Kampus
if ( ! function_exists('kampus_post_type') ) {
// Register Custom Post Type
function kampus_post_type() {
$labels = array(
'name' => _x( 'Documents', 'Post Type General Name', 'kampus_text_domain' ),
'singular_name' => _x( 'Document', 'Post Type Singular Name', 'kampus_text_domain' ),
'menu_name' => __( 'Kampus', 'kampus_text_domain' ),
'name_admin_bar' => __( 'Kampus', 'kampus_text_domain' ),
'archives' => __( 'Kampus Archives', 'kampus_text_domain' ),
'attributes' => __( 'Document Attribut', 'kampus_text_domain' ),
'parent_item_colon' => __( 'Parent Document:', 'kampus_text_domain' ),
'all_items' => __( 'Tous les Documents', 'kampus_text_domain' ),
'add_new_item' => __( 'Ajouter nouveau Document', 'kampus_text_domain' ),
'add_new' => __( 'Ajouter nouveau', 'kampus_text_domain' ),
'new_item' => __( 'Nouveau Document', 'kampus_text_domain' ),
'edit_item' => __( 'Editer Document', 'kampus_text_domain' ),
'update_item' => __( 'MàJ Document', 'kampus_text_domain' ),
'view_item' => __( 'Voir Document', 'kampus_text_domain' ),
'view_items' => __( 'Voir Documents', 'kampus_text_domain' ),
'search_items' => __( 'Rechercher Document', 'kampus_text_domain' ),
'not_found' => __( 'Pas trouvé', 'kampus_text_domain' ),
'not_found_in_trash' => __( 'Pas trouvé dans la corbeille', 'kampus_text_domain' ),
'featured_image' => __( 'Image mise en avant', 'kampus_text_domain' ),
'set_featured_image' => __( 'Définr une image mise en avant', 'kampus_text_domain' ),
'remove_featured_image' => __( 'Supprimer image mise en avant', 'kampus_text_domain' ),
'use_featured_image' => __( 'Utiliser comme image mise en avant', 'kampus_text_domain' ),
'insert_into_item' => __( 'Insérer dans le Document', 'kampus_text_domain' ),
'uploaded_to_this_item' => __( 'Uploader à ce Document', 'kampus_text_domain' ),
'items_list' => __( 'Documents liste', 'kampus_text_domain' ),
'items_list_navigation' => __( 'Documents liste de navigation', 'kampus_text_domain' ),
'filter_items_list' => __( 'Filtrer Documents', 'kampus_text_domain' ),
);
$args = array(
'label' => __( 'Document', 'kampus_text_domain' ),
'description' => __( 'Kampus Extrait Docs', 'kampus_text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields' ),
'taxonomies' => array( 'category' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-media-document',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'kwiper_kampus', $args );
}
add_action( 'init', 'kampus_post_type', 0 );
}