if ( ! function_exists('o2dca_literature') ) { // Register Custom Post Type function o2dca_literature() { $labels = array( 'name' => _x( 'Literature', 'Post Type General Name', 'o2dcaframework' ), 'singular_name' => _x( 'Literature', 'Post Type Singular Name', 'o2dcaframework' ), 'menu_name' => __( 'Literature', 'o2dcaframework' ), 'name_admin_bar' => __( 'Literature', 'o2dcaframework' ), 'archives' => __( 'Literature Archives', 'o2dcaframework' ), 'attributes' => __( 'Literature Attributes', 'o2dcaframework' ), 'parent_item_colon' => __( 'Parent Literature:', 'o2dcaframework' ), 'all_items' => __( 'All Literature', 'o2dcaframework' ), 'add_new_item' => __( 'Add New Literature', 'o2dcaframework' ), 'add_new' => __( 'Add New', 'o2dcaframework' ), 'new_item' => __( 'New Literature', 'o2dcaframework' ), 'edit_item' => __( 'Edit Literature', 'o2dcaframework' ), 'update_item' => __( 'Update Literature', 'o2dcaframework' ), 'view_item' => __( 'View Literature', 'o2dcaframework' ), 'view_items' => __( 'View Literature', 'o2dcaframework' ), 'search_items' => __( 'Search Literature', 'o2dcaframework' ), 'not_found' => __( 'Not found', 'o2dcaframework' ), 'not_found_in_trash' => __( 'Not found in Trash', 'o2dcaframework' ), 'featured_image' => __( 'Document Image', 'o2dcaframework' ), 'set_featured_image' => __( 'Set document image', 'o2dcaframework' ), 'remove_featured_image' => __( 'Remove document image', 'o2dcaframework' ), 'use_featured_image' => __( 'Use as document image', 'o2dcaframework' ), 'insert_into_item' => __( 'Insert into literature', 'o2dcaframework' ), 'uploaded_to_this_item' => __( 'Uploaded to this literature', 'o2dcaframework' ), 'items_list' => __( 'Literature list', 'o2dcaframework' ), 'items_list_navigation' => __( 'Literature list navigation', 'o2dcaframework' ), 'filter_items_list' => __( 'Filter literature list', 'o2dcaframework' ), ); $args = array( 'label' => __( 'Literature', 'o2dcaframework' ), 'description' => __( 'Literature library of documents', 'o2dcaframework' ), 'labels' => $labels, 'supports' => array( 'title', 'thumbnail' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => false, 'menu_position' => 5, 'menu_icon' => 'dashicons-pdf', 'show_in_admin_bar' => true, 'show_in_nav_menus' => false, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'literature', $args ); } add_action( 'init', 'o2dca_literature', 0 ); }