Changeset 25596 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 09/24/2013 02:54:00 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/taxonomy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r25576 r25596 508 508 } 509 509 510 /** 511 * Remove an already registered taxonomy from an object type. 512 * 513 * @since 3.7.0 514 * 515 * @param string $taxonomy Name of taxonomy object. 516 * @param string $object_type Name of the object type. 517 * @return bool True if successful, false if not. 518 */ 519 function unregister_taxonomy_for_object_type( $taxonomy, $object_type ) { 520 global $wp_taxonomies; 521 522 if ( ! isset( $wp_taxonomies[ $taxonomy ] ) ) 523 return false; 524 525 if ( ! get_post_type_object( $object_type ) ) 526 return false; 527 528 $key = array_search( $object_type, $wp_taxonomies[ $taxonomy ]->object_type, true ); 529 if ( false === $key ) 530 return false; 531 532 unset( $wp_taxonomies[ $taxonomy ]->object_type[ $key ] ); 533 return true; 534 } 535 510 536 // 511 537 // Term API
Note: See TracChangeset
for help on using the changeset viewer.