Make WordPress Core

Changeset 49597


Ignore:
Timestamp:
11/14/2020 04:33:52 PM (15 months ago)
Author:
johnbillion
Message:

Docs: Various docblock corrections and improvements.

See #50768

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/README.md

    r49594 r49597  
    1717
    1818* macOS: `brew install node`
    19 * Windows: `choco install nodejs`
     19* Windows: `choco install node`
    2020* Ubuntu: `apt install nodejs npm`
    2121
  • trunk/src/wp-includes/category-template.php

    r49193 r49597  
    11541154 * @since 2.3.0
    11551155 *
    1156  * @param int $post_id Post ID.
     1156 * @param int|WP_Post $post_id Post ID or object.
    11571157 * @return WP_Term[]|false|WP_Error Array of WP_Term objects on success, false if there are no terms
    11581158 *                                  or the post does not exist, WP_Error on failure.
  • trunk/src/wp-includes/class-wp-http-streams.php

    r48586 r49597  
    9595        if ( $is_local ) {
    9696            /**
    97              * Filters whether SSL should be verified for local requests.
     97             * Filters whether SSL should be verified for local HTTP API requests.
    9898             *
    9999             * @since 2.8.0
  • trunk/src/wp-includes/deprecated.php

    r49566 r49597  
    19121912        // No thumb, no image. We'll look for a mime-related icon instead.
    19131913
     1914        /** This filter is documented in wp-includes/post.php */
    19141915        $icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' );
    19151916        $src_file = $icon_dir . '/' . wp_basename($src);
  • trunk/src/wp-includes/general-template.php

    r49355 r49597  
    25862586 * @param string      $format Optional. PHP date format. Defaults to the 'date_format' option.
    25872587 * @param int|WP_Post $post   Optional. Post ID or WP_Post object. Default current post.
    2588  * @return string|false Date the current post was modified. False on failure.
     2588 * @return string|int|false Date the current post was modified. False on failure.
    25892589 */
    25902590function get_the_modified_date( $format = '', $post = null ) {
     
    26062606     * @since 4.6.0 Added the `$post` parameter.
    26072607     *
    2608      * @param string|false $the_time The formatted date or false if no post is found.
    2609      * @param string       $format   PHP date format.
    2610      * @param WP_Post|null $post     WP_Post object or null if no post is found.
     2608     * @param string|int|false $the_time The formatted date or false if no post is found.
     2609     * @param string           $format   PHP date format.
     2610     * @param WP_Post|null     $post     WP_Post object or null if no post is found.
    26112611     */
    26122612    return apply_filters( 'get_the_modified_date', $the_time, $format, $post );
     
    28322832 *                            Defaults to the 'time_format' option.
    28332833 * @param int|WP_Post $post   Optional. Post ID or WP_Post object. Default current post.
    2834  * @return string|false Formatted date string or Unix timestamp. False on failure.
     2834 * @return string|int|false Formatted date string or Unix timestamp. False on failure.
    28352835 */
    28362836function get_the_modified_time( $format = '', $post = null ) {
     
    28522852     * @since 4.6.0 Added the `$post` parameter.
    28532853     *
    2854      * @param string|false $the_time The formatted time or false if no post is found.
    2855      * @param string       $format   Format to use for retrieving the time the post
    2856      *                               was modified. Accepts 'G', 'U', or PHP date format.
    2857      * @param WP_Post|null $post     WP_Post object or null if no post is found.
     2854     * @param string|int|false $the_time The formatted time or false if no post is found.
     2855     * @param string           $format   Format to use for retrieving the time the post
     2856     *                                   was modified. Accepts 'G', 'U', or PHP date format.
     2857     * @param WP_Post|null     $post     WP_Post object or null if no post is found.
    28582858     */
    28592859    return apply_filters( 'get_the_modified_time', $the_time, $format, $post );
     
    29092909     * @since 2.8.0
    29102910     *
    2911      * @param string $time   The formatted time.
    2912      * @param string $format Format to use for retrieving the time the post was modified.
    2913      *                       Accepts 'G', 'U', or PHP date format. Default 'U'.
    2914      * @param bool   $gmt    Whether to retrieve the GMT time. Default false.
     2911     * @param string|int $time   Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
     2912     * @param string     $format Format to use for retrieving the time the post was modified.
     2913     *                           Accepts 'G', 'U', or PHP date format. Default 'U'.
     2914     * @param bool       $gmt    Whether to retrieve the GMT time. Default false.
    29152915     */
    29162916    return apply_filters( 'get_post_modified_time', $time, $format, $gmt );
  • trunk/src/wp-includes/media.php

    r49539 r49597  
    4343 * @since 2.5.0
    4444 *
    45  * @global int   $content_width
     45 * @global int $content_width
    4646 *
    4747 * @param int          $width   Width of the image in pixels.
     
    10821082         * @since 2.8.0
    10831083         *
    1084          * @param array        $attr       Array of attribute values for the image markup, keyed by attribute name.
     1084         * @param string[]     $attr       Array of attribute values for the image markup, keyed by attribute name.
    10851085         *                                 See wp_get_attachment_image().
    10861086         * @param WP_Post      $attachment Image attachment post.
     
    11101110     *                                    an array of width and height values in pixels (in that order).
    11111111     * @param bool         $icon          Whether the image should be treated as an icon.
    1112      * @param array        $attr          Array of attribute values for the image markup, keyed by attribute name.
     1112     * @param string[]     $attr          Array of attribute values for the image markup, keyed by attribute name.
    11131113     *                                    See wp_get_attachment_image().
    11141114     */
     
    12381238 * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
    12391239 * @param int    $attachment_id Optional. The image attachment ID. Default 0.
    1240  * @return string|bool          The 'srcset' attribute value. False on error or when only one source exists.
     1240 * @return string|false The 'srcset' attribute value. False on error or when only one source exists.
    12411241 */
    12421242function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id = 0 ) {
     
    14771477 * @param int          $attachment_id Optional. Image attachment ID. Either `$image_meta` or `$attachment_id`
    14781478 *                                    is needed when using the image size name as argument for `$size`. Default 0.
    1479  * @return string|bool A valid source size value for use in a 'sizes' attribute or false.
     1479 * @return string|false A valid source size value for use in a 'sizes' attribute or false.
    14801480 */
    14811481function wp_calculate_image_sizes( $size, $image_src = null, $image_meta = null, $attachment_id = 0 ) {
  • trunk/src/wp-includes/ms-site.php

    r49193 r49597  
    861861     * @since MU (3.0.0)
    862862     *
    863      * @param string $uploads['basedir'] Uploads path without subdirectory. @see wp_upload_dir()
    864      * @param int    $site_id            The site ID.
     863     * @param string $basedir Uploads path without subdirectory. @see wp_upload_dir()
     864     * @param int    $site_id The site ID.
    865865     */
    866866    $dir     = apply_filters( 'wpmu_delete_blog_upload_dir', $uploads['basedir'], $site->id );
  • trunk/src/wp-includes/taxonomy.php

    r49539 r49597  
    20492049 * @param string|string[] $taxonomies The taxonomy names to retrieve terms from.
    20502050 * @param array|string    $args       See WP_Term_Query::__construct() for supported arguments.
    2051  * @return array|WP_Error The requested term data or empty array if no terms found.
    2052  *                        WP_Error if any of the taxonomies don't exist.
     2051 * @return WP_Term[]|WP_Error Array of terms or empty array if no terms found.
     2052 *                            WP_Error if any of the taxonomies don't exist.
    20532053 */
    20542054function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) {
     
    21262126     * @since 4.2.0
    21272127     *
    2128      * @param array    $terms      Array of terms for the given object or objects.
    2129      * @param int[]    $object_ids Array of object IDs for which terms were retrieved.
    2130      * @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
    2131      * @param array    $args       Array of arguments for retrieving terms for the given
    2132      *                             object(s). See wp_get_object_terms() for details.
     2128     * @param WP_Term[] $terms      Array of terms for the given object or objects.
     2129     * @param int[]     $object_ids Array of object IDs for which terms were retrieved.
     2130     * @param string[]  $taxonomies Array of taxonomy names from which terms were retrieved.
     2131     * @param array     $args       Array of arguments for retrieving terms for the given
     2132     *                              object(s). See wp_get_object_terms() for details.
    21332133     */
    21342134    $terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomies, $args );
     
    21452145     * @since 2.8.0
    21462146     *
    2147      * @param array    $terms      Array of terms for the given object or objects.
    2148      * @param int[]    $object_ids Array of object IDs for which terms were retrieved.
    2149      * @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
    2150      * @param array    $args       Array of arguments for retrieving terms for the given
    2151      *                             object(s). See wp_get_object_terms() for details.
     2147     * @param WP_Term[] $terms      Array of terms for the given object or objects.
     2148     * @param string    $object_ids Comma separated list if object IDs for which terms were retrieved.
     2149     * @param string    $taxonomies SQL fragment of taxonomy names from which terms were retrieved.
     2150     * @param array     $args       Array of arguments for retrieving terms for the given
     2151     *                              object(s). See wp_get_object_terms() for details.
    21522152     */
    21532153    return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args );
Note: See TracChangeset for help on using the changeset viewer.