Ticket #20495: 20495.2.diff
File 20495.2.diff, 8.5 KB (added by , 11 years ago) |
---|
-
src/wp-includes/post-template.php
96 96 * 97 97 * @since 0.71 98 98 * 99 * @param int| object $post Optional. Post ID orobject.99 * @param int|WP_Post $post Optional. Post ID or post object. 100 100 * @return string 101 101 */ 102 102 function get_the_title( $post = 0 ) { … … 129 129 * 130 130 * @since 1.5.0 131 131 * 132 * @param int $id Optional. Post ID.132 * @param int|WP_Post $id Optional. Post ID or post object. 133 133 */ 134 134 function the_guid( $id = 0 ) { 135 135 echo esc_url( get_the_guid( $id ) ); … … 144 144 * 145 145 * @since 1.5.0 146 146 * 147 * @param int $id Optional. Post ID.147 * @param int|WP_Post $id Optional. Post ID or post object. 148 148 * @return string 149 149 */ 150 150 function get_the_guid( $id = 0 ) { … … 280 280 * 281 281 * @since 2.3.0 282 282 * 283 * @param int $id Optional. Post ID.283 * @param int|WP_Post $id Optional. Post ID or post object. 284 284 * @return bool 285 285 */ 286 286 function has_excerpt( $id = 0 ) { … … 294 294 * @since 2.7.0 295 295 * 296 296 * @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. 298 298 */ 299 299 function post_class( $class = '', $post_id = null ) { 300 300 // Separates classes with a single space, collates classes for post DIV … … 316 316 * @since 2.7.0 317 317 * 318 318 * @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. 320 320 * @return array Array of classes. 321 321 */ 322 322 function get_post_class( $class = '', $post_id = null ) { … … 1173 1173 * 1174 1174 * @since 2.0.0 1175 1175 * 1176 * @param int $id Optional. Post ID.1176 * @param int|WP_Post $id Optional. Post ID or post object. 1177 1177 * @param bool $fullsize Optional, default is false. Whether to use full size. 1178 1178 * @param bool $deprecated Deprecated. Not used. 1179 1179 * @param bool $permalink Optional, default is false. Whether to include permalink. … … 1194 1194 * @since 2.5.0 1195 1195 * @uses apply_filters() Calls 'wp_get_attachment_link' filter on HTML content with same parameters as function. 1196 1196 * 1197 * @param int $id Optional. Post ID.1197 * @param int|WP_Post $id Optional. Post ID or post object. 1198 1198 * @param string $size Optional, default is 'thumbnail'. Size of image, either array or string. 1199 1199 * @param bool $permalink Optional, default is false. Whether to add permalink to image. 1200 1200 * @param bool $icon Optional, default is false. Whether to include icon. … … 1259 1259 * 1260 1260 * @since 1.0.0 1261 1261 * @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. 1263 1263 * @return string HTML content for password form for password protected post. 1264 1264 */ 1265 1265 function get_the_password_form( $post = 0 ) { … … 1420 1420 * @uses get_edit_post_link() 1421 1421 * @uses get_the_author_meta() 1422 1422 * 1423 * @param int| object $post_idPost ID or post object.1423 * @param int|WP_Post $post_id Optional. Post ID or post object. 1424 1424 * @param string $type 'all' (default), 'revision' or 'autosave' 1425 1425 * @return null 1426 1426 */ -
src/wp-includes/post.php
380 380 * @since 1.5.1 381 381 * @link http://codex.wordpress.org/Function_Reference/get_post 382 382 * 383 * @param int| object $post Post ID or post object. Optional, default is the current post from the loop.383 * @param int|WP_Post $post Optional. Post ID or post object. 384 384 * @param string $output Optional, default is Object. Either OBJECT, ARRAY_A, or ARRAY_N. 385 385 * @param string $filter Optional, default is raw. 386 386 * @return WP_Post|null WP_Post on success or null on failure … … 710 710 * 711 711 * @since 2.5.0 712 712 * 713 * @param int| object $post Post ID or post object713 * @param int|WP_Post $post Post ID or post object. 714 714 * @return array Ancestor IDs or empty array if none are found. 715 715 */ 716 716 function get_post_ancestors( $post ) { … … 747 747 * @uses sanitize_post_field() See for possible $context values. 748 748 * 749 749 * @param string $field Post field name. 750 * @param int| object $post Post ID or post object.750 * @param int|WP_Post $post Post ID or post object. 751 751 * @param string $context Optional. How to filter the field. Default is 'display'. 752 752 * @return string The value of the post field on success, empty string on failure. 753 753 */ … … 771 771 * 772 772 * @since 2.0.0 773 773 * 774 * @param int $ID Optional. Post ID. Default is the current post from the loop.774 * @param int|WP_Post $ID Optional. Post ID or post object. 775 775 * @return string|bool The mime type on success, false on failure. 776 776 */ 777 777 function get_post_mime_type($ID = '') { … … 791 791 * 792 792 * @since 2.0.0 793 793 * 794 * @param int $ID Optional. Post ID. Default is the current post from the loop.794 * @param int|WP_Post $ID Optional. Post ID or post object. 795 795 * @return string|bool Post status on success, false on failure. 796 796 */ 797 797 function get_post_status($ID = '') { … … 1025 1025 * 1026 1026 * @since 2.1.0 1027 1027 * 1028 * @param int| object $post Optional. Post ID or post object. Default is the current post from the loop.1028 * @param int|WP_Post $post Optional. Post ID or post object. 1029 1029 * @return string|bool Post type on success, false on failure. 1030 1030 */ 1031 1031 function get_post_type( $post = null ) { … … 2480 2480 * @uses do_action() on 'trash_post_comments' before trashing 2481 2481 * @uses do_action() on 'trashed_post_comments' after trashing 2482 2482 * 2483 * @param int| object $post Post ID orobject.2483 * @param int|WP_Post $post Optional. Post ID or post object. 2484 2484 * @return mixed False on failure 2485 2485 */ 2486 2486 function wp_trash_post_comments($post = null) { … … 2521 2521 * @uses do_action() on 'untrash_post_comments' before trashing 2522 2522 * @uses do_action() on 'untrashed_post_comments' after trashing 2523 2523 * 2524 * @param int| object $post Post ID orobject.2524 * @param int|WP_Post $post Optional. Post ID or post object. 2525 2525 * @return mixed False on failure 2526 2526 */ 2527 2527 function wp_untrash_post_comments($post = null) { … … 3039 3039 * @uses $wpdb 3040 3040 * @uses do_action() Calls 'edit_post', 'save_post_{$post_type}', 'save_post' and 'wp_insert_post' on post_id and post data. 3041 3041 * 3042 * @param int| object $post Post ID orobject.3042 * @param int|WP_Post $post Post ID or post object. 3043 3043 */ 3044 3044 function wp_publish_post( $post ) { 3045 3045 global $wpdb; … … 3072 3072 * 3073 3073 * @since 2.5.0 3074 3074 * 3075 * @param int $post_id Post ID.3075 * @param int|WP_Post $post_id Post ID or post object. 3076 3076 * @return null Nothing is returned. Which can mean that no action is required or post was published. 3077 3077 */ 3078 3078 function check_and_publish_future_post($post_id) { … … 4760 4760 * 4761 4761 * @uses do_action() Calls 'clean_post_cache' on $id before adding children (if any). 4762 4762 * 4763 * @param int| object $post Post ID or object to remove from the cache4763 * @param int|WP_Post $post Post ID or post object to remove from the cache. 4764 4764 */ 4765 4765 function clean_post_cache( $post ) { 4766 4766 global $_wp_suspend_cache_invalidation, $wpdb; … … 5039 5039 * 5040 5040 * @since 3.1.0 5041 5041 * 5042 * @param int| object $post Post ID orobject where thumbnail should be attached.5042 * @param int|WP_Post $post Post ID or post object where thumbnail should be attached. 5043 5043 * @param int $thumbnail_id Thumbnail to attach. 5044 5044 * @return bool True on success, false on failure. 5045 5045 */ … … 5060 5060 * 5061 5061 * @since 3.3.0 5062 5062 * 5063 * @param int| object $post Post ID orobject where thumbnail should be removed from.5063 * @param int|WP_Post $post Post ID or post object where thumbnail should be removed from. 5064 5064 * @return bool True on success, false on failure. 5065 5065 */ 5066 5066 function delete_post_thumbnail( $post ) { -
src/wp-includes/taxonomy.php
3193 3193 * 3194 3194 * @since 2.5.0 3195 3195 * 3196 * @param int $post Optional. Post ID or will use Global Post ID (in loop).3196 * @param int|WP_Post $post Optional. Post ID or post object. 3197 3197 * @param array $args Override the defaults. 3198 3198 * @return array 3199 3199 */ … … 3240 3240 * @since 2.5.0 3241 3241 * @uses get_object_taxonomies() 3242 3242 * 3243 * @param int $post Optional. Post ID3243 * @param int|WP_Post $post Optional. Post ID or post object. 3244 3244 * @return array 3245 3245 */ 3246 3246 function get_post_taxonomies($post = 0) {