Changeset 12859 for trunk/wp-includes/meta.php
- Timestamp:
- 01/26/2010 10:49:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/meta.php
r12761 r12859 3 3 * Metadata API 4 4 * 5 * Functions for retrieving and manipulating metadata of various WordPress object types. Metadata 6 * for an object is a represented by a simple key-value pair. Objects may contain multiple 5 * Functions for retrieving and manipulating metadata of various WordPress object types. Metadata 6 * for an object is a represented by a simple key-value pair. Objects may contain multiple 7 7 * metadata entries that share the same key and differ only in their value. 8 8 * … … 24 24 * @param string $meta_key Metadata key 25 25 * @param string $meta_value Metadata value 26 * @param bool $unique Optional, default is false. Whether the specified metadata key should be 27 * unique for the object. If true, and the object already has a value for the specified 26 * @param bool $unique Optional, default is false. Whether the specified metadata key should be 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 29 29 * @return bool True on successful update, false on failure. … … 64 64 65 65 /** 66 * Update metadata for the specified object. If no value already exists for the specified object 66 * Update metadata for the specified object. If no value already exists for the specified object 67 67 * ID and metadata key, the metadata will be added. 68 68 * 69 69 * @since 2.9.0 70 70 * @uses $wpdb WordPress database object for queries. 71 * @uses do_action() Calls 'update_{$meta_type}_meta' before updating metadata with meta_id of 71 * @uses do_action() Calls 'update_{$meta_type}_meta' before updating metadata with meta_id of 72 72 * metadata entry to update, object ID, meta key, and meta value 73 * @uses do_action() Calls 'updated_{$meta_type}_meta' after updating metadata with meta_id of 73 * @uses do_action() Calls 'updated_{$meta_type}_meta' after updating metadata with meta_id of 74 74 * updated metadata entry, object ID, meta key, and meta value 75 75 * … … 78 78 * @param string $meta_key Metadata key 79 79 * @param string $meta_value Metadata value 80 * @param string $prev_value Optional. If specified, only update existing metadata entries with 80 * @param string $prev_value Optional. If specified, only update existing metadata entries with 81 81 * the specified value. Otherwise, update all entries. 82 82 * @return bool True on successful update, false on failure. … … 125 125 * @since 2.9.0 126 126 * @uses $wpdb WordPress database object for queries. 127 * @uses do_action() Calls 'deleted_{$meta_type}_meta' after deleting with meta_id of 127 * @uses do_action() Calls 'deleted_{$meta_type}_meta' after deleting with meta_id of 128 128 * deleted metadata entries, object ID, meta key, and meta value 129 129 * … … 131 131 * @param int $object_id ID of the object metadata is for 132 132 * @param string $meta_key Metadata key 133 * @param string $meta_value Optional. Metadata value. If specified, only delete metadata entries 133 * @param string $meta_value Optional. Metadata value. If specified, only delete metadata entries 134 134 * with this value. Otherwise, delete all entries with the specified meta_key. 135 * @param bool $delete_all Optional, default is false. If true, delete matching metadata entries 136 * for all objects, ignoring the specified object_id. Otherwise, only delete matching 135 * @param bool $delete_all Optional, default is false. If true, delete matching metadata entries 136 * for all objects, ignoring the specified object_id. Otherwise, only delete matching 137 137 * metadata entries for the specified object_id. 138 138 * @return bool True on successful delete, false on failure. … … 186 186 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) 187 187 * @param int $object_id ID of the object metadata is for 188 * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for 188 * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for 189 189 * the specified object. 190 * @param bool $single Optional, default is false. If true, return only the first value of the 190 * @param bool $single Optional, default is false. If true, return only the first value of the 191 191 * specified meta_key. This parameter has no effect if meta_key is not specified. 192 192 * @return string|array Single metadata value, or array of values
Note: See TracChangeset
for help on using the changeset viewer.