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 | |
/** | |
* Skeletal sample shortcode | |
*/ | |
add_shortcode( 'pilau-sample', 'pilau_sample_shortcode' ); | |
function pilau_sample_shortcode( $atts ) { | |
extract( shortcode_atts( array( | |
'text' => '' | |
), $atts ) ); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
// based on https://gist.github.com/lucasstark/dbba39215b862b446f0e | |
//this is very rough, but it works. | |
//add this to your functions file and navigate to your site http://yoururl.com/?dump-acf=1 then look in your footer area. | |
add_action( 'wp_footer', 'after_the_fact_documentation' ); | |
function after_the_fact_documentation() { | |
if ( isset( $_GET['dump-acf'] ) ) { | |
$groups = acf_get_field_groups(); | |
$object_types = array(); |
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 | |
/** | |
* Force resizes and caches images without needing to add_image_size() and bloat the /upoads/ dir | |
* | |
* Most code is completely based on Konstantin Kovshenin's image-shortcode.php | |
* https://gist.github.com/kovshenin/1984363 | |
* | |
* Expects the params similar to wp_get_attachment_image_src() | |
* http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src | |
* |
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 | |
/** | |
* Includes a few useful predicates in the bootstrapped `infiniteScroll` JS object | |
* that is served along with the rest of the document upon initial page request. | |
*/ | |
add_filter( 'infinite_scroll_js_settings', 'pla_extra_js_settings' ); | |
function pla_extra_js_settings( $js_settings ) { | |
$js_settings['text'] = __( "Plus de contenus", "pla" ); |