Make WordPress Core

Changeset 45734


Ignore:
Timestamp:
08/04/2019 01:11:01 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Add missing description for $wpdb, $wp_db_version, and $wp_current_db_version globals.

Props mukesh27, utsav72640, immeet94, SergeyBiryukov.
See #45604.

Location:
trunk/src
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r45599 r45734  
    536536     * @since 3.1.0
    537537     *
    538      * @global wpdb      $wpdb
     538     * @global wpdb      $wpdb      WordPress database abstraction object.
    539539     * @global WP_Locale $wp_locale
    540540     *
  • trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php

    r45617 r45734  
    6565     * @global string $s
    6666     * @global string $mode
    67      * @global wpdb   $wpdb
     67     * @global wpdb   $wpdb WordPress database abstraction object.
    6868     */
    6969    public function prepare_items() {
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r45704 r45734  
    6868     *
    6969     * @global WP_Post_Type $post_type_object
    70      * @global wpdb         $wpdb
     70     * @global wpdb         $wpdb             WordPress database abstraction object.
    7171     *
    7272     * @param array $args An associative array of arguments.
     
    741741
    742742    /**
    743      * @global wpdb    $wpdb
     743     * @global wpdb    $wpdb WordPress database abstraction object.
    744744     * @global WP_Post $post
    745745     * @param array $pages
  • trunk/src/wp-admin/includes/media.php

    r45667 r45734  
    25272527 * @since 2.5.0
    25282528 *
    2529  * @global wpdb      $wpdb
     2529 * @global wpdb      $wpdb            WordPress database abstraction object.
    25302530 * @global WP_Query  $wp_query
    25312531 * @global WP_Locale $wp_locale
  • trunk/src/wp-admin/includes/ms.php

    r45708 r45734  
    674674 * @since 3.0.0
    675675 *
    676  * @global int    $wp_db_version The version number of the database.
     676 * @global int    $wp_db_version WordPress database version.
    677677 * @global string $pagenow
    678678 *
  • trunk/src/wp-admin/includes/schema.php

    r44976 r45734  
    1212 * Declare these as global in case schema.php is included from a function.
    1313 *
    14  * @global wpdb   $wpdb
     14 * @global wpdb   $wpdb            WordPress database abstraction object.
    1515 * @global array  $wp_queries
    1616 * @global string $charset_collate
     
    359359 * @since 5.1.0 The $options parameter has been added.
    360360 *
    361  * @global wpdb $wpdb WordPress database abstraction object.
    362  * @global int  $wp_db_version
    363  * @global int  $wp_current_db_version
     361 * @global wpdb $wpdb                  WordPress database abstraction object.
     362 * @global int  $wp_db_version         WordPress database version.
     363 * @global int  $wp_current_db_version The old (current) database version.
    364364 *
    365365 * @param array $options Optional. Custom option $key => $value pairs to use. Default empty array.
  • trunk/src/wp-admin/includes/update-core.php

    r45611 r45734  
    870870 * @global array              $_old_files
    871871 * @global array              $_new_bundled_files
    872  * @global wpdb               $wpdb
     872 * @global wpdb               $wpdb                   WordPress database abstraction object.
    873873 * @global string             $wp_version
    874874 * @global string             $required_php_version
  • trunk/src/wp-admin/includes/upgrade.php

    r45611 r45734  
    130130     * @since 2.1.0
    131131     *
    132      * @global wpdb       $wpdb
     132     * @global wpdb       $wpdb         WordPress database abstraction object.
    133133     * @global WP_Rewrite $wp_rewrite
    134134     * @global string     $table_prefix
     
    621621     * @since 2.1.0
    622622     *
    623      * @global int  $wp_current_db_version
    624      * @global int  $wp_db_version
    625      * @global wpdb $wpdb WordPress database abstraction object.
     623     * @global int  $wp_current_db_version The old (current) database version.
     624     * @global int  $wp_db_version         The new database version.
     625     * @global wpdb $wpdb                  WordPress database abstraction object.
    626626     */
    627627    function wp_upgrade() {
     
    680680 * @since 1.0.1
    681681 *
    682  * @global int $wp_current_db_version
    683  * @global int $wp_db_version
     682 * @global int $wp_current_db_version The old (current) database version.
     683 * @global int $wp_db_version         The new database version.
    684684 */
    685685function upgrade_all() {
     
    10671067 * @since 2.0.0
    10681068 *
    1069  * @global wpdb $wpdb WordPress database abstraction object.
    1070  * @global int  $wp_current_db_version
     1069 * @global wpdb $wpdb                  WordPress database abstraction object.
     1070 * @global int  $wp_current_db_version The old (current) database version.
    10711071 */
    10721072function upgrade_160() {
     
    11861186 * @since 2.1.0
    11871187 *
    1188  * @global wpdb $wpdb WordPress database abstraction object.
    1189  * @global int  $wp_current_db_version
     1188 * @global int  $wp_current_db_version The old (current) database version.
     1189 * @global wpdb $wpdb                  WordPress database abstraction object.
    11901190 */
    11911191function upgrade_210() {
    1192     global $wpdb, $wp_current_db_version;
     1192    global $wp_current_db_version, $wpdb;
    11931193
    11941194    if ( $wp_current_db_version < 3506 ) {
     
    12381238 * @since 2.3.0
    12391239 *
    1240  * @global wpdb $wpdb WordPress database abstraction object.
    1241  * @global int  $wp_current_db_version
     1240 * @global int  $wp_current_db_version The old (current) database version.
     1241 * @global wpdb $wpdb                  WordPress database abstraction object.
    12421242 */
    12431243function upgrade_230() {
     
    15121512 * @since 2.5.0
    15131513 *
    1514  * @global int $wp_current_db_version
     1514 * @global int $wp_current_db_version The old (current) database version.
    15151515 */
    15161516function upgrade_250() {
     
    15431543 * @since 2.6.0
    15441544 *
    1545  * @global int $wp_current_db_version
     1545 * @global int $wp_current_db_version The old (current) database version.
    15461546 */
    15471547function upgrade_260() {
     
    15591559 * @since 2.7.0
    15601560 *
    1561  * @global wpdb $wpdb WordPress database abstraction object.
    1562  * @global int  $wp_current_db_version
     1561 * @global int  $wp_current_db_version The old (current) database version.
     1562 * @global wpdb $wpdb                  WordPress database abstraction object.
    15631563 */
    15641564function upgrade_270() {
    1565     global $wpdb, $wp_current_db_version;
     1565    global $wp_current_db_version, $wpdb;
    15661566
    15671567    if ( $wp_current_db_version < 8980 ) {
     
    15811581 * @since 2.8.0
    15821582 *
    1583  * @global int  $wp_current_db_version
    1584  * @global wpdb $wpdb WordPress database abstraction object.
     1583 * @global int  $wp_current_db_version The old (current) database version.
     1584 * @global wpdb $wpdb                  WordPress database abstraction object.
    15851585 */
    15861586function upgrade_280() {
     
    16141614 * @since 2.9.0
    16151615 *
    1616  * @global int $wp_current_db_version
     1616 * @global int $wp_current_db_version The old (current) database version.
    16171617 */
    16181618function upgrade_290() {
     
    16341634 * @since 3.0.0
    16351635 *
    1636  * @global int  $wp_current_db_version
    1637  * @global wpdb $wpdb WordPress database abstraction object.
     1636 * @global int  $wp_current_db_version The old (current) database version.
     1637 * @global wpdb $wpdb                  WordPress database abstraction object.
    16381638 */
    16391639function upgrade_300() {
     
    16851685 * @since 3.3.0
    16861686 *
    1687  * @global int   $wp_current_db_version
    1688  * @global wpdb  $wpdb
     1687 * @global int   $wp_current_db_version The old (current) database version.
     1688 * @global wpdb  $wpdb                  WordPress database abstraction object.
    16891689 * @global array $wp_registered_widgets
    16901690 * @global array $sidebars_widgets
     
    17661766 * @since 3.4.0
    17671767 *
    1768  * @global int   $wp_current_db_version
    1769  * @global wpdb  $wpdb
     1768 * @global int  $wp_current_db_version The old (current) database version.
     1769 * @global wpdb $wpdb                  WordPress database abstraction object.
    17701770 */
    17711771function upgrade_340() {
     
    18031803 * @since 3.5.0
    18041804 *
    1805  * @global int   $wp_current_db_version
    1806  * @global wpdb  $wpdb
     1805 * @global int  $wp_current_db_version The old (current) database version.
     1806 * @global wpdb $wpdb                  WordPress database abstraction object.
    18071807 */
    18081808function upgrade_350() {
     
    18401840 * @since 3.7.0
    18411841 *
    1842  * @global int $wp_current_db_version
     1842 * @global int $wp_current_db_version The old (current) database version.
    18431843 */
    18441844function upgrade_370() {
     
    18561856 * @since 3.8.0
    18571857 *
    1858  * @global int $wp_current_db_version
     1858 * @global int $wp_current_db_version The old (current) database version.
    18591859 */
    18601860function upgrade_372() {
     
    18711871 * @since 3.8.0
    18721872 *
    1873  * @global int $wp_current_db_version
     1873 * @global int $wp_current_db_version The old (current) database version.
    18741874 */
    18751875function upgrade_380() {
     
    18861886 * @since 4.0.0
    18871887 *
    1888  * @global int $wp_current_db_version
     1888 * @global int $wp_current_db_version The old (current) database version.
    18891889 */
    18901890function upgrade_400() {
     
    19061906 * @ignore
    19071907 * @since 4.2.0
    1908  *
    1909  * @global int   $wp_current_db_version
    1910  * @global wpdb  $wpdb
    19111908 */
    19121909function upgrade_420() {}
     
    19181915 * @since 4.3.0
    19191916 *
    1920  * @global int  $wp_current_db_version Current version.
     1917 * @global int  $wp_current_db_version The old (current) database version.
    19211918 * @global wpdb $wpdb                  WordPress database abstraction object.
    19221919 */
     
    19571954 * @since 4.3.0
    19581955 *
    1959  * @global int  $wp_current_db_version Current version.
     1956 * @global int  $wp_current_db_version The old (current) database version.
    19601957 * @global wpdb $wpdb                  WordPress database abstraction object.
    19611958 */
     
    20222019 * @since 4.4.0
    20232020 *
    2024  * @global int  $wp_current_db_version Current version.
     2021 * @global int  $wp_current_db_version The old (current) database version.
    20252022 * @global wpdb $wpdb                  WordPress database abstraction object.
    20262023 */
     
    20472044 * @since 4.5.0
    20482045 *
    2049  * @global int  $wp_current_db_version Current database version.
     2046 * @global int  $wp_current_db_version The old (current) database version.
    20502047 * @global wpdb $wpdb                  WordPress database abstraction object.
    20512048 */
     
    20722069 * @since 4.6.0
    20732070 *
    2074  * @global int $wp_current_db_version Current database version.
     2071 * @global int $wp_current_db_version The old (current) database version.
    20752072 */
    20762073function upgrade_460() {
     
    21232120 * @since 3.0.0
    21242121 *
    2125  * @global int   $wp_current_db_version
    2126  * @global wpdb  $wpdb
     2122 * @global int  $wp_current_db_version The old (current) database version.
     2123 * @global wpdb $wpdb                  WordPress database abstraction object.
    21272124 */
    21282125function upgrade_network() {
     
    22832280 * @since 1.0.0
    22842281 *
    2285  * @global wpdb  $wpdb
     2282 * @global wpdb $wpdb WordPress database abstraction object.
    22862283 *
    22872284 * @param string $table_name Database table name to create.
     
    23132310 * @since 1.0.1
    23142311 *
    2315  * @global wpdb  $wpdb
     2312 * @global wpdb $wpdb WordPress database abstraction object.
    23162313 *
    23172314 * @param string $table Database table name.
     
    23362333 * @since 1.0.1
    23372334 *
    2338  * @global wpdb  $wpdb
     2335 * @global wpdb $wpdb WordPress database abstraction object.
    23392336 *
    23402337 * @param string $table Database table name.
     
    23542351 * @since 1.3.0
    23552352 *
    2356  * @global wpdb  $wpdb
     2353 * @global wpdb $wpdb WordPress database abstraction object.
    23572354 *
    23582355 * @param string $table_name  The table name to modify.
     
    23862383 * @since 4.2.0
    23872384 *
    2388  * @global wpdb  $wpdb
     2385 * @global wpdb $wpdb WordPress database abstraction object.
    23892386 *
    23902387 * @param string $table The table to convert.
     
    24292426 * @since 1.2.0
    24302427 *
    2431  * @global wpdb  $wpdb
     2428 * @global wpdb $wpdb WordPress database abstraction object.
    24322429 *
    24332430 * @return stdClass List of options.
     
    24552452 * @access private
    24562453 *
    2457  * @global wpdb  $wpdb
     2454 * @global wpdb $wpdb WordPress database abstraction object.
    24582455 *
    24592456 * @param string $setting Option name.
     
    25202517 * @since 1.5.0
    25212518 *
    2522  * @global wpdb  $wpdb
     2519 * @global wpdb $wpdb WordPress database abstraction object.
    25232520 *
    25242521 * @param string[]|string $queries Optional. The query to run. Can be multiple queries
     
    31843181 * @since 2.1.0
    31853182 *
    3186  * @global wpdb  $wpdb
     3183 * @global wpdb $wpdb WordPress database abstraction object.
    31873184 */
    31883185function wp_check_mysql_version() {
     
    32163213 * @since 3.5.0
    32173214 *
    3218  * @global int  $wp_current_db_version
    3219  * @global wpdb $wpdb WordPress database abstraction object.
     3215 * @global int  $wp_current_db_version The old (current) database version.
     3216 * @global wpdb $wpdb                  WordPress database abstraction object.
    32203217 */
    32213218function maybe_disable_link_manager() {
     
    32323229 * @since 2.9.0
    32333230 *
    3234  * @global int  $wp_current_db_version
    3235  * @global wpdb $wpdb WordPress database abstraction object.
     3231 * @global int  $wp_current_db_version The old (current) database version.
     3232 * @global wpdb $wpdb                  WordPress database abstraction object.
    32363233 */
    32373234function pre_schema_upgrade() {
     
    32953292     * @since 3.0.0
    32963293     *
    3297      * @global wpdb   $wpdb
     3294     * @global wpdb   $wpdb            WordPress database abstraction object.
    32983295     * @global string $charset_collate
    32993296     */
  • trunk/src/wp-admin/network/upgrade.php

    r45674 r45734  
    5050        if ( $n < 5 ) {
    5151            /**
    52              * @global string $wp_db_version
     52             * @global int $wp_db_version WordPress database version.
    5353             */
    5454            global $wp_db_version;
  • trunk/src/wp-admin/update-core.php

    r45674 r45734  
    2626/**
    2727 * @global string $wp_local_package
    28  * @global wpdb   $wpdb
     28 * @global wpdb   $wpdb             WordPress database abstraction object.
    2929 *
    3030 * @staticvar bool $first_pass
  • trunk/src/wp-includes/canonical.php

    r45590 r45734  
    3232 * @global bool $is_IIS
    3333 * @global WP_Query $wp_query
    34  * @global wpdb $wpdb WordPress database abstraction object.
    35  * @global WP $wp Current WordPress environment instance.
     34 * @global wpdb $wpdb             WordPress database abstraction object.
     35 * @global WP $wp                 Current WordPress environment instance.
    3636 *
    3737 * @param string $requested_url Optional. The URL that was requested, used to
  • trunk/src/wp-includes/capabilities.php

    r45622 r45734  
    772772 * @since 4.3.0
    773773 *
    774  * @global WP_Roles $wp_roles WP_Roles global instance.
     774 * @global WP_Roles $wp_roles WordPress role management object.
    775775 *
    776776 * @return WP_Roles WP_Roles global instance if not already instantiated.
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r45639 r45734  
    33423342     * @since 4.7.0
    33433343     * @see _wp_customize_publish_changeset()
    3344      * @global wpdb $wpdb
     3344     * @global wpdb $wpdb WordPress database abstraction object.
    33453345     *
    33463346     * @param int $changeset_post_id ID for customize_changeset post. Defaults to the changeset for the current manager instance.
  • trunk/src/wp-includes/class-wp-network-query.php

    r45590 r45734  
    500500     * @since 4.6.0
    501501     *
    502      * @global wpdb  $wpdb WordPress database abstraction object.
     502     * @global wpdb $wpdb WordPress database abstraction object.
    503503     *
    504504     * @param string   $string  Search string.
  • trunk/src/wp-includes/class-wp-site-query.php

    r45590 r45734  
    691691     * @since 4.6.0
    692692     *
    693      * @global wpdb  $wpdb WordPress database abstraction object.
     693     * @global wpdb $wpdb WordPress database abstraction object.
    694694     *
    695695     * @param string   $string  Search string.
  • trunk/src/wp-includes/comment-template.php

    r45667 r45734  
    13051305 * @global WP_Query   $wp_query
    13061306 * @global WP_Post    $post
    1307  * @global wpdb       $wpdb
     1307 * @global wpdb       $wpdb             WordPress database abstraction object.
    13081308 * @global int        $id
    13091309 * @global WP_Comment $comment
  • trunk/src/wp-includes/deprecated.php

    r45723 r45734  
    23712371 * @see get_users()
    23722372 *
    2373  * @global wpdb $wpdb    WordPress database abstraction object.
     2373 * @global wpdb $wpdb WordPress database abstraction object.
    23742374 *
    23752375 * @param int $id Site ID.
  • trunk/src/wp-includes/general-template.php

    r45667 r45734  
    17721772 * @see get_archives_link()
    17731773 *
    1774  * @global wpdb      $wpdb
     1774 * @global wpdb      $wpdb      WordPress database abstraction object.
    17751775 * @global WP_Locale $wp_locale
    17761776 *
     
    20422042 * @since 1.0.0
    20432043 *
    2044  * @global wpdb      $wpdb
     2044 * @global wpdb      $wpdb      WordPress database abstraction object.
    20452045 * @global int       $m
    20462046 * @global int       $monthnum
  • trunk/src/wp-includes/load.php

    r45672 r45734  
    407407 * @since 2.5.0
    408408 *
    409  * @global wpdb $wpdb The WordPress database class.
     409 * @global wpdb $wpdb WordPress database abstraction object.
    410410 */
    411411function require_wp_db() {
     
    438438 * @access private
    439439 *
    440  * @global wpdb   $wpdb         The WordPress database class.
     440 * @global wpdb   $wpdb         WordPress database abstraction object.
    441441 * @global string $table_prefix The database table prefix.
    442442 */
  • trunk/src/wp-includes/media.php

    r45611 r45734  
    35613561 *
    35623562 * @global int       $content_width
    3563  * @global wpdb      $wpdb
     3563 * @global wpdb      $wpdb          WordPress database abstraction object.
    35643564 * @global WP_Locale $wp_locale
    35653565 *
  • trunk/src/wp-includes/ms-blogs.php

    r44926 r45734  
    478478 * @since MU (3.0.0)
    479479 *
    480  * @global wpdb            $wpdb
     480 * @global wpdb            $wpdb               WordPress database abstraction object.
    481481 * @global int             $blog_id
    482482 * @global array           $_wp_switched_stack
     
    558558 * @since MU (3.0.0)
    559559 *
    560  * @global wpdb            $wpdb
     560 * @global wpdb            $wpdb               WordPress database abstraction object.
    561561 * @global array           $_wp_switched_stack
    562562 * @global int             $blog_id
  • trunk/src/wp-includes/ms-deprecated.php

    r45708 r45734  
    597597 * @deprecated 5.1.0
    598598 *
    599  * @global wpdb     $wpdb
    600  * @global WP_Roles $wp_roles
     599 * @global wpdb     $wpdb     WordPress database abstraction object.
     600 * @global WP_Roles $wp_roles WordPress role management object.
    601601 *
    602602 * @param int    $blog_id    The value returned by wp_insert_site().
  • trunk/src/wp-includes/ms-functions.php

    r45715 r45734  
    587587 * @since MU (3.0.0)
    588588 *
    589  * @global wpdb   $wpdb
     589 * @global wpdb   $wpdb   WordPress database abstraction object.
    590590 * @global string $domain
    591591 *
  • trunk/src/wp-includes/taxonomy.php

    r45723 r45734  
    24142414 * @since 2.3.0
    24152415 *
    2416  * @global wpdb $wpdb The WordPress database abstraction object.
     2416 * @global wpdb $wpdb WordPress database abstraction object.
    24172417 *
    24182418 * @param int              $object_id The object to relate to.
     
    32153215 * @since 2.3.0
    32163216 *
    3217  * @global wpdb $wpdb WordPress database abstraction object.
     3217 * @global wpdb $wpdb                           WordPress database abstraction object.
    32183218 * @global bool $_wp_suspend_cache_invalidation
    32193219 *
  • trunk/src/wp-includes/template.php

    r45251 r45734  
    689689 * @global WP_Query   $wp_query
    690690 * @global WP_Rewrite $wp_rewrite
    691  * @global wpdb       $wpdb
     691 * @global wpdb       $wpdb          WordPress database abstraction object.
    692692 * @global string     $wp_version
    693693 * @global WP         $wp
  • trunk/src/wp-includes/theme.php

    r45662 r45734  
    32613261 * @see wp_delete_auto_drafts()
    32623262 *
     3263 * @global wpdb $wpdb WordPress database abstraction object.
     3264 *
    32633265 * @param string   $new_status Transition to this post status.
    32643266 * @param string   $old_status Previous post status.
    32653267 * @param \WP_Post $post       Post data.
    3266  * @global wpdb $wpdb
    32673268 */
    32683269function _wp_keep_alive_customize_changeset_dependent_auto_drafts( $new_status, $old_status, $post ) {
  • trunk/src/wp-includes/update.php

    r45590 r45734  
    1515 *
    1616 * @since 2.3.0
    17  * @global string $wp_version Used to check against the newest WordPress version.
    18  * @global wpdb   $wpdb
     17 * @global string $wp_version       Used to check against the newest WordPress version.
     18 * @global wpdb   $wpdb             WordPress database abstraction object.
    1919 * @global string $wp_local_package
    2020 *
  • trunk/src/wp-settings.php

    r45678 r45734  
    448448 * WordPress User Roles
    449449 *
    450  * @global WP_Roles $wp_roles
     450 * @global WP_Roles $wp_roles WordPress role management object.
    451451 * @since 2.0.0
    452452 */
Note: See TracChangeset for help on using the changeset viewer.