Make WordPress Core

Changeset 57320


Ignore:
Timestamp:
01/20/2024 04:06:31 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct the placement of @global tags in wp-settings.php.

Props shailu25, mukesh27.
Fixes #60146.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r57287 r57320  
    5454 * configuration. In multisite, it will be overridden by default in ms-settings.php.
    5555 *
     56 * @since 2.0.0
     57 *
    5658 * @global int $blog_id
    57  * @since 2.0.0
    5859 */
    5960global $blog_id;
     
    117118
    118119/**
     120 * @since 0.71
     121 *
    119122 * @global wpdb $wpdb WordPress database abstraction object.
    120  * @since 0.71
    121123 */
    122124global $wpdb;
     
    525527 * WordPress Query object
    526528 *
     529 * @since 2.0.0
     530 *
    527531 * @global WP_Query $wp_the_query WordPress Query object.
    528  * @since 2.0.0
    529532 */
    530533$GLOBALS['wp_the_query'] = new WP_Query();
     
    534537 * Use this global for WordPress queries
    535538 *
     539 * @since 1.5.0
     540 *
    536541 * @global WP_Query $wp_query WordPress Query object.
     542 */
     543$GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
     544
     545/**
     546 * Holds the WordPress Rewrite object for creating pretty URLs
     547 *
    537548 * @since 1.5.0
    538  */
    539 $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
    540 
    541 /**
    542  * Holds the WordPress Rewrite object for creating pretty URLs
    543549 *
    544550 * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
    545  * @since 1.5.0
    546551 */
    547552$GLOBALS['wp_rewrite'] = new WP_Rewrite();
     
    550555 * WordPress Object
    551556 *
     557 * @since 2.0.0
     558 *
    552559 * @global WP $wp Current WordPress environment instance.
     560 */
     561$GLOBALS['wp'] = new WP();
     562
     563/**
     564 * WordPress Widget Factory Object
     565 *
     566 * @since 2.8.0
     567 *
     568 * @global WP_Widget_Factory $wp_widget_factory
     569 */
     570$GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
     571
     572/**
     573 * WordPress User Roles
     574 *
    553575 * @since 2.0.0
    554  */
    555 $GLOBALS['wp'] = new WP();
    556 
    557 /**
    558  * WordPress Widget Factory Object
    559  *
    560  * @global WP_Widget_Factory $wp_widget_factory
    561  * @since 2.8.0
    562  */
    563 $GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
    564 
    565 /**
    566  * WordPress User Roles
    567576 *
    568577 * @global WP_Roles $wp_roles WordPress role management object.
    569  * @since 2.0.0
    570578 */
    571579$GLOBALS['wp_roles'] = new WP_Roles();
     
    594602 * WordPress Locale object for loading locale domain date and various strings.
    595603 *
     604 * @since 2.1.0
     605 *
    596606 * @global WP_Locale $wp_locale WordPress date and time locale object.
    597  * @since 2.1.0
    598607 */
    599608$GLOBALS['wp_locale'] = new WP_Locale();
Note: See TracChangeset for help on using the changeset viewer.