Ticket #20495: 20495.diff
File 20495.diff, 10.7 KB (added by , 13 years ago) |
---|
-
wp-includes/post-template.php
97 97 * 98 98 * @since 0.71 99 99 * 100 * @param int $id Optional. Post ID.100 * @param int|object $id Optional. Post ID or post object. 101 101 * @return string 102 102 */ 103 103 function get_the_title( $id = 0 ) { … … 144 144 * 145 145 * @since 1.5.0 146 146 * 147 * @param int $id Optional. Post ID.147 * @param int|object $id Optional. Post ID or post object. 148 148 * @return string 149 149 */ 150 150 function get_the_guid( $id = 0 ) { … … 274 274 * 275 275 * @since 2.3.0 276 276 * 277 * @param int $id Optional. Post ID.277 * @param int|object $id Optional. Post ID or post object. 278 278 * @return bool 279 279 */ 280 280 function has_excerpt( $id = 0 ) { … … 288 288 * @since 2.7.0 289 289 * 290 290 * @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. 292 292 */ 293 293 function post_class( $class = '', $post_id = null ) { 294 294 // Separates classes with a single space, collates classes for post DIV … … 309 309 * @since 2.7.0 310 310 * 311 311 * @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. 313 313 * @return array Array of classes. 314 314 */ 315 315 function get_post_class( $class = '', $post_id = null ) { … … 1264 1264 * 1265 1265 * @since 3.4.0 1266 1266 * 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. 1268 1268 * @return string|bool Page template filename. Returns an empty string when the default page template 1269 1269 * is in use. Returns false if the post is not a page. 1270 1270 */ … … 1343 1343 * 1344 1344 * @todo split into two functions (list, form-table) ? 1345 1345 * 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()}. 1348 1348 * @return null 1349 1349 */ 1350 1350 function wp_list_post_revisions( $post_id = 0, $args = null ) { -
wp-includes/taxonomy.php
3054 3054 * 3055 3055 * @since 2.5.0 3056 3056 * 3057 * @param int $post Optional. Post ID orwill 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). 3058 3058 * @param array $args Override the defaults. 3059 3059 * @return array 3060 3060 */ … … 3104 3104 * @since 2.5.0 3105 3105 * @uses get_object_taxonomies() 3106 3106 * 3107 * @param int $post Optional. Post ID3107 * @param int|object $post Optional. Post ID or post object. 3108 3108 * @return array 3109 3109 */ 3110 3110 function get_post_taxonomies($post = 0) { -
wp-includes/post.php
480 480 * 481 481 * @since 2.0.0 482 482 * 483 * @param int $ID Optional. Post ID.483 * @param int|object $ID Optional. Post ID or post object. 484 484 * @return bool|string False on failure or returns the mime type 485 485 */ 486 486 function get_post_mime_type($ID = '') { … … 497 497 * 498 498 * @since 3.1.0 499 499 * 500 * @param int|object $post A post500 * @param int|object $post Optional. Post ID or post object. 501 501 * 502 502 * @return mixed The format if successful. False if no format is set. WP_Error if errors. 503 503 */ … … 565 565 * 566 566 * @since 2.0.0 567 567 * 568 * @param int $ID Post ID568 * @param int|object $ID Optional. Post ID or post object. 569 569 * @return string|bool Post status or false on failure. 570 570 */ 571 571 function get_post_status($ID = '') { … … 2139 2139 * @uses do_action() on 'trash_post_comments' before trashing 2140 2140 * @uses do_action() on 'trashed_post_comments' after trashing 2141 2141 * 2142 * @param int $post Post ID orobject.2142 * @param int|object $post Optional. Post ID or post object. 2143 2143 * @return mixed False on failure 2144 2144 */ 2145 2145 function wp_trash_post_comments($post = null) { … … 2180 2180 * @uses do_action() on 'untrash_post_comments' before trashing 2181 2181 * @uses do_action() on 'untrashed_post_comments' after trashing 2182 2182 * 2183 * @param int $post Post ID orobject.2183 * @param int|object $post Optional. Post ID or post object. 2184 2184 * @return mixed False on failure 2185 2185 */ 2186 2186 function wp_untrash_post_comments($post = null) { … … 2747 2747 } 2748 2748 2749 2749 /** 2750 * Publish future post and make sure post IDhas future post status.2750 * Publish future post and make sure post has future post status. 2751 2751 * 2752 2752 * Invoked by cron 'publish_future_post' event. This safeguard prevents cron 2753 2753 * from publishing drafts, etc. … … 4670 4670 * 4671 4671 * @uses _wp_put_post_revision() 4672 4672 * 4673 * @param int $post_id The IDof 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. 4674 4674 * @return mixed Null or 0 if error, new revision ID, if success. 4675 4675 */ 4676 4676 function wp_save_post_revision( $post_id ) { … … 4724 4724 * @subpackage Post_Revisions 4725 4725 * @since 2.6.0 4726 4726 * 4727 * @param int $post_id The post ID.4727 * @param int|object $post_id Post ID or post object. 4728 4728 * @return object|bool The autosaved data or false on failure or when no autosave exists. 4729 4729 */ 4730 4730 function wp_get_post_autosave( $post_id ) { … … 4953 4953 * 4954 4954 * @uses get_children() 4955 4955 * 4956 * @param int|object $post_id Post ID or post object4956 * @param int|object $post_id Optional. Post ID or post object 4957 4957 * @return array empty if no revisions 4958 4958 */ 4959 4959 function wp_get_post_revisions( $post_id = 0, $args = null ) { -
wp-includes/comment-template.php
293 293 * 294 294 * @param string|array $class One or more classes to add to the class list 295 295 * @param int $comment_id An optional comment ID 296 * @param int $post_id An optional post ID296 * @param int|object $post_id An optional post ID or post object. 297 297 * @return array Array of classes 298 298 */ 299 299 function get_comment_class( $class = '', $comment_id = null, $post_id = null ) { … … 766 766 * @since 1.5.0 767 767 * @uses $post 768 768 * 769 * @param int $post_id An optional post IDto 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. 770 770 * @return bool True if the comments are open 771 771 */ 772 772 function comments_open( $post_id = null ) { … … 783 783 * @since 1.5.0 784 784 * @uses $post 785 785 * 786 * @param int $post_id An optional post IDto 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. 787 787 * @return bool True if pings are accepted 788 788 */ 789 789 function pings_open( $post_id = null ) { … … 1030 1030 * 1031 1031 * @param array $args Optional. Override default options. 1032 1032 * @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. 1034 1034 * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. 1035 1035 */ 1036 1036 function get_comment_reply_link($args = array(), $comment = null, $post = null) { … … 1071 1071 * 1072 1072 * @param array $args Optional. Override default options. 1073 1073 * @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. 1075 1075 * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. 1076 1076 */ 1077 1077 function comment_reply_link($args = array(), $comment = null, $post = null) { -
wp-includes/media.php
1231 1231 /** 1232 1232 * Triggers a caching of all oEmbed results. 1233 1233 * 1234 * @param int $post_ID Post IDto do the caching for.1234 * @param int|object $post_ID Post ID or post object to do the caching for. 1235 1235 */ 1236 1236 function cache_oembed( $post_ID ) { 1237 1237 $post = get_post( $post_ID ); -
wp-includes/link-template.php
73 73 * 74 74 * @since 1.0.0 75 75 * 76 * @param int $id Optional. Post ID.76 * @param int|object $id Optional. Post ID or post object. 77 77 * @param bool $leavename Optional, defaults to false. Whether to keep post name or page name. 78 78 * @return string 79 79 */ … … 168 168 * 169 169 * @since 3.0.0 170 170 * 171 * @param int $id Optional. Post ID.171 * @param int|object $id Optional. Post ID or post object. 172 172 * @param bool $leavename Optional, defaults to false. Whether to keep post name. 173 173 * @param bool $sample Optional, defaults to false. Is it a sample permalink. 174 174 * @return string … … 258 258 * @since 2.1.0 259 259 * @access private 260 260 * 261 * @param int $id Optional. Post ID.261 * @param int|object $id Optional. Post ID or post object. 262 262 * @param bool $leavename Optional. Leave name. 263 263 * @param bool $sample Optional. Sample permalink. 264 264 * @return string … … 296 296 * 297 297 * @since 2.0.0 298 298 * 299 * @param int $id Optional. Post ID.299 * @param int|object $id Optional. Post ID or post object. 300 300 * @return string 301 301 */ 302 302 function get_attachment_link($id = false) { … … 891 891 * 892 892 * @since 2.3.0 893 893 * 894 * @param int $id Optional. Post ID.894 * @param int|object $id Optional. Post ID or post object. 895 895 * @param string $context Optional, defaults to display. How to write the '&', defaults to '&'. 896 896 * @return string 897 897 */ … … 922 922 * @param string $link Optional. Anchor text. 923 923 * @param string $before Optional. Display before edit link. 924 924 * @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. 926 926 */ 927 927 function edit_post_link( $link = null, $before = '', $after = '', $id = 0 ) { 928 928 if ( !$post = &get_post( $id ) ) … … 946 946 * 947 947 * @since 2.9.0 948 948 * 949 * @param int $id Optional. Post ID.949 * @param int|object $id Optional. Post ID or post object. 950 950 * @param string $deprecated Not used. 951 951 * @param bool $force_delete Whether to bypass trash and force deletion. Default is false. 952 952 * @return string