Changeset 48214 for trunk/src/wp-includes/meta.php
- Timestamp:
- 06/29/2020 09:20:11 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/meta.php
r48192 r48214 149 149 * @param string $meta_key Metadata key. 150 150 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 151 * @param mixed $prev_value Optional. If specified, only update existing metadata entries 152 * with this value. Otherwise, update all entries. Default empty. 153 * @return int|bool The new meta field ID if a field with the given key didn't exist and was 154 * therefore added, true on successful update, false on failure. 151 * @param mixed $prev_value Optional. Previous value to check before updating. 152 * If specified, only update existing metadata entries with 153 * this value. Otherwise, update all entries. Default empty. 154 * @return int|bool The new meta field ID if a field with the given key didn't exist 155 * and was therefore added, true on successful update, 156 * false on failure or if the value passed to the function 157 * is the same as the one that is already in the database. 158 155 159 */ 156 160 function update_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_value = '' ) { … … 196 200 * @param string $meta_key Metadata key. 197 201 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 198 * @param mixed $prev_value Optional. If specified, only update existing metadata entries 199 * with this value. Otherwise, update all entries. 202 * @param mixed $prev_value Optional. Previous value to check before updating. 203 * If specified, only update existing metadata entries with 204 * this value. Otherwise, update all entries. 200 205 */ 201 206 $check = apply_filters( "update_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $prev_value );
Note: See TracChangeset
for help on using the changeset viewer.