Well this is kind of fun right. Specially since must of us have not used SVN for over 10 years.
Lets do this. Our objective here is to create a common codebase for both SVN and Git.
<?php | |
namespace WordPress\Filters; | |
class PreGetPosts{ | |
public $filterPriority = 10; | |
public function __construct( $priority = 10 ){ | |
//TODO: Set your custom properties if needed | |
$this->filterPriority; |
Select post_date, count(post_date) as post_count from wp_posts | |
where post_status = 'publish' | |
and ( post_date between '2015-05-01' And '2015-05-30' ) | |
Group By DAYOFYEAR( post_date ) | |
; | |
<?php | |
/** | |
* Return the Post Thumbnail URL if $post has thumbnail | |
* $post is a WordPress Post Object | |
* @param $post | |
* @return string | |
*/ | |
private function getPostThumbnailURL( $post ){ | |
if ( has_post_thumbnail( $post->ID ) ){ |
<?php | |
// Este es un demo de la Sintaxis Curly de PHP | |
class Empleado{ | |
public $id; | |
public $nombre; | |
public $apellido; | |
public $email; |
<?php | |
function getPostByMeta( $metaKey, $metaValue, $operatos = '=' ){ | |
$args = array( | |
'showposts' => -1, | |
'meta_query' => array( | |
'relation' => 'AND', | |
array( | |
'key' => $metaKey, | |
'value' => $metaValue, |
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 |
{ | |
"name": "page-carbajal/my-awesome-package", | |
"description": "My Awesome Package", | |
"type": "Plugin", | |
"authors": [ | |
{ | |
"name": "Page Carbajal", | |
"email": "awesom@pagecarbajal.com" | |
} | |
], |
<?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; |
<?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') ){ |