コード例 #1
0
ファイル: CataBlog.class.php プロジェクト: ricasiano/mca-site
 public function frontend_single_filter_content($content)
 {
     global $post;
     if (isset($post) && isset($post->post_type)) {
         if ($post->post_type == $this->custom_post_name) {
             $result = CataBlogItem::postToItem($post);
             if (is_single()) {
                 $content = $this->frontend_render_catalog_row($result, 'single');
             } elseif (is_archive() || is_search()) {
                 $content = $this->frontend_render_catalog_row($result, 'archive');
             } else {
                 $content = $this->frontend_render_catalog_row($result, 'default');
             }
         }
     }
     return $content;
 }