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
This commit is contained in:
audrasjb 2022-12-09 11:54:13 +00:00
parent 0d03ee0b7a
commit 01102b3d6e
10 changed files with 22 additions and 1 deletions

View File

@ -30,6 +30,7 @@ class WP_Debug_Data {
* *
* @throws ImagickException * @throws ImagickException
* @global wpdb $wpdb WordPress database abstraction object. * @global wpdb $wpdb WordPress database abstraction object.
* @global $_wp_theme_features
* *
* @return array The debug data for the site. * @return array The debug data for the site.
*/ */
@ -1558,6 +1559,8 @@ class WP_Debug_Data {
* *
* @since 5.2.0 * @since 5.2.0
* *
* @global wpdb $wpdb WordPress database abstraction object.
*
* @return int The size of the database, in bytes. * @return int The size of the database, in bytes.
*/ */
public static function get_database_size() { public static function get_database_size() {

View File

@ -1284,6 +1284,8 @@ class WP_Site_Health {
* *
* @since 5.2.0 * @since 5.2.0
* *
* @global wpdb $wpdb WordPress database abstraction object.
*
* @return array The test results. * @return array The test results.
*/ */
public function get_test_utf8mb4_support() { public function get_test_utf8mb4_support() {

View File

@ -524,6 +524,8 @@ class WP_User_Search {
* *
* @since 2.1.0 * @since 2.1.0
* @access public * @access public
*
* @global wpdb $wpdb WordPress database abstraction object.
*/ */
public function prepare_query() { public function prepare_query() {
global $wpdb; global $wpdb;
@ -562,6 +564,8 @@ class WP_User_Search {
* *
* @since 2.1.0 * @since 2.1.0
* @access public * @access public
*
* @global wpdb $wpdb WordPress database abstraction object.
*/ */
public function query() { public function query() {
global $wpdb; global $wpdb;

View File

@ -318,6 +318,8 @@ function export_wp( $args = array() ) {
* *
* @since 4.6.0 * @since 4.6.0
* *
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param WP_Term $term Term object. * @param WP_Term $term Term object.
*/ */
function wxr_term_meta( $term ) { function wxr_term_meta( $term ) {

View File

@ -179,6 +179,8 @@ function validate_email( $email, $check_domain = true) {
* @deprecated 3.0.0 Use wp_get_sites() * @deprecated 3.0.0 Use wp_get_sites()
* @see 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 $start Optional. Offset for retrieving the blog list. Default 0.
* @param int $num Optional. Number of blogs to list. Default 10. * @param int $num Optional. Number of blogs to list. Default 10.
* @param string $deprecated Unused. * @param string $deprecated Unused.

View File

@ -1279,6 +1279,8 @@ function wpmu_activate_signup( $key ) {
* *
* @since 5.5.0 * @since 5.5.0
* *
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $id ID of the user to delete. * @param int $id ID of the user to delete.
* @param int|null $reassign ID of the user to reassign posts and links to. * @param int|null $reassign ID of the user to reassign posts and links to.
* @param WP_User $user User object. * @param WP_User $user User object.

View File

@ -1033,6 +1033,8 @@ function set_transient( $transient, $value, $expiration = 0 ) {
* The multi-table delete syntax is used to delete the transient record * The multi-table delete syntax is used to delete the transient record
* from table a, and the corresponding transient_timeout record from table b. * from table a, and the corresponding transient_timeout record from table b.
* *
* @global wpdb $wpdb WordPress database abstraction object.
*
* @since 4.9.0 * @since 4.9.0
* *
* @param bool $force_db Optional. Force cleanup to run against the database even when an external object cache is used. * @param bool $force_db Optional. Force cleanup to run against the database even when an external object cache is used.

View File

@ -7953,6 +7953,8 @@ function wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post
* @since 4.5.0 * @since 4.5.0
* @access private * @access private
* *
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param WP_Post $post The post. * @param WP_Post $post The post.
* @return string New slug for the post. * @return string New slug for the post.
*/ */

View File

@ -3508,6 +3508,8 @@ function wp_destroy_all_sessions() {
* @since 4.4.0 * @since 4.4.0
* @since 4.9.0 The `$site_id` parameter was added to support multisite. * @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. * @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. * @return string[] Array of user IDs as strings.
*/ */

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.