CPT Planes entrenanamiento CNE
if ( ! function_exists('ne_cpt_planes') ) {
// Register Custom Post Type
function ne_cpt_planes() {
$labels = array(
'name' => _x( 'Planes', 'Post Type General Name', 'ne_cpt_plan' ),
'singular_name' => _x( 'Plan', 'Post Type Singular Name', 'ne_cpt_plan' ),
'menu_name' => __( 'Planes', 'ne_cpt_plan' ),
'name_admin_bar' => __( 'Plan', 'ne_cpt_plan' ),
'archives' => __( 'Archivo Plan', 'ne_cpt_plan' ),
'attributes' => __( 'Atributos Plan', 'ne_cpt_plan' ),
'parent_item_colon' => __( 'Plan superior:', 'ne_cpt_plan' ),
'all_items' => __( 'Todos los Plan', 'ne_cpt_plan' ),
'add_new_item' => __( 'Añadir nuevo Plan', 'ne_cpt_plan' ),
'add_new' => __( 'Añadir nuevo', 'ne_cpt_plan' ),
'new_item' => __( 'Ver Plan', 'ne_cpt_plan' ),
'edit_item' => __( 'Editar Plan', 'ne_cpt_plan' ),
'update_item' => __( 'Actualizar Plan', 'ne_cpt_plan' ),
'view_item' => __( 'Ver Plan', 'ne_cpt_plan' ),
'view_items' => __( 'Ver Plan', 'ne_cpt_plan' ),
'search_items' => __( 'buscar Plan', 'ne_cpt_plan' ),
'not_found' => __( 'Not found', 'ne_cpt_plan' ),
'not_found_in_trash' => __( 'Not found in Trash', 'ne_cpt_plan' ),
'featured_image' => __( 'Imagen destacada', 'ne_cpt_plan' ),
'set_featured_image' => __( 'Usar imagen destacada', 'ne_cpt_plan' ),
'remove_featured_image' => __( 'Remover imagen destacada', 'ne_cpt_plan' ),
'use_featured_image' => __( 'Usar imagen destacada', 'ne_cpt_plan' ),
'insert_into_item' => __( 'Insert into item', 'ne_cpt_plan' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'ne_cpt_plan' ),
'items_list' => __( 'Items list', 'ne_cpt_plan' ),
'items_list_navigation' => __( 'Items list navigation', 'ne_cpt_plan' ),
'filter_items_list' => __( 'Filter items list', 'ne_cpt_plan' ),
);
$rewrite = array(
'slug' => 'plan',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'Plan', 'ne_cpt_plan' ),
'description' => __( 'CPT planes', 'ne_cpt_plan' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', 'post-formats' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 10,
'menu_icon' => 'dashicons-universal-access-alt',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'ne_cpt_plan', $args );
}
add_action( 'init', 'ne_cpt_planes', 0 );
}