Skip to content

Commit ee09cad

Browse files
committed
Docs: Improve various globals documentation, as per documentation standards.
Props upadalavipul. See #57069, #56792. git-svn-id: https://develop.svn.wordpress.org/trunk@54953 602fd350-edb4-49c9-b593-d223f7449a82
1 parent cb99ef0 commit ee09cad

9 files changed

Lines changed: 21 additions & 0 deletions

File tree

src/wp-admin/includes/class-wp-debug-data.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public static function check_for_updates() {
3030
*
3131
* @throws ImagickException
3232
* @global wpdb $wpdb WordPress database abstraction object.
33+
* @global $_wp_theme_features
3334
*
3435
* @return array The debug data for the site.
3536
*/
@@ -1558,6 +1559,8 @@ public static function format( $info_array, $data_type ) {
15581559
*
15591560
* @since 5.2.0
15601561
*
1562+
* @global wpdb $wpdb WordPress database abstraction object.
1563+
*
15611564
* @return int The size of the database, in bytes.
15621565
*/
15631566
public static function get_database_size() {

src/wp-admin/includes/class-wp-site-health.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,8 @@ public function get_test_sql_server() {
12841284
*
12851285
* @since 5.2.0
12861286
*
1287+
* @global wpdb $wpdb WordPress database abstraction object.
1288+
*
12871289
* @return array The test results.
12881290
*/
12891291
public function get_test_utf8mb4_support() {

src/wp-admin/includes/deprecated.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,8 @@ public function WP_User_Search( $search_term = '', $page = '', $role = '' ) {
524524
*
525525
* @since 2.1.0
526526
* @access public
527+
*
528+
* @global wpdb $wpdb WordPress database abstraction object.
527529
*/
528530
public function prepare_query() {
529531
global $wpdb;
@@ -562,6 +564,8 @@ public function prepare_query() {
562564
*
563565
* @since 2.1.0
564566
* @access public
567+
*
568+
* @global wpdb $wpdb WordPress database abstraction object.
565569
*/
566570
public function query() {
567571
global $wpdb;

src/wp-admin/includes/export.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ function wxr_term_description( $term ) {
318318
*
319319
* @since 4.6.0
320320
*
321+
* @global wpdb $wpdb WordPress database abstraction object.
322+
*
321323
* @param WP_Term $term Term object.
322324
*/
323325
function wxr_term_meta( $term ) {

src/wp-includes/ms-deprecated.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ function validate_email( $email, $check_domain = true) {
179179
* @deprecated 3.0.0 Use wp_get_sites()
180180
* @see wp_get_sites()
181181
*
182+
* @global wpdb $wpdb WordPress database abstraction object.
183+
*
182184
* @param int $start Optional. Offset for retrieving the blog list. Default 0.
183185
* @param int $num Optional. Number of blogs to list. Default 10.
184186
* @param string $deprecated Unused.

src/wp-includes/ms-functions.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,8 @@ function wpmu_activate_signup( $key ) {
12791279
*
12801280
* @since 5.5.0
12811281
*
1282+
* @global wpdb $wpdb WordPress database abstraction object.
1283+
*
12821284
* @param int $id ID of the user to delete.
12831285
* @param int|null $reassign ID of the user to reassign posts and links to.
12841286
* @param WP_User $user User object.

src/wp-includes/option.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,8 @@ function set_transient( $transient, $value, $expiration = 0 ) {
10331033
* The multi-table delete syntax is used to delete the transient record
10341034
* from table a, and the corresponding transient_timeout record from table b.
10351035
*
1036+
* @global wpdb $wpdb WordPress database abstraction object.
1037+
*
10361038
* @since 4.9.0
10371039
*
10381040
* @param bool $force_db Optional. Force cleanup to run against the database even when an external object cache is used.

src/wp-includes/post.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7953,6 +7953,8 @@ function wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post
79537953
* @since 4.5.0
79547954
* @access private
79557955
*
7956+
* @global wpdb $wpdb WordPress database abstraction object.
7957+
*
79567958
* @param WP_Post $post The post.
79577959
* @return string New slug for the post.
79587960
*/

src/wp-includes/user.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,6 +3508,8 @@ function wp_destroy_all_sessions() {
35083508
* @since 4.4.0
35093509
* @since 4.9.0 The `$site_id` parameter was added to support multisite.
35103510
*
3511+
* @global wpdb $wpdb WordPress database abstraction object.
3512+
*
35113513
* @param int|null $site_id Optional. The site ID to get users with no role for. Defaults to the current site.
35123514
* @return string[] Array of user IDs as strings.
35133515
*/

0 commit comments

Comments
 (0)