From b691849290207fa01e439f8db6cd09091f62b394 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 18 Dec 2023 13:53:30 +0000 Subject: [PATCH] Docs: Document some globals in `wp-includes/deprecated.php`. Includes removing `$allowed_options` global references from functions where it's not actually used. Props viralsampat. See #60021. Built from https://develop.svn.wordpress.org/trunk@57196 git-svn-id: http://core.svn.wordpress.org/trunk@56707 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/deprecated.php | 14 ++++++++++---- wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index e98cad915f..e63708f91b 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -57,6 +57,8 @@ function get_postdata($postid) { * * @since 1.0.1 * @deprecated 1.5.0 + * + * @global WP_Query $wp_query WordPress Query object. */ function start_wp() { global $wp_query; @@ -2217,6 +2219,8 @@ function unregister_widget_control($id) { * @deprecated 3.0.0 Use delete_user_meta() * @see delete_user_meta() * + * @global wpdb $wpdb WordPress database abstraction object. + * * @param int $user_id User ID. * @param string $meta_key Metadata key. * @param mixed $meta_value Optional. Metadata value. Default empty. @@ -2264,6 +2268,8 @@ function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) { * @deprecated 3.0.0 Use get_user_meta() * @see get_user_meta() * + * @global wpdb $wpdb WordPress database abstraction object. + * * @param int $user_id User ID * @param string $meta_key Optional. Metadata key. Default empty. * @return mixed @@ -2316,6 +2322,8 @@ function get_usermeta( $user_id, $meta_key = '' ) { * @deprecated 3.0.0 Use update_user_meta() * @see update_user_meta() * + * @global wpdb $wpdb WordPress database abstraction object. + * * @param int $user_id User ID * @param string $meta_key Metadata key. * @param mixed $meta_value Metadata value. @@ -2753,6 +2761,8 @@ function index_rel_link() { * @since 2.8.0 * @deprecated 3.3.0 * + * @global WP_Post $post Global post object. + * * @param string $title Optional. Link title format. Default '%title'. * @return string */ @@ -4062,8 +4072,6 @@ function _wp_register_meta_args_whitelist( $args, $default_args ) { * @deprecated 5.5.0 Use add_allowed_options() instead. * Please consider writing more inclusive code. * - * @global array $allowed_options - * * @param array $new_options * @param string|array $options * @return array @@ -4081,8 +4089,6 @@ function add_option_whitelist( $new_options, $options = '' ) { * @deprecated 5.5.0 Use remove_allowed_options() instead. * Please consider writing more inclusive code. * - * @global array $allowed_options - * * @param array $del_options * @param string|array $options * @return array diff --git a/wp-includes/version.php b/wp-includes/version.php index 64f9829dba..729009974c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57195'; +$wp_version = '6.5-alpha-57196'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.