Forked from David DeSandro's Pen Isotope - packery layout mode.
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" ); |
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 | |
// Adding WPML language switcher support | |
// Feel free to add more classes to the links or | |
// the List Items to have more control over the CSS | |
if ( function_exists( 'icl_get_languages' ) ) { | |
$available_languages = icl_get_languages( 'skip_missing=0' ); | |
foreach ( $available_languages as $l ) { | |
if ( ! $l['active'] ) { | |
$langs[] = '<a href="' . $l['url'] . '" class="language_switch_link">' . $l['native_name'] . '</a>'; | |
} |
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 | |
/** | |
* Test to see if save_post is firing | |
* | |
* If it works, you should see an 'iso_save_post' entry in your wp_options table | |
* | |
*/ | |
function iso_test_save_post() { | |
add_option( 'iso_save_post', 'is_saving!' ); |
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 | |
/** | |
* Colour meta box for taxonomies | |
* | |
* You know... for kids... | |
* ...and also for things like labels | |
* | |
*/ | |
class Iso_Taxonomy_Colours { |
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 | |
/*** | |
* _____ _ _ _ _ _ | |
* / ____| | (_) | | | | (_) | |
* | | ___ _ __ ___ ___ | |_ __| | __ _| |_ _ _ __ __ _ | |
* | | / _ \| '_ \/ __|/ _ \| | |/ _` |/ _` | __| | '_ \ / _` | | |
* | |___| (_) | | | \__ \ (_) | | | (_| | (_| | |_| | | | | (_| | | |
* \_____\___/|_| |_|___/\___/|_|_|\__,_|\__,_|\__|_|_| |_|\__, | | |
* / __ \ | | (_) __/ | | |
* | | | |_ __ | |_ _ ___ _ __ ___ |___/ |
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 | |
/** | |
* | |
* Easily handle a bunch of <option>s | |
* | |
*/ | |
$my_options = array( | |
// name/label => value |
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 | |
$yoastdesc = get_post_meta( get_the_ID(), '_yoast_wpseo_metadesc', true ); | |
$excerptlength = get_theme_mod( 'excerpt_length', 25 ); | |
//$excerpt = get_the_excerpt(); //moved inside condition | |
//$content = get_the_content(); //moved inside condition | |
$screenreader = '<a href="' . get_permalink() . '"><span class="screen-reader-text">' . get_the_title() . '</span>Read More …</a>'; | |
$echoed_excerpt = ''; | |
if ( ! empty( $yoastdesc ) ) { |
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
public function event_template_redirect() { | |
global $post, $wp; | |
$plugindir = dirname( __FILE__ ); | |
$return_template = ''; | |
if ( is_tax( 'iso_season' ) ) { | |
$templatefilename = 'archive-events.php'; | |
if ( file_exists( TEMPLATEPATH . '/' . $templatefilename ) ) { | |
$return_template = TEMPLATEPATH . '/' . $templatefilename; |
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 | |
* |