FEATURE introducing equipe post type
This commit is contained in:
parent
3148507053
commit
6b7afb7dad
|
|
@ -35,6 +35,32 @@ function carhop_create_posttype()
|
|||
'taxonomies' => array('category'),
|
||||
)
|
||||
);
|
||||
register_post_type(
|
||||
'equipe',
|
||||
// CPT Options
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Equipe'),
|
||||
'singular_name' => __('Equipe'),
|
||||
'add_new' => __('Ajouter un membre'),
|
||||
'add_new_item' => __('Ajouter un nouveau membre'),
|
||||
'edit_item' => __('Editer le membre'),
|
||||
'new_item' => __('Nouveau membre'),
|
||||
'view_item' => __('Voir le membre'),
|
||||
'search_items' => __('Chercher un membre'),
|
||||
'not_found' => __('Pas de membre trouvé'),
|
||||
'not_found_in_trash' => __('Pas de membre trouvé dans la corbeille'),
|
||||
'all_items' => __('Tous les membres'),
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'rewrite' => array('slug' => 'equipe'),
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode('<svg xmlns="http://www.w3.org/2000/svg" width="32" height="40" fill="none" viewBox="0 0 32 40"><path d="M12,11c0-2.2,1.8-4,4-4s4,1.8,4,4-1.8,4-4,4-4-1.8-4-4ZM8,16c1.7,0,3-1.3,3-3s-1.3-3-3-3-3,1.3-3,3,1.3,3,3,3ZM24,16c1.7,0,3-1.3,3-3s-1.3-3-3-3-3,1.3-3,3,1.3,3,3,3ZM15.1,16.1c-3.5.5-6.1,3.6-6.1,7.2h0c0,1,.8,1.8,1.8,1.8h10.5c1,0,1.8-.8,1.8-1.8v-.2c0-4.2-3.7-7.5-7.9-6.9h0ZM9.2,17.1c-.4,0-.8-.1-1.2-.1-3.3,0-6,2.7-6,6s.9,2,2,2h3.5c-.3-.5-.5-1.1-.5-1.8,0-2.3.8-4.5,2.2-6.1ZM24,17c-.4,0-.8,0-1.2.1,1.4,1.6,2.2,3.7,2.2,5.9v.2c0,.6-.2,1.2-.5,1.8h3.5c1.1,0,2-.9,2-2,0-3.3-2.7-6-6-6Z"/></svg>'),
|
||||
'menu_position' => 5,
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action('init', 'carhop_create_posttype');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user