SHARE
TWEET

Untitled

a guest Sep 2nd, 2010 3,513 Never
  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;
RAW Paste Data
Top