/**
  * Factory method
  * @return MslsContentTypes
  */
 public static function create()
 {
     $_request = MslsPlugin::get_superglobals(array('taxonomy'));
     if ('' != $_request['taxonomy']) {
         return MslsTaxonomy::instance();
     }
     return MslsPostType::instance();
 }
 /**
  * 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');
     }
 }
 /**
  * There is something wrong? Here comes the message...
  * @return bool
  */
 public function has_problems()
 {
     $message = '';
     $options = MslsOptions::instance();
     if (1 == count($options->get_available_languages())) {
         $message = sprintf(__('There are no language files installed. You can <a href="%s">manually install some language files</a> or you could use a <a href="%s">plugin</a> to download these files automatically.'), esc_url('http://codex.wordpress.org/Installing_WordPress_in_Your_Language#Manually_Installing_Language_Files'), esc_url('http://wordpress.org/plugins/wp-native-dashboard/'));
     } elseif ($options->is_empty()) {
         $message = sprintf(__('Multisite Language Switcher is almost ready. You must <a href="%s">complete the configuration process</a>.'), esc_url(admin_url('/options-general.php?page=MslsAdmin')));
     }
     return MslsPlugin::message_handler($message, 'updated fade');
 }
 /**
  * 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';
         }
     }
 }
 /**
  * Prints a message that the Multisite Language Switcher needs an
  * active multisite to work properly.
  */
 function plugin_needs_multisite()
 {
     MslsPlugin::message_handler(__('The Multisite Language Switcher needs the activation of the multisite-feature for working properly. Please read <a onclick="window.open(this.href); return false;" href="http://codex.wordpress.org/Create_A_Network">this post</a> if you don\'t know the meaning.', 'msls'));
 }
 /**
  * Verify the static cleanup-method
  */
 function test_cleanup_method()
 {
     $this->assertInternalType('boolean', MslsPlugin::cleanup());
 }