diff --git wp-includes/meta.php wp-includes/meta.php
index 22b0315..03dd158 100644
|
|
|
22 | 22 | * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) |
23 | 23 | * @param int $object_id ID of the object metadata is for |
24 | 24 | * @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 |
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 |
… |
… |
function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = |
93 | 93 | * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) |
94 | 94 | * @param int $object_id ID of the object metadata is for |
95 | 95 | * @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 |
98 | 98 | * the specified value. Otherwise, update all entries. |
99 | 99 | * @return bool True on successful update, false on failure. |
100 | 100 | */ |
… |
… |
function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v |
174 | 174 | * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) |
175 | 175 | * @param int $object_id ID of the object metadata is for |
176 | 176 | * @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 |
178 | 178 | * with this value. Otherwise, delete all entries with the specified meta_key. |
179 | 179 | * @param bool $delete_all Optional, default is false. If true, delete matching metadata entries |
180 | 180 | * for all objects, ignoring the specified object_id. Otherwise, only delete matching |
… |
… |
class WP_Meta_Query { |
720 | 720 | $key_only_queries[$k] = $q; |
721 | 721 | unset( $this->queries[$k] ); |
722 | 722 | } |
723 | | } |
724 | | |
| 723 | } |
| 724 | |
725 | 725 | // Split out the meta_key only queries (we can only do this for OR) |
726 | 726 | if ( 'OR' == $this->relation ) { |
727 | 727 | foreach ( $this->queries as $k => $q ) { |
diff --git wp-includes/option.php wp-includes/option.php
index 3df89c2..01181a4 100644
|
|
function wp_load_core_site_options( $site_id = null ) { |
208 | 208 | * @uses do_action() Calls 'update_option_$option' and 'updated_option' hooks on success. |
209 | 209 | * |
210 | 210 | * @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. |
212 | 212 | * @return bool False if value was not updated and true if value was updated. |
213 | 213 | */ |
214 | 214 | function update_option( $option, $newvalue ) { |
… |
… |
function update_option( $option, $newvalue ) { |
284 | 284 | * @uses do_action() Calls 'add_option_$option' and 'added_option' hooks on success. |
285 | 285 | * |
286 | 286 | * @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. |
288 | 288 | * @param mixed $deprecated Optional. Description. Not used anymore. |
289 | 289 | * @param bool $autoload Optional. Default is enabled. Whether to load the option when WordPress starts up. |
290 | 290 | * @return bool False if option was not added and true if option was added. |
… |
… |
function get_transient( $transient ) { |
487 | 487 | * @uses do_action() Calls 'set_transient_$transient' and 'setted_transient' hooks on success. |
488 | 488 | * |
489 | 489 | * @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. |
491 | 491 | * @param int $expiration Time until expiration in seconds, default 0 |
492 | 492 | * @return bool False if value was not set and true if value was set. |
493 | 493 | */ |
diff --git wp-includes/post.php wp-includes/post.php
index 03f31ef..3b48af3 100644
|
|
function get_posts($args = null) { |
1671 | 1671 | * |
1672 | 1672 | * @param int $post_id Post ID. |
1673 | 1673 | * @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. |
1675 | 1675 | * @param bool $unique Optional, default is false. Whether the same key should not be added. |
1676 | 1676 | * @return int|bool Meta ID on success, false on failure. |
1677 | 1677 | */ |
… |
… |
function add_post_meta($post_id, $meta_key, $meta_value, $unique = false) { |
1695 | 1695 | * |
1696 | 1696 | * @param int $post_id post ID |
1697 | 1697 | * @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. |
1699 | 1699 | * @return bool True on success, false on failure. |
1700 | 1700 | */ |
1701 | 1701 | function delete_post_meta($post_id, $meta_key, $meta_value = '') { |
… |
… |
function get_post_meta($post_id, $key = '', $single = false) { |
1735 | 1735 | * |
1736 | 1736 | * @param int $post_id Post ID. |
1737 | 1737 | * @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. |
1739 | 1739 | * @param mixed $prev_value Optional. Previous value to check before removing. |
1740 | 1740 | * @return bool True on success, false on failure. |
1741 | 1741 | */ |