Docs: Correct the placement of `@global` tags in various files.

Follow-up to [6589], [8598], [10798], [25490], [25594], [31192], [31194], [35718], [37437], [44169], [44948], [45247], [56763], [56773], [57370], [57503].

Props shailu25.
Fixes #61295.
Built from https://develop.svn.wordpress.org/trunk@58200


git-svn-id: http://core.svn.wordpress.org/trunk@57663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-05-26 20:51:13 +00:00
parent 56ce2e58de
commit eba0df8c7b
11 changed files with 35 additions and 27 deletions

View File

@ -129,11 +129,11 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
/**
* Creates the date options fields for exporting a given post type.
*
* @since 3.1.0
*
* @global wpdb $wpdb WordPress database abstraction object.
* @global WP_Locale $wp_locale WordPress date and time locale object.
*
* @since 3.1.0
*
* @param string $post_type The post type. Default 'post'.
*/
function export_date_options( $post_type = 'post' ) {

View File

@ -355,6 +355,7 @@ class WP_Locale {
*
* For backward compatibility only.
*
* @since 2.1.0
* @deprecated For backward compatibility only.
*
* @global array $weekday
@ -362,8 +363,6 @@ class WP_Locale {
* @global array $weekday_abbrev
* @global array $month
* @global array $month_abbrev
*
* @since 2.1.0
*/
public function register_globals() {
$GLOBALS['weekday'] = $this->weekday;

View File

@ -697,10 +697,10 @@ function self_link() {
* If viewing a comment feed, the time of the most recently modified
* comment will be returned.
*
* @global WP_Query $wp_query WordPress Query object.
*
* @since 5.2.0
*
* @global WP_Query $wp_query WordPress Query object.
*
* @param string $format Date format string to return the time in.
* @return string|false The time in requested format, or false on failure.
*/

View File

@ -4762,10 +4762,10 @@ function wp_is_serving_rest_request() {
* the description. Probably should create a Codex page for it, so that it is
* available.
*
* @since 2.2.0
*
* @global array $wpsmiliestrans
* @global array $wp_smiliessearch
*
* @since 2.2.0
*/
function smilies_init() {
global $wpsmiliestrans, $wp_smiliessearch;

View File

@ -11,10 +11,10 @@
/**
* Initializes $wp_scripts if it has not been set.
*
* @global WP_Scripts $wp_scripts
*
* @since 4.2.0
*
* @global WP_Scripts $wp_scripts
*
* @return WP_Scripts WP_Scripts instance.
*/
function wp_scripts() {
@ -77,10 +77,10 @@ function _wp_scripts_maybe_doing_it_wrong( $function_name, $handle = '' ) {
* hook to register/enqueue new scripts.
*
* @see WP_Scripts::do_item()
* @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
*
* @since 2.1.0
*
* @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
*
* @param string|string[]|false $handles Optional. Scripts to be printed. Default 'false'.
* @return string[] On success, an array of handles of processed WP_Dependencies items; otherwise, an empty array.
*/
@ -234,11 +234,11 @@ function wp_localize_script( $handle, $object_name, $l10n ) {
* Works only if the script has already been registered.
*
* @see WP_Scripts::set_translations()
* @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
*
* @since 5.0.0
* @since 5.1.0 The `$domain` parameter was made optional.
*
* @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
*
* @param string $handle Script handle the textdomain will be attached to.
* @param string $domain Optional. Text domain. Default 'default'.
* @param string $path Optional. The full file path to the directory containing translation files.

View File

@ -11,10 +11,10 @@
/**
* Initializes $wp_styles if it has not been set.
*
* @global WP_Styles $wp_styles
*
* @since 4.2.0
*
* @global WP_Styles $wp_styles
*
* @return WP_Styles WP_Styles instance.
*/
function wp_styles() {
@ -34,10 +34,10 @@ function wp_styles() {
* passing an array with one string prints that style,
* and passing an array of strings prints those styles.
*
* @global WP_Styles $wp_styles The WP_Styles object for printing styles.
*
* @since 2.6.0
*
* @global WP_Styles $wp_styles The WP_Styles object for printing styles.
*
* @param string|bool|array $handles Styles to be printed. Default 'false'.
* @return string[] On success, an array of handles of processed WP_Dependencies items; otherwise, an empty array.
*/

View File

@ -7936,10 +7936,10 @@ function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache
/**
* Prime the cache containing the parent ID of various post objects.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @since 6.4.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int[] $ids ID list.
*/
function _prime_post_parent_id_caches( array $ids ) {

View File

@ -14,10 +14,10 @@
* This function provides access to the WP_Script_Modules instance, creating one
* if it doesn't exist yet.
*
* @global WP_Script_Modules $wp_script_modules
*
* @since 6.5.0
*
* @global WP_Script_Modules $wp_script_modules
*
* @return WP_Script_Modules The main WP_Script_Modules instance.
*/
function wp_script_modules(): WP_Script_Modules {

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-58199';
$wp_version = '6.6-alpha-58200';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -28,27 +28,35 @@ global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_co
/**
* Stores the sidebars, since many themes can have more than one.
*
* @global array $wp_registered_sidebars The registered sidebars.
* @since 2.2.0
*
* @global array $wp_registered_sidebars The registered sidebars.
*/
$wp_registered_sidebars = array();
/**
* Stores the registered widgets.
*
* @global array $wp_registered_widgets The registered widgets.
* @since 2.2.0
*
* @global array $wp_registered_widgets The registered widgets.
*/
$wp_registered_widgets = array();
/**
* Stores the registered widget controls (options).
*
* @global array $wp_registered_widget_controls The registered widget controls.
* @since 2.2.0
*
* @global array $wp_registered_widget_controls The registered widget controls.
*/
$wp_registered_widget_controls = array();
/**
* Stores the registered widget updates.
*
* @since 2.8.0
*
* @global array $wp_registered_widget_updates The registered widget updates.
*/
$wp_registered_widget_updates = array();

View File

@ -137,8 +137,9 @@ class WP_Nav_Menu_Widget extends WP_Widget {
*
* @since 3.0.0
*
* @param array $instance Current settings.
* @global WP_Customize_Manager $wp_customize
*
* @param array $instance Current settings.
*/
public function form( $instance ) {
global $wp_customize;