Changeset 47611 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 04/22/2020 10:29:34 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/taxonomy.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r47610 r47611 1212 1212 * @param int $term_id Term ID. 1213 1213 * @param string $meta_key Metadata name. 1214 * @param mixed $meta_value Metadata value. 1215 * @param bool $unique Optional. Whether t o bail if an entry with the same key is found for the term.1214 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 1215 * @param bool $unique Optional. Whether the same key should not be added. 1216 1216 * Default false. 1217 * @return int| WP_Error|bool Meta ID on success. WP_Error when term_id is ambiguous between taxonomies.1218 * False on failure.1217 * @return int|false|WP_Error Meta ID on success, false on failure. 1218 * WP_Error when term_id is ambiguous between taxonomies. 1219 1219 */ 1220 1220 function add_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) { … … 1233 1233 * @param int $term_id Term ID. 1234 1234 * @param string $meta_key Metadata name. 1235 * @param mixed $meta_value Optional. Metadata value. If provided, rows will only be removed that match the value. 1235 * @param mixed $meta_value Optional. Metadata value. If provided, 1236 * rows will only be removed that match the value. 1237 * Must be serializable if non-scalar. Default empty. 1236 1238 * @return bool True on success, false on failure. 1237 1239 */ … … 1246 1248 * 1247 1249 * @param int $term_id Term ID. 1248 * @param string $key Optional. The meta key to retrieve. If no key is provided, fetches all metadata for the term. 1249 * @param bool $single Optional. Whether to return a single value. If false, an array of all values matching the 1250 * `$term_id`/`$key` pair will be returned. Default false. 1251 * @return mixed If `$single` is false, an array of metadata values. If `$single` is true, a single metadata value. 1250 * @param string $key Optional. The meta key to retrieve. By default, 1251 * returns data for all keys. Default empty. 1252 * @param bool $single Optional. Whether to return a single value. 1253 * This parameter has no effect if $key is not specified. 1254 * Default false. 1255 * @return mixed An array if $single is false. The value of the meta field 1256 * if $single is true. 1252 1257 */ 1253 1258 function get_term_meta( $term_id, $key = '', $single = false ) { … … 1266 1271 * @param int $term_id Term ID. 1267 1272 * @param string $meta_key Metadata key. 1268 * @param mixed $meta_value Metadata value. 1269 * @param mixed $prev_value Optional. Previous value to check before updating. Default empty. 1270 * @return int|WP_Error|bool Meta ID if the key didn't previously exist. True on successful update. 1271 * WP_Error when term_id is ambiguous between taxonomies. False on failure. 1273 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 1274 * @param mixed $prev_value Optional. Previous value to check before updating. 1275 * Default empty. 1276 * @return int|bool|WP_Error Meta ID if the key didn't exist. true on successful update, 1277 * false on failure. WP_Error when term_id is ambiguous 1278 * between taxonomies. 1272 1279 */ 1273 1280 function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) { … … 1288 1295 * 1289 1296 * @param array $term_ids List of term IDs. 1290 * @return array|false Returns false if there is nothing to update. Returns an array of metadata on success.1297 * @return array|false An array of metadata on success, false if there is nothing to update. 1291 1298 */ 1292 1299 function update_termmeta_cache( $term_ids ) {
Note: See TracChangeset
for help on using the changeset viewer.