@@ -481,7 +481,7 @@ |
||
481 | 481 | * |
482 | 482 | * @param WP_Post|int $post Post object or ID. |
483 | 483 | * @param int $width The requested width. |
484 | - * @return array|false Response data on success, false if post doesn't exist. |
|
484 | + * @return string Response data on success, false if post doesn't exist. |
|
485 | 485 | */ |
486 | 486 | function get_oembed_response_data( $post, $width ) { |
487 | 487 | $post = get_post( $post ); |
@@ -531,7 +531,7 @@ |
||
531 | 531 | * @since 2.5.0 |
532 | 532 | * |
533 | 533 | * @param string $data Input string |
534 | - * @return array array(type, value) |
|
534 | + * @return string[] array(type, value) |
|
535 | 535 | */ |
536 | 536 | function prep_atom_text_construct($data) { |
537 | 537 | if (strpos($data, '<') === false && strpos($data, '&') === false) { |
@@ -879,7 +879,7 @@ discard block |
||
879 | 879 | * @staticvar string $_charset |
880 | 880 | * |
881 | 881 | * @param string $string The text which is to be encoded. |
882 | - * @param int|string $quote_style Optional. Converts double quotes if set to ENT_COMPAT, |
|
882 | + * @param integer $quote_style Optional. Converts double quotes if set to ENT_COMPAT, |
|
883 | 883 | * both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. |
884 | 884 | * Also compatible with old values; converting single quotes if set to 'single', |
885 | 885 | * double if set to 'double' or both if otherwise set. |
@@ -952,7 +952,7 @@ discard block |
||
952 | 952 | * @since 2.8.0 |
953 | 953 | * |
954 | 954 | * @param string $string The text which is to be decoded. |
955 | - * @param string|int $quote_style Optional. Converts double quotes if set to ENT_COMPAT, |
|
955 | + * @param integer $quote_style Optional. Converts double quotes if set to ENT_COMPAT, |
|
956 | 956 | * both single and double if set to ENT_QUOTES or |
957 | 957 | * none if set to ENT_NOQUOTES. |
958 | 958 | * Also compatible with old _wp_specialchars() values; |
@@ -3692,7 +3692,7 @@ discard block |
||
3692 | 3692 | * @since 2.8.1 |
3693 | 3693 | * @access private |
3694 | 3694 | * |
3695 | - * @param string|array $search The value being searched for, otherwise known as the needle. |
|
3695 | + * @param string[] $search The value being searched for, otherwise known as the needle. |
|
3696 | 3696 | * An array may be used to designate multiple needles. |
3697 | 3697 | * @param string $subject The string being searched and replaced on, otherwise known as the haystack. |
3698 | 3698 | * @return string The string with the replaced svalues. |
@@ -4358,7 +4358,6 @@ discard block |
||
4358 | 4358 | * @link https://secure.php.net/sprintf |
4359 | 4359 | * |
4360 | 4360 | * @param string $pattern The string which formatted args are inserted. |
4361 | - * @param mixed $args ,... Arguments to be formatted into the $pattern string. |
|
4362 | 4361 | * @return string The formatted string. |
4363 | 4362 | */ |
4364 | 4363 | function wp_sprintf( $pattern ) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * |
56 | 56 | * @param string $type Type of time to retrieve. Accepts 'mysql', 'timestamp', or PHP date |
57 | 57 | * format string (e.g. 'Y-m-d'). |
58 | - * @param int|bool $gmt Optional. Whether to use GMT timezone. Default false. |
|
58 | + * @param integer $gmt Optional. Whether to use GMT timezone. Default false. |
|
59 | 59 | * @return int|string Integer if $type is 'timestamp', string otherwise. |
60 | 60 | */ |
61 | 61 | function current_time( $type, $gmt = 0 ) { |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | * @since 2.0.5 |
437 | 437 | * |
438 | 438 | * @param string|array|object $data Data that might be serialized. |
439 | - * @return mixed A scalar data |
|
439 | + * @return string A scalar data |
|
440 | 440 | */ |
441 | 441 | function maybe_serialize( $data ) { |
442 | 442 | if ( is_array( $data ) || is_object( $data ) ) |
@@ -771,9 +771,6 @@ discard block |
||
771 | 771 | * |
772 | 772 | * @since 1.5.0 |
773 | 773 | * |
774 | - * @param string|array $key Either a query variable key, or an associative array of query variables. |
|
775 | - * @param string $value Optional. Either a query variable value, or a URL to act upon. |
|
776 | - * @param string $url Optional. A URL to act upon. |
|
777 | 774 | * @return string New URL query string (unescaped). |
778 | 775 | */ |
779 | 776 | function add_query_arg() { |
@@ -1428,7 +1425,7 @@ discard block |
||
1428 | 1425 | * @since 2.0.4 |
1429 | 1426 | * |
1430 | 1427 | * @param string $actionurl URL to add nonce action. |
1431 | - * @param int|string $action Optional. Nonce action name. Default -1. |
|
1428 | + * @param integer $action Optional. Nonce action name. Default -1. |
|
1432 | 1429 | * @param string $name Optional. Nonce name. Default '_wpnonce'. |
1433 | 1430 | * @return string Escaped URL with nonce action added. |
1434 | 1431 | */ |
@@ -1457,7 +1454,7 @@ discard block |
||
1457 | 1454 | * |
1458 | 1455 | * @since 2.0.4 |
1459 | 1456 | * |
1460 | - * @param int|string $action Optional. Action name. Default -1. |
|
1457 | + * @param integer $action Optional. Action name. Default -1. |
|
1461 | 1458 | * @param string $name Optional. Nonce name. Default '_wpnonce'. |
1462 | 1459 | * @param bool $referer Optional. Whether to set the referer field for validation. Default true. |
1463 | 1460 | * @param bool $echo Optional. Whether to display or return hidden form field. Default true. |
@@ -1549,7 +1546,7 @@ discard block |
||
1549 | 1546 | * |
1550 | 1547 | * @since 4.5.0 |
1551 | 1548 | * |
1552 | - * @return string|false Referer URL on success, false on failure. |
|
1549 | + * @return string Referer URL on success, false on failure. |
|
1553 | 1550 | */ |
1554 | 1551 | function wp_get_raw_referer() { |
1555 | 1552 | if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { |
@@ -1861,7 +1858,7 @@ discard block |
||
1861 | 1858 | * @param bool $create_dir Optional. Whether to check and create the uploads directory. |
1862 | 1859 | * Default true for backward compatibility. |
1863 | 1860 | * @param bool $refresh_cache Optional. Whether to refresh the cache. Default false. |
1864 | - * @return array See above for description. |
|
1861 | + * @return callable|null See above for description. |
|
1865 | 1862 | */ |
1866 | 1863 | function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false ) { |
1867 | 1864 | static $cache = array(), $tested_paths = array(); |
@@ -4692,7 +4689,7 @@ discard block |
||
4692 | 4689 | * |
4693 | 4690 | * @see __return_false() |
4694 | 4691 | * |
4695 | - * @return true True. |
|
4692 | + * @return boolean True. |
|
4696 | 4693 | */ |
4697 | 4694 | function __return_true() { |
4698 | 4695 | return true; |
@@ -4814,7 +4811,7 @@ discard block |
||
4814 | 4811 | * @param int $start The ID to start the loop check at. |
4815 | 4812 | * @param int $start_parent The parent_ID of $start to use instead of calling $callback( $start ). |
4816 | 4813 | * Use null to always use $callback |
4817 | - * @param array $callback_args Optional. Additional arguments to send to $callback. |
|
4814 | + * @param string[] $callback_args Optional. Additional arguments to send to $callback. |
|
4818 | 4815 | * @return array IDs of all members of loop. |
4819 | 4816 | */ |
4820 | 4817 | function wp_find_hierarchy_loop( $callback, $start, $start_parent, $callback_args = array() ) { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | * |
37 | 37 | * @since 2.6.0 |
38 | 38 | * |
39 | - * @param string|bool|array $handles Styles to be printed. Default 'false'. |
|
39 | + * @param string $handles Styles to be printed. Default 'false'. |
|
40 | 40 | * @return array On success, a processed array of WP_Dependencies items; otherwise, an empty array. |
41 | 41 | */ |
42 | 42 | function wp_print_styles( $handles = false ) { |
@@ -1842,7 +1842,7 @@ discard block |
||
1842 | 1842 | * @since 1.5.0 |
1843 | 1843 | * |
1844 | 1844 | * @param int $num Number of day. |
1845 | - * @return int Days since the start of the week. |
|
1845 | + * @return double Days since the start of the week. |
|
1846 | 1846 | */ |
1847 | 1847 | function calendar_week_mod($num) { |
1848 | 1848 | $base = 7; |
@@ -3158,7 +3158,7 @@ discard block |
||
3158 | 3158 | * @type string $before_page_number A string to appear before the page number. Default empty. |
3159 | 3159 | * @type string $after_page_number A string to append after the page number. Default empty. |
3160 | 3160 | * } |
3161 | - * @return array|string|void String of page links or array of page links. |
|
3161 | + * @return string String of page links or array of page links. |
|
3162 | 3162 | */ |
3163 | 3163 | function paginate_links( $args = '' ) { |
3164 | 3164 | global $wp_query, $wp_rewrite; |
@@ -3319,7 +3319,7 @@ discard block |
||
3319 | 3319 | * @param string $key The unique key for this theme. |
3320 | 3320 | * @param string $name The name of the theme. |
3321 | 3321 | * @param string $url The URL of the CSS file containing the color scheme. |
3322 | - * @param array $colors Optional. An array of CSS color definition strings which are used |
|
3322 | + * @param string[] $colors Optional. An array of CSS color definition strings which are used |
|
3323 | 3323 | * to give the user a feel for the theme. |
3324 | 3324 | * @param array $icons { |
3325 | 3325 | * Optional. CSS color definitions used to color any SVG icons. |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @since 1.2.0 |
13 | 13 | * @since 4.4.0 Added the `$post` parameter. |
14 | 14 | * |
15 | - * @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`. |
|
15 | + * @param integer $post Optional. Post ID or post object. Default is the global `$post`. |
|
16 | 16 | */ |
17 | 17 | function the_permalink( $post = 0 ) { |
18 | 18 | /** |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * |
98 | 98 | * @see get_permalink() |
99 | 99 | * |
100 | - * @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`. |
|
100 | + * @param integer $post Optional. Post ID or post object. Default is the global `$post`. |
|
101 | 101 | * @param bool $leavename Optional. Whether to keep post name or page name. Default false. |
102 | 102 | * |
103 | 103 | * @return string|false The permalink URL or false if post does not exist. |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * |
112 | 112 | * @since 1.0.0 |
113 | 113 | * |
114 | - * @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`. |
|
114 | + * @param integer $post Optional. Post ID or post object. Default is the global `$post`. |
|
115 | 115 | * @param bool $leavename Optional. Whether to keep post name or page name. Default false. |
116 | 116 | * @return string|false The permalink URL or false if post does not exist. |
117 | 117 | */ |
@@ -1387,7 +1387,7 @@ discard block |
||
1387 | 1387 | * |
1388 | 1388 | * @since 2.3.0 |
1389 | 1389 | * |
1390 | - * @param int|WP_Comment $comment_id Optional. Comment ID or WP_Comment object. |
|
1390 | + * @param integer $comment_id Optional. Comment ID or WP_Comment object. |
|
1391 | 1391 | * @return string|void The edit comment link URL for the given comment. |
1392 | 1392 | */ |
1393 | 1393 | function get_edit_comment_link( $comment_id = 0 ) { |
@@ -1447,7 +1447,7 @@ discard block |
||
1447 | 1447 | * |
1448 | 1448 | * @since 2.7.0 |
1449 | 1449 | * |
1450 | - * @param int|stdClass $link Optional. Bookmark ID. Default is the id of the current bookmark. |
|
1450 | + * @param integer $link Optional. Bookmark ID. Default is the id of the current bookmark. |
|
1451 | 1451 | * @return string|void The edit bookmark link URL. |
1452 | 1452 | */ |
1453 | 1453 | function get_edit_bookmark_link( $link = 0 ) { |
@@ -2761,7 +2761,7 @@ discard block |
||
2761 | 2761 | * @global WP_Rewrite $wp_rewrite |
2762 | 2762 | * |
2763 | 2763 | * @param string|array $args Optional args. See paginate_links(). Default empty array. |
2764 | - * @return string|void Markup for pagination links. |
|
2764 | + * @return string Markup for pagination links. |
|
2765 | 2765 | */ |
2766 | 2766 | function paginate_comments_links( $args = array() ) { |
2767 | 2767 | global $wp_rewrite; |
@@ -253,7 +253,7 @@ |
||
253 | 253 | * @global float $timestart Seconds from when timer_start() is called. |
254 | 254 | * @global float $timeend Seconds from when function is called. |
255 | 255 | * |
256 | - * @param int|bool $display Whether to echo or return the results. Accepts 0|false for return, |
|
256 | + * @param integer $display Whether to echo or return the results. Accepts 0|false for return, |
|
257 | 257 | * 1|true for echo. Default 0|false. |
258 | 258 | * @param int $precision The number of digits from the right of the decimal to display. |
259 | 259 | * Default 3. |
@@ -982,7 +982,7 @@ discard block |
||
982 | 982 | * width and height values in pixels (in that order). Default 'medium'. |
983 | 983 | * @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. |
984 | 984 | * Default null. |
985 | - * @return string|bool A 'srcset' value string or false. |
|
985 | + * @return false|string A 'srcset' value string or false. |
|
986 | 986 | */ |
987 | 987 | function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium', $image_meta = null ) { |
988 | 988 | if ( ! $image = wp_get_attachment_image_src( $attachment_id, $size ) ) { |
@@ -1011,7 +1011,7 @@ discard block |
||
1011 | 1011 | * @param string $image_src The 'src' of the image. |
1012 | 1012 | * @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'. |
1013 | 1013 | * @param int $attachment_id Optional. The image attachment ID to pass to the filter. Default 0. |
1014 | - * @return string|bool The 'srcset' attribute value. False on error or when only one source exists. |
|
1014 | + * @return false|string The 'srcset' attribute value. False on error or when only one source exists. |
|
1015 | 1015 | */ |
1016 | 1016 | function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id = 0 ) { |
1017 | 1017 | /** |
@@ -3523,7 +3523,7 @@ discard block |
||
3523 | 3523 | * @since 3.6.0 |
3524 | 3524 | * |
3525 | 3525 | * @param string $type Mime type. |
3526 | - * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. |
|
3526 | + * @param integer $post Optional. Post ID or WP_Post object. Default is global $post. |
|
3527 | 3527 | * @return array Found attachments. |
3528 | 3528 | */ |
3529 | 3529 | function get_attached_media( $type, $post = 0 ) { |
@@ -3610,7 +3610,7 @@ discard block |
||
3610 | 3610 | * |
3611 | 3611 | * @since 3.6.0 |
3612 | 3612 | * |
3613 | - * @param int|WP_Post $post Post ID or object. |
|
3613 | + * @param integer $post Post ID or object. |
|
3614 | 3614 | * @param bool $html Optional. Whether to return HTML or data in the array. Default true. |
3615 | 3615 | * @return array A list of arrays, each containing gallery data and srcs parsed |
3616 | 3616 | * from the expanded shortcode. |
@@ -3662,7 +3662,7 @@ discard block |
||
3662 | 3662 | * |
3663 | 3663 | * @since 3.6.0 |
3664 | 3664 | * |
3665 | - * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. |
|
3665 | + * @param integer $post Optional. Post ID or WP_Post object. Default is global $post. |
|
3666 | 3666 | * @param bool $html Optional. Whether to return HTML or data. Default is true. |
3667 | 3667 | * @return string|array Gallery data and srcs parsed from the expanded shortcode. |
3668 | 3668 | */ |
@@ -3689,7 +3689,7 @@ discard block |
||
3689 | 3689 | * |
3690 | 3690 | * @see get_post_galleries() |
3691 | 3691 | * |
3692 | - * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. |
|
3692 | + * @param integer $post Optional. Post ID or WP_Post object. Default is global `$post`. |
|
3693 | 3693 | * @return array A list of lists, each containing image srcs parsed. |
3694 | 3694 | * from an expanded shortcode |
3695 | 3695 | */ |
@@ -3705,7 +3705,7 @@ discard block |
||
3705 | 3705 | * |
3706 | 3706 | * @see get_post_gallery() |
3707 | 3707 | * |
3708 | - * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. |
|
3708 | + * @param integer $post Optional. Post ID or WP_Post object. Default is global `$post`. |
|
3709 | 3709 | * @return array A list of a gallery's image srcs in order. |
3710 | 3710 | */ |
3711 | 3711 | function get_post_gallery_images( $post = 0 ) { |
@@ -3790,7 +3790,7 @@ discard block |
||
3790 | 3790 | * |
3791 | 3791 | * @global string $wp_version |
3792 | 3792 | * |
3793 | - * @return array The relevant CSS file URLs. |
|
3793 | + * @return string[] The relevant CSS file URLs. |
|
3794 | 3794 | */ |
3795 | 3795 | function wpview_media_sandbox_styles() { |
3796 | 3796 | $version = 'ver=' . $GLOBALS['wp_version']; |