Changeset 43378 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 06/21/2018 09:06:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r43177 r43378 1324 1324 1325 1325 /** 1326 * Registers a meta key for terms. 1327 * 1328 * @since 5.0.0 1329 * 1330 * @param string $taxonomy Taxonomy to register a meta key for. Pass an empty string 1331 * to register the meta key across all existing taxonomies. 1332 * @param string $meta_key The meta key to register. 1333 * @param array $args Data used to describe the meta key when registered. See 1334 * {@see register_meta()} for a list of supported arguments. 1335 * @return bool True if the meta key was successfully registered, false if not. 1336 */ 1337 function register_term_meta( $taxonomy, $meta_key, array $args ) { 1338 $args['object_subtype'] = $taxonomy; 1339 1340 return register_meta( 'term', $meta_key, $args ); 1341 } 1342 1343 /** 1344 * Unregisters a meta key for terms. 1345 * 1346 * @since 5.0.0 1347 * 1348 * @param string $taxonomy Taxonomy the meta key is currently registered for. Pass 1349 * an empty string if the meta key is registered across all 1350 * existing taxonomies. 1351 * @param string $meta_key The meta key to unregister. 1352 * @return bool True on success, false if the meta key was not previously registered. 1353 */ 1354 function unregister_term_meta( $taxonomy, $meta_key ) { 1355 return unregister_meta_key( 'term', $meta_key, $taxonomy ); 1356 } 1357 1358 /** 1326 1359 * Determines whether a term exists. 1327 1360 *
Note: See TracChangeset
for help on using the changeset viewer.