cptbc_post_type

The CPT Bootstrap Carousel cptbc post type function.

Description

cptbc_post_type(); 

Usage

  1. if ( !function_exists( 'cptbc_post_type' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'cpt-bootstrap-carousel/cpt-bootstrap-carousel.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = cptbc_post_type(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/cpt-bootstrap-carousel.php  
  1. function cptbc_post_type() { 
  2. $labels = array( 
  3. 'name' => __('Carousel Images', 'cpt-bootstrap-carousel'),  
  4. 'singular_name' => __('Carousel Image', 'cpt-bootstrap-carousel'),  
  5. 'add_new' => __('Add New', 'cpt-bootstrap-carousel'),  
  6. 'add_new_item' => __('Add New Carousel Image', 'cpt-bootstrap-carousel'),  
  7. 'edit_item' => __('Edit Carousel Image', 'cpt-bootstrap-carousel'),  
  8. 'new_item' => __('New Carousel Image', 'cpt-bootstrap-carousel'),  
  9. 'view_item' => __('View Carousel Image', 'cpt-bootstrap-carousel'),  
  10. 'search_items' => __('Search Carousel Images', 'cpt-bootstrap-carousel'),  
  11. 'not_found' => __('No Carousel Image', 'cpt-bootstrap-carousel'),  
  12. 'not_found_in_trash' => __('No Carousel Images found in Trash', 'cpt-bootstrap-carousel'),  
  13. 'parent_item_colon' => '',  
  14. 'menu_name' => __('Carousel', 'cpt-bootstrap-carousel') 
  15. ); 
  16. $args = array( 
  17. 'labels' => $labels,  
  18. 'public' => true,  
  19. 'exclude_from_search' => true,  
  20. 'publicly_queryable' => false,  
  21. 'show_ui' => true,  
  22. 'show_in_menu' => true,  
  23. 'query_var' => true,  
  24. 'rewrite' => true,  
  25. 'capability_type' => 'page',  
  26. 'has_archive' => true,  
  27. 'hierarchical' => false,  
  28. 'menu_position' => 21,  
  29. 'menu_icon' => 'dashicons-images-alt',  
  30. 'supports' => array('title', 'excerpt', 'thumbnail', 'page-attributes') 
  31. );  
  32. register_post_type('cptbc', $args);