Make WordPress Core


Ignore:
Timestamp:
03/08/2014 07:31:51 PM (11 years ago)
Author:
DrewAPicture
Message:

Better standardize parameter value types in PHPDocs where both a post ID or WP_Post would be acceptable.

Covers cases where previously only int or int|object types were notated.

Props coffee2code for the original patch.
See #20495.

File:
1 edited

Legend:

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

    r27429 r27473  
    9797 * @since 0.71
    9898 *
    99  * @param int|object $post Optional. Post ID or object.
     99 * @param int|WP_Post $post Optional. Post ID or post object.
    100100 * @return string
    101101 */
     
    130130 * @since 1.5.0
    131131 *
    132  * @param int $id Optional. Post ID.
     132 * @param int|WP_Post $id Optional. Post ID or post object.
    133133 */
    134134function the_guid( $id = 0 ) {
     
    145145 * @since 1.5.0
    146146 *
    147  * @param int $id Optional. Post ID.
     147 * @param int|WP_Post $id Optional. Post ID or post object.
    148148 * @return string
    149149 */
     
    281281 * @since 2.3.0
    282282 *
    283  * @param int $id Optional. Post ID.
     283 * @param int|WP_Post $id Optional. Post ID or post object.
    284284 * @return bool
    285285 */
     
    295295 *
    296296 * @param string|array $class One or more classes to add to the class list.
    297  * @param int $post_id An optional post ID.
     297 * @param int|WP_Post $post_id Optional. Post ID or post object.
    298298 */
    299299function post_class( $class = '', $post_id = null ) {
     
    317317 *
    318318 * @param string|array $class One or more classes to add to the class list.
    319  * @param int $post_id An optional post ID.
     319 * @param int|WP_Post $post_id Optional. Post ID or post object.
    320320 * @return array Array of classes.
    321321 */
     
    11741174 * @since 2.0.0
    11751175 *
    1176  * @param int $id Optional. Post ID.
     1176 * @param int|WP_Post $id Optional. Post ID or post object.
    11771177 * @param bool $fullsize Optional, default is false. Whether to use full size.
    11781178 * @param bool $deprecated Deprecated. Not used.
     
    11951195 * @uses apply_filters() Calls 'wp_get_attachment_link' filter on HTML content with same parameters as function.
    11961196 *
    1197  * @param int $id Optional. Post ID.
     1197 * @param int|WP_Post $id Optional. Post ID or post object.
    11981198 * @param string $size Optional, default is 'thumbnail'. Size of image, either array or string.
    11991199 * @param bool $permalink Optional, default is false. Whether to add permalink to image.
     
    12601260 * @since 1.0.0
    12611261 * @uses apply_filters() Calls 'the_password_form' filter on output.
    1262  * @param int|WP_Post $post Optional. A post id or post object. Defaults to the current post when in The Loop, undefined otherwise.
     1262 * @param int|WP_Post $post Optional. A post ID or post object.
    12631263 * @return string HTML content for password form for password protected post.
    12641264 */
     
    14211421 * @uses get_the_author_meta()
    14221422 *
    1423  * @param int|object $post_id Post ID or post object.
     1423 * @param int|WP_Post $post_id Optional. Post ID or post object.
    14241424 * @param string $type 'all' (default), 'revision' or 'autosave'
    14251425 * @return null
Note: See TracChangeset for help on using the changeset viewer.