<?php
    
	if ( get_theme_mod('opsi_editor') != "false" ) {
	    $showinrest = true;
	} else {
	    $showinrest = false;
    }
	
	register_post_type( 'ekskul',		
	array(			
	    'menu_icon'       => 'dashicons-feedback',
	    'labels'          => array(				
	    'name'                => __( 'Ekskul' ),				
	    'singular_name'       => __( 'Ekskul' ),        
	    'add_new'             => __( 'Tambah Ekskul ?' ),	
	    'add_new_item'        => __( 'Tambah Ekskul' ),	
	    'edit'                => __( 'Edit' ),	 
	    'edit_item'           => __( 'Edit Ekskul' ),	
	    'new_item'            => __( 'Item Ekskul' ),	
	    'view'                => __( 'Lihat Ekskul' ),	
	    'view_item'           => __( 'Lihat Item' ),	
	    'search_items'        => __( 'Cari Item' ),	
	    'not_found'           => __( 'Tidak Ada Ekskul Ditemukan' ),	
	    'not_found_in_trash'  => __( 'Tidak Ada Ekskul di Folder Trash' ),	
	    'parent'              => __( 'Parent Super Duper' ),		
        'featured_image'      => __( 'Gambar Unggulan' ),		
	    ),		                	
	    	'public'              => true,           					            
	    	'has_archive'         => true,        			            
	    	'supports'            => array( 'title', 'editor', 'thumbnail' ),        			            
	    	'exclude_from_search' => false,
			'show_in_rest'        => $showinrest,
			'capabilities' => array(
                'edit_post'                 => 'edit_extra',
				'edit_posts'                => 'edit_extras',
                'edit_others_posts'         => 'edit_other_extras',
				'edit_private_posts'        => 'edit_private_extras',
				'edit_published_posts'      => 'edit_published_extras',
				'read_post'                 => 'read_extra',
				'read_private_posts'        => 'read_private_extras',
				'publish_posts'             => 'publish_extras',
				'delete_post'               => 'delete_extra',
                'delete_posts'              => 'delete_extras',
                'delete_private_posts'      => 'delete_private_extras',
				'delete_others_posts'       => 'delete_others_extras',
                'delete_published_posts'    => 'delete_published_extras',
            ),
			'map_meta_cap' => true
		 )	
    );
	
?>