From a5d44337b204539cd59c029ca1e39d08a4d10e30 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 9 Jan 2016 01:45:26 +0000 Subject: [PATCH] Docs: `@param` fixes for a variety of docblocks. See #32246 Built from https://develop.svn.wordpress.org/trunk@36232 git-svn-id: http://core.svn.wordpress.org/trunk@36199 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/list-table.php | 7 +++++-- wp-admin/includes/media.php | 2 ++ wp-admin/includes/meta-boxes.php | 4 +++- wp-admin/includes/misc.php | 2 ++ wp-includes/feed.php | 5 +++-- wp-includes/kses.php | 4 ++++ wp-includes/ms-blogs.php | 7 ++++--- wp-includes/ms-deprecated.php | 4 ++++ wp-includes/ms-functions.php | 16 +++++++++++++--- wp-includes/session.php | 1 + wp-includes/version.php | 2 +- 11 files changed, 42 insertions(+), 12 deletions(-) diff --git a/wp-admin/includes/list-table.php b/wp-admin/includes/list-table.php index 8120598a60..bcc182c866 100644 --- a/wp-admin/includes/list-table.php +++ b/wp-admin/includes/list-table.php @@ -73,11 +73,14 @@ function register_column_headers($screen, $columns) { * Prints column headers for a particular screen. * * @since 2.7.0 + * + * @param string|WP_Screen $screen The screen hook name or screen object. + * @param bool $with_id Whether to set the id attribute or not. */ -function print_column_headers($screen, $id = true) { +function print_column_headers( $screen, $with_id = true ) { $wp_list_table = new _WP_List_Table_Compat($screen); - $wp_list_table->print_column_headers($id); + $wp_list_table->print_column_headers( $with_id ); } /** diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 4acd094f67..966860aea9 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -2688,6 +2688,8 @@ function multisite_over_quota_message() { * Displays the image and editor in the post editor * * @since 3.5.0 + * + * @param WP_Post $post A post object. */ function edit_form_image_editor( $post ) { $open = isset( $_GET['image-editor'] ); diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 9888c3a6ac..fea0a0ad80 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -1173,6 +1173,8 @@ function link_advanced_meta_box($link) { * Display post thumbnail meta box. * * @since 2.9.0 + * + * @param WP_Post $post A post object. */ function post_thumbnail_meta_box( $post ) { $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true ); @@ -1184,7 +1186,7 @@ function post_thumbnail_meta_box( $post ) { * * @since 3.9.0 * - * @param WP_Post $post + * @param WP_Post $post A post object. */ function attachment_id3_data_meta_box( $post ) { $meta = array(); diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 9d54243975..53172b1ad6 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -635,6 +635,8 @@ function saveDomDocument($doc, $filename) { * @since 3.0.0 * * @global array $_wp_admin_css_colors + * + * @param int $user_id User ID. */ function admin_color_scheme_picker( $user_id ) { global $_wp_admin_css_colors; diff --git a/wp-includes/feed.php b/wp-includes/feed.php index 3a77e1416f..feb690d8da 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -622,6 +622,8 @@ function self_link() { * Return the content type for specified feed type. * * @since 2.8.0 + * + * @param string $type Type of feed. Possible values include 'rss', rss2', 'atom', and 'rdf'. */ function feed_content_type( $type = '' ) { if ( empty($type) ) @@ -642,8 +644,7 @@ function feed_content_type( $type = '' ) { * @since 2.8.0 * * @param string $content_type Content type indicating the type of data that a feed contains. - * @param string $type Type of feed. Possible values include 'rss2', 'atom'. - * Default 'rss2'. + * @param string $type Type of feed. Possible values include 'rss', rss2', 'atom', and 'rdf'. */ return apply_filters( 'feed_content_type', $content_type, $type ); } diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 20d6b9d5dd..0eee02ee2d 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -1671,6 +1671,10 @@ function kses_init() { * Inline CSS filter * * @since 2.8.1 + * + * @param string $css A string of CSS rules. + * @param string $deprecated Not used. + * @return string Filtered string of CSS rules. */ function safecss_filter_attr( $css, $deprecated = '' ) { if ( !empty( $deprecated ) ) diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 84f63ed71d..b41a9153db 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -559,9 +559,10 @@ function delete_blog_option( $id, $option ) { * * @since MU * - * @param int $id The blog id - * @param string $option The option key - * @param mixed $value The option value + * @param int $id The blog id. + * @param string $option The option key. + * @param mixed $value The option value. + * @param mixed $deprecated Not used. * @return bool True on success, false on failure. */ function update_blog_option( $id, $option, $value, $deprecated = null ) { diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index e9ab99a777..feac0bd1da 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -153,6 +153,10 @@ function is_main_blog() { * @since MU * @deprecated 3.0.0 Use is_email() * @see is_email() + * + * @param string $email Email address to verify. + * @param bool $check_domain Deprecated. + * @return string|bool Either false or the valid email address. */ function validate_email( $email, $check_domain = true) { _deprecated_function( __FUNCTION__, '3.0', 'is_email()' ); diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 7f00339993..e3c15d7630 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -1159,7 +1159,8 @@ function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $s * * @since MU * - * @param int $blog_id The new site's ID. + * @param int $blog_id The new site's ID. + * @param string $deprecated Not used. * @return bool */ function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) { @@ -1754,6 +1755,8 @@ function check_upload_mimes( $mimes ) { * @since MU * * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $deprecated Not used. */ function update_posts_count( $deprecated = '' ) { global $wpdb; @@ -1787,7 +1790,8 @@ function wpmu_log_new_registrations( $blog_id, $user_id ) { * @global wpdb $wpdb WordPress database abstraction object. * @staticvar int $global_terms_recurse * - * @param int $term_id An ID for a term on the current blog. + * @param int $term_id An ID for a term on the current blog. + * @param string $deprecated Not used. * @return int An ID from the global terms table mapped from $term_id. */ function global_terms( $term_id, $deprecated = '' ) { @@ -1856,6 +1860,7 @@ function global_terms( $term_id, $deprecated = '' ) { * @see wp_validate_redirect() * @since MU * + * @param array|string $deprecated Not used. * @return array The current site's domain */ function redirect_this_site( $deprecated = '' ) { @@ -2019,6 +2024,8 @@ function add_new_user_to_blog( $user_id, $password, $meta ) { * Correct From host on outgoing mail to match the site domain * * @since MU + * + * @param PHPMailer $phpmailer The PHPMailer instance, passed by reference. */ function fix_phpmailer_messageid( $phpmailer ) { $phpmailer->Hostname = get_current_site()->domain; @@ -2351,9 +2358,12 @@ function is_upload_space_available() { } /** + * Filters the maximum upload file size allowed, in bytes. + * * @since 3.0.0 * - * @return int of upload size limit in bytes + * @param int $size Upload size limit in bytes. + * @return int Upload size limit in bytes. */ function upload_size_limit_filter( $size ) { $fileupload_maxk = KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 ); diff --git a/wp-includes/session.php b/wp-includes/session.php index 1d7c5d01a1..409fe30a40 100644 --- a/wp-includes/session.php +++ b/wp-includes/session.php @@ -275,6 +275,7 @@ abstract class WP_Session_Tokens { * @access protected * * @param string $verifier Verifier of the session to update. + * @param array $session Optional. Session. Omitting this argument destroys the session. */ abstract protected function update_session( $verifier, $session = null ); diff --git a/wp-includes/version.php b/wp-includes/version.php index c902c5d709..01e4eba64d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36231'; +$wp_version = '4.5-alpha-36232'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.