PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 All 504 releases
← All changes | modules/theme-tools/compat/twentysixteen.php +3 -30 12.0.3 → 16.3-a.1 View file →
@@ -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 );