From 01102b3d6e4bafa1d6fc3cc40b3b77baefb12930 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Fri, 9 Dec 2022 11:54:13 +0000 Subject: [PATCH] Docs: Improve various globals documentation, as per documentation standards. Props upadalavipul. See #57069, #56792. Built from https://develop.svn.wordpress.org/trunk@54953 git-svn-id: http://core.svn.wordpress.org/trunk@54505 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-debug-data.php | 3 +++ wp-admin/includes/class-wp-site-health.php | 2 ++ wp-admin/includes/deprecated.php | 4 ++++ wp-admin/includes/export.php | 2 ++ wp-includes/ms-deprecated.php | 2 ++ wp-includes/ms-functions.php | 2 ++ wp-includes/option.php | 2 ++ wp-includes/post.php | 2 ++ wp-includes/user.php | 2 ++ wp-includes/version.php | 2 +- 10 files changed, 22 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-debug-data.php b/wp-admin/includes/class-wp-debug-data.php index 67d79b9369..be7dc0fe88 100644 --- a/wp-admin/includes/class-wp-debug-data.php +++ b/wp-admin/includes/class-wp-debug-data.php @@ -30,6 +30,7 @@ class WP_Debug_Data { * * @throws ImagickException * @global wpdb $wpdb WordPress database abstraction object. + * @global $_wp_theme_features * * @return array The debug data for the site. */ @@ -1558,6 +1559,8 @@ class WP_Debug_Data { * * @since 5.2.0 * + * @global wpdb $wpdb WordPress database abstraction object. + * * @return int The size of the database, in bytes. */ public static function get_database_size() { diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index 4300abd8de..cfc88314a5 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -1284,6 +1284,8 @@ class WP_Site_Health { * * @since 5.2.0 * + * @global wpdb $wpdb WordPress database abstraction object. + * * @return array The test results. */ public function get_test_utf8mb4_support() { diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index 75f9bfd1bf..b4aecd4ff9 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -524,6 +524,8 @@ class WP_User_Search { * * @since 2.1.0 * @access public + * + * @global wpdb $wpdb WordPress database abstraction object. */ public function prepare_query() { global $wpdb; @@ -562,6 +564,8 @@ class WP_User_Search { * * @since 2.1.0 * @access public + * + * @global wpdb $wpdb WordPress database abstraction object. */ public function query() { global $wpdb; diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index ac673ec5b1..0707b25db1 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -318,6 +318,8 @@ function export_wp( $args = array() ) { * * @since 4.6.0 * + * @global wpdb $wpdb WordPress database abstraction object. + * * @param WP_Term $term Term object. */ function wxr_term_meta( $term ) { diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index 4f1ad275b6..e526c88419 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -179,6 +179,8 @@ function validate_email( $email, $check_domain = true) { * @deprecated 3.0.0 Use wp_get_sites() * @see wp_get_sites() * + * @global wpdb $wpdb WordPress database abstraction object. + * * @param int $start Optional. Offset for retrieving the blog list. Default 0. * @param int $num Optional. Number of blogs to list. Default 10. * @param string $deprecated Unused. diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 127e115c0b..7cc8216613 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -1279,6 +1279,8 @@ function wpmu_activate_signup( $key ) { * * @since 5.5.0 * + * @global wpdb $wpdb WordPress database abstraction object. + * * @param int $id ID of the user to delete. * @param int|null $reassign ID of the user to reassign posts and links to. * @param WP_User $user User object. diff --git a/wp-includes/option.php b/wp-includes/option.php index 8ca51b8f92..b902aee87e 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -1033,6 +1033,8 @@ function set_transient( $transient, $value, $expiration = 0 ) { * The multi-table delete syntax is used to delete the transient record * from table a, and the corresponding transient_timeout record from table b. * + * @global wpdb $wpdb WordPress database abstraction object. + * * @since 4.9.0 * * @param bool $force_db Optional. Force cleanup to run against the database even when an external object cache is used. diff --git a/wp-includes/post.php b/wp-includes/post.php index 82eea18e7f..b1e9df85c2 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -7953,6 +7953,8 @@ function wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post * @since 4.5.0 * @access private * + * @global wpdb $wpdb WordPress database abstraction object. + * * @param WP_Post $post The post. * @return string New slug for the post. */ diff --git a/wp-includes/user.php b/wp-includes/user.php index 595c4c8447..a4ff0bb340 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -3508,6 +3508,8 @@ function wp_destroy_all_sessions() { * @since 4.4.0 * @since 4.9.0 The `$site_id` parameter was added to support multisite. * + * @global wpdb $wpdb WordPress database abstraction object. + * * @param int|null $site_id Optional. The site ID to get users with no role for. Defaults to the current site. * @return string[] Array of user IDs as strings. */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 819e074109..04af729d98 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-54952'; +$wp_version = '6.2-alpha-54953'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.