From b8ce0261dfe87475b687d32ec909fc16418a552d Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 18 Nov 2010 19:12:48 +0000 Subject: [PATCH] More param fixes, props duck_. see #14783. git-svn-id: http://svn.automattic.com/wordpress/trunk@16469 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-list-table.php | 4 ++-- wp-admin/includes/plugin-install.php | 3 --- wp-includes/cache.php | 2 -- wp-includes/category-template.php | 2 +- wp-includes/class.wp-dependencies.php | 24 +++++++++++------------ wp-includes/class.wp-scripts.php | 10 +++++----- wp-includes/formatting.php | 2 +- wp-includes/functions.php | 6 +++--- wp-includes/ms-blogs.php | 6 +++++- wp-includes/post-template.php | 2 +- wp-includes/post.php | 3 ++- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 04028c501a..814208bdbf 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -737,7 +737,7 @@ class WP_List_Table { * @since 3.1.0 * @access protected * - * @param $object $item The current item + * @param object $item The current item */ function single_row( $item ) { static $row_class = ''; @@ -754,7 +754,7 @@ class WP_List_Table { * @since 3.1.0 * @access protected * - * @param $object $item The current item + * @param object $item The current item */ function single_row_columns( $item ) { list( $columns, $hidden ) = $this->get_column_info(); diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 33d7f07e88..beb54676f1 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -157,9 +157,6 @@ add_action('install_plugins_upload', 'install_plugins_upload', 10, 1); * Display plugin content based on plugin list. * * @since 2.7.0 - * - * @param array $plugins List of plugins. - * @param int $total_plugins Number of plugins. */ function display_plugins_table() { global $wp_list_table; diff --git a/wp-includes/cache.php b/wp-includes/cache.php index dbefabf25c..895c43161a 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -171,8 +171,6 @@ function wp_cache_add_non_persistent_groups( $groups ) { * this function instructs the backend to reset those keys and perform any cleanup since blog or site IDs have changed since cache init. * * @since 2.6.0 - * - * @param string|array $groups A group or an array of groups to add */ function wp_cache_reset() { global $wp_object_cache; diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 37fd19409e..3a7d9ae72f 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -1174,7 +1174,7 @@ function has_tag( $tag = '', $post = null ) { * * @param string|int|array $term Optional. The term name/term_id/slug or array of them to check for. * @param string $taxonomy Taxonomy name - * @param int|post object Optional. Post to check instead of the current post. + * @param int|object $post Optional. Post to check instead of the current post. * @return bool True if the current post has any of the given tags (or any tag, if no tag specified). */ function has_term( $term = '', $taxonomy = '', $post = null ) { diff --git a/wp-includes/class.wp-dependencies.php b/wp-includes/class.wp-dependencies.php index ea607de2cf..de3630ad84 100644 --- a/wp-includes/class.wp-dependencies.php +++ b/wp-includes/class.wp-dependencies.php @@ -37,11 +37,11 @@ class WP_Dependencies { * * Process the items passed to it or the queue. Processes all dependencies. * - * @param mixed handles (optional) items to be processed. (void) processes queue, (string) process that item, (array of strings) process those items + * @param mixed $handles (optional) items to be processed. (void) processes queue, (string) process that item, (array of strings) process those items * @return array Items that have been processed */ function do_items( $handles = false, $group = false ) { - // Print the queue if nothing is passed. If a string is passed, print that script. If an array is passed, print those scripts. + // Print the queue if nothing is passed. If a string is passed, print that script. If an array is passed, print those scripts. $handles = false === $handles ? $this->queue : (array) $handles; $this->all_deps( $handles ); @@ -72,9 +72,9 @@ class WP_Dependencies { * * Recursively builds array of items to process taking dependencies into account. Does NOT catch infinite loops. * - - * @param mixed handles Accepts (string) dep name or (array of strings) dep names - * @param bool recursion Used internally when function calls itself + * + * @param mixed $handles Accepts (string) dep name or (array of strings) dep names + * @param bool $recursion Used internally when function calls itself */ function all_deps( $handles, $recursion = false, $group = false ) { if ( !$handles = (array) $handles ) @@ -125,10 +125,10 @@ class WP_Dependencies { * * Adds the item only if no item of that name already exists * - * @param string handle Script name - * @param string src Script url - * @param array deps (optional) Array of script names on which this script depends - * @param string ver (optional) Script version (used for cache busting) + * @param string $handle Script name + * @param string $src Script url + * @param array $deps (optional) Array of script names on which this script depends + * @param string $ver (optional) Script version (used for cache busting) * @return array Hierarchical array of dependencies */ function add( $handle, $src, $deps = array(), $ver = false, $args = null ) { @@ -143,9 +143,9 @@ class WP_Dependencies { * * Adds data only if script has already been added * - * @param string handle Script name - * @param string data_name Name of object in which to store extra data - * @param array data Array of extra data + * @param string $handle Script name + * @param string $data_name Name of object in which to store extra data + * @param array $data Array of extra data * @return bool success */ function add_data( $handle, $data_name, $data ) { diff --git a/wp-includes/class.wp-scripts.php b/wp-includes/class.wp-scripts.php index 9ba2fcc420..681a824699 100644 --- a/wp-includes/class.wp-scripts.php +++ b/wp-includes/class.wp-scripts.php @@ -39,8 +39,8 @@ class WP_Scripts extends WP_Dependencies { * * Prints the scripts passed to it or the print queue. Also prints all necessary dependencies. * - * @param mixed handles (optional) Scripts to be printed. (void) prints queue, (string) prints that script, (array of strings) prints those scripts. - * @param int group (optional) If scripts were queued in groups prints this group number. + * @param mixed $handles (optional) Scripts to be printed. (void) prints queue, (string) prints that script, (array of strings) prints those scripts. + * @param int $group (optional) If scripts were queued in groups prints this group number. * @return array Scripts that have been printed */ function print_scripts( $handles = false, $group = false ) { @@ -135,9 +135,9 @@ class WP_Scripts extends WP_Dependencies { * * Localizes only if script has already been added * - * @param string handle Script name - * @param string object_name Name of JS object to hold l10n info - * @param array l10n Array of JS var name => localized string + * @param string $handle Script name + * @param string $object_name Name of JS object to hold l10n info + * @param array $l10n Array of JS var name => localized string * @return bool Successful localization */ function localize( $handle, $object_name, $l10n ) { diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index b5d690c7b9..04ed7f9747 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1577,7 +1577,7 @@ function wp_iso_descrambler($string) { * * @since 3.1.0 * @access private - * @param $match the preg_replace_callback matches array + * @param array $match the preg_replace_callback matches array */ function _wp_iso_convert( $match ) { return chr( hexdec( strtolower( $match[1] ) ) ); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e0a663a800..ea64136433 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -4360,8 +4360,8 @@ function _wp_mysql_week( $column ) { * @access private * * @param callback $callback function that accepts ( ID, $callback_args ) and outputs parent_ID - * @param $start The ID to start the loop check at - * @param $start_parent the parent_ID of $start to use instead of calling $callback( $start ). Use null to always use $callback + * @param int $start The ID to start the loop check at + * @param int $start_parent the parent_ID of $start to use instead of calling $callback( $start ). Use null to always use $callback * @param array $callback_args optional additional arguments to send to $callback * @return array IDs of all members of loop */ @@ -4384,7 +4384,7 @@ function wp_find_hierarchy_loop( $callback, $start, $start_parent, $callback_arg * @access private * * @param callback $callback function that accupts ( ID, callback_arg, ... ) and outputs parent_ID - * @param $start The ID to start the loop check at + * @param int $start The ID to start the loop check at * @param array $override an array of ( ID => parent_ID, ... ) to use instead of $callback * @param array $callback_args optional additional arguments to send to $callback * @param bool $_return_loop Return loop members or just detect presence of loop? diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 7eed680657..b24a3865c5 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -664,13 +664,17 @@ function get_blog_status( $id, $pref ) { * * @since MU * - * @param $deprecated Not used + * @param mixed $deprecated Not used * @param int $start The offset * @param int $quantity The maximum number of blogs to retrieve. Default is 40. * @return array The list of blogs */ function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) { global $wpdb; + + if ( ! empty( $deprecated ) ) + _deprecated_argument( __FUNCTION__, 'MU' ); // never used + return $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity ) , ARRAY_A ); } diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 1d0e39e034..6dffb4d0df 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -675,7 +675,7 @@ function wp_link_pages($args = '') { * @since 3.1.0 * @access private * - * @param $i Page number. + * @param int $i Page number. * @return string Link. */ function _wp_link_page( $i ) { diff --git a/wp-includes/post.php b/wp-includes/post.php index fbc6455e90..4fcc44991d 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -5042,7 +5042,8 @@ function wp_check_post_hierarchy_for_loops( $post_parent, $post_ID ) { * * @since 2.0.0 * - * @param string A post type string, defaults to 'post'. + * @param string $post_type A post type string, defaults to 'post'. + * @param bool $create_in_db If true then also insert an auto-draft into database * @return object stdClass object containing all the default post data as attributes */ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) {