if ( ! function_exists('materiais_post_type') ) { // Register Custom Post Type function materiais_post_type() { $labels = array( 'name' => _x( 'Materiais', 'Post Type General Name', 'nw2' ), 'singular_name' => _x( 'Material', 'Post Type Singular Name', 'nw2' ), 'menu_name' => __( 'Material', 'nw2' ), 'name_admin_bar' => __( 'Material', 'nw2' ), 'archives' => __( 'Material', 'nw2' ), 'attributes' => __( 'Item Attributes', 'nw2' ), 'parent_item_colon' => __( 'Material relacionado', 'nw2' ), 'all_items' => __( 'Todos os Materiais', 'nw2' ), 'add_new_item' => __( 'Adicionar novo Material', 'nw2' ), 'add_new' => __( 'Adicionar Material', 'nw2' ), 'new_item' => __( 'Novo Material', 'nw2' ), 'edit_item' => __( 'Editar Material', 'nw2' ), 'update_item' => __( 'Atualizar Material', 'nw2' ), 'view_item' => __( 'Ver Material', 'nw2' ), 'view_items' => __( 'View Items', 'nw2' ), 'search_items' => __( 'Procurar Material', 'nw2' ), 'not_found' => __( 'Não encontrado', 'nw2' ), 'not_found_in_trash' => __( 'Nada na lixeira', 'nw2' ), 'featured_image' => __( 'Imagem deste material', 'nw2' ), 'set_featured_image' => __( 'Selecionar imagem que representa este material', 'nw2' ), 'remove_featured_image' => __( 'Remover Imagem representativa', 'nw2' ), 'use_featured_image' => __( 'Usar como imagem que representa este material', 'nw2' ), 'insert_into_item' => __( 'Inserir no material', 'nw2' ), 'uploaded_to_this_item' => __( 'Upload para este material', 'nw2' ), 'items_list' => __( 'Lista de Materiais', 'nw2' ), 'items_list_navigation' => __( 'Navegação entre materiais', 'nw2' ), 'filter_items_list' => __( 'Filtrar materiais', 'nw2' ), ); $args = array( 'label' => __( 'Material', 'nw2' ), 'description' => __( 'Disponibilizar materiais', 'nw2' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-index-card', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => false, 'exclude_from_search' => true, 'publicly_queryable' => true, 'rewrite' => false, 'capability_type' => 'page', ); register_post_type( 'materiais', $args ); } add_action( 'init', 'materiais_post_type', 0 ); }