Make WordPress Core

Changeset 47397


Ignore:
Timestamp:
03/01/2020 10:36:38 AM (5 years ago)
Author:
johnbillion
Message:

Docs: Use more specific types in parameter descriptions in place of mixed.

See #48303.

Location:
trunk/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image-edit.php

    r47304 r47397  
    338338         * @since 3.5.0
    339339         *
    340          * @param mixed           $override  Value to return instead of saving. Default null.
     340         * @param bool|null       $override  Value to return instead of saving. Default null.
    341341         * @param string          $filename  Name of the file to be saved.
    342342         * @param WP_Image_Editor $image     The image editor instance.
  • trunk/src/wp-admin/includes/post.php

    r47372 r47397  
    20202020 * @since 5.1.0
    20212021 *
    2022  * @param mixed $terms Raw term data from the 'tax_input' field.
    2023  * @return array
     2022 * @param string $taxonomy The taxonomy name.
     2023 * @param array  $terms    Raw term data from the 'tax_input' field.
     2024 * @return int[] Array of sanitized term IDs.
    20242025 */
    20252026function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonomy, $terms ) {
     
    20322033 * @since 5.1.0
    20332034 *
    2034  * @param mixed $terms Raw term data from the 'tax_input' field.
     2035 * @param string       $taxonomy The taxonomy name.
     2036 * @param array|string $terms    Raw term data from the 'tax_input' field.
    20352037 * @return array
    20362038 */
  • trunk/src/wp-admin/link-parse-opml.php

    r47122 r47397  
    2828 * @global array $feeds
    2929 *
    30  * @param mixed $parser XML Parser resource.
     30 * @param resource $parser XML Parser resource.
    3131 * @param string $tagName XML element name.
    3232 * @param array $attrs XML element attributes.
     
    6666 * @access private
    6767 *
    68  * @param mixed $parser XML Parser resource.
     68 * @param resource $parser XML Parser resource.
    6969 * @param string $tagName XML tag name.
    7070 */
  • trunk/src/wp-includes/blocks.php

    r46896 r47397  
    312312 * @since 5.3.1
    313313 *
    314  * @param mixed          $value             The attribute value to filter.
    315  * @param array[]|string $allowed_html      An array of allowed HTML elements
    316  *                                          and attributes, or a context name
    317  *                                          such as 'post'.
    318  * @param string[]       $allowed_protocols Array of allowed URL protocols.
    319  * @return array The filtered and sanitized result.
     314 * @param string[]|string $value             The attribute value to filter.
     315 * @param array[]|string  $allowed_html      An array of allowed HTML elements
     316 *                                           and attributes, or a context name
     317 *                                           such as 'post'.
     318 * @param string[]        $allowed_protocols Array of allowed URL protocols.
     319 * @return string[]|string The filtered and sanitized result.
    320320 */
    321321function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = array() ) {
  • trunk/src/wp-includes/class-wp-query.php

    r47219 r47397  
    36313631     * @since 3.1.0
    36323632     *
    3633      * @param mixed $attachment Attachment ID, title, slug, or array of such.
     3633     * @param int|string|int[]|string[] $attachment Optional. Attachment ID, title, slug, or array of such to check against.
    36343634     * @return bool
    36353635     */
     
    36653665     * @since 3.1.0
    36663666     *
    3667      * @param mixed $author Optional. User ID, nickname, nicename, or array of User IDs, nicknames, and nicenames
     3667     * @param int|string|int[]|string[] $author Optional. User ID, nickname, nicename, or array of such to check against.
    36683668     * @return bool
    36693669     */
     
    37003700     * @since 3.1.0
    37013701     *
    3702      * @param mixed $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs.
     3702     * @param int|string|int[]|string[] $category Optional. Category ID, name, slug, or array of such to check against.
    37033703     * @return bool
    37043704     */
     
    37353735     * @since 3.1.0
    37363736     *
    3737      * @param mixed $tag Optional. Tag ID, name, slug, or array of Tag IDs, names, and slugs.
     3737     * @param int|string|int[]|string[] $tag Optional. Tag ID, name, slug, or array of such to check against.
    37383738     * @return bool
    37393739     */
     
    37763776     * @global array $wp_taxonomies
    37773777     *
    3778      * @param mixed $taxonomy Optional. Taxonomy slug or slugs.
    3779      * @param mixed $term     Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
     3778     * @param string|string[]           $taxonomy Optional. Taxonomy slug or slugs to check against.
     3779     * @param int|string|int[]|string[] $term     Optional. Term ID, name, slug, or array of such to check against.
    37803780     * @return bool True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
    37813781     */
  • trunk/src/wp-includes/class-wp-theme.php

    r47219 r47397  
    11651165     * @since 3.4.0
    11661166     *
    1167      * @param mixed $type Optional. Array of extensions to return. Defaults to all files (null).
    1168      * @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth). -1 depth is infinite.
    1169      * @param bool $search_parent Optional. Whether to return parent files. Defaults to false.
     1167     * @param string[]|string $type       Optional. Array of extensions to find, string of a single extension,
     1168     *                                    or null for all extensions. Default null.
     1169     * @param int          $depth         Optional. How deep to search for files. Defaults to a flat scan (0 depth).
     1170     *                                    -1 depth is infinite.
     1171     * @param bool         $search_parent Optional. Whether to return parent files. Default false.
    11701172     * @return string[] Array of files, keyed by the path to the file relative to the theme's directory, with the values
    11711173     *                  being absolute paths.
  • trunk/src/wp-includes/comment.php

    r47324 r47397  
    214214     * @since 2.3.0
    215215     *
    216      * @param mixed $_comment Comment data.
     216     * @param WP_Comment $_comment Comment data.
    217217     */
    218218    $_comment = apply_filters( 'get_comment', $_comment );
  • trunk/src/wp-includes/feed.php

    r47219 r47397  
    744744 * @since 2.8.0
    745745 *
    746  * @param mixed $url URL of feed to retrieve. If an array of URLs, the feeds are merged
    747  * using SimplePie's multifeed feature.
    748  * See also {@link http://simplepie.org/wiki/faq/typical_multifeed_gotchas}
    749  *
     746 * @param string|string[] $url URL of feed to retrieve. If an array of URLs, the feeds are merged
     747 *                             using SimplePie's multifeed feature.
     748 *                             See also {@link http://simplepie.org/wiki/faq/typical_multifeed_gotchas}
    750749 * @return SimplePie|WP_Error SimplePie object on success or WP_Error object on failure.
    751750 */
     
    778777     * @since 3.0.0
    779778     *
    780      * @param SimplePie $feed SimplePie feed object (passed by reference).
    781      * @param mixed     $url  URL of feed to retrieve. If an array of URLs, the feeds are merged.
     779     * @param SimplePie       $feed SimplePie feed object (passed by reference).
     780     * @param string|string[] $url  URL of feed or array of URLs of feeds to retrieve.
    782781     */
    783782    do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
  • trunk/src/wp-includes/functions.php

    r47219 r47397  
    26462646     * @since 3.0.0
    26472647     *
    2648      * @param mixed $upload_bits_error An array of upload bits data, or a non-array error to return.
     2648     * @param array|string $upload_bits_error An array of upload bits data, or error message to return.
    26492649     */
    26502650    $upload_bits_error = apply_filters(
  • trunk/src/wp-includes/general-template.php

    r47374 r47397  
    824824             * @since 2.0.5
    825825             *
    826              * @param mixed $output The URL returned by bloginfo().
    827              * @param mixed $show   Type of information requested.
     826             * @param string $output The URL returned by bloginfo().
     827             * @param string $show   Type of information requested.
    828828             */
    829829            $output = apply_filters( 'bloginfo_url', $output, $show );
     
    834834             * @since 0.71
    835835             *
    836              * @param mixed $output The requested non-URL site information.
    837              * @param mixed $show   Type of information requested.
     836             * @param mixed  $output The requested non-URL site information.
     837             * @param string $show   Type of information requested.
    838838             */
    839839            $output = apply_filters( 'bloginfo', $output, $show );
  • trunk/src/wp-includes/pluggable.php

    r47219 r47397  
    822822     * @since 4.3.0 Added the `$token` parameter.
    823823     *
    824      * @param int    $user_id  User ID.
    825      * @param bool   $remember Whether to remember the user.
    826      * @param mixed  $secure   Whether the admin cookies should only be sent over HTTPS.
    827      *                         Default is the value of is_ssl().
    828      * @param string $token    Optional. User's session token to use for this cookie.
     824     * @param int         $user_id  User ID.
     825     * @param bool        $remember Whether to remember the user.
     826     * @param bool|string $secure   Whether the auth cookie should only be sent over HTTPS. Default is an empty
     827     *                              string which means the value of `is_ssl()` will be used.
     828     * @param string      $token    Optional. User's session token to use for this cookie.
    829829     */
    830830    function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token = '' ) {
  • trunk/src/wp-includes/query.php

    r47122 r47397  
    226226 * @global WP_Query $wp_query WordPress Query object.
    227227 *
    228  * @param mixed $author Optional. User ID, nickname, nicename, or array of User IDs, nicknames, and nicenames
     228 * @param int|string|int[]|string[] $author Optional. User ID, nickname, nicename, or array of such to check against.
    229229 * @return bool
    230230 */
     
    254254 * @global WP_Query $wp_query WordPress Query object.
    255255 *
    256  * @param mixed $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs.
     256 * @param int|string|int[]|string[] $category Optional. Category ID, name, slug, or array of such to check against.
    257257 * @return bool
    258258 */
     
    282282 * @global WP_Query $wp_query WordPress Query object.
    283283 *
    284  * @param mixed $tag Optional. Tag ID, name, slug, or array of Tag IDs, names, and slugs.
     284 * @param int|string|int[]|string[] $tag Optional. Tag ID, name, slug, or array of such to check against.
    285285 * @return bool
    286286 */
     
    314314 * @global WP_Query $wp_query WordPress Query object.
    315315 *
    316  * @param string|array     $taxonomy Optional. Taxonomy slug or slugs.
    317  * @param int|string|array $term     Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
     316 * @param string|string[]           $taxonomy Optional. Taxonomy slug or slugs to check against.
     317 * @param int|string|int[]|string[] $term     Optional. Term ID, name, slug, or array of such to check against.
    318318 * @return bool True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
    319319 */
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php

    r47391 r47397  
    343343     * @since 5.0.0
    344344     *
    345      * @param mixed $post_data Associative array containing the post data.
     345     * @param array $post_data Associative array containing the post data.
    346346     * @return mixed The autosave revision ID or WP_Error.
    347347     */
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r47299 r47397  
    12361236     * @since 4.7.0
    12371237     *
    1238      * @param mixed           $value   The username submitted in the request.
     1238     * @param string          $value   The username submitted in the request.
    12391239     * @param WP_REST_Request $request Full details about the request.
    12401240     * @param string          $param   The parameter name.
     
    12731273     * @since 4.7.0
    12741274     *
    1275      * @param mixed           $value   The password submitted in the request.
     1275     * @param string          $value   The password submitted in the request.
    12761276     * @param WP_REST_Request $request Full details about the request.
    12771277     * @param string          $param   The parameter name.
Note: See TracChangeset for help on using the changeset viewer.