Docs: Use more specific types in parameter descriptions in place of `mixed`.
See #48303. Built from https://develop.svn.wordpress.org/trunk@47397 git-svn-id: http://core.svn.wordpress.org/trunk@47184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bf8c4ee5c6
commit
056dad9c2c
|
@ -337,7 +337,7 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
|
|||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param mixed $override Value to return instead of saving. Default null.
|
||||
* @param bool|null $override Value to return instead of saving. Default null.
|
||||
* @param string $filename Name of the file to be saved.
|
||||
* @param WP_Image_Editor $image The image editor instance.
|
||||
* @param string $mime_type The mime type of the image.
|
||||
|
|
|
@ -2019,8 +2019,9 @@ function redirect_post( $post_id = '' ) {
|
|||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param mixed $terms Raw term data from the 'tax_input' field.
|
||||
* @return array
|
||||
* @param string $taxonomy The taxonomy name.
|
||||
* @param array $terms Raw term data from the 'tax_input' field.
|
||||
* @return int[] Array of sanitized term IDs.
|
||||
*/
|
||||
function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonomy, $terms ) {
|
||||
return array_map( 'intval', $terms );
|
||||
|
@ -2031,7 +2032,8 @@ function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonomy, $terms ) {
|
|||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param mixed $terms Raw term data from the 'tax_input' field.
|
||||
* @param string $taxonomy The taxonomy name.
|
||||
* @param array|string $terms Raw term data from the 'tax_input' field.
|
||||
* @return array
|
||||
*/
|
||||
function taxonomy_meta_box_sanitize_cb_input( $taxonomy, $terms ) {
|
||||
|
|
|
@ -27,7 +27,7 @@ global $opml;
|
|||
* @global array $descriptions
|
||||
* @global array $feeds
|
||||
*
|
||||
* @param mixed $parser XML Parser resource.
|
||||
* @param resource $parser XML Parser resource.
|
||||
* @param string $tagName XML element name.
|
||||
* @param array $attrs XML element attributes.
|
||||
*/
|
||||
|
@ -65,7 +65,7 @@ function startElement( $parser, $tagName, $attrs ) { // phpcs:ignore WordPress.N
|
|||
* @since 0.71
|
||||
* @access private
|
||||
*
|
||||
* @param mixed $parser XML Parser resource.
|
||||
* @param resource $parser XML Parser resource.
|
||||
* @param string $tagName XML tag name.
|
||||
*/
|
||||
function endElement( $parser, $tagName ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
|
||||
|
|
|
@ -311,12 +311,12 @@ function filter_block_kses( $block, $allowed_html, $allowed_protocols = array()
|
|||
*
|
||||
* @since 5.3.1
|
||||
*
|
||||
* @param mixed $value The attribute value to filter.
|
||||
* @param array[]|string $allowed_html An array of allowed HTML elements
|
||||
* and attributes, or a context name
|
||||
* such as 'post'.
|
||||
* @param string[] $allowed_protocols Array of allowed URL protocols.
|
||||
* @return array The filtered and sanitized result.
|
||||
* @param string[]|string $value The attribute value to filter.
|
||||
* @param array[]|string $allowed_html An array of allowed HTML elements
|
||||
* and attributes, or a context name
|
||||
* such as 'post'.
|
||||
* @param string[] $allowed_protocols Array of allowed URL protocols.
|
||||
* @return string[]|string The filtered and sanitized result.
|
||||
*/
|
||||
function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = array() ) {
|
||||
if ( is_array( $value ) ) {
|
||||
|
|
|
@ -3630,7 +3630,7 @@ class WP_Query {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param mixed $attachment Attachment ID, title, slug, or array of such.
|
||||
* @param int|string|int[]|string[] $attachment Optional. Attachment ID, title, slug, or array of such to check against.
|
||||
* @return bool
|
||||
*/
|
||||
public function is_attachment( $attachment = '' ) {
|
||||
|
@ -3664,7 +3664,7 @@ class WP_Query {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param mixed $author Optional. User ID, nickname, nicename, or array of User IDs, nicknames, and nicenames
|
||||
* @param int|string|int[]|string[] $author Optional. User ID, nickname, nicename, or array of such to check against.
|
||||
* @return bool
|
||||
*/
|
||||
public function is_author( $author = '' ) {
|
||||
|
@ -3699,7 +3699,7 @@ class WP_Query {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param mixed $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs.
|
||||
* @param int|string|int[]|string[] $category Optional. Category ID, name, slug, or array of such to check against.
|
||||
* @return bool
|
||||
*/
|
||||
public function is_category( $category = '' ) {
|
||||
|
@ -3734,7 +3734,7 @@ class WP_Query {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param mixed $tag Optional. Tag ID, name, slug, or array of Tag IDs, names, and slugs.
|
||||
* @param int|string|int[]|string[] $tag Optional. Tag ID, name, slug, or array of such to check against.
|
||||
* @return bool
|
||||
*/
|
||||
public function is_tag( $tag = '' ) {
|
||||
|
@ -3775,8 +3775,8 @@ class WP_Query {
|
|||
*
|
||||
* @global array $wp_taxonomies
|
||||
*
|
||||
* @param mixed $taxonomy Optional. Taxonomy slug or slugs.
|
||||
* @param mixed $term Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
|
||||
* @param string|string[] $taxonomy Optional. Taxonomy slug or slugs to check against.
|
||||
* @param int|string|int[]|string[] $term Optional. Term ID, name, slug, or array of such to check against.
|
||||
* @return bool True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
|
||||
*/
|
||||
public function is_tax( $taxonomy = '', $term = '' ) {
|
||||
|
|
|
@ -1164,9 +1164,11 @@ final class WP_Theme implements ArrayAccess {
|
|||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param mixed $type Optional. Array of extensions to return. Defaults to all files (null).
|
||||
* @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth). -1 depth is infinite.
|
||||
* @param bool $search_parent Optional. Whether to return parent files. Defaults to false.
|
||||
* @param string[]|string $type Optional. Array of extensions to find, string of a single extension,
|
||||
* or null for all extensions. Default null.
|
||||
* @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth).
|
||||
* -1 depth is infinite.
|
||||
* @param bool $search_parent Optional. Whether to return parent files. Default false.
|
||||
* @return string[] Array of files, keyed by the path to the file relative to the theme's directory, with the values
|
||||
* being absolute paths.
|
||||
*/
|
||||
|
|
|
@ -213,7 +213,7 @@ function get_comment( &$comment = null, $output = OBJECT ) {
|
|||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
* @param mixed $_comment Comment data.
|
||||
* @param WP_Comment $_comment Comment data.
|
||||
*/
|
||||
$_comment = apply_filters( 'get_comment', $_comment );
|
||||
|
||||
|
|
|
@ -743,10 +743,9 @@ function feed_content_type( $type = '' ) {
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param mixed $url URL of feed to retrieve. If an array of URLs, the feeds are merged
|
||||
* using SimplePie's multifeed feature.
|
||||
* See also {@link http://simplepie.org/wiki/faq/typical_multifeed_gotchas}
|
||||
*
|
||||
* @param string|string[] $url URL of feed to retrieve. If an array of URLs, the feeds are merged
|
||||
* using SimplePie's multifeed feature.
|
||||
* See also {@link http://simplepie.org/wiki/faq/typical_multifeed_gotchas}
|
||||
* @return SimplePie|WP_Error SimplePie object on success or WP_Error object on failure.
|
||||
*/
|
||||
function fetch_feed( $url ) {
|
||||
|
@ -777,8 +776,8 @@ function fetch_feed( $url ) {
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param SimplePie $feed SimplePie feed object (passed by reference).
|
||||
* @param mixed $url URL of feed to retrieve. If an array of URLs, the feeds are merged.
|
||||
* @param SimplePie $feed SimplePie feed object (passed by reference).
|
||||
* @param string|string[] $url URL of feed or array of URLs of feeds to retrieve.
|
||||
*/
|
||||
do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
|
||||
$feed->init();
|
||||
|
|
|
@ -2645,7 +2645,7 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param mixed $upload_bits_error An array of upload bits data, or a non-array error to return.
|
||||
* @param array|string $upload_bits_error An array of upload bits data, or error message to return.
|
||||
*/
|
||||
$upload_bits_error = apply_filters(
|
||||
'wp_upload_bits',
|
||||
|
|
|
@ -823,8 +823,8 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
|
|||
*
|
||||
* @since 2.0.5
|
||||
*
|
||||
* @param mixed $output The URL returned by bloginfo().
|
||||
* @param mixed $show Type of information requested.
|
||||
* @param string $output The URL returned by bloginfo().
|
||||
* @param string $show Type of information requested.
|
||||
*/
|
||||
$output = apply_filters( 'bloginfo_url', $output, $show );
|
||||
} else {
|
||||
|
@ -833,8 +833,8 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
|
|||
*
|
||||
* @since 0.71
|
||||
*
|
||||
* @param mixed $output The requested non-URL site information.
|
||||
* @param mixed $show Type of information requested.
|
||||
* @param mixed $output The requested non-URL site information.
|
||||
* @param string $show Type of information requested.
|
||||
*/
|
||||
$output = apply_filters( 'bloginfo', $output, $show );
|
||||
}
|
||||
|
|
|
@ -821,11 +821,11 @@ if ( ! function_exists( 'wp_set_auth_cookie' ) ) :
|
|||
* @since 2.5.0
|
||||
* @since 4.3.0 Added the `$token` parameter.
|
||||
*
|
||||
* @param int $user_id User ID.
|
||||
* @param bool $remember Whether to remember the user.
|
||||
* @param mixed $secure Whether the admin cookies should only be sent over HTTPS.
|
||||
* Default is the value of is_ssl().
|
||||
* @param string $token Optional. User's session token to use for this cookie.
|
||||
* @param int $user_id User ID.
|
||||
* @param bool $remember Whether to remember the user.
|
||||
* @param bool|string $secure Whether the auth cookie should only be sent over HTTPS. Default is an empty
|
||||
* string which means the value of `is_ssl()` will be used.
|
||||
* @param string $token Optional. User's session token to use for this cookie.
|
||||
*/
|
||||
function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token = '' ) {
|
||||
if ( $remember ) {
|
||||
|
|
|
@ -225,7 +225,7 @@ function is_attachment( $attachment = '' ) {
|
|||
*
|
||||
* @global WP_Query $wp_query WordPress Query object.
|
||||
*
|
||||
* @param mixed $author Optional. User ID, nickname, nicename, or array of User IDs, nicknames, and nicenames
|
||||
* @param int|string|int[]|string[] $author Optional. User ID, nickname, nicename, or array of such to check against.
|
||||
* @return bool
|
||||
*/
|
||||
function is_author( $author = '' ) {
|
||||
|
@ -253,7 +253,7 @@ function is_author( $author = '' ) {
|
|||
*
|
||||
* @global WP_Query $wp_query WordPress Query object.
|
||||
*
|
||||
* @param mixed $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs.
|
||||
* @param int|string|int[]|string[] $category Optional. Category ID, name, slug, or array of such to check against.
|
||||
* @return bool
|
||||
*/
|
||||
function is_category( $category = '' ) {
|
||||
|
@ -281,7 +281,7 @@ function is_category( $category = '' ) {
|
|||
*
|
||||
* @global WP_Query $wp_query WordPress Query object.
|
||||
*
|
||||
* @param mixed $tag Optional. Tag ID, name, slug, or array of Tag IDs, names, and slugs.
|
||||
* @param int|string|int[]|string[] $tag Optional. Tag ID, name, slug, or array of such to check against.
|
||||
* @return bool
|
||||
*/
|
||||
function is_tag( $tag = '' ) {
|
||||
|
@ -313,8 +313,8 @@ function is_tag( $tag = '' ) {
|
|||
*
|
||||
* @global WP_Query $wp_query WordPress Query object.
|
||||
*
|
||||
* @param string|array $taxonomy Optional. Taxonomy slug or slugs.
|
||||
* @param int|string|array $term Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
|
||||
* @param string|string[] $taxonomy Optional. Taxonomy slug or slugs to check against.
|
||||
* @param int|string|int[]|string[] $term Optional. Term ID, name, slug, or array of such to check against.
|
||||
* @return bool True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
|
||||
*/
|
||||
function is_tax( $taxonomy = '', $term = '' ) {
|
||||
|
|
|
@ -342,7 +342,7 @@ class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller {
|
|||
*
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param mixed $post_data Associative array containing the post data.
|
||||
* @param array $post_data Associative array containing the post data.
|
||||
* @return mixed The autosave revision ID or WP_Error.
|
||||
*/
|
||||
public function create_post_autosave( $post_data ) {
|
||||
|
|
|
@ -1235,7 +1235,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
|||
*
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @param mixed $value The username submitted in the request.
|
||||
* @param string $value The username submitted in the request.
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @param string $param The parameter name.
|
||||
* @return string|WP_Error The sanitized username, if valid, otherwise an error.
|
||||
|
@ -1272,7 +1272,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
|||
*
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @param mixed $value The password submitted in the request.
|
||||
* @param string $value The password submitted in the request.
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @param string $param The parameter name.
|
||||
* @return string|WP_Error The sanitized password, if valid, otherwise an error.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.4-beta3-47396';
|
||||
$wp_version = '5.4-beta3-47397';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue