From ccc5f888876bcb32874926cf121afe625e566eae Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Mon, 24 Nov 2014 04:57:17 +0000 Subject: [PATCH] Ensure inline code is markdown-escaped as such, and that code snippets in descriptions are properly indented. Affects DocBlocks for the following core elements: * Backtick-escapes a `` tag in a parameter description for the `embed_oembed_discover` hook * Inline code fixes in the summary and return description for `WP_List_Table::get_table_classes()` * Removes HTML markup from the summary for `WP_List_Table::display_rows_or_placeholder()` * Backtick-escapes a `` tag in a parameter description for `WP_Users_List_Table::single_row()` * Converts non-DocBlocks into multi-line comments in `WP_Dependencies::do_items()` * Removes HTML markup from the summary for the `comment_form_top` hook. * Inline code and snippet fixes in the description for `wp_get_schedules()` Props rarst for the initial patch. See #30473. git-svn-id: https://develop.svn.wordpress.org/trunk@30537 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-list-table.php | 6 +++--- .../includes/class-wp-users-list-table.php | 2 +- src/wp-includes/class-wp-embed.php | 2 +- src/wp-includes/class.wp-dependencies.php | 8 ++++---- src/wp-includes/cron.php | 16 ++++++++-------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php index b698d58a8f..488d1a851d 100644 --- a/src/wp-admin/includes/class-wp-list-table.php +++ b/src/wp-admin/includes/class-wp-list-table.php @@ -913,12 +913,12 @@ class WP_List_Table { } /** - * Get a list of CSS classes for the tag + * Get a list of CSS classes for the list table table tag. * * @since 3.1.0 * @access protected * - * @return array + * @return array List of CSS classes for the table tag. */ protected function get_table_classes() { return array( 'widefat', 'fixed', $this->_args['plural'] ); @@ -958,7 +958,7 @@ class WP_List_Table { protected function extra_tablenav( $which ) {} /** - * Generate the part of the table + * Generate the tbody element for the list table. * * @since 3.1.0 * @access public diff --git a/src/wp-admin/includes/class-wp-users-list-table.php b/src/wp-admin/includes/class-wp-users-list-table.php index 15d55f4e41..81637e98b5 100644 --- a/src/wp-admin/includes/class-wp-users-list-table.php +++ b/src/wp-admin/includes/class-wp-users-list-table.php @@ -331,7 +331,7 @@ class WP_Users_List_Table extends WP_List_Table { * @access public * * @param object $user_object The current user object. - * @param string $style Optional. Style attributes added to the element. + * @param string $style Optional. Style attributes added to the `` element. * Must be sanitized. Default empty. * @param string $role Optional. Key for the $wp_roles array. Default empty. * @param int $numposts Optional. Post count to display for this user. Defaults diff --git a/src/wp-includes/class-wp-embed.php b/src/wp-includes/class-wp-embed.php index 03e5e8a56c..a3c524d8b5 100644 --- a/src/wp-includes/class-wp-embed.php +++ b/src/wp-includes/class-wp-embed.php @@ -229,7 +229,7 @@ class WP_Embed { * * @see WP_oEmbed::discover() * - * @param bool $enable Whether to enable link tag discovery. Default false. + * @param bool $enable Whether to enable `` tag discovery. Default false. */ $attr['discover'] = ( apply_filters( 'embed_oembed_discover', false ) && author_can( $post_ID, 'unfiltered_html' ) ); diff --git a/src/wp-includes/class.wp-dependencies.php b/src/wp-includes/class.wp-dependencies.php index c1bac65ba1..7995a908c8 100644 --- a/src/wp-includes/class.wp-dependencies.php +++ b/src/wp-includes/class.wp-dependencies.php @@ -89,7 +89,7 @@ class WP_Dependencies { * @return array Handles of items that have been processed. */ public function do_items( $handles = false, $group = false ) { - /** + /* * If nothing is passed, print the queue. If a string is passed, * print that item. If an array is passed, print those items. */ @@ -99,7 +99,7 @@ class WP_Dependencies { foreach( $this->to_do as $key => $handle ) { if ( !in_array($handle, $this->done, true) && isset($this->registered[$handle]) ) { - /** + /* * A single item may alias a set of items, by having dependencies, * but no source. Queuing the item queues the dependencies. * @@ -107,13 +107,13 @@ class WP_Dependencies { * add( 'scriptaculous', false, array( 'scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls' ) ); * * The src property is false. - **/ + */ if ( ! $this->registered[$handle]->src ) { $this->done[] = $handle; continue; } - /** + /* * Attempt to process the item. If successful, * add the handle to the done array. * diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php index c4ce866cf6..d9865bd21e 100644 --- a/src/wp-includes/cron.php +++ b/src/wp-includes/cron.php @@ -349,17 +349,17 @@ function wp_cron() { * 60*60*24*7 or 604800. The value of 'interval' would then be 604800. * * The 'display' is the description. For the 'weekly' key, the 'display' would - * be __('Once Weekly'). + * be `__( 'Once Weekly' )`. * * For your plugin, you will be passed an array. you can easily add your * schedule by doing the following. - * - * // filter parameter variable name is 'array' - * $array['weekly'] = array( - * 'interval' => 604800, - * 'display' => __('Once Weekly') - * ); - * + * + * // Filter parameter variable name is 'array'. + * $array['weekly'] = array( + * 'interval' => 604800, + * 'display' => __( 'Once Weekly' ) + * ); + * * * @since 2.1.0 *