Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 2nd, 2010  |  syntax: PHP  |  size: 0.26 KB  |  views: 2,584  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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;
clone this paste RAW Paste Data