This file contains hidden or 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 | |
if( function_exists( 'jetpack_photon_url' ) ) { | |
add_filter( 'jetpack_photon_url', 'jetpack_photon_url', 10, 3 ); | |
} | |
function jeherve_display_custom( $content, $post ) { | |
global $post; | |
// If you didn't define a post thumnail, let's forget about all this | |
if ( !has_post_thumbnail( $post->ID ) ) |
This file contains hidden or 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_filter( 'jetpack_shortcodes_to_include', 'my_remove_shortcode_function' ); | |
function my_remove_shortcode_function( $shortcodes ) { | |
$jetpack_shortcodes_dir = WP_CONTENT_DIR . '/plugins/jetpack/modules/shortcodes/'; | |
$shortcodes_to_unload = array( 'ted.php', 'soundcloud.php', ); | |
foreach ( $shortcodes_to_unload as $shortcode ) { | |
if ( $key = array_search( $jetpack_shortcodes_dir . $shortcode, $shortcodes ) ) { |
This file contains hidden or 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 | |
// Check if we are on mobile | |
function jetpackme_is_mobile() { | |
// Are Jetpack Mobile functions available? | |
if ( ! function_exists( 'jetpack_is_mobile' ) ) | |
return false; | |
// Is Mobile theme showing? | |
if ( isset( $_COOKIE['akm_mobile'] ) && $_COOKIE['akm_mobile'] == 'false' ) |
This file contains hidden or 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 jeherve_custom_infinite_more() { | |
if ( is_home() || is_archive() ) { | |
?> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
infiniteScroll.settings.text = "Custom Text"; | |
//]]> | |
</script> |
This file contains hidden or 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 jeherve_check_galleries( $post ) { | |
global $post; | |
if ( false !== strpos( $post->post_content, '[gallery' ) ) | |
echo '<meta http-equiv="X-UA-Compatible" content="IE=8" />'; | |
} | |
add_action( 'wp_head', 'jeherve_check_galleries' ); |
This file contains hidden or 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 | |
//* Do NOT include the opening php tag | |
add_action( 'genesis_before_loop', 'jh_open_wrapper' ); | |
add_action( 'genesis_after_loop', 'jh_close_wrapper' ); | |
function jh_open_wrapper() { ?> | |
<div id="jh_posts"> | |
<?php } |
This file contains hidden or 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 | |
//* Do NOT include the opening php tag | |
/** Delete the default Jetpack sharing buttons */ | |
function jeherve_remove_share() { | |
if ( function_exists( 'sharing_display' ) ) | |
remove_filter( 'the_content', 'sharing_display', 19 ); | |
remove_filter( 'the_excerpt', 'sharing_display', 19 ); | |
} | |
add_action( 'init', 'jeherve_remove_share' ); |
This file contains hidden or 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
function tweakjp_rm_comments_att( $open, $post_id ) { | |
$post = get_post( $post_id ); | |
if( $post->post_type == 'attachment' ) { | |
return false; | |
} | |
return $open; | |
} | |
add_filter( 'comments_open', 'tweakjp_rm_comments_att', 10 , 2 ); |
This file contains hidden or 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 | |
/* | |
* Plugin Name: Disable Jetpack's Spinner | |
* Plugin URI: http://wordpress.org/extend/plugins/ | |
* Description: Disable Jetpack's Spinner | |
* Author: George Stephanis | |
* Version: 1.0 | |
* Author URI: http://stephanis.info/ | |
* License: GPL2+ | |
*/ |
This file contains hidden or 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 | |
/** | |
* When hooked to either the_content or the_excerpt filters, | |
* this should append the signature before the Jetpack sharing buttons | |
* are added, so long as the priority is 18 or less! | |
* (as Jetpack's sharing options go in at priority 19) | |
* | |
* @param string $content The post content as passed to the function | |
* @returns string The content with the author box appended to it. |