advantage_post_types

The Advantage advantage post types function.

Description

advantage_post_types(); 

Usage

  1. if ( !function_exists( 'advantage_post_types' ) ) { 
  2. require_once '/inc/lib-general.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = advantage_post_types(); 
  7.  

Defined (1)

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

/inc/lib-general.php  
  1. function advantage_post_types() {  
  2. $args = array( 
  3. 'public' => true,  
  4. '_builtin' => false );  
  5. $post_types = get_post_types( $args );  
  6. $types = array(  
  7. array( 'key' => 'post',  
  8. 'name' => __( 'post', 'advantage' ) ),  
  9. array( 'key' => 'page',  
  10. 'name' => __( 'page', 'advantage' ) ),  
  11. ); 
  12. foreach ( $post_types as $post_type ) { 
  13. $types[] = array( 'key' => $post_type, 'name' => $post_type ); 
  14. return apply_filters( 'advantage_post_types', $types );