function recipe_hero_output_jetpack_sharing_buttons() { if (function_exists('sharing_display')) { sharing_display('', true); } if (class_exists('Jetpack_Likes')) { $custom_likes = new Jetpack_Likes(); echo $custom_likes->post_likes(''); } }
function init() { if (wallow_is_mobile()) { return; } //Infinite Scroll add_theme_support('infinite-scroll', array('type' => 'click', 'container' => 'content', 'render' => array($this, 'infinite_scroll_render'), 'wrapper' => false)); if (class_exists('The_Neverending_Home_Page')) { add_filter('infinite_scroll_results', array($this, 'infinite_scroll_encode'), 11, 1); } //Sharedaddy if (function_exists('sharing_display')) { remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); remove_action('wallow_hook_entry_before', 'wallow_I_like_it'); add_action('wallow_hook_entry_bottom', array($this, 'sharedaddy')); } //Carousel if (class_exists('Jetpack_Carousel')) { remove_filter('post_gallery', 'wallow_gallery_shortcode', 10, 2); add_filter('wallow_option_wallow_thickbox', '__return_false'); } //Likes if (class_exists('Jetpack_Likes')) { add_action('wallow_hook_entry_bottom', array($this, 'likes')); remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); add_filter('wallow_filter_likes', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } }
function init() { if (fastfood_is_mobile()) { return; } //Infinite Scroll if (Jetpack::is_module_active('infinite-scroll')) { //nop } //Sharedaddy if (Jetpack::is_module_active('sharedaddy')) { remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); add_action('fastfood_hook_entry_bottom', array($this, 'sharedaddy')); } //Carousel if (Jetpack::is_module_active('carousel')) { //nop } //Likes if (Jetpack::is_module_active('likes')) { add_action('fastfood_hook_entry_bottom', array($this, 'likes')); remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); add_filter('fastfood_filter_likes', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } }
function aaron_move_share() { remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); if (class_exists('Jetpack_Likes')) { remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } }
/** * Remove ratings from excerpts that are used as intro on blog index, single, and archive pages. */ function twentysixteen_remove_share() { if (is_single() || is_archive() || is_home()) { remove_filter('the_excerpt', 'sharing_display', 19); if (class_exists('Jetpack_Likes')) { remove_filter('the_excerpt', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } } }
function jptweak_remove_share() { if (is_le_page() || defined('OP_LIVEEDITOR')) { remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); if (class_exists('Jetpack_Likes')) { remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } } }
function listable_jetpack_remove_share_from_listings() { if (is_post_type_archive('job_listing') || get_query_var('post_type') == 'job_listing') { remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); if (class_exists('Jetpack_Likes')) { remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } } }
function jptweak_remove_share() { if (has_action('sharing_display')) { remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); } if (class_exists('Jetpack_Likes')) { remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } }
public function loop_start() { if (!is_singular('job_listing')) { return; } remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); if (class_exists('Jetpack_Likes')) { remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } }
/** * Prints HTML with meta information for the categories, tags and comments. */ function aaron_portfolio_footer() { if (get_theme_mod('aaron_hide_meta') == "") { echo '<footer class="entry-footer">'; global $post; echo '<a href="' . esc_url(home_url('/portfolio/')) . '"><b>' . __('Portfolio', 'aaron') . '</b></a><br/><br/>'; //the_terms( $id, $taxonomy, $before, $sep, $after ); echo the_terms($post->ID, 'jetpack-portfolio-type', '<span class="jetpack-portfolio-type">' . __('Project Type: ', 'aaron'), ', ', '</span>'); echo the_terms($post->ID, 'jetpack-portfolio-tag', '<span class="tags-links">' . __('Project Tags: ', 'aaron'), ', ', '</span>'); /* translators: % is the post title */ edit_post_link(sprintf(__('Edit %s', 'aaron'), get_the_title()), '<span class="edit-link"><i aria-hidden="true"></i>', '</span>'); /* Display jetpack's share if it's active*/ if (function_exists('sharing_display')) { echo sharing_display(); } /* Display jetpack's like if it's active */ if (class_exists('Jetpack_Likes')) { $aaron_custom_likes = new Jetpack_Likes(); echo $aaron_custom_likes->post_likes(''); } echo '</footer><!-- .entry-footer -->'; } }
function test_remove_likes_from_filtered_content() { // initial sync sets the screen to 'sync', then `is_admin` returns `true` set_current_screen('front'); // force likes to be appended to the_content add_filter('wpl_is_likes_visible', '__return_true'); require_once JETPACK__PLUGIN_DIR . 'modules/likes.php'; $jpl = Jetpack_Likes::init(); $jpl->action_init(); $this->post->post_content = 'The new post content'; wp_update_post($this->post); $this->assertContains('div class=\'sharedaddy', apply_filters('the_content', $this->post->post_content)); $this->sender->do_sync(); $synced_post = $this->server_replica_storage->get_post($this->post->ID); $this->assertEquals('<p>' . $synced_post->post_content . "</p>\n", $synced_post->post_content_filtered); }
/** * Remove the sharing from below the content on single accommodation. */ public static function remove_jetpack_sharing() { remove_filter('the_excerpt', 'sharing_display', 19); if (class_exists('Jetpack_Likes')) { remove_filter('the_excerpt', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } remove_filter('the_content', 'sharing_display', 19); if (class_exists('Jetpack_Likes')) { remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } }
function ms_share_display() { if (function_exists('sharing_display')) { sharing_display('', true); } if (class_exists('Jetpack_Likes')) { $custom_likes = new Jetpack_Likes(); echo $custom_likes->post_likes(''); } }
function white_div_end() { if (function_exists('sharing_display')) { echo sharing_display(); } else { $this->fallback_sharing(); } if (class_exists('Jetpack_Likes') && is_callable(array('Jetpack_Likes', 'init'))) { $likes = Jetpack_Likes::init(); echo $likes->post_likes(''); } ?> </div><!-- .white_box --> <?php }
/** * Are likes enabled for this post? * * @param int $post_id * @retun bool */ function is_post_likeable($post_id = 0) { $post = get_post($post_id); if (!$post || is_wp_error($post)) { return false; } $sitewide_likes_enabled = (bool) Jetpack_Likes::is_enabled_sitewide(); $post_likes_switched = (bool) get_post_meta($post->ID, 'switch_like_status', true); $post_likes_enabled = $sitewide_likes_enabled; if ($post_likes_switched) { $post_likes_enabled = !$post_likes_enabled; } return $post_likes_enabled; }
the_ID(); ?> " <?php post_class(); ?> > <p>content.php - <?php echo get_post_type(); ?> </p> <?php if (function_exists('sharing_display')) { sharing_display('', true); } if (class_exists('Jetpack_Likes')) { $custom_likes = new Jetpack_Likes(); echo $custom_likes->post_likes(''); } ?> <header class="entry-header"> <?php if (is_single()) { the_title('<h1 class="entry-title">', '</h1>'); } else { the_title('<h2 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h2>'); } if ('post' === get_post_type()) { ?> <div class="entry-meta"> <?php pacificano_posted_on();
/** * Remove the sharing from below the content on single portfolio pages. * * @package lsx * @subpackage jetpack * @category portfolio */ function lsx_portfolio_remove_share() { if (is_single() && 'jetpack-portfolio' == get_post_type() || is_page_template('page-templates/template-portfolio.php')) { remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); if (class_exists('Jetpack_Likes')) { remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } } }