Make WordPress Core

Changeset 31659


Ignore:
Timestamp:
03/07/2015 07:08:52 AM (10 years ago)
Author:
DrewAPicture
Message:

Better document parameters and the return for the newly-introduced wp_attachment_is().

Also adds a changelog entry to the DocBlock for wp_attachment_is_image() to denote that it serves as a wrapper for wp_attachment_is() as of 4.2.0.

See [31645]. See #25275.

File:
1 edited

Legend:

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

    r31653 r31659  
    50725072
    50735073/**
    5074  * Verfify the attachment as being of a specific type
    5075  *
    5076  * @param string      $type    Type: image, audio, or video.
    5077  * @param int|WP_Post $post_id Optional. Default 0.
    5078  * @return bool
     5074 * Verifies an attachment is of a given type.
     5075 *
     5076 * @param string      $type    Attachment type. Accepts 'image', 'audio', or 'video'.
     5077 * @param int|WP_Post $post_id Optional. Attachment ID. Default 0.
     5078 * @return bool True if one of the accepted types, false otherwise.
    50795079 */
    50805080function wp_attachment_is( $type, $post_id = 0 ) {
     
    51195119
    51205120/**
    5121  * Check if the attachment is an image.
     5121 * Checks if the attachment is an image.
    51225122 *
    51235123 * @since 2.1.0
     5124 * @since 4.2.0 Modified into wrapper for wp_attachment_is()
    51245125 *
    51255126 * @param int|WP_Post $post Optional. Attachment ID. Default 0.
Note: See TracChangeset for help on using the changeset viewer.