Make WordPress Core

Ticket #18488: 18488.2.diff

File 18488.2.diff, 5.8 KB (added by wonderboymusic, 11 years ago)
  • wp-includes/meta.php

    diff --git wp-includes/meta.php wp-includes/meta.php
    index 22b0315..03dd158 100644
     
    2222 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    2323 * @param int $object_id ID of the object metadata is for
    2424 * @param string $meta_key Metadata key
    25  * @param string $meta_value Metadata value
     25 * @param mixed $meta_value Metadata value, must be serializable if non-scalar
    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
    function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = 
    9393 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    9494 * @param int $object_id ID of the object metadata is for
    9595 * @param string $meta_key Metadata key
    96  * @param string $meta_value Metadata value
    97  * @param string $prev_value Optional. If specified, only update existing metadata entries with
     96 * @param mixed $meta_value Metadata value, must be serializable if non-scalar
     97 * @param mixed $prev_value Optional. If specified, only update existing metadata entries with
    9898 *              the specified value. Otherwise, update all entries.
    9999 * @return bool True on successful update, false on failure.
    100100 */
    function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v 
    174174 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    175175 * @param int $object_id ID of the object metadata is for
    176176 * @param string $meta_key Metadata key
    177  * @param string $meta_value Optional. Metadata value. If specified, only delete metadata entries
     177 * @param mixed $meta_value Optional. Metadata value, must be serializable if non-scalar. If specified, only delete metadata entries
    178178 *              with this value. Otherwise, delete all entries with the specified meta_key.
    179179 * @param bool $delete_all Optional, default is false. If true, delete matching metadata entries
    180180 *              for all objects, ignoring the specified object_id. Otherwise, only delete matching
    class WP_Meta_Query { 
    720720                                $key_only_queries[$k] = $q;
    721721                                unset( $this->queries[$k] );
    722722                        }
    723                 }               
    724                
     723                }
     724
    725725                // Split out the meta_key only queries (we can only do this for OR)
    726726                if ( 'OR' == $this->relation ) {
    727727                        foreach ( $this->queries as $k => $q ) {
  • wp-includes/option.php

    diff --git wp-includes/option.php wp-includes/option.php
    index 3df89c2..01181a4 100644
    function wp_load_core_site_options( $site_id = null ) { 
    208208 * @uses do_action() Calls 'update_option_$option' and 'updated_option' hooks on success.
    209209 *
    210210 * @param string $option Option name. Expected to not be SQL-escaped.
    211  * @param mixed $newvalue Option value. Expected to not be SQL-escaped.
     211 * @param mixed $newvalue Option value, must be serializable if non-scalar. Expected to not be SQL-escaped.
    212212 * @return bool False if value was not updated and true if value was updated.
    213213 */
    214214function update_option( $option, $newvalue ) {
    function update_option( $option, $newvalue ) { 
    284284 * @uses do_action() Calls 'add_option_$option' and 'added_option' hooks on success.
    285285 *
    286286 * @param string $option Name of option to add. Expected to not be SQL-escaped.
    287  * @param mixed $value Optional. Option value, can be anything. Expected to not be SQL-escaped.
     287 * @param mixed $value Optional. Option value, must be serializable if non-scalar. Expected to not be SQL-escaped.
    288288 * @param mixed $deprecated Optional. Description. Not used anymore.
    289289 * @param bool $autoload Optional. Default is enabled. Whether to load the option when WordPress starts up.
    290290 * @return bool False if option was not added and true if option was added.
    function get_transient( $transient ) { 
    487487 * @uses do_action() Calls 'set_transient_$transient' and 'setted_transient' hooks on success.
    488488 *
    489489 * @param string $transient Transient name. Expected to not be SQL-escaped.
    490  * @param mixed $value Transient value. Expected to not be SQL-escaped.
     490 * @param mixed $value Transient value, must be serializable if non-scalar. Expected to not be SQL-escaped.
    491491 * @param int $expiration Time until expiration in seconds, default 0
    492492 * @return bool False if value was not set and true if value was set.
    493493 */
  • wp-includes/post.php

    diff --git wp-includes/post.php wp-includes/post.php
    index 03f31ef..3b48af3 100644
    function get_posts($args = null) { 
    16711671 *
    16721672 * @param int $post_id Post ID.
    16731673 * @param string $meta_key Metadata name.
    1674  * @param mixed $meta_value Metadata value.
     1674 * @param mixed $meta_value Metadata value, must be serializable if non-scalar.
    16751675 * @param bool $unique Optional, default is false. Whether the same key should not be added.
    16761676 * @return int|bool Meta ID on success, false on failure.
    16771677 */
    function add_post_meta($post_id, $meta_key, $meta_value, $unique = false) { 
    16951695 *
    16961696 * @param int $post_id post ID
    16971697 * @param string $meta_key Metadata name.
    1698  * @param mixed $meta_value Optional. Metadata value.
     1698 * @param mixed $meta_value Optional. Metadata value, must be serializable if non-scalar.
    16991699 * @return bool True on success, false on failure.
    17001700 */
    17011701function delete_post_meta($post_id, $meta_key, $meta_value = '') {
    function get_post_meta($post_id, $key = '', $single = false) { 
    17351735 *
    17361736 * @param int $post_id Post ID.
    17371737 * @param string $meta_key Metadata key.
    1738  * @param mixed $meta_value Metadata value.
     1738 * @param mixed $meta_value Metadata value, must be serializable if non-scalar.
    17391739 * @param mixed $prev_value Optional. Previous value to check before removing.
    17401740 * @return bool True on success, false on failure.
    17411741 */