From 26621b3b44da8466c14862e9b1de5448ae2c2e1e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 20 Jun 2020 12:14:09 +0000 Subject: [PATCH] Docs: Miscellaneous DocBlock corrections for plugin and theme installation and updates. See #49572. Built from https://develop.svn.wordpress.org/trunk@48105 git-svn-id: http://core.svn.wordpress.org/trunk@47874 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-automatic-updater.php | 8 +++----- .../includes/class-wp-ms-themes-list-table.php | 12 +++++++----- .../class-wp-plugin-install-list-table.php | 14 +++++++------- wp-admin/includes/class-wp-plugins-list-table.php | 10 +++++----- .../includes/class-wp-theme-install-list-table.php | 2 +- wp-admin/includes/plugin.php | 6 +++--- wp-admin/themes.php | 4 ++-- wp-includes/version.php | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/wp-admin/includes/class-wp-automatic-updater.php b/wp-admin/includes/class-wp-automatic-updater.php index dee1490dfd..016e36b771 100644 --- a/wp-admin/includes/class-wp-automatic-updater.php +++ b/wp-admin/includes/class-wp-automatic-updater.php @@ -276,7 +276,6 @@ class WP_Automatic_Updater { * * @param string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'. * @param object $item The update offer. - * * @return null|WP_Error */ public function update( $type, $item ) { @@ -1037,10 +1036,9 @@ class WP_Automatic_Updater { * @type string $body The email message body. * @type string $headers Any email headers, defaults to no headers. * } - * @param string $type The type of email being sent. Can be one of - * 'success', 'fail', 'mixed'. - * @param array $successful_updates The updates that succeeded. - * @param array $failed_updates The updates that failed. + * @param string $type The type of email being sent. Can be one of 'success', 'fail', 'mixed'. + * @param array $successful_updates A list of updates that succeeded. + * @param array $failed_updates A list of updates that failed. */ $email = apply_filters( 'auto_plugin_theme_update_email', $email, $type, $successful_updates, $failed_updates ); diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index 96b738608d..4c56a16804 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -639,6 +639,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { */ public function column_description( $theme ) { global $status, $totals; + if ( $theme->errors() ) { $pre = 'broken' === $status ? __( 'Broken Theme:' ) . ' ' : ''; echo '

' . $pre . $theme->errors()->get_error_message() . '

