Make WordPress Core

Changeset 30671


Ignore:
Timestamp:
11/30/2014 10:37:00 PM (10 years ago)
Author:
wonderboymusic
Message:

Improve the @param docs for src/wp-includes/post*.php.

See #30224.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r30545 r30671  
    207207 *
    208208 * @param string $more_link_text Optional. Content for when there is more text.
    209  * @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.
     209 * @param bool   $strip_teaser  Optional. Strip teaser content before the more text. Default is false.
    210210 */
    211211function the_content( $more_link_text = null, $strip_teaser = false) {
     
    230230 *
    231231 * @param string $more_link_text Optional. Content for when there is more text.
    232  * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
     232 * @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.
    233233 * @return string
    234234 */
     
    14471447 *
    14481448 * @param int|WP_Post $id Optional. Post ID or post object.
    1449  * @param bool $fullsize Optional, default is false. Whether to use full size.
    1450  * @param bool $deprecated Deprecated. Not used.
    1451  * @param bool $permalink Optional, default is false. Whether to include permalink.
     1449 * @param bool        $fullsize    Optional, default is false. Whether to use full size.
     1450 * @param bool        $deprecated  Deprecated. Not used.
     1451 * @param bool        $permalink    Optional, default is false. Whether to include permalink.
    14521452 */
    14531453function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) {
     
    14661466 * @since 2.5.0
    14671467 *
    1468  * @param int|WP_Post $id Optional. Post ID or post object.
    1469  * @param string $size Optional, default is 'thumbnail'. Size of image, either array or string.
    1470  * @param bool $permalink Optional, default is false. Whether to add permalink to image.
    1471  * @param bool $icon Optional, default is false. Whether to include icon.
    1472  * @param string|bool $text Optional, default is false. If string, then will be link text.
    1473  * @param array|string $attr Optional. Array or string of attributes.
     1468 * @param int|WP_Post  $id        Optional. Post ID or post object.
     1469 * @param string       $size      Optional, default is 'thumbnail'. Size of image, either array or string.
     1470 * @param bool         $permalink Optional, default is false. Whether to add permalink to image.
     1471 * @param bool         $icon      Optional, default is false. Whether to include icon.
     1472 * @param string|bool  $text      Optional, default is false. If string, then will be link text.
     1473 * @param array|string $attr      Optional. Array or string of attributes.
    14741474 * @return string HTML content.
    14751475 */
     
    17311731 *
    17321732 * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post.
    1733  * @param string $type 'all' (default), 'revision' or 'autosave'
     1733 * @param string      $type    'all' (default), 'revision' or 'autosave'
    17341734 * @return null
    17351735 */
  • trunk/src/wp-includes/post.php

    r30653 r30671  
    840840 *
    841841 * @param int|WP_Post $ID Optional. Post ID or post object. Default empty.
    842  * @return string|bool The mime type on success, false on failure.
     842 * @return string|false The mime type on success, false on failure.
    843843 */
    844844function get_post_mime_type( $ID = '' ) {
     
    860860 *
    861861 * @param int|WP_Post $ID Optional. Post ID or post object. Default empty.
    862  * @return string|bool Post status on success, false on failure.
     862 * @return string|false Post status on success, false on failure.
    863863 */
    864864function get_post_status( $ID = '' ) {
     
    11251125 *
    11261126 * @param int|WP_Post $post Optional. Post ID or post object. Default is global $post.
    1127  * @return string|bool Post type on success, false on failure.
     1127 * @return string|false Post type on success, false on failure.
    11281128 */
    11291129function get_post_type( $post = null ) {
     
    28572857 *
    28582858 * @param int|WP_Post $post Optional. Post ID or post object. Defaults to global $post.
    2859  * @return mixed False on failure.
     2859 * @return null|bool Null on failure.
    28602860 */
    28612861function wp_untrash_post_comments( $post = null ) {
     
    29852985 * @see get_posts()
    29862986 *
    2987  * @param string $deprecated Not used.
    29882987 * @param array  $args       Optional. Arguments to retrieve posts. Default empty array.
    29892988 * @param string $output     Optional. Type of output. Accepts ARRAY_A or ''. Default ARRAY_A.
     
    37213720            do {
    37223721                $alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
    3723                 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_type, $post_ID, $post_parent ) ); 
     3722                $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_type, $post_ID, $post_parent ) );
    37243723                $suffix++;
    37253724            } while ( $post_name_check );
     
    39173916 * @since 2.3.0
    39183917 *
    3919  * @param string $new_status Transition to this post status.
    3920  * @param string $old_status Previous post status.
    3921  * @param object $post Post data.
     3918 * @param string  $new_status Transition to this post status.
     3919 * @param string  $old_status Previous post status.
     3920 * @param WP_Post $post Post data.
    39223921 */
    39233922function wp_transition_post_status( $new_status, $old_status, $post ) {
     
    57035702 * @since 3.1.0
    57045703 *
    5705  * @param int $post_id
     5704 * @param int $post_ID
    57065705 *
    57075706 * @return int|bool Post parent ID, otherwise false.
     
    58395838 * @see update_post_caches()
    58405839 *
    5841  * @param array $post_ids          ID list
     5840 * @param array $ids               ID list
    58425841 * @param bool  $update_term_cache Optional. Whether to update the term cache. Default true.
    58435842 * @param bool  $update_meta_cache Optional. Whether to update the meta cache. Default true.
Note: See TracChangeset for help on using the changeset viewer.