twentyfourteen_mute_content_filters

Removes sharing markup from post content if we're not in the loop and it's a formatted post.

Description

twentyfourteen_mute_content_filters( (bool) $show, (WP_Post) $post ); 

Parameters (2)

0. $show (bool)
Whether to show sharing options.
1. $post (WP_Post)
The post to share.

Usage

  1. if ( !function_exists( 'twentyfourteen_mute_content_filters' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/theme-tools/compat/twentyfourteen.php'; 
  3.  
  4. // Whether to show sharing options. 
  5. $show = true; 
  6.  
  7. // The post to share. 
  8. $post = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = twentyfourteen_mute_content_filters($show, $post); 
  12.  

Defined (1)

The function is defined in the following location(s).

/modules/theme-tools/compat/twentyfourteen.php  
  1. function twentyfourteen_mute_content_filters( $show, $post ) { 
  2. $formats = get_theme_support( 'post-formats' ); 
  3. if ( ! in_the_loop() && has_post_format( $formats[0], $post ) ) { 
  4. $show = false; 
  5. return $show;