Ejemplo n.º 1
0
 /**
  * Factory method
  * @return MslsContentTypes
  */
 public static function create()
 {
     $_request = MslsPlugin::get_superglobals(array('taxonomy'));
     if ('' != $_request['taxonomy']) {
         return MslsTaxonomy::instance();
     }
     return MslsPostType::instance();
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->types = array_merge(array('category', 'post_tag'), get_taxonomies(array('public' => true, '_builtin' => false), 'names', 'and'));
     $_request = MslsPlugin::get_superglobals(array('taxonomy', 'post_type'));
     if ('' != $_request['taxonomy']) {
         $this->request = esc_attr($_request['taxonomy']);
         $this->post_type = esc_attr($_request['post_type']);
     } else {
         $this->request = get_query_var('taxonomy');
     }
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  * @uses get_post_types
  */
 public function __construct()
 {
     $this->types = array_merge(array('post', 'page'), get_post_types(array('public' => true, '_builtin' => false), 'names', 'and'));
     $_request = MslsPlugin::get_superglobals(array('post_type'));
     if ('' != $_request['post_type']) {
         $this->request = esc_attr($_request['post_type']);
     } else {
         $this->request = get_post_type();
         if (!$this->request) {
             $this->request = 'post';
         }
     }
 }