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/twentynineteen.php +9 -66 13.7.216.3-a.1 View file →
@@ -5,8 +5,12 @@
5 5 *
6 6 * @package automattic/jetpack
7 7 */
8 8
9 +if ( ! defined( 'ABSPATH' ) ) {
10 + exit( 0 );
11 +}
12 +
9 13 /**
10 14 * Add Jetpack theme supports for Twenty Nineteen.
11 15 */
12 16 function twentynineteen_jetpack_setup() {
@@ -22,41 +26,8 @@
22 26 'render' => 'twentynineteen_infinite_scroll_render',
23 27 'footer' => 'page',
24 28 )
25 29 );
26 -
27 - /**
28 - * Add theme support for Responsive Videos.
29 - */
30 - add_theme_support( 'jetpack-responsive-videos' );
31 -
32 - /**
33 - * Add theme support for geo-location.
34 - */
35 - add_theme_support( 'jetpack-geo-location' );
36 -
37 - /**
38 - * Add theme support for Content Options.
39 - */
40 - add_theme_support(
41 - 'jetpack-content-options',
42 - array(
43 - 'blog-display' => array( 'content', 'excerpt' ),
44 - 'post-details' => array(
45 - 'stylesheet' => 'twentynineteen-style',
46 - 'date' => '.posted-on',
47 - 'categories' => '.cat-links',
48 - 'tags' => '.tags-links',
49 - 'author' => '.byline',
50 - 'comment' => '.comments-link',
51 - ),
52 - 'featured-images' => array(
53 - 'archive' => true,
54 - 'post' => true,
55 - 'page' => true,
56 - ),
57 - )
58 - );
59 30 }
60 31 add_action( 'after_setup_theme', 'twentynineteen_jetpack_setup' );
61 32
62 33 /**
@@ -97,37 +68,8 @@
97 68 }
98 69 add_filter( 'gallery_widget_content_width', 'twentynineteen_gallery_widget_content_width' );
99 70
100 71 /**
101 - * Alter featured-image default visibility for content-options.
102 - */
103 -function twentynineteen_override_post_thumbnail() {
104 - $options = get_theme_support( 'jetpack-content-options' );
105 - $featured_images = ( ! empty( $options[0]['featured-images'] ) ) ? $options[0]['featured-images'] : null;
106 -
107 - $settings = array(
108 - 'post-default' => ( isset( $featured_images['post-default'] ) && false === $featured_images['post-default'] ) ? '' : 1,
109 - 'page-default' => ( isset( $featured_images['page-default'] ) && false === $featured_images['page-default'] ) ? '' : 1,
110 - );
111 -
112 - $settings = array_merge(
113 - $settings,
114 - array(
115 - 'post-option' => get_option( 'jetpack_content_featured_images_post', $settings['post-default'] ),
116 - 'page-option' => get_option( 'jetpack_content_featured_images_page', $settings['page-default'] ),
117 - )
118 - );
119 -
120 - if ( ( ! $settings['post-option'] && is_single() )
121 - || ( ! $settings['page-option'] && is_singular() && is_page() ) ) {
122 - return false;
123 - } else {
124 - return ! post_password_required() && ! is_attachment() && has_post_thumbnail();
125 - }
126 -}
127 -add_filter( 'twentynineteen_can_show_post_thumbnail', 'twentynineteen_override_post_thumbnail', 10, 2 );
128 -
129 -/**
130 72 * Adds custom classes to the array of body classes.
131 73 *
132 74 * @param array $classes Classes for the body element.
133 75 * @return array
@@ -135,9 +77,9 @@
135 77 function twentynineteen_jetpack_body_classes( $classes ) {
136 78 // Adds a class if we're in the Customizer.
137 79 if ( is_customize_preview() ) :
138 80 $classes[] = 'twentynineteen-customizer';
139 - endif;
81 + endif;
140 82
141 83 return $classes;
142 84 }
143 85 add_filter( 'body_class', 'twentynineteen_jetpack_body_classes' );
@@ -216,12 +158,13 @@
216 158 <div id="infinite-handle" style="text-align: center;">
217 159 <span>
218 160 <a href="{{url}}">
219 161 <button>
220 - <?php esc_html_e( 'Older posts', 'jetpack' ); ?>
162 + <?php esc_html_e( 'Older posts', 'jetpack' ); ?>
221 163 </button>
222 164 </a>
223 165 </span>
224 166 </div>
225 - <?php
226 - return ob_get_clean();
167 + <?php
168 + return ob_get_clean();
227 169 }
170 +