This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
wp_reset_query(); | |
$wp_query = new WP_Query(); | |
$query = $wp_query->query("post_type=sms-categories"); | |
while ($wp_query->have_posts()) | |
{ | |
$wp_query->the_post(); | |
?> | |
//put your code here | |
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$logotipo = get_post_meta($post->ID,'logotipo',true); | |
if($logotipo > 0 AND $logotipo != ''){ | |
$logotipo = wp_get_attachment_image_src( $logotipo ); | |
if(is_array($logotipo) AND count($logotipo) > 0){ | |
$logotipo = array_shift($logotipo); | |
}else{ | |
$logotipo = ''; | |
} | |
}else{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'wp-load.php'; | |
$folder = $_GET['folder']; | |
$results = $wpdb->get_results( "SELECT option_id,option_name,option_value FROM wp_options WHERE option_name = 'home' OR option_name = 'siteurl'"); | |
$rows = count($results); | |
if($rows > 0 AND is_array($results)){ | |
$host = $_SERVER['HTTP_HOST']; | |
$site_url = $results[0]->option_value; | |
$home = $results[1]->option_value; | |
if( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include '../../../../wp-load.php'; | |
global $wpdb; | |
$table_name = "wp_posts"; | |
if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name) { | |
//Your code here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Referencia do arquivo | |
$arquivo = $_GET["arquivo"]; | |
//get file ... | |
$path = /*path file here*/ | |
if(isset($path) && file_exists($path)){ | |
// verifica se a extensão do arquivo é permitida para baixar | |
switch(strtolower(substr(strrchr(basename($path),"."),1))){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class image{ | |
public function createthumb_estadio($id, $name, $new_w, $new_h) { | |
$border=false; $transparency=true; $base64=false; | |
$name_ = $name; | |
$name = "images/estadios/{$id}/{$name}"; | |
$newname = "images/estadios/$id/".$new_w."_".$new_h.$name_; | |
if(file_exists($newname)){ | |
switch (exif_imagetype($newname)) { | |
case IMAGETYPE_PNG: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_options SET option_value = replace(option_value, 'http://homologa.info/sesc-bienal', 'http://localhost/bienal-danca') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://homologa.info/sesc-bienal','http://localhost/bienal-danca'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://homologa.info/sesc-bienal', 'http://localhost/bienal-danca'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://homologa.info/sesc-bienal', 'http://localhost/bienal-danca'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.vertical(@startColor: #555, @endColor: #333) { | |
background-color: mix(@startColor, @endColor, 60%); | |
background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ | |
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ | |
background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ | |
background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 | |
background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 | |
background-repeat: repeat-x; | |
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = "http://localhost/project/temp/folder/file.mp4"; | |
var array = path.split('/'); // split / | |
var ultimo = array.pop(); // get last index | |
var basename = ultimo.split('.'); // splt . | |
var extension = basename.pop(); // get last index | |
alert(extension); | |
// OR | |
var path ="http://localhost/project/temp/folder/file.mp4"; |
OlderNewer