SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | if ( ! function_exists( 'unregister_post_type' ) ) : | |
3 | function unregister_post_type( $post_type ) { | |
4 | global $wp_post_types; | |
5 | if ( isset( $wp_post_types[ $post_type ] ) ) { | |
6 | unset( $wp_post_types[ $post_type ] ); | |
7 | return true; | |
8 | } | |
9 | return false; | |
10 | } | |
11 | endif; |