WordPress.org

Make WordPress Core

Ticket #18488: 18488.diff

File 18488.diff, 5.4 KB (added by scribu, 6 years ago)
  • wp-includes/meta.php

    diff --git wp-includes/meta.php wp-includes/meta.php
    index 3964644..34d3e84 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 serializable $meta_value Metadata value
    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 serializable $meta_value Metadata value
     97 * @param serializable $prev_value 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 serializable $meta_value Metadata value. 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
  • wp-includes/option.php

    diff --git wp-includes/option.php wp-includes/option.php
    index 33897b6..e456a06 100644
    function wp_load_core_site_options( $site_id = null ) { 
    209209 * @uses do_action() Calls 'update_option_$option' and 'updated_option' hooks on success.
    210210 *
    211211 * @param string $option Option name. Expected to not be SQL-escaped.
    212  * @param mixed $newvalue Option value. Expected to not be SQL-escaped.
     212 * @param serializable $newvalue Option value. Expected to not be SQL-escaped.
    213213 * @return bool False if value was not updated and true if value was updated.
    214214 */
    215215function update_option( $option, $newvalue ) {
    function update_option( $option, $newvalue ) { 
    285285 * @uses do_action() Calls 'add_option_$option' and 'added_option' hooks on success.
    286286 *
    287287 * @param string $option Name of option to add. Expected to not be SQL-escaped.
    288  * @param mixed $value Optional. Option value, can be anything. Expected to not be SQL-escaped.
     288 * @param serializable $value Option value. Expected to not be SQL-escaped.
    289289 * @param mixed $deprecated Optional. Description. Not used anymore.
    290290 * @param bool $autoload Optional. Default is enabled. Whether to load the option when WordPress starts up.
    291291 * @return bool False if option was not added and true if option was added.
    function get_transient( $transient ) { 
    484484 * @uses do_action() Calls 'set_transient_$transient' and 'setted_transient' hooks on success.
    485485 *
    486486 * @param string $transient Transient name. Expected to not be SQL-escaped.
    487  * @param mixed $value Transient value. Expected to not be SQL-escaped.
     487 * @param serializable $value Transient value. Expected to not be SQL-escaped.
    488488 * @param int $expiration Time until expiration in seconds, default 0
    489489 * @return bool False if value was not set and true if value was set.
    490490 */
  • wp-includes/post.php

    diff --git wp-includes/post.php wp-includes/post.php
    index 29ee906..6a18afb 100644
    function get_posts($args = null) { 
    15881588 *
    15891589 * @param int $post_id Post ID.
    15901590 * @param string $meta_key Metadata name.
    1591  * @param mixed $meta_value Metadata value.
     1591 * @param serializable $meta_value Metadata value.
    15921592 * @param bool $unique Optional, default is false. Whether the same key should not be added.
    15931593 * @return bool False for failure. True for success.
    15941594 */
    function add_post_meta($post_id, $meta_key, $meta_value, $unique = false) { 
    16131613 *
    16141614 * @param int $post_id post ID
    16151615 * @param string $meta_key Metadata name.
    1616  * @param mixed $meta_value Optional. Metadata value.
     1616 * @param serializable $meta_value Optional. Metadata value.
    16171617 * @return bool False for failure. True for success.
    16181618 */
    16191619function delete_post_meta($post_id, $meta_key, $meta_value = '') {
    function get_post_meta($post_id, $key = '', $single = false) { 
    16551655 *
    16561656 * @param int $post_id Post ID.
    16571657 * @param string $meta_key Metadata key.
    1658  * @param mixed $meta_value Metadata value.
    1659  * @param mixed $prev_value Optional. Previous value to check before removing.
     1658 * @param serializable $meta_value Metadata value.
     1659 * @param serializable $prev_value Previous value to check before removing.
    16601660 * @return bool False on failure, true if success.
    16611661 */
    16621662function update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '') {