Disable the fields of forms. This does not touch the fields that are disabled at the moment of disabling. This script is executed like an event call.
This depends of jQuery.
<?php | |
/** | |
* get_thumb_tag | |
* | |
* @author JoseRobinson.com | |
* @link https://gist.github.com/jrobinsonc/3959a3c40138fdb701c8 | |
* @version 201506211936 | |
* @param int $post_id | |
* @param mixed $size |
function hex2rgb($hex) | |
{ | |
$hex = str_replace("#", "", $hex); | |
if(strlen($hex) === 3) | |
{ | |
$r = hexdec(substr($hex,0,1).substr($hex,0,1)); | |
$g = hexdec(substr($hex,1,1).substr($hex,1,1)); | |
$b = hexdec(substr($hex,2,1).substr($hex,2,1)); | |
} |
String.prototype.repeat = function( num ) | |
{ | |
return new Array( num + 1 ).join( this ); | |
} | |
alert( "string to repeat\n".repeat( 4 ) ); |
<?php | |
##################################################### | |
# Example to show most visited posts. | |
##################################################### | |
$custom_query = new WP_query(array( | |
'meta_key' => Posts_views::$key, | |
'orderby' => 'meta_value_num', | |
'order' => 'DESC' |
Disable the fields of forms. This does not touch the fields that are disabled at the moment of disabling. This script is executed like an event call.
This depends of jQuery.
<?php | |
/** | |
* Envio de emails. | |
* | |
* @param string $to Destinatario del email. | |
* @param string $subject Asunto. | |
* @param string $body Mensaje. | |
* @param string $alt_body (Opcional) Mensaje en texto plano. | |
* @return mixed Devuelve TRUE si todo paso bien o un String con el error si algo fallo. |
git filter-branch --commit-filter ' | |
if [ "$GIT_COMMITTER_NAME" = "<Old Name>" ]; | |
then | |
GIT_COMMITTER_NAME="<New Name>"; | |
GIT_AUTHOR_NAME="<New Name>"; | |
GIT_COMMITTER_EMAIL="<New Email>"; | |
GIT_AUTHOR_EMAIL="<New Email>"; | |
git commit-tree "$@"; | |
else | |
git commit-tree "$@"; |