From a7ec28812c5564890844e7cea81c162b63752021 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 7 Mar 2023 08:28:40 +0000 Subject: [PATCH] Bundled Themes: Improve various globals documentation, as per docblock standards. Props viralsampat, audrasjb, costdev. See #56792, #57069. git-svn-id: https://develop.svn.wordpress.org/trunk@55472 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyfourteen/functions.php | 2 ++ src/wp-content/themes/twentyseventeen/front-page.php | 2 ++ src/wp-content/themes/twentythirteen/functions.php | 5 +++++ src/wp-content/themes/twentytwenty/index.php | 3 +++ 4 files changed, 12 insertions(+) diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 91c65384ae..6c15c8ae39 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -721,6 +721,8 @@ if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow * * Enables installing Twenty Fourteen in WordPress versions before 4.0.0 when the * `is_customize_preview` function was introduced. + * + * @global WP_Customize_Manager $wp_customize Customizer object. */ if ( ! function_exists( 'is_customize_preview' ) ) : function is_customize_preview() { diff --git a/src/wp-content/themes/twentyseventeen/front-page.php b/src/wp-content/themes/twentyseventeen/front-page.php index ceeb10037c..bf490b7e40 100644 --- a/src/wp-content/themes/twentyseventeen/front-page.php +++ b/src/wp-content/themes/twentyseventeen/front-page.php @@ -38,6 +38,8 @@ get_header(); ?> * * @since Twenty Seventeen 1.0 * + * @global int|string $twentyseventeencounter Front page section counter. + * * @param int $num_sections Number of front page sections. */ $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 ); diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php index 3aad05ed6d..1d456ad48b 100644 --- a/src/wp-content/themes/twentythirteen/functions.php +++ b/src/wp-content/themes/twentythirteen/functions.php @@ -383,6 +383,9 @@ add_action( 'enqueue_block_editor_assets', 'twentythirteen_block_editor_styles' * * @since Twenty Thirteen 1.0 * + * @global int $paged WordPress archive pagination page count. + * @global int $page WordPress paginated post page count. + * * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string The filtered title. @@ -751,6 +754,8 @@ add_filter( 'body_class', 'twentythirteen_body_class' ); * Adjust content_width value for video post formats and attachment templates. * * @since Twenty Thirteen 1.0 + * + * @global int $content_width Content width. */ function twentythirteen_content_width() { global $content_width; diff --git a/src/wp-content/themes/twentytwenty/index.php b/src/wp-content/themes/twentytwenty/index.php index 2efda3596f..0c73e812e3 100644 --- a/src/wp-content/themes/twentytwenty/index.php +++ b/src/wp-content/themes/twentytwenty/index.php @@ -25,6 +25,9 @@ get_header(); $archive_subtitle = ''; if ( is_search() ) { + /** + * @global WP_Query $wp_query WordPress Query object. + */ global $wp_query; $archive_title = sprintf(