Orders
// Register Custom Post Type
function order_post_type() {
$labels = array(
'name' => _x( 'Órdenes', 'Post Type General Name', 'wp_frida' ),
'singular_name' => _x( 'Orden', 'Post Type Singular Name', 'wp_frida' ),
'menu_name' => __( 'Órdenes', 'wp_frida' ),
'name_admin_bar' => __( 'Órdenes', 'wp_frida' ),
'archives' => __( 'Archivo de Órdenes', 'wp_frida' ),
'attributes' => __( 'Atributos de Orden', 'wp_frida' ),
'parent_item_colon' => __( 'Parent Order:', 'wp_frida' ),
'all_items' => __( 'Todas las Órdenes', 'wp_frida' ),
'add_new_item' => __( 'Agregar Orden Nueva', 'wp_frida' ),
'add_new' => __( 'Agregar Nueva', 'wp_frida' ),
'new_item' => __( 'Nueva Orden', 'wp_frida' ),
'edit_item' => __( 'Editar Orden', 'wp_frida' ),
'update_item' => __( 'Actualizar Orden', 'wp_frida' ),
'view_item' => __( 'Ver Orden', 'wp_frida' ),
'view_items' => __( 'Ver Órdenes', 'wp_frida' ),
'search_items' => __( 'Buscar Orden', 'wp_frida' ),
'not_found' => __( 'No se encontraron Órdenes', 'wp_frida' ),
'not_found_in_trash' => __( 'No se encontraron Órdenes en la Papelera', 'wp_frida' ),
'featured_image' => __( 'Imagen Destacada', 'wp_frida' ),
'set_featured_image' => __( 'Asignar Imagen Destacada', 'wp_frida' ),
'remove_featured_image' => __( 'Eliminar Imagen Destacada', 'wp_frida' ),
'use_featured_image' => __( 'Usar como imagen destacada', 'wp_frida' ),
'insert_into_item' => __( 'Insertar en esta orden', 'wp_frida' ),
'uploaded_to_this_item' => __( 'Subido a esta orden', 'wp_frida' ),
'items_list' => __( 'Lista de Órdenes', 'wp_frida' ),
'items_list_navigation' => __( 'Navegación de Lista de Órdenes', 'wp_frida' ),
'filter_items_list' => __( 'Filtrar Lista de Órdenes', 'wp_frida' ),
);
$args = array(
'label' => __( 'Orden', 'wp_frida' ),
'description' => __( 'Orders', 'wp_frida' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'post-formats' ),
'taxonomies' => array( 'category', 'post_tag', '' ),
'hierarchical' => false,
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-text-page',
'show_in_admin_bar' => true,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => false,
'capability_type' => 'post',
'show_in_rest' => true,
);
register_post_type( 'order', $args );
}
add_action( 'init', 'order_post_type', 0 );