Docs: Various corrections to inline docblocks.

See #49572
Built from https://develop.svn.wordpress.org/trunk@48573


git-svn-id: http://core.svn.wordpress.org/trunk@48335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2020-07-23 00:48:06 +00:00
parent daace832e3
commit 1fbcdb2213
14 changed files with 29 additions and 23 deletions

View File

@ -300,8 +300,8 @@ function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
* *
* @since 2.8.0 * @since 2.8.0
* *
* @param int|string $tag_name * @param string $tag_name The term name.
* @param string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'. * @param string $taxonomy Optional. The taxonomy within which to create the term. Default 'post_tag'.
* @return array|WP_Error * @return array|WP_Error
*/ */
function wp_create_term( $tag_name, $taxonomy = 'post_tag' ) { function wp_create_term( $tag_name, $taxonomy = 'post_tag' ) {

View File

@ -2221,12 +2221,11 @@ function get_post_states( $post ) {
} }
/** /**
* Function to echo the attachment media states as HTML. * Outputs the attachment media states as HTML.
* *
* @since 3.2.0 * @since 3.2.0
* *
* @param WP_Post $post The attachment post to retrieve states for. * @param WP_Post $post The attachment post to retrieve states for.
* @return string Media states string.
*/ */
function _media_states( $post ) { function _media_states( $post ) {
static $header_images; static $header_images;

View File

@ -359,7 +359,7 @@ function get_dynamic_block_names() {
* *
* @since 5.3.1 * @since 5.3.1
* *
* @param array $attributes Attributes object. * @param array $block_attributes Attributes object.
* @return string Serialized attributes. * @return string Serialized attributes.
*/ */
function serialize_block_attributes( $block_attributes ) { function serialize_block_attributes( $block_attributes ) {
@ -397,8 +397,8 @@ function strip_core_block_namespace( $block_name = null ) {
* @since 5.3.1 * @since 5.3.1
* *
* @param string $block_name Block name. * @param string $block_name Block name.
* @param array $attributes Block attributes. * @param array $block_attributes Block attributes.
* @param string $content Block save content. * @param string $block_content Block save content.
* @return string Comment-delimited block content. * @return string Comment-delimited block content.
*/ */
function get_comment_delimited_block_content( $block_name = null, $block_attributes, $block_content ) { function get_comment_delimited_block_content( $block_name = null, $block_attributes, $block_content ) {

View File

@ -2292,7 +2292,7 @@ final class WP_Customize_Manager {
* *
* @since 3.4.0 * @since 3.4.0
* *
* @param $current_theme {@internal Parameter is not used} * @param mixed $current_theme {@internal Parameter is not used}
* @return string Theme name. * @return string Theme name.
*/ */
public function current_theme( $current_theme ) { public function current_theme( $current_theme ) {

View File

@ -846,8 +846,8 @@ class WP_Customize_Setting {
* *
* @since 3.4.0 * @since 3.4.0
* *
* @param $root * @param array $root
* @param $keys * @param array $keys
* @param bool $create Default false. * @param bool $create Default false.
* @return array|void Keys are 'root', 'node', and 'key'. * @return array|void Keys are 'root', 'node', and 'key'.
*/ */
@ -901,8 +901,8 @@ class WP_Customize_Setting {
* *
* @since 3.4.0 * @since 3.4.0
* *
* @param $root * @param array $root
* @param $keys * @param array $keys
* @param mixed $value The value to update. * @param mixed $value The value to update.
* @return mixed * @return mixed
*/ */
@ -927,8 +927,8 @@ class WP_Customize_Setting {
* *
* @since 3.4.0 * @since 3.4.0
* *
* @param $root * @param array $root
* @param $keys * @param array $keys
* @param mixed $default A default value which is used as a fallback. Default null. * @param mixed $default A default value which is used as a fallback. Default null.
* @return mixed The requested value or the default value. * @return mixed The requested value or the default value.
*/ */
@ -946,8 +946,8 @@ class WP_Customize_Setting {
* *
* @since 3.4.0 * @since 3.4.0
* *
* @param $root * @param array $root
* @param $keys * @param array $keys
* @return bool True if value is set, false if not. * @return bool True if value is set, false if not.
*/ */
final protected function multidimensional_isset( $root, $keys ) { final protected function multidimensional_isset( $root, $keys ) {

View File

@ -90,7 +90,7 @@ class _WP_Dependency {
* @since 5.3.0 Formalized the existing `...$args` parameter by adding it * @since 5.3.0 Formalized the existing `...$args` parameter by adding it
* to the function signature. * to the function signature.
* *
* @param ...$args Dependency information. * @param mixed ...$args Dependency information.
*/ */
public function __construct( ...$args ) { public function __construct( ...$args ) {
list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = $args; list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = $args;

View File

@ -2597,8 +2597,8 @@ function wp_unique_filename( $dir, $filename, $unique_filename_callback = null )
* @access private * @access private
* *
* @param string $filename The file name to check. * @param string $filename The file name to check.
* $param array $files An array of existing files in the directory. * @param array $files An array of existing files in the directory.
* $return bool True if the tested file name could match an existing file, false otherwise. * @return bool True if the tested file name could match an existing file, false otherwise.
*/ */
function _wp_check_existing_file_names( $filename, $files ) { function _wp_check_existing_file_names( $filename, $files ) {
$fname = pathinfo( $filename, PATHINFO_FILENAME ); $fname = pathinfo( $filename, PATHINFO_FILENAME );

View File

@ -2162,7 +2162,7 @@ function calendar_week_mod( $num ) {
* @global array $posts * @global array $posts
* *
* @param bool $initial Optional. Whether to use initial calendar names. Default true. * @param bool $initial Optional. Whether to use initial calendar names. Default true.
* @param bool $display Optional. Whether to display or return the calendar. Default true. * @param bool $echo Optional. Whether to display the calendar output. Default true.
* @return void|string Void if `$echo` argument is true, calendar HTML if `$echo` is false. * @return void|string Void if `$echo` argument is true, calendar HTML if `$echo` is false.
*/ */
function get_calendar( $initial = true, $echo = true ) { function get_calendar( $initial = true, $echo = true ) {

View File

@ -1034,6 +1034,7 @@ function wp_kses_uri_attributes() {
* or a context name such as 'post'. * or a context name such as 'post'.
* @global string[] $pass_allowed_protocols Array of allowed URL protocols. * @global string[] $pass_allowed_protocols Array of allowed URL protocols.
* *
* @param array $matches preg_replace regexp matches
* @return string * @return string
*/ */
function _wp_kses_split_callback( $match ) { function _wp_kses_split_callback( $match ) {
@ -1712,6 +1713,7 @@ function wp_kses_html_error( $string ) {
* *
* @param string $string Content to check for bad protocols. * @param string $string Content to check for bad protocols.
* @param string[] $allowed_protocols Array of allowed URL protocols. * @param string[] $allowed_protocols Array of allowed URL protocols.
* @param int $count Depth of call recursion to this function.
* @return string Sanitized content. * @return string Sanitized content.
*/ */
function wp_kses_bad_protocol_once( $string, $allowed_protocols, $count = 1 ) { function wp_kses_bad_protocol_once( $string, $allowed_protocols, $count = 1 ) {

View File

@ -92,6 +92,8 @@ if ( ! class_exists( 'PO', false ) ) :
* Text to include as a comment before the start of the PO contents * Text to include as a comment before the start of the PO contents
* *
* Doesn't need to include # in the beginning of lines, these are added automatically * Doesn't need to include # in the beginning of lines, these are added automatically
*
* @param string $text Text to include as a comment.
*/ */
function set_comment_before_headers( $text ) { function set_comment_before_headers( $text ) {
$this->comments_before_headers = $text; $this->comments_before_headers = $text;

View File

@ -1544,6 +1544,7 @@ function walk_page_tree( $pages, $depth, $current_page, $r ) {
* @uses Walker_PageDropdown to create HTML dropdown content. * @uses Walker_PageDropdown to create HTML dropdown content.
* @see Walker_PageDropdown::walk() for parameters and return description. * @see Walker_PageDropdown::walk() for parameters and return description.
* *
* @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments.
* @return string * @return string
*/ */
function walk_page_dropdown_tree( ...$args ) { function walk_page_dropdown_tree( ...$args ) {

View File

@ -40,6 +40,7 @@ require ABSPATH . WPINC . '/functions.wp-styles.php';
* @since 5.0.0 * @since 5.0.0
* *
* @param WP_Scripts $scripts WP_Scripts object. * @param WP_Scripts $scripts WP_Scripts object.
* @param bool $force_uncompressed Whether to forcibly prevent gzip compression. Default false.
*/ */
function wp_register_tinymce_scripts( $scripts, $force_uncompressed = false ) { function wp_register_tinymce_scripts( $scripts, $force_uncompressed = false ) {
global $tinymce_version, $concatenate_scripts, $compress_scripts; global $tinymce_version, $concatenate_scripts, $compress_scripts;

View File

@ -2471,6 +2471,7 @@ function get_theme_starter_content() {
* @since 5.3.0 The `html5` feature now also accepts 'script' and 'style'. * @since 5.3.0 The `html5` feature now also accepts 'script' and 'style'.
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter * @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature. * by adding it to the function signature.
* @since 5.5.0 The `core-block-patterns` feature was added and is enabled by default.
* *
* @global array $_wp_theme_features * @global array $_wp_theme_features
* *

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-beta3-48572'; $wp_version = '5.5-beta3-48573';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.