CPT Testparati – Tests
Menú de tests para introducir nuevos elementos y ver el archivo.
if ( ! function_exists('clc_cpt_testparati') ) { // Register Custom Post Type function clc_cpt_testparati() { $labels = array( 'name' => _x( 'Tests', 'Post Type General Name', 'clc_cpt_testparati' ), 'singular_name' => _x( 'Test', 'Post Type Singular Name', 'clc_cpt_testparati' ), 'menu_name' => __( 'Tests', 'clc_cpt_testparati' ), 'name_admin_bar' => __( 'Tests', 'clc_cpt_testparati' ), 'archives' => __( 'Archivos de tests', 'clc_cpt_testparati' ), 'attributes' => __( 'Atributos de test', 'clc_cpt_testparati' ), 'parent_item_colon' => __( 'Parent Item:', 'clc_cpt_testparati' ), 'all_items' => __( 'Todos los test', 'clc_cpt_testparati' ), 'add_new_item' => __( 'Añadir nuevo test', 'clc_cpt_testparati' ), 'add_new' => __( 'Nuevo test', 'clc_cpt_testparati' ), 'new_item' => __( 'Nuevo test', 'clc_cpt_testparati' ), 'edit_item' => __( 'Editar test', 'clc_cpt_testparati' ), 'update_item' => __( 'Actualizar test', 'clc_cpt_testparati' ), 'view_item' => __( 'Visualizar test', 'clc_cpt_testparati' ), 'view_items' => __( 'Visualizar test', 'clc_cpt_testparati' ), 'search_items' => __( 'Buscar test', 'clc_cpt_testparati' ), 'not_found' => __( 'Test no encontrado', 'clc_cpt_testparati' ), 'not_found_in_trash' => __( 'Test no encontrado en papelera', 'clc_cpt_testparati' ), 'featured_image' => __( 'Miniatura de test', 'clc_cpt_testparati' ), 'set_featured_image' => __( 'Fijar miniatura de test', 'clc_cpt_testparati' ), 'remove_featured_image' => __( 'Eliminar miniatura', 'clc_cpt_testparati' ), 'use_featured_image' => __( 'Utilizar como miniatura', 'clc_cpt_testparati' ), 'insert_into_item' => __( 'Insertar a test', 'clc_cpt_testparati' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'clc_cpt_testparati' ), 'items_list' => __( 'Items list', 'clc_cpt_testparati' ), 'items_list_navigation' => __( 'Items list navigation', 'clc_cpt_testparati' ), 'filter_items_list' => __( 'Filter items list', 'clc_cpt_testparati' ), ); $rewrite = array( 'slug' => 'tests', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'Test', 'clc_cpt_testparati' ), 'description' => __( 'Test en el menú de backend', 'clc_cpt_testparati' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail' ), 'taxonomies' => array( 'clc_tax_genero' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-editor-spellcheck', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => false, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'clc_cpt_testparati', $args ); } add_action( 'init', 'clc_cpt_testparati', 0 ); }