Changeset 32331 for trunk/src/wp-includes/meta.php
- Timestamp:
- 05/01/2015 04:37:35 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/meta.php
r32044 r32331 295 295 * @global wpdb $wpdb WordPress database abstraction object. 296 296 * 297 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) 298 * @param int $object_id ID of the object metadata is for 299 * @param string $meta_key Metadata key 300 * @param mixed $meta_value Optional. Metadata value. Must be serializable if non-scalar. If specified, only delete metadata entries 301 * with this value. Otherwise, delete all entries with the specified meta_key. 302 * @param bool $delete_all Optional, default is false. If true, delete matching metadata entries 303 * for all objects, ignoring the specified object_id. Otherwise, only delete matching 304 * metadata entries for the specified object_id. 297 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) 298 * @param int $object_id ID of the object metadata is for 299 * @param string $meta_key Metadata key 300 * @param mixed $meta_value Optional. Metadata value. Must be serializable if non-scalar. If specified, only delete 301 * metadata entries with this value. Otherwise, delete all entries with the specified meta_key. 302 * Pass `null, `false`, or an empty string to skip this check. (For backward compatibility, 303 * it is not possible to pass an empty string to delete those entries with an empty string 304 * for a value.) 305 * @param bool $delete_all Optional, default is false. If true, delete matching metadata entries for all objects, 306 * ignoring the specified object_id. Otherwise, only delete matching metadata entries for 307 * the specified object_id. 305 308 * @return bool True on successful delete, false on failure. 306 309 */ … … 357 360 $query .= $wpdb->prepare(" AND $type_column = %d", $object_id ); 358 361 359 if ( $meta_value )362 if ( '' !== $meta_value && null !== $meta_value && false !== $meta_value ) 360 363 $query .= $wpdb->prepare(" AND meta_value = %s", $meta_value ); 361 364
Note: See TracChangeset
for help on using the changeset viewer.