Make WordPress Core


Ignore:
Timestamp:
06/28/2020 11:47:45 AM (4 years 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/post-formats.php

    r47808 r48197  
    1212 * @since 3.1.0
    1313 *
    14  * @param int|object|null $post Post ID or post object. Optional, default is the current post from the loop.
     14 * @param int|object|null $post Optional. Post ID or post object. Defaults to the current post in the loop.
    1515 * @return string|false The format if successful. False otherwise.
    1616 */
     
    4343 *
    4444 * @param string|array     $format Optional. The format or formats to check.
    45  * @param WP_Post|int|null $post   Optional. The post to check. If not supplied, defaults to the current post if used in the loop.
    46  * @return bool True if the post has any of the given formats (or any format, if no format specified), false otherwise.
     45 * @param WP_Post|int|null $post   Optional. The post to check. Defaults to the current post in the loop.
     46 * @return bool True if the post has any of the given formats (or any format, if no format specified),
     47 *              false otherwise.
    4748 */
    4849function has_post_format( $format = array(), $post = null ) {
     
    6566 * @param int|object $post   The post for which to assign a format.
    6667 * @param string     $format A format to assign. Use an empty string or array to remove all formats from the post.
    67  * @return array|WP_Error|false WP_Error on error. Array of affected term IDs on success.
     68 * @return array|WP_Error|false Array of affected term IDs on success. WP_Error on error.
    6869 */
    6970function set_post_format( $post, $format ) {
Note: See TracChangeset for help on using the changeset viewer.