Ticket #24616: 24616.2.patch
File 24616.2.patch, 18.1 KB (added by , 12 years ago) |
---|
-
wp-includes/category-template.php
37 37 * @param string $separator Optional, default is '/'. How to separate categories. 38 38 * @param bool $nicename Optional, default is false. Whether to use nice name for display. 39 39 * @param array $visited Optional. Already linked to categories to prevent duplicates. 40 * @return string 40 * @return string|WP_Error A list of category parents on success, WP_Error on failure. 41 41 */ 42 42 function get_category_parents( $id, $link = false, $separator = '/', $nicename = false, $visited = array() ) { 43 43 $chain = ''; … … 131 131 * @since 0.71 132 132 * 133 133 * @param int $cat_ID Category ID. 134 * @return string Category name.134 * @return string|WP_Error Category name on success, WP_Error on failure. 135 135 */ 136 136 function get_the_category_by_ID( $cat_ID ) { 137 137 $cat_ID = (int) $cat_ID; … … 980 980 * @uses apply_filters() Calls 'get_the_tags' filter on the list of post tags. 981 981 * 982 982 * @param int $id Post ID. 983 * @return array 983 * @return array|bool Array of tag objects on success, false on failure. 984 984 */ 985 985 function get_the_tags( $id = 0 ) { 986 986 return apply_filters( 'get_the_tags', get_the_terms( $id, 'post_tag' ) ); … … 996 996 * @param string $sep Optional. Between tags. 997 997 * @param string $after Optional. After tags. 998 998 * @param int $id Optional. Post ID. Defaults to the current post. 999 * @return string 999 * @return string|bool|WP_Error A list of tags on success, false or WP_Error on failure. 1000 1000 */ 1001 1001 function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) { 1002 1002 return apply_filters( 'the_tags', get_the_term_list( $id, 'post_tag', $before, $sep, $after ), $before, $sep, $after, $id ); … … 1010 1010 * @param string $before Optional. Before list. 1011 1011 * @param string $sep Optional. Separate items using this. 1012 1012 * @param string $after Optional. After list. 1013 * @return string1014 1013 */ 1015 1014 function the_tags( $before = null, $sep = ', ', $after = '' ) { 1016 1015 if ( null === $before ) … … 1054 1053 * 1055 1054 * @since 2.5.0 1056 1055 * 1057 * @param mixed$post Post ID or object.1056 * @param int|object $post Post ID or object. 1058 1057 * @param string $taxonomy Taxonomy name. 1059 * @return array|bool False on failure. Array of term objects on success.1058 * @return array|bool|WP_Error Array of term objects on success, false or WP_Error on failure. 1060 1059 */ 1061 1060 function get_the_terms( $post, $taxonomy ) { 1062 1061 if ( ! $post = get_post( $post ) ) … … 1086 1085 * @param string $before Optional. Before list. 1087 1086 * @param string $sep Optional. Separate items using this. 1088 1087 * @param string $after Optional. After list. 1089 * @return string 1088 * @return string|bool|WP_Error A list of terms on success, false or WP_Error on failure. 1090 1089 */ 1091 1090 function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = '' ) { 1092 1091 $terms = get_the_terms( $id, $taxonomy ); -
wp-includes/comment.php
539 539 * @param string $meta_key Metadata name. 540 540 * @param mixed $meta_value Metadata value. 541 541 * @param bool $unique Optional, default is false. Whether the same key should not be added. 542 * @return bool False for failure. True for success.542 * @return int|bool Meta ID on success, false on failure. 543 543 */ 544 544 function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = false) { 545 545 return add_metadata('comment', $comment_id, $meta_key, $meta_value, $unique); … … 559 559 * @param int $comment_id comment ID 560 560 * @param string $meta_key Metadata name. 561 561 * @param mixed $meta_value Optional. Metadata value. 562 * @return bool False for failure. True for success.562 * @return bool True on success, false on failure. 563 563 */ 564 564 function delete_comment_meta($comment_id, $meta_key, $meta_value = '') { 565 565 return delete_metadata('comment', $comment_id, $meta_key, $meta_value); … … 598 598 * @param string $meta_key Metadata key. 599 599 * @param mixed $meta_value Metadata value. 600 600 * @param mixed $prev_value Optional. Previous value to check before removing. 601 * @return bool False on failure, true if success.601 * @return bool True on success, false on failure. 602 602 */ 603 603 function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '') { 604 604 return update_metadata('comment', $comment_id, $meta_key, $meta_value, $prev_value); … … 994 994 * 995 995 * @param int $comment_id Comment ID 996 996 * @param bool $force_delete Whether to bypass trash and force deletion. Default is false. 997 * @return bool False if delete comment query failure, true on success.997 * @return bool True on success, false on failure. 998 998 */ 999 999 function wp_delete_comment($comment_id, $force_delete = false) { 1000 1000 global $wpdb; … … 1044 1044 * @uses wp_delete_comment() if trash is disabled 1045 1045 * 1046 1046 * @param int $comment_id Comment ID. 1047 * @return mixed False on failure1047 * @return bool True on success, false on failure. 1048 1048 */ 1049 1049 function wp_trash_comment($comment_id) { 1050 1050 if ( !EMPTY_TRASH_DAYS ) … … 1073 1073 * @uses do_action() on 'untrashed_comment' after untrashing 1074 1074 * 1075 1075 * @param int $comment_id Comment ID. 1076 * @return mixed False on failure1076 * @return bool True on success, false on failure. 1077 1077 */ 1078 1078 function wp_untrash_comment($comment_id) { 1079 1079 if ( ! (int)$comment_id ) … … 1103 1103 * @uses do_action() on 'spammed_comment' after spamming 1104 1104 * 1105 1105 * @param int $comment_id Comment ID. 1106 * @return mixed False on failure1106 * @return bool True on success, false on failure. 1107 1107 */ 1108 1108 function wp_spam_comment($comment_id) { 1109 1109 if ( !$comment = get_comment($comment_id) ) … … 1128 1128 * @uses do_action() on 'unspammed_comment' after unspamming 1129 1129 * 1130 1130 * @param int $comment_id Comment ID. 1131 * @return mixed False on failure1131 * @return bool True on success, false on failure. 1132 1132 */ 1133 1133 function wp_unspam_comment($comment_id) { 1134 1134 if ( ! (int)$comment_id ) … … 1423 1423 * @param int $comment_id Comment ID. 1424 1424 * @param string $comment_status New comment status, either 'hold', 'approve', 'spam', or 'trash'. 1425 1425 * @param bool $wp_error Whether to return a WP_Error object if there is a failure. Default is false. 1426 * @return bool False on failure or deletion and true on success.1426 * @return bool|WP_Error True on success, false or WP_Error on failure. 1427 1427 */ 1428 1428 function wp_set_comment_status($comment_id, $comment_status, $wp_error = false) { 1429 1429 global $wpdb; … … 1601 1601 * @uses do_action() Calls 'edit_posts' hook on $post_id and $post 1602 1602 * 1603 1603 * @param int $post_id Post ID 1604 * @return bool False on '0' $post_id or if post with ID does not exist. True on success.1604 * @return bool True on success, false on '0' $post_id or if post with ID does not exist. 1605 1605 */ 1606 1606 function wp_update_comment_count_now($post_id) { 1607 1607 global $wpdb; -
wp-includes/formatting.php
3116 3116 * 3117 3117 * @since 2.5.0 3118 3118 * 3119 * @param integer$str String to get the excerpt from.3119 * @param string $str String to get the excerpt from. 3120 3120 * @param integer $count Maximum number of characters to take. 3121 3121 * @param string $more Optional. What to append if $str needs to be trimmed. Defaults to empty string. 3122 3122 * @return string The excerpt. -
wp-includes/js/quicktags.js
296 296 * QTags.addButton( 'my_id', 'my button', '<span>', '</span>' ); 297 297 * QTags.addButton( 'my_id2', 'my button', '<br />' ); 298 298 * 299 * @param id string requiredButton HTML ID300 * @param display string requiredButton's value="..."301 * @param arg1 string || function requiredEither a starting tag to be inserted like "<span>" or a callback that is executed when the button is clicked.302 * @param arg2 string optionalEnding tag like "</span>"303 * @param access_key string optionalAccess key for the button.304 * @param title string optionalButton's title="..."305 * @param priority int optionalNumber representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.306 * @param instance string optionalLimit the button to a specifric instance of Quicktags, add to all instances if not present.299 * @param string id Required. Button HTML ID 300 * @param string display Required. Button's value="..." 301 * @param string|function arg1 Required. Either a starting tag to be inserted like "<span>" or a callback that is executed when the button is clicked. 302 * @param string arg2 Optional. Ending tag like "</span>" 303 * @param string access_key Optional. Access key for the button. 304 * @param string title Optional. Button's title="..." 305 * @param int priority Optional. Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc. 306 * @param string instance Optional. Limit the button to a specifric instance of Quicktags, add to all instances if not present. 307 307 * @return mixed null or the button object that is needed for back-compat. 308 308 */ 309 309 qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance ) { -
wp-includes/link-template.php
232 232 * 233 233 * @since 1.5.0 234 234 * 235 * @param mixed$post Optional. Post ID or object.235 * @param int|object $post Optional. Post ID or object. 236 236 * @param bool $leavename Optional, defaults to false. Whether to keep page name. 237 237 * @param bool $sample Optional, defaults to false. Is it a sample permalink. 238 238 * @return string … … 256 256 * @since 2.1.0 257 257 * @access private 258 258 * 259 * @param mixed$post Optional. Post ID or object.259 * @param int|object $post Optional. Post ID or object. 260 260 * @param bool $leavename Optional. Leave name. 261 261 * @param bool $sample Optional. Sample permalink. 262 262 * @return string … … 291 291 * 292 292 * @since 2.0.0 293 293 * 294 * @param mixed$post Optional. Post ID or object.294 * @param int|object $post Optional. Post ID or object. 295 295 * @param bool $leavename Optional. Leave name. 296 296 * @return string 297 297 */ -
wp-includes/meta.php
26 26 * @param bool $unique Optional, default is false. Whether the specified metadata key should be 27 27 * unique for the object. If true, and the object already has a value for the specified 28 28 * metadata key, no change will be made 29 * @return bool The meta ID on successful update, false on failure.29 * @return int|bool The meta ID on successful update, false on failure. 30 30 */ 31 31 function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = false) { 32 32 if ( !$meta_type || !$meta_key ) -
wp-includes/post-template.php
96 96 * 97 97 * @since 0.71 98 98 * 99 * @param mixed$post Optional. Post ID or object.99 * @param int|object $post Optional. Post ID or object. 100 100 * @return string 101 101 */ 102 102 function get_the_title( $post = 0 ) { … … 1265 1265 * @uses $wp_query 1266 1266 * 1267 1267 * @param string $template The specific template name if specific matching is required. 1268 * @return bool False on failure, true if success.1268 * @return bool True on success, false on failure. 1269 1269 */ 1270 1270 function is_page_template( $template = '' ) { 1271 1271 if ( ! is_page() ) -
wp-includes/post.php
203 203 * 204 204 * @param int $attachment_id Attachment ID 205 205 * @param string $file File path for the attachment 206 * @return bool False on failure, true on success.206 * @return bool True on success, false on failure. 207 207 */ 208 208 function update_attached_file( $attachment_id, $file ) { 209 209 if ( !get_post( $attachment_id ) ) … … 724 724 * @since 2.3.0 725 725 * @uses sanitize_post_field() See for possible $context values. 726 726 * 727 * @param string $field Post field name 728 * @param i d $post Post ID729 * @param string $context Optional. How to filter the field. Default is display.730 * @return bool|string False on failure or returns the value in post field727 * @param string $field Post field name. 728 * @param int|object $post Post ID or post object. 729 * @param string $context Optional. How to filter the field. Default is 'display'. 730 * @return string The value of the post field on success, empty string on failure. 731 731 */ 732 732 function get_post_field( $field, $post, $context = 'display' ) { 733 733 $post = get_post( $post ); … … 749 749 * 750 750 * @since 2.0.0 751 751 * 752 * @param int $ID Optional. Post ID. 753 * @return bool|string False on failure or returns the mime type752 * @param int $ID Optional. Post ID. Default is the current post from the loop. 753 * @return string|bool The mime type on success, false on failure. 754 754 */ 755 755 function get_post_mime_type($ID = '') { 756 756 $post = get_post($ID); … … 769 769 * 770 770 * @since 2.0.0 771 771 * 772 * @param int $ID Post ID773 * @return string|bool Post status o rfalse on failure.772 * @param int $ID Optional. Post ID. Default is the current post from the loop. 773 * @return string|bool Post status on success, false on failure. 774 774 */ 775 775 function get_post_status($ID = '') { 776 776 $post = get_post($ID); … … 1009 1009 * 1010 1010 * @since 2.1.0 1011 1011 * 1012 * @uses $post The Loop current post global 1013 * 1014 * @param mixed $post Optional. Post object or post ID. 1015 * @return bool|string post type or false on failure. 1012 * @param int|object $post Optional. Post ID or post object. Default is the current post from the loop. 1013 * @return string|bool Post type on success, false on failure. 1016 1014 */ 1017 1015 function get_post_type( $post = null ) { 1018 1016 if ( $post = get_post( $post ) ) … … 1675 1673 * @param string $meta_key Metadata name. 1676 1674 * @param mixed $meta_value Metadata value. 1677 1675 * @param bool $unique Optional, default is false. Whether the same key should not be added. 1678 * @return bool False for failure. True for success.1676 * @return int|bool Meta ID on success, false on failure. 1679 1677 */ 1680 1678 function add_post_meta($post_id, $meta_key, $meta_value, $unique = false) { 1681 1679 // make sure meta is added to the post, not a revision … … 1699 1697 * @param int $post_id post ID 1700 1698 * @param string $meta_key Metadata name. 1701 1699 * @param mixed $meta_value Optional. Metadata value. 1702 * @return bool False for failure. True for success.1700 * @return bool True on success, false on failure. 1703 1701 */ 1704 1702 function delete_post_meta($post_id, $meta_key, $meta_value = '') { 1705 1703 // make sure meta is added to the post, not a revision … … 1742 1740 * @param string $meta_key Metadata key. 1743 1741 * @param mixed $meta_value Metadata value. 1744 1742 * @param mixed $prev_value Optional. Previous value to check before removing. 1745 * @return bool False on failure, true if success.1743 * @return bool True on success, false on failure. 1746 1744 */ 1747 1745 function update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '') { 1748 1746 // make sure meta is added to the post, not a revision … … 2391 2389 * @uses do_action() on 'trash_post_comments' before trashing 2392 2390 * @uses do_action() on 'trashed_post_comments' after trashing 2393 2391 * 2394 * @param int $post Post ID or object.2392 * @param int|object $post Post ID or object. 2395 2393 * @return mixed False on failure 2396 2394 */ 2397 2395 function wp_trash_post_comments($post = null) { … … 2432 2430 * @uses do_action() on 'untrash_post_comments' before trashing 2433 2431 * @uses do_action() on 'untrashed_post_comments' after trashing 2434 2432 * 2435 * @param int $post Post ID or object.2433 * @param int|object $post Post ID or object. 2436 2434 * @return mixed False on failure 2437 2435 */ 2438 2436 function wp_untrash_post_comments($post = null) { … … 2953 2951 * @uses $wpdb 2954 2952 * @uses do_action() Calls 'edit_post', 'save_post', and 'wp_insert_post' on post_id and post data. 2955 2953 * 2956 * @param mixed$post Post ID or object.2954 * @param int|object $post Post ID or object. 2957 2955 */ 2958 2956 function wp_publish_post( $post ) { 2959 2957 global $wpdb; … … 4606 4604 * 4607 4605 * @uses do_action() Calls 'clean_post_cache' on $id before adding children (if any). 4608 4606 * 4609 * @param object|int $post The post object or IDto remove from the cache4607 * @param int|object $post Post ID or object to remove from the cache 4610 4608 */ 4611 4609 function clean_post_cache( $post ) { 4612 4610 global $_wp_suspend_cache_invalidation, $wpdb; -
wp-includes/user.php
791 791 * @param string $meta_key Metadata name. 792 792 * @param mixed $meta_value Metadata value. 793 793 * @param bool $unique Optional, default is false. Whether the same key should not be added. 794 * @return bool False for failure. True for success.794 * @return int|bool Meta ID on success, false on failure. 795 795 */ 796 796 function add_user_meta($user_id, $meta_key, $meta_value, $unique = false) { 797 797 return add_metadata('user', $user_id, $meta_key, $meta_value, $unique); … … 811 811 * @param int $user_id user ID 812 812 * @param string $meta_key Metadata name. 813 813 * @param mixed $meta_value Optional. Metadata value. 814 * @return bool False for failure. True for success.814 * @return bool True on success, false on failure. 815 815 */ 816 816 function delete_user_meta($user_id, $meta_key, $meta_value = '') { 817 817 return delete_metadata('user', $user_id, $meta_key, $meta_value); … … 850 850 * @param string $meta_key Metadata key. 851 851 * @param mixed $meta_value Metadata value. 852 852 * @param mixed $prev_value Optional. Previous value to check before removing. 853 * @return bool False on failure, true if success.853 * @return bool True on success, false on failure. 854 854 */ 855 855 function update_user_meta($user_id, $meta_key, $meta_value, $prev_value = '') { 856 856 return update_metadata('user', $user_id, $meta_key, $meta_value, $prev_value);