PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.5
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.5
16.3-a.5 16.3-a.7 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 All 506 releases
← All changes | modules/theme-tools/content-options/customizer.php +18 -1 13.8.3 → 16.3-a.5 View file →
@@ -4,16 +4,23 @@
4 4 *
5 5 * @package automattic/jetpack
6 6 */
7 7
8 +if ( ! defined( 'ABSPATH' ) ) {
9 + exit( 0 );
10 +}
11 +
8 12 if ( ! function_exists( 'jetpack_content_options_customize_register' ) ) {
9 13
10 14 /**
11 15 * Add Content section to the Theme Customizer.
12 16 *
17 + * @deprecated 13.9 Moved to Classic Theme Helper package.
18 + *
13 19 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
14 20 */
15 21 function jetpack_content_options_customize_register( $wp_customize ) {
22 + _deprecated_function( __FUNCTION__, 'jetpack-13.9' );
16 23 $options = get_theme_support( 'jetpack-content-options' );
17 24 $blog_display = ( ! empty( $options[0]['blog-display'] ) ) ? $options[0]['blog-display'] : null;
18 25 $blog_display = preg_grep( '/^(content|excerpt)$/', (array) $blog_display );
19 26 sort( $blog_display );
@@ -67,9 +74,9 @@
67 74
68 75 /**
69 76 * Render the control's content.
70 77 */
71 - public function render_content() { // phpcs:ignore MediaWiki.Usage.NestedFunctions.NestedFunction
78 + public function render_content() {
72 79 ?>
73 80 <span class="customize-control-title"><?php echo wp_kses_post( $this->label ); ?></span>
74 81 <?php
75 82 }
@@ -435,10 +442,13 @@
435 442 if ( ! function_exists( 'jetpack_post_thumbnail_supports' ) ) {
436 443
437 444 /**
438 445 * Return whether the theme supports Post Thumbnails.
446 + *
447 + * @deprecated 13.9 Moved to Classic Theme Helper package.
439 448 */
440 449 function jetpack_post_thumbnail_supports() {
450 + _deprecated_function( __FUNCTION__, 'jetpack-13.9' );
441 451 return ( current_theme_supports( 'post-thumbnails' ) );
442 452 }
443 453
444 454 }
@@ -447,12 +457,14 @@
447 457
448 458 /**
449 459 * Sanitize the checkbox.
450 460 *
461 + * @deprecated 13.9 Moved to Classic Theme Helper package.
451 462 * @param int $input The unsanitized value from the setting.
452 463 * @return boolean|string
453 464 */
454 465 function jetpack_content_options_sanitize_checkbox( $input ) {
466 + _deprecated_function( __FUNCTION__, 'jetpack-13.9' );
455 467 return ( 1 === (int) $input ) ? 1 : '';
456 468 }
457 469
458 470 }
@@ -461,12 +473,14 @@
461 473
462 474 /**
463 475 * Sanitize the Display value.
464 476 *
477 + * @deprecated 13.9 Moved to Classic Theme Helper package.
465 478 * @param string $display The unsanitized value from the setting.
466 479 * @return string
467 480 */
468 481 function jetpack_content_options_sanitize_blog_display( $display ) {
482 + _deprecated_function( __FUNCTION__, 'jetpack-13.9' );
469 483 if ( ! in_array( $display, array( 'content', 'excerpt', 'mixed' ), true ) ) {
470 484 $display = 'content';
471 485 }
472 486 return $display;
@@ -477,10 +491,13 @@
477 491 if ( ! function_exists( 'jetpack_content_options_customize_preview_js' ) ) {
478 492
479 493 /**
480 494 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
495 + *
496 + * @deprecated 13.9 Moved to Classic Theme Helper package.
481 497 */
482 498 function jetpack_content_options_customize_preview_js() {
499 + _deprecated_function( __FUNCTION__, 'jetpack-13.9' );
483 500 $options = get_theme_support( 'jetpack-content-options' );
484 501 $blog_display = ( ! empty( $options[0]['blog-display'] ) ) ? $options[0]['blog-display'] : null;
485 502 $blog_display = preg_grep( '/^(content|excerpt)$/', (array) $blog_display );
486 503 sort( $blog_display );