From 30e0cf9fcdf6f52a7bb02e7b07db498a0da40e2d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 1 Jul 2020 13:52:01 +0000 Subject: [PATCH] Docs: Bundled Themes: Correct DocBlock placement for custom header and background argument filters. See #49572. Built from https://develop.svn.wordpress.org/trunk@48264 git-svn-id: http://core.svn.wordpress.org/trunk@48033 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyfifteen/functions.php | 24 ++++----- .../twentyfifteen/inc/custom-header.php | 30 +++++------ .../themes/twentyfourteen/functions.php | 11 ++++ .../twentyfourteen/inc/custom-header.php | 36 ++++++------- .../twentyseventeen/inc/custom-header.php | 34 ++++++------ .../themes/twentysixteen/inc/customizer.php | 54 +++++++++---------- .../template-parts/entry-header.php | 14 ++--- wp-includes/version.php | 2 +- 8 files changed, 108 insertions(+), 97 deletions(-) diff --git a/wp-content/themes/twentyfifteen/functions.php b/wp-content/themes/twentyfifteen/functions.php index 7535caf850..bbd1dbd9fb 100644 --- a/wp-content/themes/twentyfifteen/functions.php +++ b/wp-content/themes/twentyfifteen/functions.php @@ -144,20 +144,20 @@ if ( ! function_exists( 'twentyfifteen_setup' ) ) : // Setup the WordPress core custom background feature. - /** - * Filter Twenty Fifteen custom-header support arguments. - * - * @since Twenty Fifteen 1.0 - * - * @param array $args { - * An array of custom-header support arguments. - * - * @type string $default-color Default color of the header. - * @type string $default-attachment Default attachment of the header. - * } - */ add_theme_support( 'custom-background', + /** + * Filter Twenty Fifteen custom-background support arguments. + * + * @since Twenty Fifteen 1.0 + * + * @param array $args { + * An array of custom-background support arguments. + * + * @type string $default-color Default color of the background. + * @type string $default-attachment Default attachment of the background. + * } + */ apply_filters( 'twentyfifteen_custom_background_args', array( diff --git a/wp-content/themes/twentyfifteen/inc/custom-header.php b/wp-content/themes/twentyfifteen/inc/custom-header.php index 5b634f31fc..260a6082ec 100644 --- a/wp-content/themes/twentyfifteen/inc/custom-header.php +++ b/wp-content/themes/twentyfifteen/inc/custom-header.php @@ -16,23 +16,23 @@ function twentyfifteen_custom_header_setup() { $color_scheme = twentyfifteen_get_color_scheme(); $default_text_color = trim( $color_scheme[4], '#' ); - /** - * Filter Twenty Fifteen custom-header support arguments. - * - * @since Twenty Fifteen 1.0 - * - * @param array $args { - * An array of custom-header support arguments. - * - * @type string $default_text_color Default color of the header text. - * @type int $width Width in pixels of the custom header image. Default 954. - * @type int $height Height in pixels of the custom header image. Default 1300. - * @type string $wp-head-callback Callback function used to styles the header image and text - * displayed on the blog. - * } - */ add_theme_support( 'custom-header', + /** + * Filter Twenty Fifteen custom-header support arguments. + * + * @since Twenty Fifteen 1.0 + * + * @param array $args { + * An array of custom-header support arguments. + * + * @type string $default_text_color Default color of the header text. + * @type int $width Width in pixels of the custom header image. Default 954. + * @type int $height Height in pixels of the custom header image. Default 1300. + * @type string $wp-head-callback Callback function used to styles the header image and text + * displayed on the blog. + * } + */ apply_filters( 'twentyfifteen_custom_header_args', array( diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php index d0a139ebda..197fab0ab9 100644 --- a/wp-content/themes/twentyfourteen/functions.php +++ b/wp-content/themes/twentyfourteen/functions.php @@ -169,6 +169,17 @@ if ( ! function_exists( 'twentyfourteen_setup' ) ) : // This theme allows users to set a custom background. add_theme_support( 'custom-background', + /** + * Filter Twenty Fourteen custom-background support arguments. + * + * @since Twenty Fourteen 1.0 + * + * @param array $args { + * An array of custom-background support arguments. + * + * @type string $default-color Default color of the background. + * } + */ apply_filters( 'twentyfourteen_custom_background_args', array( diff --git a/wp-content/themes/twentyfourteen/inc/custom-header.php b/wp-content/themes/twentyfourteen/inc/custom-header.php index 49ee8ac278..3d782b910f 100644 --- a/wp-content/themes/twentyfourteen/inc/custom-header.php +++ b/wp-content/themes/twentyfourteen/inc/custom-header.php @@ -17,26 +17,26 @@ * @uses twentyfourteen_admin_header_image() */ function twentyfourteen_custom_header_setup() { - /** - * Filter Twenty Fourteen custom-header support arguments. - * - * @since Twenty Fourteen 1.0 - * - * @param array $args { - * An array of custom-header support arguments. - * - * @type bool $header_text Whether to display custom header text. Default false. - * @type int $width Width in pixels of the custom header image. Default 1260. - * @type int $height Height in pixels of the custom header image. Default 240. - * @type bool $flex_height Whether to allow flexible-height header images. Default true. - * @type string $admin_head_callback Callback function used to style the image displayed in - * the Appearance > Header screen. - * @type string $admin_preview_callback Callback function used to create the custom header markup in - * the Appearance > Header screen. - * } - */ add_theme_support( 'custom-header', + /** + * Filter Twenty Fourteen custom-header support arguments. + * + * @since Twenty Fourteen 1.0 + * + * @param array $args { + * An array of custom-header support arguments. + * + * @type bool $header_text Whether to display custom header text. Default false. + * @type int $width Width in pixels of the custom header image. Default 1260. + * @type int $height Height in pixels of the custom header image. Default 240. + * @type bool $flex_height Whether to allow flexible-height header images. Default true. + * @type string $admin_head_callback Callback function used to style the image displayed in + * the Appearance > Header screen. + * @type string $admin_preview_callback Callback function used to create the custom header markup in + * the Appearance > Header screen. + * } + */ apply_filters( 'twentyfourteen_custom_header_args', array( diff --git a/wp-content/themes/twentyseventeen/inc/custom-header.php b/wp-content/themes/twentyseventeen/inc/custom-header.php index cb2d77c9a4..2e25a98f65 100644 --- a/wp-content/themes/twentyseventeen/inc/custom-header.php +++ b/wp-content/themes/twentyseventeen/inc/custom-header.php @@ -16,25 +16,25 @@ */ function twentyseventeen_custom_header_setup() { - /** - * Filter Twenty Seventeen custom-header support arguments. - * - * @since Twenty Seventeen 1.0 - * - * @param array $args { - * An array of custom-header support arguments. - * - * @type string $default-image Default image of the header. - * @type int $width Width in pixels of the custom header image. Default 954. - * @type int $height Height in pixels of the custom header image. Default 1300. - * @type string $flex-height Flex support for height of header. - * @type string $video Video support for header. - * @type string $wp-head-callback Callback function used to styles the header image and text - * displayed on the blog. - * } - */ add_theme_support( 'custom-header', + /** + * Filter Twenty Seventeen custom-header support arguments. + * + * @since Twenty Seventeen 1.0 + * + * @param array $args { + * An array of custom-header support arguments. + * + * @type string $default-image Default image of the header. + * @type int $width Width in pixels of the custom header image. Default 954. + * @type int $height Height in pixels of the custom header image. Default 1300. + * @type string $flex-height Flex support for height of header. + * @type string $video Video support for header. + * @type string $wp-head-callback Callback function used to styles the header image and text + * displayed on the blog. + * } + */ apply_filters( 'twentyseventeen_custom_header_args', array( diff --git a/wp-content/themes/twentysixteen/inc/customizer.php b/wp-content/themes/twentysixteen/inc/customizer.php index 6201f299d5..d249991a71 100644 --- a/wp-content/themes/twentysixteen/inc/customizer.php +++ b/wp-content/themes/twentysixteen/inc/customizer.php @@ -19,19 +19,19 @@ function twentysixteen_custom_header_and_background() { $default_background_color = trim( $color_scheme[0], '#' ); $default_text_color = trim( $color_scheme[3], '#' ); - /** - * Filter the arguments used when adding 'custom-background' support in Twenty Sixteen. - * - * @since Twenty Sixteen 1.0 - * - * @param array $args { - * An array of custom-background support arguments. - * - * @type string $default-color Default color of the background. - * } - */ add_theme_support( 'custom-background', + /** + * Filter the arguments used when adding 'custom-background' support in Twenty Sixteen. + * + * @since Twenty Sixteen 1.0 + * + * @param array $args { + * An array of custom-background support arguments. + * + * @type string $default-color Default color of the background. + * } + */ apply_filters( 'twentysixteen_custom_background_args', array( @@ -40,24 +40,24 @@ function twentysixteen_custom_header_and_background() { ) ); - /** - * Filter the arguments used when adding 'custom-header' support in Twenty Sixteen. - * - * @since Twenty Sixteen 1.0 - * - * @param array $args { - * An array of custom-header support arguments. - * - * @type string $default-text-color Default color of the header text. - * @type int $width Width in pixels of the custom header image. Default 1200. - * @type int $height Height in pixels of the custom header image. Default 280. - * @type bool $flex-height Whether to allow flexible-height header images. Default true. - * @type callable $wp-head-callback Callback function used to style the header image and text - * displayed on the blog. - * } - */ add_theme_support( 'custom-header', + /** + * Filter the arguments used when adding 'custom-header' support in Twenty Sixteen. + * + * @since Twenty Sixteen 1.0 + * + * @param array $args { + * An array of custom-header support arguments. + * + * @type string $default-text-color Default color of the header text. + * @type int $width Width in pixels of the custom header image. Default 1200. + * @type int $height Height in pixels of the custom header image. Default 280. + * @type bool $flex-height Whether to allow flexible-height header images. Default true. + * @type callable $wp-head-callback Callback function used to style the header image and text + * displayed on the blog. + * } + */ apply_filters( 'twentysixteen_custom_header_args', array( diff --git a/wp-content/themes/twentytwenty/template-parts/entry-header.php b/wp-content/themes/twentytwenty/template-parts/entry-header.php index b5b6909fdb..224be7d463 100644 --- a/wp-content/themes/twentytwenty/template-parts/entry-header.php +++ b/wp-content/themes/twentytwenty/template-parts/entry-header.php @@ -20,13 +20,13 @@ if ( is_singular() ) {