CPTP_Util::get_post_types PHP Method

get_post_types() public static method

public static get_post_types ( ) : array
return array
    public static function get_post_types()
    {
        $post_type = get_post_types(array('_builtin' => false, 'publicly_queryable' => true, 'show_ui' => true));
        return array_filter($post_type, array(__CLASS__, 'is_post_type_support_rewrite'));
    }

Usage Example

 /**
  * fire on uninstall. delete options.
  *
  * @static
  */
 public static function uninstall_hook()
 {
     foreach (CPTP_Util::get_post_types() as $post_type) {
         delete_option($post_type . '_structure');
     }
     delete_option('no_taxonomy_structure');
 }
All Usage Examples Of CPTP_Util::get_post_types