From c6c46a5a48beec445f919548f88c36efccc1e080 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 28 Oct 2019 19:46:13 +0000 Subject: [PATCH] Docs: Miscellaneous docblock corrections. See #48303 git-svn-id: https://develop.svn.wordpress.org/trunk@46610 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-core-upgrader.php | 1 + src/wp-admin/includes/class-wp-list-table.php | 8 ++++---- src/wp-includes/functions.php | 16 ++++++++-------- src/wp-includes/post-template.php | 4 ++-- src/wp-includes/script-loader.php | 14 +++++++------- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/wp-admin/includes/class-core-upgrader.php b/src/wp-admin/includes/class-core-upgrader.php index ad94983074..6ea093c8d0 100644 --- a/src/wp-admin/includes/class-core-upgrader.php +++ b/src/wp-admin/includes/class-core-upgrader.php @@ -127,6 +127,7 @@ class Core_Upgrader extends WP_Upgrader { // WARNING: This may be removed in the future. if ( is_wp_error( $download ) && $download->get_error_data( 'softfail-filename' ) ) { // Outout the failure error as a normal feedback, and not as an error: + /** This filter is documented in wp-admin/includes/update-core.php */ apply_filters( 'update_feedback', $download->get_error_message() ); // Report this failure back to WordPress.org for debugging purposes. diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php index cf0c05c2ab..3faaec691d 100644 --- a/src/wp-admin/includes/class-wp-list-table.php +++ b/src/wp-admin/includes/class-wp-list-table.php @@ -501,13 +501,13 @@ class WP_List_Table { } /** - * Generate row actions div + * Generates the required HTML for a list of row action links. * * @since 3.1.0 * * @param string[] $actions An array of action links. * @param bool $always_visible Whether the actions should be always visible. - * @return string + * @return string The HTML for the row actions. */ protected function row_actions( $actions, $always_visible = false ) { $action_count = count( $actions ); @@ -531,14 +531,14 @@ class WP_List_Table { } /** - * Display a monthly dropdown for filtering items + * Displays a dropdown for filtering items in the list table by month. * * @since 3.1.0 * * @global wpdb $wpdb WordPress database abstraction object. * @global WP_Locale $wp_locale WordPress date and time locale object. * - * @param string $post_type + * @param string $post_type The post type. */ protected function months_dropdown( $post_type ) { global $wpdb, $wp_locale; diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 035b70af5c..3a2199bd36 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -2618,8 +2618,8 @@ function wp_ext2type( $ext ) { * @return array { * Values for the extension and mime type. * - * @type string|false $0 File extension, or false if the file doesn't match a mime type. - * @type string|false $1 File mime type, or false if the file doesn't match a mime type. + * @type string|false $ext File extension, or false if the file doesn't match a mime type. + * @type string|false $type File mime type, or false if the file doesn't match a mime type. * } */ function wp_check_filetype( $filename, $mimes = null ) { @@ -2660,9 +2660,9 @@ function wp_check_filetype( $filename, $mimes = null ) { * @return array { * Values for the extension, mime type, and corrected filename. * - * @type string|false $0 File extension, or false if the file doesn't match a mime type. - * @type string|false $1 File mime type, or false if the file doesn't match a mime type. - * @type string|false $2 File name with its correct extension, or false if it cannot be determined. + * @type string|false $ext File extension, or false if the file doesn't match a mime type. + * @type string|false $type File mime type, or false if the file doesn't match a mime type. + * @type string|false $proper_filename File name with its correct extension, or false if it cannot be determined. * } */ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) { @@ -2822,9 +2822,9 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) { * @param array $wp_check_filetype_and_ext { * Values for the extension, mime type, and corrected filename. * - * @type string|false $0 File extension, or false if the file doesn't match a mime type. - * @type string|false $1 File mime type, or false if the file doesn't match a mime type. - * @type string|false $2 File name with its correct extension, or false if it cannot be determined. + * @type string|false $ext File extension, or false if the file doesn't match a mime type. + * @type string|false $type File mime type, or false if the file doesn't match a mime type. + * @type string|false $proper_filename File name with its correct extension, or false if it cannot be determined. * } * @param string $file Full path to the file. * @param string $filename The name of the file (may differ from $file due to diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 8bed3945f5..75ffc47ab2 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -419,8 +419,8 @@ function get_the_excerpt( $post = null ) { * @since 1.2.0 * @since 4.5.0 Introduced the `$post` parameter. * - * @param string $post_excerpt The post excerpt. - * @param WP_Post $post Post object. + * @param string $post_excerpt The post excerpt. + * @param WP_Post $post Post object. */ return apply_filters( 'get_the_excerpt', $post->post_excerpt, $post ); } diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 26068f2039..9c505cf494 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -778,7 +778,7 @@ function wp_tinymce_inline_scripts() { 'wpview', ); - /* This filter is documented in wp-includes/class-wp-editor.php */ + /** This filter is documented in wp-includes/class-wp-editor.php */ $tinymce_plugins = apply_filters( 'tiny_mce_plugins', $tinymce_plugins, 'classic-block' ); $tinymce_plugins = array_unique( $tinymce_plugins ); @@ -807,7 +807,7 @@ function wp_tinymce_inline_scripts() { 'wp_adv', ); - /* This filter is documented in wp-includes/class-wp-editor.php */ + /** This filter is documented in wp-includes/class-wp-editor.php */ $toolbar1 = apply_filters( 'mce_buttons', $toolbar1, 'classic-block' ); $toolbar2 = array( @@ -824,13 +824,13 @@ function wp_tinymce_inline_scripts() { 'wp_help', ); - /* This filter is documented in wp-includes/class-wp-editor.php */ + /** This filter is documented in wp-includes/class-wp-editor.php */ $toolbar2 = apply_filters( 'mce_buttons_2', $toolbar2, 'classic-block' ); - /* This filter is documented in wp-includes/class-wp-editor.php */ + /** This filter is documented in wp-includes/class-wp-editor.php */ $toolbar3 = apply_filters( 'mce_buttons_3', array(), 'classic-block' ); - /* This filter is documented in wp-includes/class-wp-editor.php */ + /** This filter is documented in wp-includes/class-wp-editor.php */ $toolbar4 = apply_filters( 'mce_buttons_4', array(), 'classic-block' ); - /* This filter is documented in wp-includes/class-wp-editor.php */ + /** This filter is documented in wp-includes/class-wp-editor.php */ $external_plugins = apply_filters( 'mce_external_plugins', array(), 'classic-block' ); $tinymce_settings = array( @@ -851,7 +851,7 @@ function wp_tinymce_inline_scripts() { array_merge( $tinymce_settings, $editor_settings['tinymce'] ); } - /* This filter is documented in wp-includes/class-wp-editor.php */ + /** This filter is documented in wp-includes/class-wp-editor.php */ $tinymce_settings = apply_filters( 'tiny_mce_before_init', $tinymce_settings, 'classic-block' ); // Do "by hand" translation from PHP array to js object.