LOCUCIONES Custom Post Type
if ( ! function_exists('custom_post_type') ) {
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Locuciones', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Locución', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( '> Locuciones', 'text_domain' ),
'name_admin_bar' => __( '> Locuciones', 'text_domain' ),
'archives' => __( 'Archivo de locuciones', 'text_domain' ),
'parent_item_colon' => __( 'Locución padre', 'text_domain' ),
'all_items' => __( 'Todas las locuciones', 'text_domain' ),
'add_new_item' => __( 'Añadir nueva locución', 'text_domain' ),
'add_new' => __( 'Añadir nueva', 'text_domain' ),
'new_item' => __( 'Nueva locución', 'text_domain' ),
'edit_item' => __( 'Editar locución', 'text_domain' ),
'update_item' => __( 'Actualizar locución', 'text_domain' ),
'view_item' => __( 'Abrir locución', 'text_domain' ),
'search_items' => __( 'Buscar locución', 'text_domain' ),
'not_found' => __( 'No encontradas', 'text_domain' ),
'not_found_in_trash' => __( 'No encontradas en la papelera', 'text_domain' ),
'featured_image' => __( 'Imagen destacada', 'text_domain' ),
'set_featured_image' => __( 'Definir imagen destacada', 'text_domain' ),
'remove_featured_image' => __( 'Eliminar imagen destacada', 'text_domain' ),
'use_featured_image' => __( 'Usar como imagen destacada', 'text_domain' ),
'insert_into_item' => __( 'Insertar en locución', 'text_domain' ),
'uploaded_to_this_item' => __( 'Añadida a esta locución', 'text_domain' ),
'items_list' => __( 'Lista de locuciones', 'text_domain' ),
'items_list_navigation' => __( 'Lista de locuciones', 'text_domain' ),
'filter_items_list' => __( 'Filtrar lista de locuciones', 'text_domain' ),
);
$args = array(
'label' => __( 'Locución', 'text_domain' ),
'description' => __( 'Pieza de audio de locución o doblaje', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'post-formats', ),
'taxonomies' => array( 'tono_taxonomy', 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-format-audio',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => false,
'capability_type' => 'post',
);
register_post_type( 'locucion_post_type', $args );
}
add_action( 'init', 'custom_post_type', 0 );
}