Changeset 36316 for trunk/tests/phpunit/includes/utils.php
- Timestamp:
- 01/15/2016 12:19:15 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/utils.php
r36272 r36316 336 336 */ 337 337 function _unregister_post_type( $cpt_name ) { 338 unset( $GLOBALS['wp_post_types'][ $cpt_name ] ); 339 unset( $GLOBALS['_wp_post_type_features'][ $cpt_name ] ); 340 341 foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy ) { 342 if ( false !== $key = array_search( $cpt_name, $taxonomy->object_type ) ) { 343 unset( $taxonomy->object_type[$key] ); 344 } 345 } 338 unregister_post_type( $cpt_name ); 346 339 } 347 340
Note: See TracChangeset
for help on using the changeset viewer.