WordPress.org

Make WordPress Core

Changeset 28653


Ignore:
Timestamp:
06/03/2014 03:52:46 AM (6 years ago)
Author:
DrewAPicture
Message:

Make sure $post is properly documented as optional where applicable.

See #28388.

Location:
trunk/src
Files:
4 edited

Legend:

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

    r28561 r28653  
    14641464 *
    14651465 * @since 2.7.0
    1466  * @param mixed $post Post id or object. If not supplied the global $post is used.
    1467  * @return string The post title if set
     1466 *
     1467 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
     1468 * @return string The post title if set.
    14681469 */
    14691470function _draft_or_post_title( $post = 0 ) {
  • trunk/src/wp-includes/media.php

    r28652 r28653  
    29752975 * @since 3.6.0
    29762976 *
    2977  * @param string $type (Mime) type of media desired
    2978  * @param mixed $post Post ID or object
    2979  * @return array Found attachments
     2977 * @param string      $type Mime type.
     2978 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
     2979 * @return array Found attachments.
    29802980 */
    29812981function get_attached_media( $type, $post = 0 ) {
     
    31013101 * @since 3.6.0
    31023102 *
    3103  * @param int|WP_Post $post Optional. Post ID or object.
     3103 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
    31043104 * @param bool        $html Whether to return HTML or data.
    31053105 * @return string|array Gallery data and srcs parsed from the expanded shortcode.
     
    31263126 * @since 3.6.0
    31273127 *
    3128  * @param mixed $post Optional. Post ID or object.
    3129  * @return array A list of lists, each containing image srcs parsed
     3128 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
     3129 * @return array A list of lists, each containing image srcs parsed.
    31303130 *      from an expanded shortcode
    31313131 */
     
    31403140 * @since 3.6.0
    31413141 *
    3142  * @param mixed $post Optional. Post ID or object.
    3143  * @return array A list of a gallery's image srcs in order
     3142 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
     3143 * @return array A list of a gallery's image srcs in order.
    31443144 */
    31453145function get_post_gallery_images( $post = 0 ) {
  • trunk/src/wp-includes/post-template.php

    r28571 r28653  
    105105 * @since 0.71
    106106 *
    107  * @param int|WP_Post $post Optional. Post ID or post object.
     107 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
    108108 * @return string
    109109 */
     
    15461546 *
    15471547 * @since 1.0.0
    1548  * @uses apply_filters() Calls 'the_password_form' filter on output.
    1549  * @param int|WP_Post $post Optional. A post ID or post object.
     1548 *
     1549 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
    15501550 * @return string HTML content for password form for password protected post.
    15511551 */
  • trunk/src/wp-includes/taxonomy.php

    r28618 r28653  
    37673767 * @since 2.5.0
    37683768 *
    3769  * @param int|WP_Post $post Optional. Post ID or post object.
     3769 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
    37703770 * @param array $args Override the defaults.
    3771  * @return array
     3771 * @return array List of taxonomies.
    37723772 */
    37733773function get_the_taxonomies( $post = 0, $args = array() ) {
     
    38163816 *
    38173817 * @since 2.5.0
     3818 *
    38183819 * @uses get_object_taxonomies()
    38193820 *
    3820  * @param int|WP_Post $post Optional. Post ID or post object.
     3821 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
    38213822 * @return array
    38223823 */
    3823 function get_post_taxonomies($post = 0) {
     3824function get_post_taxonomies( $post = 0 ) {
    38243825    $post = get_post( $post );
    38253826
Note: See TracChangeset for help on using the changeset viewer.