mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-24 15:24:36 +00:00
Remove non-built-in post statuses during each unit test teardown.
See #29167. git-svn-id: https://develop.svn.wordpress.org/trunk@31046 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -331,6 +331,17 @@ function _unregister_taxonomy( $taxonomy_name ) {
|
||||
unset( $GLOBALS['wp_taxonomies'][$taxonomy_name] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister a post status.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $status
|
||||
*/
|
||||
function _unregister_post_status( $status ) {
|
||||
unset( $GLOBALS['wp_post_statuses'][ $status ] );
|
||||
}
|
||||
|
||||
function _cleanup_query_vars() {
|
||||
// clean out globals to stop them polluting wp and wp_query
|
||||
foreach ( $GLOBALS['wp']->public_query_vars as $v )
|
||||
|
||||
Reference in New Issue
Block a user