mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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
This commit is contained in:
parent
3b6c9519a8
commit
4b6abbaff4
@ -13,12 +13,13 @@
|
||||
//
|
||||
|
||||
/**
|
||||
* Walker to output an unordered list of category checkbox <input> 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 <input> 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 <input> 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
|
||||
* <input> elements labelled with the names of the selected terms is output.
|
||||
* `<input>` 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 <option> HTML elements for the page templates drop-down.
|
||||
* Print out option HTML elements for the page templates drop-down.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
@ -798,7 +805,7 @@ function page_template_dropdown( $default = '' ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print out <option> HTML elements for the page parents drop-down.
|
||||
* Print out option HTML elements for the page parents drop-down.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
@ -831,7 +838,7 @@ function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print out <option> html elements for role selectors
|
||||
* Print out option html elements for role selectors.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
@ -1307,12 +1314,15 @@ function do_settings_fields($page, $section) {
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @todo Properly document optional arguments as such.
|
||||
*
|
||||
* @global array $wp_settings_errors Storage array of errors registered during this pageload
|
||||
*
|
||||
* @param string $setting Slug title of the setting to which this error applies
|
||||
* @param string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
|
||||
* @param string $message The formatted message text to display to the user (will be shown inside styled <div> and <p>)
|
||||
* @param string $type The type of message it is, controls HTML class. Use 'error' or 'updated'.
|
||||
* @param string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
|
||||
* @param string $message The formatted message text to display to the user (will be shown inside styled
|
||||
* `<div>` and `<p>` tags).
|
||||
* @param string $type The type of message it is, controls HTML class. Use 'error' or 'updated'.
|
||||
*/
|
||||
function add_settings_error( $setting, $code, $message, $type = 'error' ) {
|
||||
global $wp_settings_errors;
|
||||
@ -1382,20 +1392,24 @@ function get_settings_errors( $setting = '', $sanitize = false ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Display settings errors registered by add_settings_error()
|
||||
* Display settings errors registered by {@see add_settings_error()}.
|
||||
*
|
||||
* Part of the Settings API. Outputs a <div> for each error retrieved by get_settings_errors().
|
||||
* Part of the Settings API. Outputs a div for each error retrieved by
|
||||
* {@see get_settings_errors()}.
|
||||
*
|
||||
* This is called automatically after a settings page based on the Settings API is submitted.
|
||||
* Errors should be added during the validation callback function for a setting defined in register_setting()
|
||||
* This is called automatically after a settings page based on the
|
||||
* Settings API is submitted. Errors should be added during the validation
|
||||
* callback function for a setting defined in {@see register_setting()}
|
||||
*
|
||||
* The $sanitize option is passed into get_settings_errors() and will re-run the setting sanitization
|
||||
* The $sanitize option is passed into {@see get_settings_errors()} and will
|
||||
* re-run the setting sanitization
|
||||
* on its current value.
|
||||
*
|
||||
* The $hide_on_update option will cause errors to only show when the settings page is first loaded.
|
||||
* if the user has already saved new values it will be hidden to avoid repeating messages already
|
||||
* shown in the default error reporting after submission. This is useful to show general errors like missing
|
||||
* settings when the user arrives at the settings page.
|
||||
* The $hide_on_update option will cause errors to only show when the settings
|
||||
* page is first loaded. if the user has already saved new values it will be
|
||||
* hidden to avoid repeating messages already shown in the default error
|
||||
* reporting after submission. This is useful to show general errors like
|
||||
* missing settings when the user arrives at the settings page.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
|
@ -155,8 +155,8 @@ function get_taxonomies( $args = array(), $output = 'names', $operator = 'and' )
|
||||
* It appears that this function can be used to find all of the names inside of
|
||||
* $wp_taxonomies global variable.
|
||||
*
|
||||
* <code><?php $taxonomies = get_object_taxonomies('post'); ?></code> Should
|
||||
* result in <code>Array('category', 'post_tag')</code>
|
||||
* `<?php $taxonomies = get_object_taxonomies('post'); ?>` Should
|
||||
* result in `Array( 'category', 'post_tag' )`
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
@ -434,13 +434,14 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
||||
* Builds an object with all taxonomy labels out of a taxonomy object
|
||||
*
|
||||
* Accepted keys of the label array in the taxonomy object:
|
||||
*
|
||||
* - name - general name for the taxonomy, usually plural. The same as and overridden by $tax->label. Default is Tags/Categories
|
||||
* - singular_name - name for one object of this taxonomy. Default is Tag/Category
|
||||
* - search_items - Default is Search Tags/Search Categories
|
||||
* - popular_items - This string isn't used on hierarchical taxonomies. Default is Popular Tags
|
||||
* - all_items - Default is All Tags/All Categories
|
||||
* - parent_item - This string isn't used on non-hierarchical taxonomies. In hierarchical ones the default is Parent Category
|
||||
* - parent_item_colon - The same as <code>parent_item</code>, but with colon <code>:</code> in the end
|
||||
* - parent_item_colon - The same as `parent_item`, but with colon `:ё in the end
|
||||
* - edit_item - Default is Edit Tag/Edit Category
|
||||
* - view_item - Default is View Tag/View Category
|
||||
* - update_item - Default is Update Tag/Update Category
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-beta2-30545';
|
||||
$wp_version = '4.1-beta2-30546';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -1172,10 +1172,8 @@ class wpdb {
|
||||
*
|
||||
* Both %d and %s should be left unquoted in the query string.
|
||||
*
|
||||
* <code>
|
||||
* wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 )
|
||||
* wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
|
||||
* </code>
|
||||
* wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 )
|
||||
* wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
|
||||
*
|
||||
* @link http://php.net/sprintf Description of syntax.
|
||||
* @since 2.3.0
|
||||
@ -1724,10 +1722,8 @@ class wpdb {
|
||||
/**
|
||||
* Insert a row into a table.
|
||||
*
|
||||
* <code>
|
||||
* wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
|
||||
* wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
|
||||
* </code>
|
||||
* wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
|
||||
* wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @see wpdb::prepare()
|
||||
@ -1747,10 +1743,8 @@ class wpdb {
|
||||
/**
|
||||
* Replace a row into a table.
|
||||
*
|
||||
* <code>
|
||||
* wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
|
||||
* wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
|
||||
* </code>
|
||||
* wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
|
||||
* wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @see wpdb::prepare()
|
||||
@ -1814,10 +1808,8 @@ class wpdb {
|
||||
/**
|
||||
* Update a row in the table
|
||||
*
|
||||
* <code>
|
||||
* wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) )
|
||||
* wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) )
|
||||
* </code>
|
||||
* wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) )
|
||||
* wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) )
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @see wpdb::prepare()
|
||||
@ -1868,10 +1860,8 @@ class wpdb {
|
||||
/**
|
||||
* Delete a row in the table
|
||||
*
|
||||
* <code>
|
||||
* wpdb::delete( 'table', array( 'ID' => 1 ) )
|
||||
* wpdb::delete( 'table', array( 'ID' => 1 ), array( '%d' ) )
|
||||
* </code>
|
||||
* wpdb::delete( 'table', array( 'ID' => 1 ) )
|
||||
* wpdb::delete( 'table', array( 'ID' => 1 ), array( '%d' ) )
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @see wpdb::prepare()
|
||||
|
@ -25,7 +25,8 @@ if ( force_ssl_admin() && ! is_ssl() ) {
|
||||
/**
|
||||
* Output the login page header.
|
||||
*
|
||||
* @param string $title Optional. WordPress Log In Page title to display in <title> element. Default 'Log In'.
|
||||
* @param string $title Optional. WordPress login Page title to display in the `<title>` element.
|
||||
* Default 'Log In'.
|
||||
* @param string $message Optional. Message to display in header. Default empty.
|
||||
* @param WP_Error $wp_error Optional. The error to pass. Default empty.
|
||||
*/
|
||||
@ -537,7 +538,7 @@ case 'retrievepassword' :
|
||||
</p>
|
||||
<?php
|
||||
/**
|
||||
* Fires inside the lostpassword <form> tags, before the hidden fields.
|
||||
* Fires inside the lostpassword form tags, before the hidden fields.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
|
@ -19,7 +19,7 @@ if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) &&
|
||||
*/
|
||||
function do_signup_header() {
|
||||
/**
|
||||
* Fires within the <head> section of the site sign-up screen.
|
||||
* Fires within the head section of the site sign-up screen.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user