From 5e3a64e83d7033cb4679e1635985152b407f9bcd Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 3 Nov 2014 07:09:23 +0000 Subject: [PATCH] Correct some types in `wp-admin/*`-location files' doc blocks. See #30224. Built from https://develop.svn.wordpress.org/trunk@30203 git-svn-id: http://core.svn.wordpress.org/trunk@30203 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/bookmark.php | 2 +- wp-admin/includes/dashboard.php | 2 +- wp-admin/includes/file.php | 4 ++-- wp-admin/includes/image-edit.php | 8 ++++++++ wp-admin/includes/media.php | 18 +++++++++++++----- wp-includes/version.php | 2 +- 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php index 43ccd418cf..f7977944ec 100644 --- a/wp-admin/includes/bookmark.php +++ b/wp-admin/includes/bookmark.php @@ -50,7 +50,7 @@ function edit_link( $link_id = 0 ) { * * @since 2.0.0 * - * @return object Default link + * @return stdClass Default link */ function get_default_link_to_edit() { $link = new stdClass; diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index a1ad29c917..bf37176bae 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -1111,7 +1111,7 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) { * * @since 3.0.0 * - * @return bool True if not multisite, user can't upload files, or the space check option is disabled. + * @return bool|null True if not multisite, user can't upload files, or the space check option is disabled. */ function wp_dashboard_quota() { if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_site_option( 'upload_space_check_disabled' ) ) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 0d57069232..6bb05f0ad8 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -163,7 +163,7 @@ function wp_tempnam($filename = '', $dir = '') { * * @param string $file file the users is attempting to edit * @param array $allowed_files Array of allowed files to edit, $file must match an entry exactly - * @return null + * @return string|null */ function validate_file_to_edit( $file, $allowed_files = '' ) { $code = validate_file( $file, $allowed_files ); @@ -809,7 +809,7 @@ function copy_dir($from, $to, $skip_list = array() ) { * * @param array $args (optional) Connection args, These are passed directly to the WP_Filesystem_*() classes. * @param string $context (optional) Context for get_filesystem_method(), See function declaration for more information. - * @return boolean false on failure, true on success + * @return null|boolean false on failure, true on success */ function WP_Filesystem( $args = false, $context = false ) { global $wp_filesystem; diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php index 99a188e638..05b5068993 100644 --- a/wp-admin/includes/image-edit.php +++ b/wp-admin/includes/image-edit.php @@ -6,6 +6,10 @@ * @subpackage Administration */ +/** + * @param int $post_id + * @param bool|object $msg + */ function wp_image_editor($post_id, $msg = false) { $nonce = wp_create_nonce("image_editor-$post_id"); $meta = wp_get_attachment_metadata($post_id); @@ -554,6 +558,10 @@ function stream_preview_image( $post_id ) { return wp_stream_image( $img, $post->post_mime_type, $post_id ); } +/** + * @param int $post_id + * @return stdClass + */ function wp_restore_image($post_id) { $meta = wp_get_attachment_metadata($post_id); $file = get_attached_file($post_id); diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 14dd237e92..8f5cdaa147 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -570,6 +570,14 @@ function media_buttons($editor_id = 'content') { } add_action( 'media_buttons', 'media_buttons' ); +/** + * + * @global int $post_ID + * @param string $type + * @param int $post_id + * @param string $tab + * @return string + */ function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) { global $post_ID; @@ -717,7 +725,7 @@ function media_upload_form_handler() { * * @since 2.5.0 * - * @return mixed + * @return null|string */ function wp_media_upload_handler() { $errors = array(); @@ -1091,8 +1099,8 @@ function media_post_single_attachment_fields_to_edit( $form_fields, $post ) { * * @since 2.5.0 * - * @param WP_Post $post The WP_Post attachment object. - * @param array $attachment An array of attachment metadata. + * @param array $post The WP_Post attachment object converted to an array. + * @param array $attachment An array of attachment metadata. * @return array Filtered attachment post object. */ function image_attachment_fields_to_save( $post, $attachment ) { @@ -1117,7 +1125,7 @@ add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, * @param string $html * @param integer $attachment_id * @param array $attachment - * @return array + * @return string */ function image_media_send_to_editor($html, $attachment_id, $attachment) { $post = get_post($attachment_id); @@ -1141,7 +1149,7 @@ add_filter('media_send_to_editor', 'image_media_send_to_editor', 10, 3); * * @since 2.5.0 * - * @param object $post + * @param WP_Post $post * @param array $errors * @return array */ diff --git a/wp-includes/version.php b/wp-includes/version.php index b5c691dcca..68cf9daf9b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30202'; +$wp_version = '4.1-alpha-30203'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.