twentyfifteen-rtl.css
7 years ago
twentyfifteen.css
1 year ago
twentyfifteen.php
1 year ago
twentyfourteen-rtl.css
7 years ago
twentyfourteen.css
1 year ago
twentyfourteen.php
1 year ago
twentynineteen-rtl.css
2 years ago
twentynineteen.css
1 year ago
twentynineteen.php
1 year ago
twentysixteen-rtl.css
3 years ago
twentysixteen.css
1 year ago
twentysixteen.php
1 year ago
twentytwenty-rtl.css
2 years ago
twentytwenty.css
1 year ago
twentytwenty.php
1 year ago
twentytwentyone-rtl.css
2 years ago
twentytwentyone.css
1 year ago
twentytwentyone.php
1 year ago
twentyfourteen.php
44 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Jetpack Compatibility File |
| 4 | * See: https://jetpack.com/ |
| 5 | * |
| 6 | * @package automattic/jetpack |
| 7 | */ |
| 8 | |
| 9 | /** |
| 10 | * Removes sharing markup from post content if we're not in the loop and it's a |
| 11 | * formatted post. |
| 12 | * |
| 13 | * @param bool $show Whether to show sharing options. |
| 14 | * @param WP_Post $post The post to share. |
| 15 | * @return bool |
| 16 | */ |
| 17 | function twentyfourteen_mute_content_filters( $show, $post ) { |
| 18 | $formats = get_theme_support( 'post-formats' ); |
| 19 | if ( ! in_the_loop() && has_post_format( $formats[0], $post ) ) { |
| 20 | $show = false; |
| 21 | } |
| 22 | return $show; |
| 23 | } |
| 24 | add_filter( 'sharing_show', 'twentyfourteen_mute_content_filters', 10, 2 ); |
| 25 | |
| 26 | /** |
| 27 | * Enqueue Jetpack compat styles for Twenty Fourteen. |
| 28 | */ |
| 29 | function twentyfourteen_init_jetpack() { |
| 30 | /** |
| 31 | * Add our compat CSS file for custom widget stylings and such. |
| 32 | * Set the version equal to filemtime for development builds, and the JETPACK__VERSION for production. |
| 33 | */ |
| 34 | if ( ! is_admin() ) { |
| 35 | $version = false; |
| 36 | if ( method_exists( 'Jetpack', 'is_development_version' ) ) { |
| 37 | $version = Jetpack::is_development_version() ? filemtime( plugin_dir_path( __FILE__ ) . 'twentyfourteen.css' ) : JETPACK__VERSION; |
| 38 | } |
| 39 | wp_enqueue_style( 'twentyfourteen-jetpack', plugins_url( 'twentyfourteen.css', __FILE__ ), array(), $version ); |
| 40 | wp_style_add_data( 'twentyfourteen-jetpack', 'rtl', 'replace' ); |
| 41 | } |
| 42 | } |
| 43 | add_action( 'init', 'twentyfourteen_init_jetpack' ); |
| 44 |