<?php
    
	if ( get_theme_mod('opsi_editor') != "false" ) {
	    $showinrest = true;
	} else {
	    $showinrest = false;
    }
	
	register_post_type( 'quotes',		
	array(			
	    'menu_icon'       => 'dashicons-format-chat',
		'labels'          => array(				
	    'name'                => __( 'Quotes / Kutipan' ),				
	    'singular_name'       => __( 'Quotes / Kutipan' ),        
	    'add_new'             => __( 'Tambah Quotes ?' ),	
	    'add_new_item'        => __( 'Tambah Quotes' ),	
	    'edit'                => __( 'Edit' ),	 
	    'edit_item'           => __( 'Edit Quotes' ),	
	    'new_item'            => __( 'Item Quotes' ),	
	    'view'                => __( 'Lihat Quotes' ),	
	    'view_item'           => __( 'Lihat Item' ),	
	    'search_items'        => __( 'Cari Item' ),	
	    'not_found'           => __( 'Tidak Ada Quotes Ditemukan' ),	
	    'not_found_in_trash'  => __( 'Tidak Ada Quotes di Folder Trash' ),	
	    'parent'              => __( 'Parent Super Duper' ),		
        'featured_image'      => __( 'Gambar Unggulan' ),		
	    ),		                	
	    	'public'              => true,           					            
	    	'has_archive'         => true,        			            
	    	'supports'            => array( 'title', 'editor' ),        			            
	    	'exclude_from_search' => false,
			'show_in_rest'        => $showinrest,
			'capabilities' => array(
                'edit_post'                 => 'edit_quot',
				'edit_posts'                => 'edit_quots',
                'edit_others_posts'         => 'edit_other_quots',
				'edit_private_posts'        => 'edit_private_quots',
				'edit_published_posts'      => 'edit_published_quots',
				'read_post'                 => 'read_quot',
				'read_private_posts'        => 'read_private_quots',
				'publish_posts'             => 'publish_quots',
				'delete_post'               => 'delete_quot',
                'delete_posts'              => 'delete_quots',
                'delete_private_posts'      => 'delete_private_quots',
				'delete_others_posts'       => 'delete_others_quots',
                'delete_published_posts'    => 'delete_published_quots',
            ),
			'map_meta_cap' => true
		 )	
    );
?>