From 45c8adcbc4ef420e910df5a0addcbe77c5aa0e87 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" Date: Sun, 21 Jan 2024 03:12:00 -0600 Subject: [PATCH 01/27] 2010 functions.php - `$wp_version` for `twentyten_setup()`, `gallery_style` backward compatibility filter - `$comment` for `twentyten_comment()` - matches "comment arguments" in `twentyeleven_comment()` --- src/wp-content/themes/twentyten/functions.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyten/functions.php b/src/wp-content/themes/twentyten/functions.php index c2baec76eff4d..8bd9fd1ea9e09 100644 --- a/src/wp-content/themes/twentyten/functions.php +++ b/src/wp-content/themes/twentyten/functions.php @@ -72,6 +72,8 @@ * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Twenty Ten 1.0 + * + * @global string $wp_version WordPress version. */ function twentyten_setup() { @@ -434,7 +436,12 @@ function twentyten_custom_excerpt_more( $output ) { function twentyten_remove_gallery_css( $css ) { return preg_replace( "##s", '', $css ); } -// Backward compatibility with WordPress 3.0. + +/** + * Backward compatibility with WordPress 3.0. + * + * @global string $wp_version WordPress version. + */ if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) { add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); } @@ -450,8 +457,10 @@ function twentyten_remove_gallery_css( $css ) { * * @since Twenty Ten 1.0 * + * @global WP_Comment $comment Global comment object. + * * @param WP_Comment $comment The comment object. - * @param array $args An array of arguments. @see get_comment_reply_link() + * @param array $args An array of comment arguments. @see get_comment_reply_link() * @param int $depth The depth of the comment. */ function twentyten_comment( $comment, $args, $depth ) { From b765a7e92e9b865092fc0b9f2e7d2ca050f60492 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" Date: Sun, 21 Jan 2024 03:13:38 -0600 Subject: [PATCH 02/27] 2010 header.php Adds notation for `$page` and `$paged` in multi-line comment (not docblock) before `wp_title()` --- src/wp-content/themes/twentyten/header.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-content/themes/twentyten/header.php b/src/wp-content/themes/twentyten/header.php index 7d77bcfd2edb2..4aac926f5002a 100644 --- a/src/wp-content/themes/twentyten/header.php +++ b/src/wp-content/themes/twentyten/header.php @@ -16,6 +16,9 @@ tag based on what is being viewed. + * + * @global int $page WordPress paginated post page count. + * @global int $paged WordPress archive pagination page count. */ global $page, $paged; From b0dd7a6f10fe715fde40c65b396ee1dcfc1e696c Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" Date: Sun, 21 Jan 2024 03:15:45 -0600 Subject: [PATCH 03/27] 2011 functions.php - `$wp_version` for `twentyeleven_setup()` - `$wp_query` for `twentyeleven_content_nav()` - `$comment` for `twentyeleven_comment()` --- src/wp-content/themes/twentyeleven/functions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-content/themes/twentyeleven/functions.php b/src/wp-content/themes/twentyeleven/functions.php index 3ca5da5882f27..6b7061cb380ff 100644 --- a/src/wp-content/themes/twentyeleven/functions.php +++ b/src/wp-content/themes/twentyeleven/functions.php @@ -70,6 +70,8 @@ * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Twenty Eleven 1.0 + * + * @global string $wp_version WordPress version. */ function twentyeleven_setup() { @@ -637,6 +639,8 @@ function twentyeleven_widgets_init() { * * @since Twenty Eleven 1.0 * + * @global WP_Query $wp_query WordPress Query object. + * * @param string $html_id The HTML id attribute. */ function twentyeleven_content_nav( $html_id ) { @@ -741,6 +745,8 @@ function twentyeleven_footer_sidebar_class() { * * @since Twenty Eleven 1.0 * + * @global WP_Comment $comment Global comment object. + * * @param WP_Comment $comment The comment object. * @param array $args An array of comment arguments. @see get_comment_reply_link() * @param int $depth The depth of the comment. From f1e000529237b09db5417d46aaa87de1d1bb28ff Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" Date: Sun, 21 Jan 2024 03:17:34 -0600 Subject: [PATCH 04/27] 2011 header.php Adds notes for `$page` and `$paged` in multi-line comment (not docblock) before `wp_title()` --- src/wp-content/themes/twentyeleven/header.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentyeleven/header.php b/src/wp-content/themes/twentyeleven/header.php index 29d4cc0708cfd..fdf8727c9a72f 100644 --- a/src/wp-content/themes/twentyeleven/header.php +++ b/src/wp-content/themes/twentyeleven/header.php @@ -26,7 +26,12 @@ <?php - // Print the <title> tag based on what is being viewed. + /* + * Print the <title> tag based on what is being viewed. + * + * @global int $page WordPress paginated post page count. + * @global int $paged WordPress archive pagination page count. + */ global $page, $paged; wp_title( '|', true, 'right' ); From df0980b08073271da672e6b05c9fd876e582eec6 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:18:53 -0600 Subject: [PATCH 05/27] 2011 content-featured.php Adds docblock-style notation for `$feature_class` --- src/wp-content/themes/twentyeleven/content-featured.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-content/themes/twentyeleven/content-featured.php b/src/wp-content/themes/twentyeleven/content-featured.php index b49f680454902..8ee0401fe6898 100644 --- a/src/wp-content/themes/twentyeleven/content-featured.php +++ b/src/wp-content/themes/twentyeleven/content-featured.php @@ -7,6 +7,9 @@ * @since Twenty Eleven 1.0 */ +/** + * @global string $feature_class Classes for post container of featured posts. + */ global $feature_class; ?> <article id="post-<?php the_ID(); ?>" <?php post_class( $feature_class ); ?>> From 0f278e18b01b1843bfa966632bce88371e3ddac4 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:19:48 -0600 Subject: [PATCH 06/27] 2011 showcase.php Adds note about `$more` in a multi-line comment --- src/wp-content/themes/twentyeleven/showcase.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentyeleven/showcase.php b/src/wp-content/themes/twentyeleven/showcase.php index a46fed329cd69..138bd180af83a 100644 --- a/src/wp-content/themes/twentyeleven/showcase.php +++ b/src/wp-content/themes/twentyeleven/showcase.php @@ -208,7 +208,11 @@ if ( $recent->have_posts() ) : $recent->the_post(); - // Set $more to 0 in order to only get the first part of the post. + /* + * Set $more to 0 in order to only get the first part of the post. + * + * @global int $more + */ global $more; $more = 0; From 6d342d309432be04f9c22f427bab026da7956f78 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:26:44 -0600 Subject: [PATCH 07/27] 2012 functions.php Additions to docblocks: - `$wp_version` for `twentytwelve_setup()` and `twentytwelve_resource_hints()` - `$wp_styles` for `twentytwelve_scripts_styles()` - `$paged` and `$page` for `twentytwelve_wp_title()` - `$wp_query` for `twentytwelve_content_nav( )` - `$comment` for `twentytwelve_comment()` plus parameter information from Twenty Eleven - `$content_width` for `twentytwelve_content_width()` --- .../themes/twentytwelve/functions.php | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 1c4499955094a..9545370262328 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -43,6 +43,8 @@ * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Twenty Twelve 1.0 + * + * @global string $wp_version WordPress version. */ function twentytwelve_setup() { /* @@ -175,6 +177,8 @@ function twentytwelve_get_font_url() { * Enqueue scripts and styles for front end. * * @since Twenty Twelve 1.0 + * + * @global WP_Styles $wp_styles The WP_Styles object for printing styles. */ function twentytwelve_scripts_styles() { global $wp_styles; @@ -237,6 +241,8 @@ function twentytwelve_block_editor_styles() { * @since Twenty Twelve 2.2 * @deprecated Twenty Twelve 3.9 Disabled filter because, by default, fonts are self-hosted. * + * @global string $wp_version WordPress version. + * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. * @return array URLs to print for resource hints. @@ -294,6 +300,9 @@ function twentytwelve_mce_css( $mce_css ) { * * @since Twenty Twelve 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 Filtered title. @@ -404,6 +413,8 @@ function wp_get_list_item_separator() { * Displays navigation to next/previous pages when applicable. * * @since Twenty Twelve 1.0 + * + * @global WP_Query $wp_query WordPress Query object. */ function twentytwelve_content_nav( $html_id ) { global $wp_query; @@ -430,7 +441,12 @@ function twentytwelve_content_nav( $html_id ) { * * @since Twenty Twelve 1.0 * - * @global WP_Post $post Global post object. + * @global WP_Comment $comment Global comment object. + * @global WP_Post $post Global post object. + * + * @param WP_Comment $comment The comment object. + * @param array $args An array of comment arguments. @see get_comment_reply_link() + * @param int $depth The depth of the comment. */ function twentytwelve_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; @@ -623,6 +639,8 @@ function twentytwelve_body_class( $classes ) { * templates, and when there are no active widgets in the sidebar. * * @since Twenty Twelve 1.0 + * + * @global int $content_width Content width. */ function twentytwelve_content_width() { if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) { From 9be551cfec49a7bfe77f7ee1fbebf3c2a5cd3773 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:29:58 -0600 Subject: [PATCH 08/27] 2013 functions.php Additions to docblocks: - `$wp_version` for `back-compat.php`, `twentythirteen_setup()`, and `twentythirteen_resource_hints()` - `$wp_query` for `twentythirteen_paging_nav()` --- src/wp-content/themes/twentythirteen/functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php index 3e0c3a957f576..f20feda631472 100644 --- a/src/wp-content/themes/twentythirteen/functions.php +++ b/src/wp-content/themes/twentythirteen/functions.php @@ -40,6 +40,8 @@ /** * Twenty Thirteen only works in WordPress 3.6 or later. + * + * @global string $wp_version WordPress version. */ if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; @@ -66,6 +68,8 @@ * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Twenty Thirteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentythirteen_setup() { /* @@ -357,6 +361,8 @@ function twentythirteen_scripts_styles() { * @since Twenty Thirteen 2.1 * @deprecated Twenty Thirteen 3.8 Disabled filter because, by default, fonts are self-hosted. * + * @global string $wp_version WordPress version. + * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. * @return array URLs to print for resource hints. @@ -483,6 +489,8 @@ function wp_get_list_item_separator() { * Display navigation to next/previous set of posts when applicable. * * @since Twenty Thirteen 1.0 + * + * @global WP_Query $wp_query WordPress Query object. */ function twentythirteen_paging_nav() { global $wp_query; From 4b266964b416bc24b1733863bc9617c28a56164a Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:31:41 -0600 Subject: [PATCH 09/27] 2013 back-compat.php Adds global notation for `$wp_version` in `twentythirteen_upgrade_notice()`, `twentythirteen_customize()`, and `twentythirteen_preview()` --- src/wp-content/themes/twentythirteen/inc/back-compat.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-content/themes/twentythirteen/inc/back-compat.php b/src/wp-content/themes/twentythirteen/inc/back-compat.php index 2f30c1c7133e8..8df3922bb0118 100644 --- a/src/wp-content/themes/twentythirteen/inc/back-compat.php +++ b/src/wp-content/themes/twentythirteen/inc/back-compat.php @@ -32,6 +32,8 @@ function twentythirteen_switch_theme() { * Twenty Thirteen on WordPress versions prior to 3.6. * * @since Twenty Thirteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentythirteen_upgrade_notice() { printf( @@ -48,6 +50,8 @@ function twentythirteen_upgrade_notice() { * Prevent the Customizer from being loaded on WordPress versions prior to 3.6. * * @since Twenty Thirteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentythirteen_customize() { wp_die( @@ -68,6 +72,8 @@ function twentythirteen_customize() { * Prevent the Theme Preview from being loaded on WordPress versions prior to 3.4. * * @since Twenty Thirteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentythirteen_preview() { if ( isset( $_GET['preview'] ) ) { From cbd5ef88e200bef3e496f066c56e3c1b86c90fe4 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:38:25 -0600 Subject: [PATCH 10/27] 2014 functions.php - `$wp_version` for `back-compat.php`, `twentyfourteen_setup()`, `twentyfourteen_resource_hints()`, `twentyfourteen_list_authors()` - `$content_width` for `twentyfourteen_content_width()` - `$pagenow` for `twentyfourteen_body_classes()` and `featured-content.php` --- src/wp-content/themes/twentyfourteen/functions.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index f6db24f3c1a81..3424797d80d4a 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -38,6 +38,8 @@ /** * Twenty Fourteen only works in WordPress 3.6 or later. + * + * @global string $wp_version WordPress version. */ if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; @@ -54,6 +56,8 @@ * as indicating support post thumbnails. * * @since Twenty Fourteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentyfourteen_setup() { @@ -226,6 +230,8 @@ function twentyfourteen_setup() { * Adjust content_width value for image attachment template. * * @since Twenty Fourteen 1.0 + * + * @global int $content_width Content width. */ function twentyfourteen_content_width() { if ( is_attachment() && wp_attachment_is_image() ) { @@ -417,6 +423,8 @@ function twentyfourteen_admin_fonts() { * @since Twenty Fourteen 1.9 * @deprecated Twenty Fourteen 3.6 Disabled filter because, by default, fonts are self-hosted. * + * @global string $wp_version WordPress version. + * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. * @return array URLs to print for resource hints. @@ -524,6 +532,8 @@ function twentyfourteen_the_attached_image() { * Print a list of all site contributors who published at least one post. * * @since Twenty Fourteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentyfourteen_list_authors() { $args = array( @@ -596,6 +606,8 @@ function twentyfourteen_list_authors() { * * @since Twenty Fourteen 1.0 * + * @global string $pagenow The filename of the current screen. + * * @param array $classes A list of existing body class values. * @return array The filtered body class list. */ @@ -736,6 +748,8 @@ function twentyfourteen_widget_tag_cloud_args( $args ) { * * To overwrite in a plugin, define your own Featured_Content class on or * before the 'setup_theme' hook. + * + * @global string $pagenow The filename of the current screen. */ if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow'] ) { require get_template_directory() . '/inc/featured-content.php'; From 2add9e4ac6ddd492ff0807edcfc717ae4fb0170a Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:39:31 -0600 Subject: [PATCH 11/27] 2014 back-compat.php Adds global notation for `$wp_version` in `twentyfourteen_upgrade_notice()`, `twentyfourteen_customize()`, and `twentyfourteen_preview()` --- src/wp-content/themes/twentyfourteen/inc/back-compat.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-content/themes/twentyfourteen/inc/back-compat.php b/src/wp-content/themes/twentyfourteen/inc/back-compat.php index a0e0b118d63b1..0428f7334fe78 100644 --- a/src/wp-content/themes/twentyfourteen/inc/back-compat.php +++ b/src/wp-content/themes/twentyfourteen/inc/back-compat.php @@ -32,6 +32,8 @@ function twentyfourteen_switch_theme() { * Twenty Fourteen on WordPress versions prior to 3.6. * * @since Twenty Fourteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentyfourteen_upgrade_notice() { printf( @@ -48,6 +50,8 @@ function twentyfourteen_upgrade_notice() { * Prevent the Customizer from being loaded on WordPress versions prior to 3.6. * * @since Twenty Fourteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentyfourteen_customize() { wp_die( @@ -68,6 +72,8 @@ function twentyfourteen_customize() { * Prevent the Theme Preview from being loaded on WordPress versions prior to 3.4. * * @since Twenty Fourteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentyfourteen_preview() { if ( isset( $_GET['preview'] ) ) { From 20a6e3b9e3d22b266455d8c0962d7048d626fc09 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:40:58 -0600 Subject: [PATCH 12/27] 2014 customizer.php Adds global notation for `$typenow` in `twentyfourteen_contextual_help()` --- src/wp-content/themes/twentyfourteen/inc/customizer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-content/themes/twentyfourteen/inc/customizer.php b/src/wp-content/themes/twentyfourteen/inc/customizer.php index eda5778c90ed6..df73f1e3b10db 100644 --- a/src/wp-content/themes/twentyfourteen/inc/customizer.php +++ b/src/wp-content/themes/twentyfourteen/inc/customizer.php @@ -150,6 +150,8 @@ function twentyfourteen_customize_preview_js() { * Add contextual help to the Themes and Post edit screens. * * @since Twenty Fourteen 1.0 + * + * @global string $typenow The post type of the current screen. */ function twentyfourteen_contextual_help() { if ( 'admin_head-edit.php' === current_filter() && 'post' !== $GLOBALS['typenow'] ) { From e2c8a32b52dca9394ac64c2d6565b34cf7469c50 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:41:46 -0600 Subject: [PATCH 13/27] 2014 widgets.php Adds global notation for `$content_width` and `$more` in `widget()` --- src/wp-content/themes/twentyfourteen/inc/widgets.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-content/themes/twentyfourteen/inc/widgets.php b/src/wp-content/themes/twentyfourteen/inc/widgets.php index 48844a3730a7c..ba45dbd5d3a09 100644 --- a/src/wp-content/themes/twentyfourteen/inc/widgets.php +++ b/src/wp-content/themes/twentyfourteen/inc/widgets.php @@ -67,6 +67,9 @@ public function enqueue_scripts() { * * @since Twenty Fourteen 1.0 * + * @global int $content_width Content width. + * @global int $more + * * @param array $args An array of standard parameters for widgets in this theme. * @param array $instance An array of settings for this widget instance. */ From 94989f080c4b49df43dc1f65a4189831b9a2d518 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:44:53 -0600 Subject: [PATCH 14/27] 2015 functions.php Adds notations of global variable `$wp_version` for `back-compat.php`, `twentyfifteen_setup()`, and `twentyfifteen_resource_hints()` --- src/wp-content/themes/twentyfifteen/functions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-content/themes/twentyfifteen/functions.php b/src/wp-content/themes/twentyfifteen/functions.php index 0a1b3a2e6df03..263e26f9eacee 100644 --- a/src/wp-content/themes/twentyfifteen/functions.php +++ b/src/wp-content/themes/twentyfifteen/functions.php @@ -36,6 +36,8 @@ /** * Twenty Fifteen only works in WordPress 4.1 or later. + * + * @global string $wp_version WordPress version. */ if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; @@ -50,6 +52,8 @@ * as indicating support for post thumbnails. * * @since Twenty Fifteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentyfifteen_setup() { @@ -498,6 +502,8 @@ function twentyfifteen_block_editor_styles() { * @since Twenty Fifteen 1.7 * @deprecated Twenty Fifteen 3.4 Disabled filter because, by default, fonts are self-hosted. * + * @global string $wp_version WordPress version. + * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. * @return array URLs to print for resource hints. From 9f777c623d6457544bb428bcf2e7551906dc4427 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:45:58 -0600 Subject: [PATCH 15/27] 2015 back-compat.php Adds global notation for `$wp_version` in `twentyfifteen_upgrade_notice()`, `twentyfifteen_customize()`, and `twentyfifteen_preview()` --- src/wp-content/themes/twentyfifteen/inc/back-compat.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-content/themes/twentyfifteen/inc/back-compat.php b/src/wp-content/themes/twentyfifteen/inc/back-compat.php index 6b871f5e0edfc..281709acc5e59 100644 --- a/src/wp-content/themes/twentyfifteen/inc/back-compat.php +++ b/src/wp-content/themes/twentyfifteen/inc/back-compat.php @@ -32,6 +32,8 @@ function twentyfifteen_switch_theme() { * Twenty Fifteen on WordPress versions prior to 4.1. * * @since Twenty Fifteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentyfifteen_upgrade_notice() { printf( @@ -48,6 +50,8 @@ function twentyfifteen_upgrade_notice() { * Prevent the Customizer from being loaded on WordPress versions prior to 4.1. * * @since Twenty Fifteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentyfifteen_customize() { wp_die( @@ -68,6 +72,8 @@ function twentyfifteen_customize() { * Prevent the Theme Preview from being loaded on WordPress versions prior to 4.1. * * @since Twenty Fifteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentyfifteen_preview() { if ( isset( $_GET['preview'] ) ) { From 5c3d4a4aaf43a16c03371168d6a9e80c4d039916 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:48:56 -0600 Subject: [PATCH 16/27] 2016 functions.php - Adds notation of global variable `$wp_version` for `back-compat.php` and `twentysixteen_setup()` - Adds description to `$content_width` for `twentysixteen_content_width()` --- src/wp-content/themes/twentysixteen/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php index a305628e0f61e..04061279d5553 100644 --- a/src/wp-content/themes/twentysixteen/functions.php +++ b/src/wp-content/themes/twentysixteen/functions.php @@ -27,6 +27,8 @@ /** * Twenty Sixteen only works in WordPress 4.4 or later. + * + * @global string $wp_version WordPress version. */ if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; @@ -43,6 +45,8 @@ * Create your own twentysixteen_setup() function to override in a child theme. * * @since Twenty Sixteen 1.0 + * + * @global string $wp_version WordPress version. */ function twentysixteen_setup() { /* @@ -241,7 +245,7 @@ function twentysixteen_setup() { * * Priority 0 to make it available to lower priority callbacks. * - * @global int $content_width + * @global int $content_width Content width. * * @since Twenty Sixteen 1.0 */ From 6b74b32d38bc82fd1ad87f1d01ab864ff4ac9ea3 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:53:54 -0600 Subject: [PATCH 17/27] 2017 functions.php - Adds notation of global variable `$wp_version` for `back-compat.php` - Adds `since` and notation of global variable `$content_width` for `twentyseventeen_setup()` - Adds description to `$content_width` for `twentyseventeen_content_width()` --- src/wp-content/themes/twentyseventeen/functions.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index df9d3b381d2c2..82811fca749c7 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -11,6 +11,8 @@ /** * Twenty Seventeen only works in WordPress 4.7 or later. + * + * @global string $wp_version WordPress version. */ if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; @@ -23,6 +25,10 @@ * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. + * + * @since Twenty Seventeen 1.0 + * + * @global int $content_width Content width. */ function twentyseventeen_setup() { @@ -248,7 +254,7 @@ function twentyseventeen_setup() { * * Priority 0 to make it available to lower priority callbacks. * - * @global int $content_width + * @global int $content_width Content width. */ function twentyseventeen_content_width() { From f6892bf4b3856ebd8f17cd731050bfb035511e84 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:56:39 -0600 Subject: [PATCH 18/27] 2017 content-front-page-panels.php Adds docblock-style note for `$twentyseventeencounter` --- .../template-parts/page/content-front-page-panels.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php b/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php index 923c11f6132a1..5c6959b262158 100644 --- a/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php +++ b/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php @@ -8,6 +8,9 @@ * @version 1.0 */ +/** + * @global int|string $twentyseventeencounter Front page section counter. + */ global $twentyseventeencounter; ?> From 2d877d81e5c16d091b1ad3b7d135d82a4b598e4a Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 03:57:29 -0600 Subject: [PATCH 19/27] 2019 functions.php Adds notation of global variable `$wp_version` for `back-compat.php` --- src/wp-content/themes/twentynineteen/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-content/themes/twentynineteen/functions.php b/src/wp-content/themes/twentynineteen/functions.php index de93b40f77678..9de2bac0cf80c 100644 --- a/src/wp-content/themes/twentynineteen/functions.php +++ b/src/wp-content/themes/twentynineteen/functions.php @@ -11,6 +11,8 @@ /** * Twenty Nineteen only works in WordPress 4.7 or later. + * + * @global string $wp_version WordPress version. */ if ( version_compare( $GLOBALS['wp_version'], '4.7', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; From cecad66ab79b7896fb8712b15370cc7cc132e913 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 04:00:50 -0600 Subject: [PATCH 20/27] 2020 functions.php - Adds notation of global variables `$content_width` and `$wp_version` for `twentytwenty_theme_support()` - Adds docblock-style notation for global variable `$wp_version` when determining how to enqueue block styles --- src/wp-content/themes/twentytwenty/functions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-content/themes/twentytwenty/functions.php b/src/wp-content/themes/twentytwenty/functions.php index 2ce8fffb77bac..e4288ce6d65ec 100644 --- a/src/wp-content/themes/twentytwenty/functions.php +++ b/src/wp-content/themes/twentytwenty/functions.php @@ -32,6 +32,9 @@ * as indicating support for post thumbnails. * * @since Twenty Twenty 1.0 + * + * @global int $content_width Content width. + * @global string $wp_version WordPress version. */ function twentytwenty_theme_support() { @@ -445,6 +448,9 @@ function twentytwenty_block_editor_styles() { } } +/** + * @global string $wp_version WordPress version. + */ if ( is_admin() && version_compare( $GLOBALS['wp_version'], '6.3', '>=' ) ) { add_action( 'enqueue_block_assets', 'twentytwenty_block_editor_styles', 1, 1 ); } else { From 80fb633ee4354e41281cb484dc0b71f5e6ee8349 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 04:03:52 -0600 Subject: [PATCH 21/27] 2021 functions.php - Changes single-line comment to docblock-style for `back-compat.php` so it documents `$wp_version` - Adds notation about `$is_IE` for `twenty_twenty_one_setup()` and capitalizes Internet Explorer --- src/wp-content/themes/twentytwentyone/functions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentytwentyone/functions.php b/src/wp-content/themes/twentytwentyone/functions.php index f163e394df734..7d5e5e8997d57 100644 --- a/src/wp-content/themes/twentytwentyone/functions.php +++ b/src/wp-content/themes/twentytwentyone/functions.php @@ -9,7 +9,11 @@ * @since Twenty Twenty-One 1.0 */ -// This theme requires WordPress 5.3 or later. +/** + * This theme requires WordPress 5.3 or later. + * + * @global string $wp_version WordPress version. + */ if ( version_compare( $GLOBALS['wp_version'], '5.3', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; } @@ -24,6 +28,8 @@ * * @since Twenty Twenty-One 1.0 * + * @global bool $is_IE + * * @return void */ function twenty_twenty_one_setup() { @@ -126,7 +132,7 @@ function twenty_twenty_one_setup() { $editor_stylesheet_path = './assets/css/style-editor.css'; // Note, the is_IE global variable is defined by WordPress and is used - // to detect if the current browser is internet explorer. + // to detect if the current browser is Internet Explorer. global $is_IE; if ( $is_IE ) { $editor_stylesheet_path = './assets/css/ie-editor.css'; From da9e9f726936e9b3e11847ce25fc07b890549328 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Sun, 21 Jan 2024 23:46:45 -0600 Subject: [PATCH 22/27] 2016: move `since` before `$content_width` global --- src/wp-content/themes/twentysixteen/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php index 04061279d5553..a69f0ac8960c2 100644 --- a/src/wp-content/themes/twentysixteen/functions.php +++ b/src/wp-content/themes/twentysixteen/functions.php @@ -245,9 +245,9 @@ function twentysixteen_setup() { * * Priority 0 to make it available to lower priority callbacks. * - * @global int $content_width Content width. - * * @since Twenty Sixteen 1.0 + * + * @global int $content_width Content width. */ function twentysixteen_content_width() { $GLOBALS['content_width'] = apply_filters( 'twentysixteen_content_width', 840 ); From 8b245b5d378a292195a04eff33d6429232e5b372 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Mon, 22 Jan 2024 00:13:02 -0600 Subject: [PATCH 23/27] 2021: remove space at end of line --- src/wp-content/themes/twentytwentyone/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentytwentyone/functions.php b/src/wp-content/themes/twentytwentyone/functions.php index 7d5e5e8997d57..8c75ef4fbf2c3 100644 --- a/src/wp-content/themes/twentytwentyone/functions.php +++ b/src/wp-content/themes/twentytwentyone/functions.php @@ -11,7 +11,7 @@ /** * This theme requires WordPress 5.3 or later. - * + * * @global string $wp_version WordPress version. */ if ( version_compare( $GLOBALS['wp_version'], '5.3', '<' ) ) { From 1c6e7ee6007f7dfc36b2ef628d920b676a2cf31c Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Mon, 22 Jan 2024 00:19:31 -0600 Subject: [PATCH 24/27] 2021: remove space at end of another line --- src/wp-content/themes/twentytwentyone/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentytwentyone/functions.php b/src/wp-content/themes/twentytwentyone/functions.php index 8c75ef4fbf2c3..56d73f3ed161c 100644 --- a/src/wp-content/themes/twentytwentyone/functions.php +++ b/src/wp-content/themes/twentytwentyone/functions.php @@ -13,7 +13,7 @@ * This theme requires WordPress 5.3 or later. * * @global string $wp_version WordPress version. - */ + */ if ( version_compare( $GLOBALS['wp_version'], '5.3', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; } From a9a4206c6ab303e6a9bf5fdff0647101b28670c5 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Thu, 21 Mar 2024 11:54:01 -0500 Subject: [PATCH 25/27] Use "The WordPress version string" for `$wp_version` description --- src/wp-content/themes/twentyeleven/functions.php | 2 +- src/wp-content/themes/twentyfifteen/functions.php | 6 +++--- src/wp-content/themes/twentyfifteen/inc/back-compat.php | 6 +++--- src/wp-content/themes/twentyfourteen/functions.php | 8 ++++---- src/wp-content/themes/twentyfourteen/inc/back-compat.php | 6 +++--- src/wp-content/themes/twentynineteen/functions.php | 2 +- src/wp-content/themes/twentynineteen/inc/back-compat.php | 6 +++--- src/wp-content/themes/twentyseventeen/functions.php | 2 +- src/wp-content/themes/twentyseventeen/inc/back-compat.php | 6 +++--- src/wp-content/themes/twentysixteen/functions.php | 4 ++-- src/wp-content/themes/twentysixteen/inc/back-compat.php | 6 +++--- src/wp-content/themes/twentyten/functions.php | 4 ++-- src/wp-content/themes/twentythirteen/functions.php | 6 +++--- src/wp-content/themes/twentythirteen/inc/back-compat.php | 6 +++--- src/wp-content/themes/twentytwelve/functions.php | 4 ++-- src/wp-content/themes/twentytwenty/functions.php | 4 ++-- src/wp-content/themes/twentytwentyone/functions.php | 2 +- src/wp-content/themes/twentytwentyone/inc/back-compat.php | 6 +++--- 18 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/wp-content/themes/twentyeleven/functions.php b/src/wp-content/themes/twentyeleven/functions.php index 6b7061cb380ff..15b5a74f29941 100644 --- a/src/wp-content/themes/twentyeleven/functions.php +++ b/src/wp-content/themes/twentyeleven/functions.php @@ -71,7 +71,7 @@ * * @since Twenty Eleven 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyeleven_setup() { diff --git a/src/wp-content/themes/twentyfifteen/functions.php b/src/wp-content/themes/twentyfifteen/functions.php index 263e26f9eacee..2fbfc1771263c 100644 --- a/src/wp-content/themes/twentyfifteen/functions.php +++ b/src/wp-content/themes/twentyfifteen/functions.php @@ -37,7 +37,7 @@ /** * Twenty Fifteen only works in WordPress 4.1 or later. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; @@ -53,7 +53,7 @@ * * @since Twenty Fifteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyfifteen_setup() { @@ -502,7 +502,7 @@ function twentyfifteen_block_editor_styles() { * @since Twenty Fifteen 1.7 * @deprecated Twenty Fifteen 3.4 Disabled filter because, by default, fonts are self-hosted. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. diff --git a/src/wp-content/themes/twentyfifteen/inc/back-compat.php b/src/wp-content/themes/twentyfifteen/inc/back-compat.php index 281709acc5e59..4577c08fce162 100644 --- a/src/wp-content/themes/twentyfifteen/inc/back-compat.php +++ b/src/wp-content/themes/twentyfifteen/inc/back-compat.php @@ -33,7 +33,7 @@ function twentyfifteen_switch_theme() { * * @since Twenty Fifteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyfifteen_upgrade_notice() { printf( @@ -51,7 +51,7 @@ function twentyfifteen_upgrade_notice() { * * @since Twenty Fifteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyfifteen_customize() { wp_die( @@ -73,7 +73,7 @@ function twentyfifteen_customize() { * * @since Twenty Fifteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyfifteen_preview() { if ( isset( $_GET['preview'] ) ) { diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 3424797d80d4a..f58b7bafbc2d0 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -39,7 +39,7 @@ /** * Twenty Fourteen only works in WordPress 3.6 or later. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; @@ -57,7 +57,7 @@ * * @since Twenty Fourteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyfourteen_setup() { @@ -423,7 +423,7 @@ function twentyfourteen_admin_fonts() { * @since Twenty Fourteen 1.9 * @deprecated Twenty Fourteen 3.6 Disabled filter because, by default, fonts are self-hosted. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. @@ -533,7 +533,7 @@ function twentyfourteen_the_attached_image() { * * @since Twenty Fourteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyfourteen_list_authors() { $args = array( diff --git a/src/wp-content/themes/twentyfourteen/inc/back-compat.php b/src/wp-content/themes/twentyfourteen/inc/back-compat.php index 0428f7334fe78..36fe3a66012ad 100644 --- a/src/wp-content/themes/twentyfourteen/inc/back-compat.php +++ b/src/wp-content/themes/twentyfourteen/inc/back-compat.php @@ -33,7 +33,7 @@ function twentyfourteen_switch_theme() { * * @since Twenty Fourteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyfourteen_upgrade_notice() { printf( @@ -51,7 +51,7 @@ function twentyfourteen_upgrade_notice() { * * @since Twenty Fourteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyfourteen_customize() { wp_die( @@ -73,7 +73,7 @@ function twentyfourteen_customize() { * * @since Twenty Fourteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyfourteen_preview() { if ( isset( $_GET['preview'] ) ) { diff --git a/src/wp-content/themes/twentynineteen/functions.php b/src/wp-content/themes/twentynineteen/functions.php index 9de2bac0cf80c..ba5c54c347ab1 100644 --- a/src/wp-content/themes/twentynineteen/functions.php +++ b/src/wp-content/themes/twentynineteen/functions.php @@ -12,7 +12,7 @@ /** * Twenty Nineteen only works in WordPress 4.7 or later. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ if ( version_compare( $GLOBALS['wp_version'], '4.7', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; diff --git a/src/wp-content/themes/twentynineteen/inc/back-compat.php b/src/wp-content/themes/twentynineteen/inc/back-compat.php index b7734600872a0..9f7df4fa01dc1 100644 --- a/src/wp-content/themes/twentynineteen/inc/back-compat.php +++ b/src/wp-content/themes/twentynineteen/inc/back-compat.php @@ -33,7 +33,7 @@ function twentynineteen_switch_theme() { * * @since Twenty Nineteen 1.0.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentynineteen_upgrade_notice() { printf( @@ -51,7 +51,7 @@ function twentynineteen_upgrade_notice() { * * @since Twenty Nineteen 1.0.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentynineteen_customize() { wp_die( @@ -73,7 +73,7 @@ function twentynineteen_customize() { * * @since Twenty Nineteen 1.0.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentynineteen_preview() { if ( isset( $_GET['preview'] ) ) { diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index 82811fca749c7..ee26ec3d595f6 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -12,7 +12,7 @@ /** * Twenty Seventeen only works in WordPress 4.7 or later. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; diff --git a/src/wp-content/themes/twentyseventeen/inc/back-compat.php b/src/wp-content/themes/twentyseventeen/inc/back-compat.php index a2c9a325c2046..d080a8144c480 100644 --- a/src/wp-content/themes/twentyseventeen/inc/back-compat.php +++ b/src/wp-content/themes/twentyseventeen/inc/back-compat.php @@ -33,7 +33,7 @@ function twentyseventeen_switch_theme() { * * @since Twenty Seventeen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyseventeen_upgrade_notice() { printf( @@ -51,7 +51,7 @@ function twentyseventeen_upgrade_notice() { * * @since Twenty Seventeen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyseventeen_customize() { wp_die( @@ -73,7 +73,7 @@ function twentyseventeen_customize() { * * @since Twenty Seventeen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyseventeen_preview() { if ( isset( $_GET['preview'] ) ) { diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php index a69f0ac8960c2..89b7360bf9ba8 100644 --- a/src/wp-content/themes/twentysixteen/functions.php +++ b/src/wp-content/themes/twentysixteen/functions.php @@ -28,7 +28,7 @@ /** * Twenty Sixteen only works in WordPress 4.4 or later. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; @@ -46,7 +46,7 @@ * * @since Twenty Sixteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentysixteen_setup() { /* diff --git a/src/wp-content/themes/twentysixteen/inc/back-compat.php b/src/wp-content/themes/twentysixteen/inc/back-compat.php index bf1a8d0889680..3968bcc6e534c 100644 --- a/src/wp-content/themes/twentysixteen/inc/back-compat.php +++ b/src/wp-content/themes/twentysixteen/inc/back-compat.php @@ -35,7 +35,7 @@ function twentysixteen_switch_theme() { * * @since Twenty Sixteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentysixteen_upgrade_notice() { printf( @@ -53,7 +53,7 @@ function twentysixteen_upgrade_notice() { * * @since Twenty Sixteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentysixteen_customize() { wp_die( @@ -75,7 +75,7 @@ function twentysixteen_customize() { * * @since Twenty Sixteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentysixteen_preview() { if ( isset( $_GET['preview'] ) ) { diff --git a/src/wp-content/themes/twentyten/functions.php b/src/wp-content/themes/twentyten/functions.php index 8bd9fd1ea9e09..859679d398112 100644 --- a/src/wp-content/themes/twentyten/functions.php +++ b/src/wp-content/themes/twentyten/functions.php @@ -73,7 +73,7 @@ * * @since Twenty Ten 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentyten_setup() { @@ -440,7 +440,7 @@ function twentyten_remove_gallery_css( $css ) { /** * Backward compatibility with WordPress 3.0. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) { add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php index f20feda631472..0ed65c411e899 100644 --- a/src/wp-content/themes/twentythirteen/functions.php +++ b/src/wp-content/themes/twentythirteen/functions.php @@ -41,7 +41,7 @@ /** * Twenty Thirteen only works in WordPress 3.6 or later. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; @@ -69,7 +69,7 @@ * * @since Twenty Thirteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentythirteen_setup() { /* @@ -361,7 +361,7 @@ function twentythirteen_scripts_styles() { * @since Twenty Thirteen 2.1 * @deprecated Twenty Thirteen 3.8 Disabled filter because, by default, fonts are self-hosted. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. diff --git a/src/wp-content/themes/twentythirteen/inc/back-compat.php b/src/wp-content/themes/twentythirteen/inc/back-compat.php index 8df3922bb0118..8a88170b274c8 100644 --- a/src/wp-content/themes/twentythirteen/inc/back-compat.php +++ b/src/wp-content/themes/twentythirteen/inc/back-compat.php @@ -33,7 +33,7 @@ function twentythirteen_switch_theme() { * * @since Twenty Thirteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentythirteen_upgrade_notice() { printf( @@ -51,7 +51,7 @@ function twentythirteen_upgrade_notice() { * * @since Twenty Thirteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentythirteen_customize() { wp_die( @@ -73,7 +73,7 @@ function twentythirteen_customize() { * * @since Twenty Thirteen 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentythirteen_preview() { if ( isset( $_GET['preview'] ) ) { diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 9545370262328..864b43ae85c4f 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -44,7 +44,7 @@ * * @since Twenty Twelve 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentytwelve_setup() { /* @@ -241,7 +241,7 @@ function twentytwelve_block_editor_styles() { * @since Twenty Twelve 2.2 * @deprecated Twenty Twelve 3.9 Disabled filter because, by default, fonts are self-hosted. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. diff --git a/src/wp-content/themes/twentytwenty/functions.php b/src/wp-content/themes/twentytwenty/functions.php index e4288ce6d65ec..0b3aaad7d29b2 100644 --- a/src/wp-content/themes/twentytwenty/functions.php +++ b/src/wp-content/themes/twentytwenty/functions.php @@ -34,7 +34,7 @@ * @since Twenty Twenty 1.0 * * @global int $content_width Content width. - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ function twentytwenty_theme_support() { @@ -449,7 +449,7 @@ function twentytwenty_block_editor_styles() { } /** - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ if ( is_admin() && version_compare( $GLOBALS['wp_version'], '6.3', '>=' ) ) { add_action( 'enqueue_block_assets', 'twentytwenty_block_editor_styles', 1, 1 ); diff --git a/src/wp-content/themes/twentytwentyone/functions.php b/src/wp-content/themes/twentytwentyone/functions.php index 56d73f3ed161c..52af5911d61c1 100644 --- a/src/wp-content/themes/twentytwentyone/functions.php +++ b/src/wp-content/themes/twentytwentyone/functions.php @@ -12,7 +12,7 @@ /** * This theme requires WordPress 5.3 or later. * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. */ if ( version_compare( $GLOBALS['wp_version'], '5.3', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; diff --git a/src/wp-content/themes/twentytwentyone/inc/back-compat.php b/src/wp-content/themes/twentytwentyone/inc/back-compat.php index ccf6351780667..7e7a4b5cf6fbc 100644 --- a/src/wp-content/themes/twentytwentyone/inc/back-compat.php +++ b/src/wp-content/themes/twentytwentyone/inc/back-compat.php @@ -31,7 +31,7 @@ function twenty_twenty_one_switch_theme() { * * @since Twenty Twenty-One 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. * * @return void */ @@ -50,7 +50,7 @@ function twenty_twenty_one_upgrade_notice() { * * @since Twenty Twenty-One 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. * * @return void */ @@ -74,7 +74,7 @@ function twenty_twenty_one_customize() { * * @since Twenty Twenty-One 1.0 * - * @global string $wp_version WordPress version. + * @global string $wp_version The WordPress version string. * * @return void */ From c7124bad24ea6ce5adb3155bfecedd4676328536 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Wed, 4 Feb 2026 17:55:37 -0600 Subject: [PATCH 26/27] Move `$page` and `$paged` earlier in T11 `header.php` --- src/wp-content/themes/twentyeleven/header.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-content/themes/twentyeleven/header.php b/src/wp-content/themes/twentyeleven/header.php index 970f7aacad31a..cceae47cb4b68 100644 --- a/src/wp-content/themes/twentyeleven/header.php +++ b/src/wp-content/themes/twentyeleven/header.php @@ -8,6 +8,13 @@ * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ + +/** + * @global int $page WordPress paginated post page count. + * @global int $paged WordPress archive pagination page count. + */ +global $page, $paged; + ?><!DOCTYPE html> <html <?php language_attributes(); ?>> <head> @@ -15,14 +22,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title> <?php - /* - * Print the <title> tag based on what is being viewed. - * - * @global int $page WordPress paginated post page count. - * @global int $paged WordPress archive pagination page count. - */ - global $page, $paged; - + // Print the <title> tag based on what is being viewed. wp_title( '|', true, 'right' ); // Add the site name. From 84911f3b498390e0705eb16ca8ebe7ce9ca4fe4d Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" <sabernhardt@yahoo.com> Date: Wed, 4 Feb 2026 17:59:14 -0600 Subject: [PATCH 27/27] Move `$page` and `$paged` earlier in T10 `header.php` --- src/wp-content/themes/twentyten/header.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-content/themes/twentyten/header.php b/src/wp-content/themes/twentyten/header.php index d0aa1e2f4e543..b3dd3d7379501 100644 --- a/src/wp-content/themes/twentyten/header.php +++ b/src/wp-content/themes/twentyten/header.php @@ -8,20 +8,20 @@ * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ + +/** + * @global int $page WordPress paginated post page count. + * @global int $paged WordPress archive pagination page count. + */ +global $page, $paged; + ?><!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <title> <?php - /* - * Print the <title> tag based on what is being viewed. - * - * @global int $page WordPress paginated post page count. - * @global int $paged WordPress archive pagination page count. - */ - global $page, $paged; - + // Print the <title> tag based on what is being viewed. wp_title( '|', true, 'right' ); // Add the site name.