UPDATE wp_posts AS posts,
(SELECT post_id, meta_value FROM wp_postmeta
WHERE meta_key = 'wpcf-p-desc') AS meta
SET posts.post_content = meta.meta_value
WHERE posts.ID = meta.post_id
AND posts.post_content = ''
;
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
// Force jQuery Injection | |
(function($d){ | |
if( 'undefined' === typeof jQuery ){ | |
var head = document.getElementsByTagName("head")[0]; | |
var customScript = document.createElement("script"); | |
customScript.src = scriptSource; | |
customScript.onload = function(){ | |
if( jQuery ){ | |
/******** Start writing you jQuery 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 | |
add_action('template_redirect','justIfContentHas'); | |
function justIfContentHas() | |
{ | |
global $post; | |
// Set the condition for loading your resources | |
if( has_shortcode($post->post_content, 'my_short_code') ){ |
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 | |
// Late Static Binding in PHP are great. | |
// However they are not supported in every version of PHP | |
// Use the code below in a new 3val.org window to test support | |
// for Late Static Bindings inside closures. | |
abstract class Demo | |
{ | |
protected $item; |
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
{ | |
"name": "page-carbajal/my-awesome-package", | |
"description": "My Awesome Package", | |
"type": "Plugin", | |
"authors": [ | |
{ | |
"name": "Page Carbajal", | |
"email": "[email protected]" | |
} | |
], |
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
xdebug.remote_enable=1 | |
xdebug.profiler_enable=1 | |
xdebug.profiler_output_name = xdebug.profiler.%H.%t | |
xdebug.profiler_enable_trigger=1 | |
xdebug.profiler_output_dir=/set/a/path |
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 | |
function getPostByMeta( $metaKey, $metaValue, $operatos = '=' ){ | |
$args = array( | |
'showposts' => -1, | |
'meta_query' => array( | |
'relation' => 'AND', | |
array( | |
'key' => $metaKey, | |
'value' => $metaValue, |
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 | |
// Este es un demo de la Sintaxis Curly de PHP | |
class Empleado{ | |
public $id; | |
public $nombre; | |
public $apellido; | |
public $email; |
NewerOlder