WordPress.org

Make WordPress Core

Changeset 25076


Ignore:
Timestamp:
08/21/13 21:10:23 (4 years ago)
Author:
wonderboymusic
Message:

Improve inline docs for function params that can be serialized when non-scalar. Fixes #18488.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/meta.php

    r24714 r25076  
    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 
     
    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. 
     
    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 
     
    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 ) { 
  • trunk/src/wp-includes/option.php

    r25075 r25076  
    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 */ 
     
    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. 
     
    489489 * 
    490490 * @param string $transient Transient name. Expected to not be SQL-escaped. 
    491  * @param mixed $value Transient value. Expected to not be SQL-escaped. 
     491 * @param mixed $value Transient value. Must be serializable if non-scalar. Expected to not be SQL-escaped. 
    492492 * @param int $expiration Time until expiration in seconds, default 0 
    493493 * @return bool False if value was not set and true if value was set. 
  • trunk/src/wp-includes/post.php

    r25050 r25076  
    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. 
     
    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 */ 
     
    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. 
Note: See TracChangeset for help on using the changeset viewer.