'; @@ -680,20 +681,21 @@ class WP_MS_Themes_List_Table extends WP_List_Table { __( 'Visit Theme Site' ) ); } + /** * Filters the array of row meta for each theme in the Multisite themes * list table. * * @since 3.1.0 * - * @param string[] $theme_meta An array of the theme's metadata, - * including the version, author, and - * theme URI. + * @param string[] $theme_meta An array of the theme's metadata, including + * the version, author, and theme URI. * @param string $stylesheet Directory name of the theme. * @param WP_Theme $theme WP_Theme object. * @param string $status Status of the theme. */ $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $stylesheet, $theme, $status ); + echo implode( ' | ', $theme_meta ); echo ''; @@ -768,8 +770,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table { * * @since 5.5.0 * - * @param string $html The HTML for theme’s auto-update setting including toggle auto-update action link - * and time to next update. + * @param string $html The HTML for theme's auto-update setting, including + * toggle auto-update action link and time to next update. * @param string $stylesheet Directory name of the theme. * @param WP_Theme $theme WP_Theme object. */ diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php index ff172b80d0..e22f203e2b 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -117,21 +117,21 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $nonmenu_tabs = array( 'plugin-information' ); // Valid actions to perform which do not have a Menu item. /** - * Filters the tabs shown on the Plugin Install screen. + * Filters the tabs shown on the Add Plugins screen. * * @since 2.7.0 * - * @param string[] $tabs The tabs shown on the Plugin Install screen. Defaults include 'featured', 'popular', - * 'recommended', 'favorites', and 'upload'. + * @param string[] $tabs The tabs shown on the Add Plugins screen. Defaults include + * 'featured', 'popular', 'recommended', 'favorites', and 'upload'. */ $tabs = apply_filters( 'install_plugins_tabs', $tabs ); /** - * Filters tabs not associated with a menu item on the Plugin Install screen. + * Filters tabs not associated with a menu item on the Add Plugins screen. * * @since 2.7.0 * - * @param string[] $nonmenu_tabs The tabs that don't have a menu item on the Plugin Install screen. + * @param string[] $nonmenu_tabs The tabs that don't have a menu item on the Add Plugins screen. */ $nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs ); @@ -207,14 +207,14 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { } /** - * Filters API request arguments for each Plugin Install screen tab. + * Filters API request arguments for each Add Plugins screen tab. * * The dynamic portion of the hook name, `$tab`, refers to the plugin install tabs. * Default tabs include 'featured', 'popular', 'recommended', 'favorites', and 'upload'. * * @since 3.7.0 * - * @param array|bool $args Plugin Install API arguments. + * @param array|false $args Plugin install API arguments. */ $args = apply_filters( "install_plugins_table_api_args_{$tab}", $args ); diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index ee5833aba1..094ff1b97e 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -1006,9 +1006,8 @@ class WP_Plugins_List_Table extends WP_List_Table { * * @since 2.8.0 * - * @param string[] $plugin_meta An array of the plugin's metadata, - * including the version, author, - * author URI, and plugin URI. + * @param string[] $plugin_meta An array of the plugin's metadata, including + * the version, author, author URI, and plugin URI. * @param string $plugin_file Path to the plugin file relative to the plugins directory. * @param array $plugin_data An array of plugin data. * @param string $status Status of the plugin. Defaults are 'All', 'Active', @@ -1016,6 +1015,7 @@ class WP_Plugins_List_Table extends WP_List_Table { * 'Drop-ins', 'Search', 'Paused'. */ $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status ); + echo implode( ' | ', $plugin_meta ); echo ''; @@ -1089,8 +1089,8 @@ class WP_Plugins_List_Table extends WP_List_Table { * * @since 5.5.0 * - * @param string $html The HTML of the plugin's auto-update column content, - * including toggle auto-update action links and time to next update. + * @param string $html The HTML of the plugin's auto-update column content, including + * toggle auto-update action links and time to next update. * @param string $plugin_file Path to the plugin file relative to the plugins directory. * @param array $plugin_data An array of plugin data. */ diff --git a/wp-admin/includes/class-wp-theme-install-list-table.php b/wp-admin/includes/class-wp-theme-install-list-table.php index 824e213a0c..e5e0ee4ebe 100644 --- a/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/wp-admin/includes/class-wp-theme-install-list-table.php @@ -137,7 +137,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { * * @since 3.7.0 * - * @param array $args An array of themes API arguments. + * @param array|false $args Theme install API arguments. */ $args = apply_filters( "install_themes_table_api_args_{$tab}", $args ); diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index e3af2ce240..1f821a07ed 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -677,7 +677,7 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen * * @param string $plugin Path to the plugin file relative to the plugins directory. * @param bool $network_wide Whether to enable the plugin for all sites in the network - * or just the current site. Multisite only. Default is false. + * or just the current site. Multisite only. Default false. */ do_action( 'activate_plugin', $plugin, $network_wide ); @@ -692,7 +692,7 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen * @since 2.0.0 * * @param bool $network_wide Whether to enable the plugin for all sites in the network - * or just the current site. Multisite only. Default is false. + * or just the current site. Multisite only. Default false. */ do_action( "activate_{$plugin}", $network_wide ); } @@ -719,7 +719,7 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen * * @param string $plugin Path to the plugin file relative to the plugins directory. * @param bool $network_wide Whether to enable the plugin for all sites in the network - * or just the current site. Multisite only. Default is false. + * or just the current site. Multisite only. Default false. */ do_action( 'activated_plugin', $plugin, $network_wide ); } diff --git a/wp-admin/themes.php b/wp-admin/themes.php index c1e5618bab..4bd3e37ed3 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -552,7 +552,7 @@ if ( ! is_multisite() && $broken_themes ) {