0
X
Add Snippet To Project
New Project
Add To Existing Project
/**
* Registers a custom post type 'Clientes'.
*
* @since 1.0.0
*
* @return void
*/
function wp_gpoclientes() : void {
$labels = [
'name' => _x( 'Clientes', 'Post Type General Name', 'wp_gpoclientes' ),
'singular_name' => _x( 'Cliente', 'Post Type Singular Name', 'wp_gpoclientes' ),
'menu_name' => __( 'Clientes', 'wp_gpoclientes' ),
'name_admin_bar' => __( 'Clientes', 'wp_gpoclientes' ),
'archives' => __( 'Clientes Archives', 'wp_gpoclientes' ),
'attributes' => __( 'Clientes Attributes', 'wp_gpoclientes' ),
'parent_item_colon' => __( 'Parent Cliente:', 'wp_gpoclientes' ),
'all_items' => __( 'All Clientes', 'wp_gpoclientes' ),
'add_new_item' => __( 'Add New Cliente', 'wp_gpoclientes' ),
'add_new' => __( 'Add New', 'wp_gpoclientes' ),
'new_item' => __( 'New Cliente', 'wp_gpoclientes' ),
'edit_item' => __( 'Edit Cliente', 'wp_gpoclientes' ),
'update_item' => __( 'Update Cliente', 'wp_gpoclientes' ),
'view_item' => __( 'View Cliente', 'wp_gpoclientes' ),
'view_items' => __( 'View Clientes', 'wp_gpoclientes' ),
'search_items' => __( 'Search Clientes', 'wp_gpoclientes' ),
'not_found' => __( 'Cliente Not Found', 'wp_gpoclientes' ),
'not_found_in_trash' => __( 'Cliente Not Found in Trash', 'wp_gpoclientes' ),
'featured_image' => __( 'Featured Image', 'wp_gpoclientes' ),
'set_featured_image' => __( 'Set Featured Image', 'wp_gpoclientes' ),
'remove_featured_image' => __( 'Remove Featured Image', 'wp_gpoclientes' ),
'use_featured_image' => __( 'Use as Featured Image', 'wp_gpoclientes' ),
'insert_into_item' => __( 'Insert into Cliente', 'wp_gpoclientes' ),
'uploaded_to_this_item' => __( 'Uploaded to this Cliente', 'wp_gpoclientes' ),
'items_list' => __( 'Clientes List', 'wp_gpoclientes' ),
'items_list_navigation' => __( 'Clientes List Navigation', 'wp_gpoclientes' ),
'filter_items_list' => __( 'Filter Clientes List', 'wp_gpoclientes' ),
];
$labels = apply_filters( 'Clientes-labels', $labels );
$args = [
'label' => __( 'Cliente', 'wp_gpoclientes' ),
'description' => __( 'Listado de clientes', 'wp_gpoclientes' ),
'labels' => $labels,
'supports' => [
'title',
'editor',
'thumbnail',
'revisions',
],
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-groups',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'exclude_from_search' => false,
'has_archive' => false,
'can_export' => false,
'capability_type' => 'page',
'show_in_rest' => true,
];
$args = apply_filters( 'Clientes-args', $args );
register_post_type( 'Clientes', $args );
}
add_action( 'init', 'wp_gpoclientes', 0 );
lista de clientes