From 4b6abbaff44cd116b22806d681987fe6d0ae3d08 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 24 Nov 2014 06:31:21 +0000 Subject: [PATCH] Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented. Affects DocBlocks for the following core elements: * Backtick-escape code snippets in the description for `get_object_taxonomies()` * Backtick-escape inline code in a markdown-formatted unordered list in the description for `get_taxonomy_labels()` * Remove an HTML tag from the summary for the `Walker_Category_Checklist` class * Remove an HTML tag from the summary for `wp_category_checklist()`, various formatting * Remove an HTML tag from the summary for `wp_terms_checklist()` * Backtick-escape an HTML tag in the description for `wp_popular_terms_checklist()` * Remove HTML tags from the summaries for `page_template_dropdown()`, `parent_dropdown()`, and `wp_dropdown_roles()` * Backtick-escape HTML tags in a parameter description for `add_settings_error()` * Various formatting in the description and summary for `settings_errors()` * Markdown-indent code snippets in the descriptions for `wpdb::prepare()`, `wpdb::insert()`, `wpdb::replace()`, `wpdb::update()`, and `wpdb::delete()` * Backtick-escape an HTML tag in a parameter description for `login_header()` * Remove HTML tags from the summaries for the `lostpassword_form` and `signup_header` hooks Props rarst. See #30473. Built from https://develop.svn.wordpress.org/trunk@30546 git-svn-id: http://core.svn.wordpress.org/trunk@30535 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 62 +++++++++++++++++++++------------- wp-includes/taxonomy.php | 7 ++-- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 30 ++++++---------- wp-login.php | 5 +-- wp-signup.php | 2 +- 6 files changed, 57 insertions(+), 51 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 990834d0cb..56417ba571 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -13,12 +13,13 @@ // /** - * Walker to output an unordered list of category checkbox elements. + * Walker to output an unordered list of category checkbox input elements. + * + * @since 2.5.1 * * @see Walker * @see wp_category_checklist() * @see wp_terms_checklist() - * @since 2.5.1 */ class Walker_Category_Checklist extends Walker { public $tree_type = 'category'; @@ -112,12 +113,15 @@ class Walker_Category_Checklist extends Walker { } /** - * Output an unordered list of checkbox elements labelled + * Output an unordered list of checkbox input elements labelled * with category names. * - * @see wp_terms_checklist() * @since 2.5.1 * + * @todo Properly document optional arguments as such. + * + * @see wp_terms_checklist() + * * @param int $post_id Mark categories associated with this post as checked. $selected_cats must not be an array. * @param int $descendants_and_self ID of the category to output along with its descendents. * @param bool|array $selected_cats List of categories to mark as checked. @@ -137,13 +141,16 @@ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $select } /** - * Output an unordered list of checkbox elements labelled - * with term names. Taxonomy independent version of wp_category_checklist(). + * Output an unordered list of checkbox input elements labelled with term names. + * + * Taxonomy independent version of {@see wp_category_checklist()}. * * @since 3.0.0 * - * @param int $post_id - * @param array $args + * @todo Properly document optional default arguments. + * + * @param int $post_id Post ID. + * @param array $args Arguments to form the terms checklist. */ function wp_terms_checklist( $post_id = 0, $args = array() ) { $defaults = array( @@ -236,7 +243,7 @@ function wp_terms_checklist( $post_id = 0, $args = array() ) { * Retrieve a list of the most popular terms from the specified taxonomy. * * If the $echo argument is true then the elements for a list of checkbox - * elements labelled with the names of the selected terms is output. + * `` elements labelled with the names of the selected terms is output. * If the $post_ID global isn't empty then the terms associated with that * post will be marked as checked. * @@ -782,7 +789,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { } /** - * Print out