From c6a4512b1b20729efc379e37d495fe7d23220d32 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 29 May 2015 20:17:26 +0000 Subject: [PATCH] Add missing doc blocks to `wp-admin/includes/*`. Fix some egregious uses of tabbing. Some functions can simply return `apply_filters(...)` instead of setting a variable that is immediately returned. See #32444. Built from https://develop.svn.wordpress.org/trunk@32654 git-svn-id: http://core.svn.wordpress.org/trunk@32624 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/credits.php | 4 +- wp-admin/custom-background.php | 8 +- wp-admin/custom-header.php | 40 ++++++-- wp-admin/includes/bookmark.php | 4 +- .../includes/class-wp-comments-list-table.php | 58 ++++++++++-- .../includes/class-wp-filesystem-base.php | 1 - .../includes/class-wp-filesystem-ftpext.php | 10 +- .../class-wp-filesystem-ftpsockets.php | 30 +++--- .../includes/class-wp-filesystem-ssh2.php | 58 +++++++----- wp-admin/includes/class-wp-importer.php | 16 +++- .../includes/class-wp-links-list-table.php | 16 ++++ wp-admin/includes/class-wp-list-table.php | 14 ++- .../includes/class-wp-media-list-table.php | 36 +++++-- .../includes/class-wp-ms-sites-list-table.php | 20 +++- .../class-wp-ms-themes-list-table.php | 15 ++- .../includes/class-wp-ms-users-list-table.php | 23 ++++- .../class-wp-plugin-install-list-table.php | 15 ++- .../includes/class-wp-plugins-list-table.php | 17 +++- .../includes/class-wp-posts-list-table.php | 39 ++++++-- .../includes/class-wp-terms-list-table.php | 34 ++++++- .../class-wp-theme-install-list-table.php | 6 ++ .../includes/class-wp-themes-list-table.php | 9 +- .../includes/class-wp-users-list-table.php | 2 + wp-admin/includes/comment.php | 13 ++- wp-admin/includes/template.php | 38 +++++--- wp-admin/includes/theme-install.php | 4 + wp-admin/includes/theme.php | 4 +- wp-admin/includes/update-core.php | 8 +- wp-admin/includes/update.php | 46 ++++++++- wp-admin/includes/upgrade.php | 94 +++++++++---------- wp-admin/includes/user.php | 7 +- wp-admin/includes/widgets.php | 2 + wp-admin/install-helper.php | 12 +-- wp-admin/install.php | 4 + wp-admin/load-styles.php | 5 + wp-admin/menu.php | 6 +- wp-admin/network.php | 4 + wp-admin/network/users.php | 4 + wp-admin/plugins.php | 3 + wp-admin/post.php | 2 +- wp-admin/setup-config.php | 4 +- wp-admin/update-core.php | 3 +- wp-admin/user-new.php | 5 + wp-admin/widgets.php | 5 + wp-includes/version.php | 2 +- 45 files changed, 558 insertions(+), 192 deletions(-) diff --git a/wp-admin/credits.php b/wp-admin/credits.php index 4e160f4eb2..299bbf073b 100644 --- a/wp-admin/credits.php +++ b/wp-admin/credits.php @@ -18,7 +18,7 @@ $title = __( 'Credits' ); * * @since 3.2.0 * - * @return array|bool A list of all of the contributors, or false on error. + * @return array|false A list of all of the contributors, or false on error. */ function wp_credits() { global $wp_version; @@ -55,7 +55,6 @@ function wp_credits() { * @param string &$display_name The contributor's display name, passed by reference. * @param string $username The contributor's username. * @param string $profiles URL to the contributor's WordPress.org profile page. - * @return string A contributor's display name, hyperlinked to a WordPress.org profile page. */ function _wp_credits_add_profile_link( &$display_name, $username, $profiles ) { $display_name = '' . esc_html( $display_name ) . ''; @@ -68,7 +67,6 @@ function _wp_credits_add_profile_link( &$display_name, $username, $profiles ) { * @since 3.2.0 * * @param string &$data External library data, passed by reference. - * @return string Link to the external library. */ function _wp_credits_build_object_link( &$data ) { $data = '' . $data[0] . ''; diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index fc320f9f41..b9e078d1ef 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -108,7 +108,6 @@ class Custom_Background { * @since 3.0.0 */ public function take_action() { - if ( empty($_POST) ) return; @@ -357,7 +356,6 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) ) * @since 3.0.0 */ public function handle_upload() { - if ( empty($_FILES) ) return; @@ -434,6 +432,9 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) ) * * @since 3.4.0 * @deprecated 3.5.0 + * + * @param array $form_fields + * @return $form_fields */ public function attachment_fields_to_edit( $form_fields ) { return $form_fields; @@ -443,6 +444,9 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) ) * * @since 3.4.0 * @deprecated 3.5.0 + * + * @param $tabs + * @return $tabs */ public function filter_upload_tabs( $tabs ) { return $tabs; diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 712e4cc83d..f756968000 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -317,7 +317,6 @@ class Custom_Image_Header { } } ?> -