WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/28/2020 11:47:45 AM (19 months ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for optional parameters per the documentation standards.

See #49572.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/deprecated.php

    r48175 r48197  
    12431243 * @see get_term_children()
    12441244 *
    1245  * @param int $id Category ID to retrieve children.
    1246  * @param string $before Optional. Prepend before category term ID.
    1247  * @param string $after Optional, default is empty string. Append after category term ID.
    1248  * @param array $visited Optional. Category Term IDs that have already been added.
     1245 * @param int    $id      Category ID to retrieve children.
     1246 * @param string $before  Optional. Prepend before category term ID. Default '/'.
     1247 * @param string $after   Optional. Append after category term ID. Default empty string.
     1248 * @param array  $visited Optional. Category Term IDs that have already been added.
     1249 *                        Default empty array.
    12491250 * @return string
    12501251 */
     
    18351836 * @see wp_get_attachment_link()
    18361837 *
    1837  * @param int $id Optional. Post ID.
    1838  * @param bool $fullsize Optional, default is false. Whether to use full size image.
     1838 * @param int   $id      Optional. Post ID.
     1839 * @param bool  $fullsize Optional. Whether to use full size image. Default false.
    18391840 * @param array $max_dims Optional. Max image dimensions.
    1840  * @param bool $permalink Optional, default is false. Whether to include permalink to image.
     1841 * @param bool $permalink Optional. Whether to include permalink to image. Default false.
    18411842 * @return string
    18421843 */
     
    18651866 * @see wp_get_attachment_image_src()
    18661867 *
    1867  * @param int $id Optional. Post ID.
    1868  * @param bool $fullsize Optional, default to false. Whether to have full image.
     1868 * @param int  $id      Optional. Post ID.
     1869 * @param bool $fullsize Optional. Whether to have full image. Default false.
    18691870 * @return array Icon URL and full path to file, respectively.
    18701871 */
     
    19061907 * @see wp_get_attachment_image()
    19071908 *
    1908  * @param int $id Optional. Post ID.
    1909  * @param bool $fullsize Optional, default to false. Whether to have full size image.
     1909 * @param int   $id      Optional. Post ID.
     1910 * @param bool  $fullsize Optional. Whether to have full size image. Default false.
    19101911 * @param array $max_dims Optional. Dimensions of image.
    19111912 * @return string|false HTML content.
     
    19621963 * @see wp_get_attachment_image()
    19631964 *
    1964  * @param int $id Optional. Post ID.
    1965  * @param bool $fullsize Optional, default to false. Whether to have full size image.
     1965 * @param int   $id      Optional. Post ID.
     1966 * @param bool  $fullsize Optional. Whether to have full size image. Default false.
    19661967 * @param array $max_dims Optional. Dimensions of image.
    19671968 * @return string|false
     
    23872388 * @see add_theme_support()
    23882389 *
    2389  * @param bool $add Optional, default is true. Add or remove links. Defaults to true.
     2390 * @param bool $add Optional. Add or remove links. Default true.
    23902391 */
    23912392function automatic_feed_links( $add = true ) {
     
    24062407 *
    24072408 * @param string    $field User meta field.
    2408  * @param false|int $user Optional. User ID to retrieve the field for. Default false (current user).
     2409 * @param false|int $user  Optional. User ID to retrieve the field for. Default false (current user).
    24092410 * @return string The author's field from the current author's DB object.
    24102411 */
     
    26242625 * @deprecated 3.3.0
    26252626 *
    2626  * @param object|array $user The User Object or Array
    2627  * @param string $context Optional, default is 'display'. How to sanitize user fields.
    2628  * @return object|array The now sanitized User Object or Array (will be the same type as $user)
     2627 * @param object|array $user    The user object or array.
     2628 * @param string       $context Optional. How to sanitize user fields. Default 'display'.
     2629 * @return object|array The now sanitized user object or array (will be the same type as $user).
    26292630 */
    26302631function sanitize_user_object($user, $context = 'display') {
     
    26612662 * @deprecated 3.3.0
    26622663 *
    2663  * @param string $title Optional. Link title format.
    2664  * @param bool $in_same_cat Optional. Whether link should be in a same category.
    2665  * @param string $excluded_categories Optional. Excluded categories IDs.
    2666  * @param bool $start Optional, default is true. Whether to display link to first or last post.
     2664 * @param string $title               Optional. Link title format. Default '%title'.
     2665 * @param bool   $in_same_cat         Optional. Whether link should be in a same category.
     2666 *                                    Default false.
     2667 * @param string $excluded_categories Optional. Excluded categories IDs. Default empty.
     2668 * @param bool   $start               Optional. Whether to display link to first or last post.
     2669 *                                    Default true.
    26672670 * @return string
    26682671 */
     
    32163219 * @see wp_get_image_editor()
    32173220 *
    3218  * @param string $file Image file path.
    3219  * @param int $max_w Maximum width to resize to.
    3220  * @param int $max_h Maximum height to resize to.
    3221  * @param bool $crop Optional. Whether to crop image or resize.
    3222  * @param string $suffix Optional. File suffix.
    3223  * @param string $dest_path Optional. New image file path.
    3224  * @param int $jpeg_quality Optional, default is 90. Image quality percentage.
     3221 * @param string $file         Image file path.
     3222 * @param int    $max_w        Maximum width to resize to.
     3223 * @param int    $max_h        Maximum height to resize to.
     3224 * @param bool   $crop         Optional. Whether to crop image or resize. Default false.
     3225 * @param string $suffix       Optional. File suffix. Default null.
     3226 * @param string $dest_path    Optional. New image file path. Default null.
     3227 * @param int    $jpeg_quality Optional. Image quality percentage. Default 90.
    32253228 * @return mixed WP_Error on failure. String with new destination path.
    32263229 */
Note: See TracChangeset for help on using the changeset viewer.