| @@ -5,23 +5,11 @@ | ||
| 5 | 5 | * |
| 6 | 6 | * @package automattic/jetpack |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -/** | |
| 10 | - * Add Jetpack theme supports for Twenty Sixteen. | |
| 11 | - */ | |
| 12 | -function twentysixteen_jetpack_setup() { | |
| 13 | - /** | |
| 14 | - * Add theme support for Responsive Videos. | |
| 15 | - */ | |
| 16 | - add_theme_support( 'jetpack-responsive-videos' ); | |
| 17 | - | |
| 18 | - /** | |
| 19 | - * Add theme support for geo-location. | |
| 20 | - */ | |
| 21 | - add_theme_support( 'jetpack-geo-location' ); | |
| 9 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 10 | + exit( 0 ); | |
| 22 | 11 | } |
| 23 | -add_action( 'after_setup_theme', 'twentysixteen_jetpack_setup' ); | |
| 24 | 12 | |
| 25 | 13 | /** |
| 26 | 14 | * Enqueue Jetpack compat styles for Twenty Sixteen. |
| 27 | 15 | */ |
| @@ -56,24 +44,9 @@ | ||
| 56 | 44 | function twentysixteen_remove_share() { |
| 57 | 45 | if ( is_single() || is_archive() || is_home() ) { |
| 58 | 46 | remove_filter( 'the_excerpt', 'sharing_display', 19 ); |
| 59 | 47 | if ( class_exists( 'Jetpack_Likes' ) ) { |
| 60 | - remove_filter( 'the_excerpt', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 ); | |
| 48 | + remove_filter( 'the_excerpt', array( Jetpack_Likes::init(), 'post_likes' ), 30 ); | |
| 61 | 49 | } |
| 62 | 50 | } |
| 63 | 51 | } |
| 64 | 52 | add_action( 'loop_start', 'twentysixteen_remove_share' ); |
| 65 | - | |
| 66 | -/** | |
| 67 | - * Add inline script for lazy load compat in Twenty Sixteen. | |
| 68 | - */ | |
| 69 | -function twentysixteen_jetpack_lazy_images_compat() { | |
| 70 | - // Since TwentySixteen outdents when window is resized, let's trigger a window resize | |
| 71 | - // every time we lazy load an image on the TwentySixteen theme. | |
| 72 | - wp_add_inline_script( | |
| 73 | - 'jetpack-lazy-images', | |
| 74 | - "jQuery( document.body ).on( 'jetpack-lazy-loaded-image', function () { jQuery( window ).trigger( 'resize' ); } );" | |
| 75 | - ); | |
| 76 | -} | |
| 77 | - | |
| 78 | -// Priority needs to be 11 here so that we have already enqueued jetpack-lazy-images. | |
| 79 | -add_action( 'wp_enqueue_scripts', 'twentysixteen_jetpack_lazy_images_compat', 11 ); | |