Promoções
CPT de promoções
if ( ! function_exists('promocoes') ) { // Register Custom Post Type function promocoes() { $labels = array( 'name' => _x( 'Promoções', 'Post Type General Name', 'nw2' ), 'singular_name' => _x( 'Promoção', 'Post Type Singular Name', 'nw2' ), 'menu_name' => __( 'Promoções', 'nw2' ), 'name_admin_bar' => __( 'Promoções', 'nw2' ), 'archives' => __( 'Arquivo de Promoções', 'nw2' ), 'attributes' => __( 'Atributos de Promoções', 'nw2' ), 'parent_item_colon' => __( 'Promoção relacionada', 'nw2' ), 'all_items' => __( 'Todas as promoções', 'nw2' ), 'add_new_item' => __( 'Adicionar promoção', 'nw2' ), 'add_new' => __( 'Adicionar promoção', 'nw2' ), 'new_item' => __( 'Nova promoção', 'nw2' ), 'edit_item' => __( 'Editar promoção', 'nw2' ), 'update_item' => __( 'Atualizar promoção', 'nw2' ), 'view_item' => __( 'Ver promoção', 'nw2' ), 'view_items' => __( 'Ver promoções', 'nw2' ), 'search_items' => __( 'Procurar promoção', 'nw2' ), 'not_found' => __( 'Nada por aqui.', 'nw2' ), 'not_found_in_trash' => __( 'Nada na lixeira.', 'nw2' ), 'featured_image' => __( 'Imagem destacada', 'nw2' ), 'set_featured_image' => __( 'Definir imagem destacada', 'nw2' ), 'remove_featured_image' => __( 'Remover imagem destacada', 'nw2' ), 'use_featured_image' => __( 'Usar como imagem destacada da promoção', 'nw2' ), 'insert_into_item' => __( 'Inserir na promoção', 'nw2' ), 'uploaded_to_this_item' => __( 'Upload para esta promoção', 'nw2' ), 'items_list' => __( 'Lista de promoções', 'nw2' ), 'items_list_navigation' => __( 'Navegar pelas promoções', 'nw2' ), 'filter_items_list' => __( 'Filtrar promoções', 'nw2' ), ); $args = array( 'label' => __( 'Promoção', 'nw2' ), 'description' => __( 'Promoções', 'nw2' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 60, 'menu_icon' => 'dashicons-cart', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post', 'show_in_rest' => false, ); register_post_type( 'promocoes', $args ); } add_action( 'init', 'promocoes', 0 ); }