Make WordPress Core

Ticket #21864: 21864.patch

File 21864.patch, 3.3 KB (added by SergeyBiryukov, 11 years ago)
  • src/wp-includes/comment.php

     
    648648 * @param string $meta_key Metadata key.
    649649 * @param mixed $meta_value Metadata value.
    650650 * @param mixed $prev_value Optional. Previous value to check before removing.
    651  * @return bool True on success, false on failure.
     651 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
    652652 */
    653653function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '') {
    654654        return update_metadata('comment', $comment_id, $meta_key, $meta_value, $prev_value);
  • src/wp-includes/meta.php

     
    2626 * @param bool $unique Optional, default is false. Whether the specified metadata key should be
    2727 *              unique for the object. If true, and the object already has a value for the specified
    2828 *              metadata key, no change will be made
    29  * @return int|bool The meta ID on successful update, false on failure.
     29 * @return int|bool The meta ID on success, false on failure.
    3030 */
    3131function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = false) {
    3232        if ( !$meta_type || !$meta_key )
     
    9696 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
    9797 * @param mixed $prev_value Optional. If specified, only update existing metadata entries with
    9898 *              the specified value. Otherwise, update all entries.
    99  * @return bool True on successful update, false on failure.
     99 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
    100100 */
    101101function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_value = '') {
    102102        if ( !$meta_type || !$meta_key )
  • src/wp-includes/post.php

     
    17891789 * @param string $meta_key Metadata key.
    17901790 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
    17911791 * @param mixed $prev_value Optional. Previous value to check before removing.
    1792  * @return bool True on success, false on failure.
     1792 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
    17931793 */
    17941794function update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '') {
    17951795        // make sure meta is added to the post, not a revision
  • src/wp-includes/user.php

     
    988988 * @param string $meta_key Metadata key.
    989989 * @param mixed $meta_value Metadata value.
    990990 * @param mixed $prev_value Optional. Previous value to check before removing.
    991  * @return bool True on success, false on failure.
     991 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
    992992 */
    993993function update_user_meta($user_id, $meta_key, $meta_value, $prev_value = '') {
    994994        return update_metadata('user', $user_id, $meta_key, $meta_value, $prev_value);