if ( ! function_exists('cpt_cotizaciones') ) { // Register Custom Post Type function cpt_cotizaciones() { $labels = array( 'name' => _x( 'Cotizaciones', 'Post Type General Name', 'cotizaciones' ), 'singular_name' => _x( 'Cotización', 'Post Type Singular Name', 'cotizaciones' ), 'menu_name' => __( 'Cotizaciones', 'cotizaciones' ), 'name_admin_bar' => __( 'Cotizaciones', 'cotizaciones' ), 'archives' => __( 'Archivo', 'cotizaciones' ), 'attributes' => __( 'Atributos', 'cotizaciones' ), 'parent_item_colon' => __( 'Padre', 'cotizaciones' ), 'all_items' => __( 'Ver todas', 'cotizaciones' ), 'add_new_item' => __( 'Nueva cotización', 'cotizaciones' ), 'add_new' => __( 'Nueva cotización', 'cotizaciones' ), 'new_item' => __( 'Nueva cotización', 'cotizaciones' ), 'edit_item' => __( 'Editar cotización', 'cotizaciones' ), 'update_item' => __( 'Actualizar cotización', 'cotizaciones' ), 'view_item' => __( 'Ver cotización', 'cotizaciones' ), 'view_items' => __( 'Ver cotización', 'cotizaciones' ), 'search_items' => __( 'Buscar cotización', 'cotizaciones' ), 'not_found' => __( 'Sin resultados de búsqueda', 'cotizaciones' ), 'not_found_in_trash' => __( 'Sin resultados de búsqueda en papelera', 'cotizaciones' ), 'featured_image' => __( 'Featured Image', 'cotizaciones' ), 'set_featured_image' => __( 'Set featured image', 'cotizaciones' ), 'remove_featured_image' => __( 'Remove featured image', 'cotizaciones' ), 'use_featured_image' => __( 'Use as featured image', 'cotizaciones' ), 'insert_into_item' => __( 'Insert into item', 'cotizaciones' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'cotizaciones' ), 'items_list' => __( 'Items list', 'cotizaciones' ), 'items_list_navigation' => __( 'Items list navigation', 'cotizaciones' ), 'filter_items_list' => __( 'Filter items list', 'cotizaciones' ), ); $capabilities = array( 'edit_post' => 'cotizaciones_edit_post', 'read_post' => 'cotizaciones_read_post', 'delete_post' => 'cotizaciones_delete_post', 'edit_posts' => 'cotizaciones_edit_posts', 'edit_others_posts' => 'cotizaciones_edit_others_posts', 'publish_posts' => 'cotizaciones_publish_posts', 'read_private_posts' => 'cotizaciones_read_private_posts', ); $args = array( 'label' => __( 'Cotización', 'cotizaciones' ), 'labels' => $labels, 'supports' => false, 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 75, 'menu_icon' => 'dashicons-calculator', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => false, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capabilities' => $capabilities, ); register_post_type( 'cotizaciones', $args ); } add_action( 'init', 'cpt_cotizaciones', 0 ); }