Created
October 2, 2015 20:48
-
-
Save blobaugh/92a0da590c87aec5a1d5 to your computer and use it in GitHub Desktop.
Unregister post type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists( 'unregister_post_type' ) ) : | |
function unregister_post_type( $post_type ) { | |
global $wp_post_types; | |
if ( isset( $wp_post_types[ $post_type ] ) ) { | |
unset( $wp_post_types[ $post_type ] ); | |
return true; | |
} | |
return false; | |
} | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment