Prédications
if ( ! function_exists('predications_post_type') ) {
// Register Custom Post Type
function predications_post_type() {
$labels = array(
'name' => _x( 'Prédications', 'Post Type General Name', 'Divi' ),
'singular_name' => _x( 'Prédication', 'Post Type Singular Name', 'Divi' ),
'menu_name' => __( 'Prédications', 'Divi' ),
'name_admin_bar' => __( 'Prédications', 'Divi' ),
'archives' => __( 'Archives de prédication', 'Divi' ),
'attributes' => __( 'Attributes de prédication', 'Divi' ),
'parent_item_colon' => __( 'Prédication parent :', 'Divi' ),
'all_items' => __( 'Toutes les prédications', 'Divi' ),
'add_new_item' => __( 'Ajouter nouvelle prédication', 'Divi' ),
'add_new' => __( 'Ajouter prédications', 'Divi' ),
'new_item' => __( 'Nouvelle prédication', 'Divi' ),
'edit_item' => __( 'Éditer prédication', 'Divi' ),
'update_item' => __( 'Mettre la prédication à jour', 'Divi' ),
'view_item' => __( 'Voir prédication', 'Divi' ),
'view_items' => __( 'Voir les prédications', 'Divi' ),
'search_items' => __( 'Chercher une prédications', 'Divi' ),
'not_found' => __( 'Pas trouvé', 'Divi' ),
'not_found_in_trash' => __( 'Non trouvé dans la corbeille', 'Divi' ),
'featured_image' => __( 'Limage à la une', 'Divi' ),
'set_featured_image' => __( 'Définir limage à la une', 'Divi' ),
'remove_featured_image' => __( 'Enlever limage à la une', 'Divi' ),
'use_featured_image' => __( 'Utiliser comme limage à la une', 'Divi' ),
'insert_into_item' => __( 'Insérer dans la prédication', 'Divi' ),
'uploaded_to_this_item' => __( 'Importé dans cette prédications', 'Divi' ),
'items_list' => __( 'Liste des prédications', 'Divi' ),
'items_list_navigation' => __( 'Navigation dans la liste des prédications', 'Divi' ),
'filter_items_list' => __( 'Filtrer la liste des prédications', 'Divi' ),
);
$capabilities = array(
'edit_post' => 'edit_predication',
'read_post' => 'read_predications',
'delete_post' => 'delete_predications',
'edit_posts' => 'edit_predications',
'edit_others_posts' => 'edit_others_predications',
'publish_posts' => 'publish_predications',
'read_private_posts' => 'read_private_predications',
);
$args = array(
'label' => __( 'Prédication', 'Divi' ),
'description' => __( 'Les prédications disponibles sur le site web.', 'Divi' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'custom-fields' ),
'taxonomies' => array( 'serie', 'predicateur' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-megaphone',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capabilities' => $capabilities,
);
register_post_type( 'predication', $args );
}
add_action( 'init', 'predications_post_type', 0 );
}