Resources Custom Post Type
Custom Post Type for Documan Plugin
// Register Custom Post Type function documan_register_post_type() { $labels = array( 'name' => _x( 'Resources', 'Post Type General Name', 'documan' ), 'singular_name' => _x( 'Resource', 'Post Type Singular Name', 'documan' ), 'menu_name' => __( 'Resources', 'documan' ), 'name_admin_bar' => __( 'Resources', 'documan' ), 'parent_item_colon' => __( 'Parent Item:', 'documan' ), 'all_items' => __( 'All Resources', 'documan' ), 'add_new_item' => __( 'Add New Resource', 'documan' ), 'add_new' => __( 'Add New', 'documan' ), 'new_item' => __( 'New Resource', 'documan' ), 'edit_item' => __( 'Edit Resource', 'documan' ), 'update_item' => __( 'Update Resource', 'documan' ), 'view_item' => __( 'View Resource', 'documan' ), 'search_items' => __( 'Search Resource', 'documan' ), 'not_found' => __( 'Not found', 'documan' ), 'not_found_in_trash' => __( 'Not found in Trash', 'documan' ), ); $rewrite = array( 'slug' => 'resources', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'documan_resources', 'documan' ), 'description' => __( 'Resources Manager', 'documan' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', ), 'taxonomies' => array( 'category' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 25, 'menu_icon' => 'dashicons-download', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'post', ); register_post_type( 'documan_resources', $args ); } // Hook into the 'init' action add_action( 'init', 'documan_register_post_type', 0 );