Correct references of `@uses $wpdb` in core documentation to use `@global`.

See #30191, [30105].
Fixes #30217.

Built from https://develop.svn.wordpress.org/trunk@30122


git-svn-id: http://core.svn.wordpress.org/trunk@30122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2014-10-31 17:56:22 +00:00
parent 70631df84a
commit 66c47f29bb
19 changed files with 102 additions and 67 deletions

View File

@ -112,7 +112,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
/**
* Create the date options fields for exporting a given post type.
*
* @global wpdb $wpdb WordPress database object.
* @global wpdb $wpdb WordPress database abstraction object.
* @global WP_Locale $wp_locale Date and Time Locale object.
*
* @since 3.1.0

View File

@ -10,7 +10,8 @@
* Determine if a comment exists based on author and date.
*
* @since 2.0.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $comment_author Author of the comment
* @param string $comment_date Date of the comment
@ -110,7 +111,8 @@ function get_comment_to_edit( $id ) {
* Get the number of pending comments on a post or posts
*
* @since 2.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|array $post_id Either a single Post ID or an array of Post IDs
* @return int|array Either a single Posts pending comments as an int or an array of ints keyed on the Post IDs

View File

@ -324,7 +324,8 @@ $wp_queries = wp_get_db_schema( 'all' );
* Create WordPress options and set the default values.
*
* @since 1.5.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
* @uses $wp_db_version
*/
function populate_options() {

View File

@ -44,7 +44,7 @@ if ( ! function_exists('maybe_create_table') ) :
*
* @since 1.0.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $table_name Database table name.
* @param string $create_ddl Create database table SQL.
@ -76,7 +76,7 @@ if ( ! function_exists('maybe_add_column') ) :
*
* @since 1.0.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $table_name Database table name
* @param string $column_name Table column name
@ -110,7 +110,7 @@ endif;
*
* @since 1.0.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $table_name Table name
* @param string $column_name Column name

View File

@ -10,7 +10,8 @@
* Retrieve Bookmark data
*
* @since 2.1.0
* @uses $wpdb Database Object
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param mixed $bookmark
* @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
@ -91,7 +92,7 @@ function get_bookmark_field( $field, $bookmark, $context = 'display' ) {
*
* @since 2.1.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string|array $args {
* Optional. String or array of arguments to retrieve bookmarks.

View File

@ -512,7 +512,8 @@ function _remove_qs_args_if_not_in_url( $query_string, Array $args_to_check, $ur
* Attempts to guess the correct URL based on query vars
*
* @since 2.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @return bool|string The correct URL if one is found. False on failure.
*/

View File

@ -104,7 +104,8 @@ class WP_Roles {
*
* @since 2.1.0
* @access protected
* @uses $wpdb Used to get the database prefix.
*
* @global wpdb $wpdb WordPress database abstraction object.
* @global array $wp_user_roles Used to set the 'roles' property value.
*/
protected function _init() {

View File

@ -24,7 +24,7 @@
*
* @since 1.2.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $author Comment author name.
* @param string $email Comment author email.
@ -155,7 +155,8 @@ function get_approved_comments( $post_id = 0, $args = array() ) {
* comment variable will be used, if it is set.
*
* @since 2.0.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param object|string|int $comment Comment to retrieve.
* @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants.
@ -214,7 +215,8 @@ function get_comment(&$comment, $output = OBJECT) {
* 'order', 'number', 'offset', and 'post_id'.
*
* @since 2.7.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param mixed $args Optional. Array or string of options to override defaults.
* @return array List of comments.
@ -757,7 +759,8 @@ function get_comment_statuses() {
* The date the last comment was modified.
*
* @since 1.5.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $timezone Which timezone to use in reference to 'gmt', 'blog',
* or 'server' locations.
@ -797,7 +800,8 @@ function get_lastcommentmodified($timezone = 'server') {
* caches, but this function does not.
*
* @since 2.0.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $post_id Optional. Comment amount in post if > 0, else total comments blog wide.
* @return array The amount of spam, approved, awaiting moderation, and total comments.
@ -1015,7 +1019,8 @@ function sanitize_comment_cookies() {
* Validates whether this comment is allowed to be made.
*
* @since 2.0.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $commentdata Contains information on the comment
* @return mixed Signifies the approval status (0|1|'spam')
@ -1132,7 +1137,8 @@ function wp_allow_comment( $commentdata ) {
* administrators.
*
* @since 2.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $ip Comment IP.
* @param string $email Comment author email address.
@ -1435,7 +1441,8 @@ function wp_count_comments( $post_id = 0 ) {
* post ID available.
*
* @since 2.0.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $comment_id Comment ID
* @param bool $force_delete Whether to bypass trash and force deletion. Default is false.
@ -1810,7 +1817,8 @@ function wp_get_current_commenter() {
* 'comment_date_gmt', 'comment_parent', 'comment_approved', and 'user_id'.
*
* @since 2.0.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $commentdata Contains information on the comment.
* @return int|bool The new comment's ID on success, false on failure.
@ -2105,7 +2113,8 @@ function wp_set_comment_status($comment_id, $comment_status, $wp_error = false)
* Filters the comment and makes sure certain fields are valid before updating.
*
* @since 2.0.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $commentarr Contains information on the comment.
* @return int Comment was updated if value is 1, or was not updated if value is 0.
@ -2243,7 +2252,8 @@ function wp_update_comment_count($post_id, $do_deferred=false) {
* Updates the comment count for the post.
*
* @since 2.5.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $post_id Post ID
* @return bool True on success, false on '0' $post_id or if post with ID does not exist.
@ -2357,7 +2367,8 @@ function discover_pingback_server_uri( $url, $deprecated = '' ) {
* Perform all pingbacks, enclosures, trackbacks, and send to pingback services.
*
* @since 2.1.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*/
function do_all_pings() {
global $wpdb;
@ -2388,7 +2399,8 @@ function do_all_pings() {
* Perform trackbacks.
*
* @since 1.5.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $post_id Post ID to do trackbacks on.
*/
@ -2562,7 +2574,8 @@ function privacy_ping_filter($sites) {
* Updates database when sending trackback to prevent duplicates.
*
* @since 0.71
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $trackback_url URL to send trackbacks.
* @param string $title Title of post.

View File

@ -2424,7 +2424,8 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
*
* @since 2.2.0
* @deprecated 3.1.0
* @uses $wpdb WordPress database object for queries
*
* @global wpdb $wpdb WordPress database abstraction object.
* @uses $blog_id The Blog id of the blog for those that use more than one blog
*
* @param int $id Blog ID.

View File

@ -1087,7 +1087,7 @@ function cache_javascript_headers() {
*
* @since 2.0.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @return int Number of database queries.
*/
@ -1253,7 +1253,7 @@ function do_robots() {
*
* @since 2.1.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @return bool Whether the blog is already installed.
*/
@ -3238,7 +3238,7 @@ function wp_ob_end_flush_all() {
*
* @since 2.3.2
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*/
function dead_db() {
global $wpdb;

View File

@ -3260,7 +3260,7 @@ function wp_maybe_generate_attachment_metadata( $attachment ) {
*
* @since 4.0.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $url The URL to resolve.
* @return int The found post ID.

View File

@ -15,7 +15,8 @@
* Add metadata for the specified object.
*
* @since 2.9.0
* @uses $wpdb WordPress database object for queries.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
* @param int $object_id ID of the object metadata is for
@ -128,7 +129,8 @@ function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique =
* ID and metadata key, the metadata will be added.
*
* @since 2.9.0
* @uses $wpdb WordPress database object for queries.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
* @param int $object_id ID of the object metadata is for
@ -278,7 +280,8 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
* Delete metadata for the specified object.
*
* @since 2.9.0
* @uses $wpdb WordPress database object for queries.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
* @param int $object_id ID of the object metadata is for
@ -756,7 +759,8 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
* Update the metadata cache for the specified objects.
*
* @since 2.9.0
* @uses $wpdb WordPress database object for queries.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
* @param int|array $object_ids array or comma delimited list of object IDs to update cache for
@ -1500,7 +1504,8 @@ class WP_Meta_Query {
* Retrieve the name of the metadata table for the specified object type.
*
* @since 2.9.0
* @uses $wpdb WordPress database object for queries.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $type Type of object to get metadata table for (e.g., comment, post, or user)
* @return mixed Metadata table name, or false if no metadata table exists

View File

@ -1484,7 +1484,7 @@ if ( !function_exists('wp_notify_moderator') ) :
*
* @since 1.0.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $comment_id Comment ID
* @return bool Always returns true
@ -2064,7 +2064,7 @@ if ( !function_exists('wp_set_password') ) :
*
* @since 2.5.0
*
* @uses $wpdb WordPress database object for queries
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $password The plaintext new user password
* @param int $user_id User ID

View File

@ -1789,7 +1789,7 @@ function post_type_supports( $post_type, $feature ) {
*
* @since 2.5.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $post_id Optional. Post ID to change post type. Default 0.
* @param string $post_type Optional. Post type. Accepts 'post' or 'page' to
@ -2554,7 +2554,7 @@ function wp_post_mime_type_where( $post_mime_types, $table_alias = '' ) {
*
* @since 1.0.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
* @see wp_delete_attachment()
* @see wp_trash_post()
*
@ -2799,7 +2799,7 @@ function wp_untrash_post( $post_id = 0 ) {
*
* @since 2.9.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|WP_Post $post Optional. Post ID or post object. Defaults to global $post.
* @return mixed False on failure.
@ -4741,7 +4741,7 @@ function wp_insert_attachment( $args, $file = false, $parent = 0 ) {
*
* @since 2.0.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $post_id Attachment ID.
* @param bool $force_delete Optional. Whether to bypass trash and force deletion.
@ -5430,7 +5430,7 @@ function update_post_cache( &$posts ) {
*
* @since 2.0.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|WP_Post $post Post ID or post object to remove from the cache.
*/
@ -5588,7 +5588,7 @@ function clean_attachment_cache( $id, $clean_terms = false ) {
* @access private
*
* @see wp_clear_scheduled_hook()
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $new_status New post status.
* @param string $old_status Previous post status.
@ -5780,7 +5780,7 @@ function delete_post_thumbnail( $post ) {
*
* @since 3.4.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*/
function wp_delete_auto_drafts() {
global $wpdb;

View File

@ -2211,7 +2211,7 @@ class WP_Query {
* @since 4.0.0
* @access protected
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $orderby Alias for the field to order by.
* @return string|bool Table-prefixed value to used in the ORDER clause. False otherwise.
@ -4619,8 +4619,9 @@ class WP_Query {
* Attempts to find the current slug from the past slugs.
*
* @since 2.1.0
*
* @uses $wp_query
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @return null If no link is found, null is returned.
*/

View File

@ -562,7 +562,7 @@ function unregister_taxonomy_for_object_type( $taxonomy, $object_type ) {
*
* @since 2.3.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|array $term_ids Term id or array of term ids of terms that will be used
* @param string|array $taxonomies String of taxonomy name or Array of string values of taxonomy names
@ -1261,7 +1261,7 @@ class WP_Tax_Query {
*
* @since 2.3.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
* @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param.
*
* @param int|object $term If integer, will get from database. If object will apply filters and return $term.
@ -1356,7 +1356,7 @@ function get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') {
*
* @since 2.3.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
* @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param.
*
* @param string $field Either 'slug', 'name', 'id' (term_id), or 'term_taxonomy_id'
@ -1446,7 +1446,7 @@ function get_term_by($field, $value, $taxonomy, $output = OBJECT, $filter = 'raw
*
* @since 2.3.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $term_id ID of Term to get children
* @param string $taxonomy Taxonomy Name
@ -1553,7 +1553,7 @@ function get_term_to_edit( $id, $taxonomy ) {
*
* @since 2.3.0
*
* @global wpdb $wpdb WordPress database access abstraction object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string|array $taxonomies Taxonomy name or list of Taxonomy names.
* @param array|string $args {
@ -2003,7 +2003,7 @@ function get_terms( $taxonomies, $args = '' ) {
*
* @since 3.0.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|string $term The term to check
* @param string $taxonomy The taxonomy name to use
@ -2143,7 +2143,7 @@ function sanitize_term($term, $taxonomy, $context = 'display') {
*
* @since 2.3.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $field Term field to sanitize
* @param string $value Search for this term value
@ -2363,7 +2363,7 @@ function wp_delete_object_term_relationships( $object_id, $taxonomies ) {
*
* @since 2.3.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $term Term ID
* @param string $taxonomy Taxonomy Name
@ -2562,7 +2562,8 @@ function wp_delete_category( $cat_ID ) {
* array of all matching term ids or term names will be returned respectively.
*
* @since 2.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|array $object_ids The ID(s) of the object(s) to retrieve.
* @param string|array $taxonomies The taxonomies to retrieve terms from.
@ -2733,7 +2734,7 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
* If the term already exists on the same hierarchical level,
* or the term slug and name are not unique, a WP_Error object will be returned.
*
* @global wpdb $wpdb The WordPress database object.
* @global wpdb $wpdb WordPress database abstraction object.
* @since 2.3.0
*
@ -3089,7 +3090,8 @@ function wp_add_object_terms( $object_id, $terms, $taxonomy ) {
* Remove term(s) associated with a given object.
*
* @since 3.6.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $object_id The ID of the object from which the terms will be removed.
* @param array|int|string $terms The slug(s) or ID(s) of the term(s) to remove.
@ -3177,7 +3179,8 @@ function wp_remove_object_terms( $object_id, $terms, $taxonomy ) {
* The only purpose for $term is for appending a parent, if one exists.
*
* @since 2.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $slug The string that will be tried for a unique slug
* @param object $term The term object that the $slug will belong too
@ -3249,7 +3252,7 @@ function wp_unique_term_slug($slug, $term) {
*
* @since 2.3.0
*
* @uses $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $term_id The ID of the term
* @param string $taxonomy The context in which to relate the term to the object.
@ -3494,7 +3497,8 @@ function wp_defer_term_counting($defer=null) {
* of term ID. Once that is done, then update the database.
*
* @since 2.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|array $terms The term_taxonomy_id of the terms
* @param string $taxonomy The context of the term.
@ -3607,7 +3611,8 @@ function clean_object_term_cache($object_ids, $object_type) {
* Will remove all of the term ids from the cache.
*
* @since 2.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|array $ids Single or list of Term IDs
* @param string $taxonomy Can be empty and will assume tt_ids, else will use for context.
@ -3870,7 +3875,8 @@ function _get_term_children($term_id, $terms, $taxonomy) {
*
* @access private
* @since 2.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $terms List of Term IDs
* @param string $taxonomy Term Context
@ -3934,7 +3940,8 @@ function _pad_term_counts(&$terms, $taxonomy) {
*
* @access private
* @since 2.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $terms List of Term taxonomy IDs
* @param object $taxonomy Current taxonomy object of terms
@ -3982,7 +3989,8 @@ function _update_post_term_count( $terms, $taxonomy ) {
* Default callback for the link_category taxonomy.
*
* @since 3.3.0
* @uses $wpdb
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $terms List of Term taxonomy IDs
* @param object $taxonomy Current taxonomy object of terms

View File

@ -806,7 +806,7 @@ class WP_User_Query {
*
* @since 3.2.0
*
* @global wpdb $wpdb WordPress database object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $sql The SELECT FOUND_ROWS() query for the current WP_User_Query.
*/

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-alpha-30121';
$wp_version = '4.1-alpha-30122';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -263,7 +263,8 @@ function wp_login_viewport_meta() {
/**
* Handles sending password retrieval email to user.
*
* @uses $wpdb WordPress Database object
* @global wpdb $wpdb WordPress database abstraction object.
* @global PasswordHash $wp_hasher Portable PHP password hashing framework.
*
* @return bool|WP_Error True: when finish. WP_Error on error
*/