示例#1
0
 static function installPlugin()
 {
     Glossary_Type::loadGlossaryType();
     Taxonomies::registerTaxonomies();
     Post_Type::registerPostType();
     Flush_Rewrite_Rules();
 }
示例#2
0
 public static function findById($app, $taxonomy_name, $id)
 {
     $taxonomy = Taxonomies::findById($app, $taxonomy_name);
     $term = self::model()->findById($taxonomy_name, $id);
     if (!$term) {
         $app->halt('404', get_status_header_desc('404'));
     }
     if ($lastModified = apply_filters('thermal_term_last_modified', false)) {
         $app->lastModified(strtotime($lastModified . ' GMT'));
     }
     self::format($term, 'read');
     return $term;
 }