WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/04/2019 01:11:01 AM (4 months 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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     */
Note: See TracChangeset for help on using the changeset viewer.