-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc12-presse.php
66 lines (60 loc) · 1.84 KB
/
c12-presse.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/*
Plugin Name: C12 Presse
Plugin URI: https://github.com/cave12/c12-presse
Description: Ajoute le type de contenu "Presse".
Version: 0.1
Author: Manuel Schmalstieg
Author URI: https://ms-studio.net
GitHub Plugin URI: https:/github.com/cave12/c12-presse
*/
add_action( 'init', 'c12_register_presse_post_type' );
function c12_register_presse_post_type() {
register_post_type(
'presse',
array(
'label' => 'Presse',
'labels' => array(
'name' => 'Presse',
'singular_name' => 'Presse',
'add_new' => __( 'Ajouter' ),
'add_new_item' => __( 'Ajouter un nouvel article de presse' ),
'edit' => __( 'Éditer' ),
'edit_item' => __( 'Éditer l’article' ),
'new_item' => __( 'Nouvel article' ),
'view' => __( 'Voir l’article' ),
'view_item' => __( 'Voir l’article' ),
'search_items' => __( 'Rechercher les articles' ),
'not_found' => __( 'Pas d’articles trouvés' ),
'not_found_in_trash' => __( 'Pas d’articles trouvés dans la Corbeille' ),
'parent_item_colon' => __( 'Article parent' ),
),
'description' => __( 'Presse.' ),
'public' => true,
'show_ui' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'menu_position' => 20,
'menu_icon' => 'dashicons-media-spreadsheet',
'map_meta_cap' => true,
'hierarchical' => true,
'has_archive' => true,
'supports' => array(
'title',
'editor',
'author',
'revisions',
),
'taxonomies' => array( 'post_tag' ),
'rewrite' => array(
'slug' => 'presse',
'with_front' => false,
'pages' => false
),
)
);
}
// Query Parameters
include_once (plugin_dir_path(__FILE__).'c12-presse-query.php');
// Champs ACF
include_once (plugin_dir_path(__FILE__).'c12-presse-acf.php');