WordPress.org

Make WordPress Core

Ticket #20495: 20495.diff

File 20495.diff, 10.7 KB (added by coffee2code, 2 years ago)

Aforementioned patch.

  • wp-includes/post-template.php

     
    9797 * 
    9898 * @since 0.71 
    9999 * 
    100  * @param int $id Optional. Post ID. 
     100 * @param int|object $id Optional. Post ID or post object. 
    101101 * @return string 
    102102 */ 
    103103function get_the_title( $id = 0 ) { 
     
    144144 * 
    145145 * @since 1.5.0 
    146146 * 
    147  * @param int $id Optional. Post ID. 
     147 * @param int|object $id Optional. Post ID or post object. 
    148148 * @return string 
    149149 */ 
    150150function get_the_guid( $id = 0 ) { 
     
    274274 * 
    275275 * @since 2.3.0 
    276276 * 
    277  * @param int $id Optional. Post ID. 
     277 * @param int|object $id Optional. Post ID or post object. 
    278278 * @return bool 
    279279 */ 
    280280function has_excerpt( $id = 0 ) { 
     
    288288 * @since 2.7.0 
    289289 * 
    290290 * @param string|array $class One or more classes to add to the class list. 
    291  * @param int $post_id An optional post ID. 
     291 * @param int|object $post_id Optional. Post ID or post object. 
    292292 */ 
    293293function post_class( $class = '', $post_id = null ) { 
    294294        // Separates classes with a single space, collates classes for post DIV 
     
    309309 * @since 2.7.0 
    310310 * 
    311311 * @param string|array $class One or more classes to add to the class list. 
    312  * @param int $post_id An optional post ID. 
     312 * @param int|object $post_id Optional. Post ID or post object. 
    313313 * @return array Array of classes. 
    314314 */ 
    315315function get_post_class( $class = '', $post_id = null ) { 
     
    12641264 * 
    12651265 * @since 3.4.0 
    12661266 * 
    1267  * @param int $id The page ID to check. Defaults to the current post, when used in the loop. 
     1267 * @param int|object $post_id Optional. Page ID or page object to check. Defaults to the current post when used in the loop. 
    12681268 * @return string|bool Page template filename. Returns an empty string when the default page template 
    12691269 *      is in use. Returns false if the post is not a page. 
    12701270 */ 
     
    13431343 * 
    13441344 * @todo split into two functions (list, form-table) ? 
    13451345 * 
    1346  * @param int|object $post_id Post ID or post object. 
    1347  * @param string|array $args See description {@link wp_parse_args()}. 
     1346 * @param int|object $post_id Optional. Post ID or post object. 
     1347 * @param string|array $args Optional. See description {@link wp_parse_args()}. 
    13481348 * @return null 
    13491349 */ 
    13501350function wp_list_post_revisions( $post_id = 0, $args = null ) { 
  • wp-includes/taxonomy.php

     
    30543054 * 
    30553055 * @since 2.5.0 
    30563056 * 
    3057  * @param int $post Optional. Post ID or will use Global Post ID (in loop). 
     3057 * @param int|object $post Optional. Post ID or post object. By default will use Global Post ID (in loop). 
    30583058 * @param array $args Override the defaults. 
    30593059 * @return array 
    30603060 */ 
     
    31043104 * @since 2.5.0 
    31053105 * @uses get_object_taxonomies() 
    31063106 * 
    3107  * @param int $post Optional. Post ID 
     3107 * @param int|object $post Optional. Post ID or post object. 
    31083108 * @return array 
    31093109 */ 
    31103110function get_post_taxonomies($post = 0) { 
  • wp-includes/post.php

     
    480480 * 
    481481 * @since 2.0.0 
    482482 * 
    483  * @param int $ID Optional. Post ID. 
     483 * @param int|object $ID Optional. Post ID or post object. 
    484484 * @return bool|string False on failure or returns the mime type 
    485485 */ 
    486486function get_post_mime_type($ID = '') { 
     
    497497 * 
    498498 * @since 3.1.0 
    499499 * 
    500  * @param int|object $post A post 
     500 * @param int|object $post Optional. Post ID or post object. 
    501501 * 
    502502 * @return mixed The format if successful. False if no format is set. WP_Error if errors. 
    503503 */ 
     
    565565 * 
    566566 * @since 2.0.0 
    567567 * 
    568  * @param int $ID Post ID 
     568 * @param int|object $ID Optional. Post ID or post object. 
    569569 * @return string|bool Post status or false on failure. 
    570570 */ 
    571571function get_post_status($ID = '') { 
     
    21392139 * @uses do_action() on 'trash_post_comments' before trashing 
    21402140 * @uses do_action() on 'trashed_post_comments' after trashing 
    21412141 * 
    2142  * @param int $post Post ID or object. 
     2142 * @param int|object $post Optional. Post ID or post object. 
    21432143 * @return mixed False on failure 
    21442144 */ 
    21452145function wp_trash_post_comments($post = null) { 
     
    21802180 * @uses do_action() on 'untrash_post_comments' before trashing 
    21812181 * @uses do_action() on 'untrashed_post_comments' after trashing 
    21822182 * 
    2183  * @param int $post Post ID or object. 
     2183 * @param int|object $post Optional. Post ID or post object. 
    21842184 * @return mixed False on failure 
    21852185 */ 
    21862186function wp_untrash_post_comments($post = null) { 
     
    27472747} 
    27482748 
    27492749/** 
    2750  * Publish future post and make sure post ID has future post status. 
     2750 * Publish future post and make sure post has future post status. 
    27512751 * 
    27522752 * Invoked by cron 'publish_future_post' event. This safeguard prevents cron 
    27532753 * from publishing drafts, etc. 
     
    46704670 * 
    46714671 * @uses _wp_put_post_revision() 
    46724672 * 
    4673  * @param int $post_id The ID of the post to save as a revision. 
     4673 * @param int|object $post_id The ID or object of the post to save as a revision. 
    46744674 * @return mixed Null or 0 if error, new revision ID, if success. 
    46754675 */ 
    46764676function wp_save_post_revision( $post_id ) { 
     
    47244724 * @subpackage Post_Revisions 
    47254725 * @since 2.6.0 
    47264726 * 
    4727  * @param int $post_id The post ID. 
     4727 * @param int|object $post_id Post ID or post object. 
    47284728 * @return object|bool The autosaved data or false on failure or when no autosave exists. 
    47294729 */ 
    47304730function wp_get_post_autosave( $post_id ) { 
     
    49534953 * 
    49544954 * @uses get_children() 
    49554955 * 
    4956  * @param int|object $post_id Post ID or post object 
     4956 * @param int|object $post_id Optional. Post ID or post object 
    49574957 * @return array empty if no revisions 
    49584958 */ 
    49594959function wp_get_post_revisions( $post_id = 0, $args = null ) { 
  • wp-includes/comment-template.php

     
    293293 * 
    294294 * @param string|array $class One or more classes to add to the class list 
    295295 * @param int $comment_id An optional comment ID 
    296  * @param int $post_id An optional post ID 
     296 * @param int|object $post_id An optional post ID or post object. 
    297297 * @return array Array of classes 
    298298 */ 
    299299function get_comment_class( $class = '', $comment_id = null, $post_id = null ) { 
     
    766766 * @since 1.5.0 
    767767 * @uses $post 
    768768 * 
    769  * @param int $post_id An optional post ID to check instead of the current post. 
     769 * @param int|object $post_id An optional post ID or post object to check instead of the current post. 
    770770 * @return bool True if the comments are open 
    771771 */ 
    772772function comments_open( $post_id = null ) { 
     
    783783 * @since 1.5.0 
    784784 * @uses $post 
    785785 * 
    786  * @param int $post_id An optional post ID to check instead of the current post. 
     786 * @param int|object $post_id An optional post ID or post object to check instead of the current post. 
    787787 * @return bool True if pings are accepted 
    788788 */ 
    789789function pings_open( $post_id = null ) { 
     
    10301030 * 
    10311031 * @param array $args Optional. Override default options. 
    10321032 * @param int $comment Optional. Comment being replied to. 
    1033  * @param int $post Optional. Post that the comment is going to be displayed on. 
     1033 * @param int|object $post Optional. Post that the comment is going to be displayed on. 
    10341034 * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. 
    10351035 */ 
    10361036function get_comment_reply_link($args = array(), $comment = null, $post = null) { 
     
    10711071 * 
    10721072 * @param array $args Optional. Override default options. 
    10731073 * @param int $comment Optional. Comment being replied to. 
    1074  * @param int $post Optional. Post that the comment is going to be displayed on. 
     1074 * @param int|object $post Optional. Post that the comment is going to be displayed on. 
    10751075 * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. 
    10761076 */ 
    10771077function comment_reply_link($args = array(), $comment = null, $post = null) { 
  • wp-includes/media.php

     
    12311231        /** 
    12321232         * Triggers a caching of all oEmbed results. 
    12331233         * 
    1234          * @param int $post_ID Post ID to do the caching for. 
     1234         * @param int|object $post_ID Post ID or post object to do the caching for. 
    12351235         */ 
    12361236        function cache_oembed( $post_ID ) { 
    12371237                $post = get_post( $post_ID ); 
  • wp-includes/link-template.php

     
    7373 * 
    7474 * @since 1.0.0 
    7575 * 
    76  * @param int $id Optional. Post ID. 
     76 * @param int|object $id Optional. Post ID or post object. 
    7777 * @param bool $leavename Optional, defaults to false. Whether to keep post name or page name. 
    7878 * @return string 
    7979 */ 
     
    168168 * 
    169169 * @since 3.0.0 
    170170 * 
    171  * @param int $id Optional. Post ID. 
     171 * @param int|object $id Optional. Post ID or post object. 
    172172 * @param bool $leavename Optional, defaults to false. Whether to keep post name. 
    173173 * @param bool $sample Optional, defaults to false. Is it a sample permalink. 
    174174 * @return string 
     
    258258 * @since 2.1.0 
    259259 * @access private 
    260260 * 
    261  * @param int $id Optional. Post ID. 
     261 * @param int|object $id Optional. Post ID or post object. 
    262262 * @param bool $leavename Optional. Leave name. 
    263263 * @param bool $sample Optional. Sample permalink. 
    264264 * @return string 
     
    296296 * 
    297297 * @since 2.0.0 
    298298 * 
    299  * @param int $id Optional. Post ID. 
     299 * @param int|object $id Optional. Post ID or post object. 
    300300 * @return string 
    301301 */ 
    302302function get_attachment_link($id = false) { 
     
    891891 * 
    892892 * @since 2.3.0 
    893893 * 
    894  * @param int $id Optional. Post ID. 
     894 * @param int|object $id Optional. Post ID or post object. 
    895895 * @param string $context Optional, defaults to display. How to write the '&', defaults to '&'. 
    896896 * @return string 
    897897 */ 
     
    922922 * @param string $link Optional. Anchor text. 
    923923 * @param string $before Optional. Display before edit link. 
    924924 * @param string $after Optional. Display after edit link. 
    925  * @param int $id Optional. Post ID. 
     925 * @param int|object $id Optional. Post ID or post object. 
    926926 */ 
    927927function edit_post_link( $link = null, $before = '', $after = '', $id = 0 ) { 
    928928        if ( !$post = &get_post( $id ) ) 
     
    946946 * 
    947947 * @since 2.9.0 
    948948 * 
    949  * @param int $id Optional. Post ID. 
     949 * @param int|object $id Optional. Post ID or post object. 
    950950 * @param string $deprecated Not used. 
    951951 * @param bool $force_delete Whether to bypass trash and force deletion. Default is false. 
    952952 * @return string