This file contains hidden or 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
/** | |
* RETORNA URL DO POST_THUMBNAIL PARA BACKGROUND-IMAGE | |
* @param int: get_the_ID() | |
* @param string: thumbnail, medium, large, full | |
**/ | |
function post_thumbnail_url($post_id, $size = 'thumbnail'){ | |
$thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), $size ); | |
$url = $thumb[0]; | |
return $url; | |
} |
This file contains hidden or 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
/* | |
* apply a natural box layout model to all elements | |
* http://www.paulirish.com/2012/box-sizing-border-box-ftw/ | |
*/ | |
*, *:before, *:after { | |
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; | |
} |
This file contains hidden or 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
div { | |
overflow: auto; | |
} |
This file contains hidden or 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 | |
error_reporting(E_ERROR | E_PARSE | E_NOTICE); | |
?> |
This file contains hidden or 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 | |
//If you just see a blank page instead of an error reporting and you have no server access so you can't edit php configuration files like php.ini try this: | |
// create a new file in which you include the faulty script: | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
include("file_with_errors.php"); | |
// execute this file instead of the faulty script file |
This file contains hidden or 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
function extract_matching_string_from_array($array_of_strings, $comparison){ | |
$array = array(); | |
foreach ($array_of_strings as $string): | |
if (strstr($string, $comparison)): | |
array_push($array, $string); | |
endif; | |
endforeach; | |
return $array; | |
} |
This file contains hidden or 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
/* apply a natural box layout model to all elements */ | |
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } |
This file contains hidden or 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
function get_url_parameter(name) { | |
return decodeURI( | |
(new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[null])[1] | |
); | |
} |
This file contains hidden or 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
sudo mkdir -p /Library/Server/Mail/Data/spool | |
sudo /usr/sbin/postfix set-permissions | |
sudo /usr/sbin/postfix start |
This file contains hidden or 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
anchor(base_url().'sample/'.$object->hash,'<span class="btn btn-mini btn-info"><i class="icon-search icon-white"></i> View</span>',array('data-remote'=>base_url().'sample/'.$object->hash,'data-toggle'=>'modal','data-target'=>'#modal-sample')); | |
$('#modal-sample').on('hidden', function() { | |
$(this).removeData('modal'); | |
}); | |