public static function post_features_panel() { $panel = ""; global $post; $post_id = 0; if (is_object($post)) { $post_id = $post->ID; } if (isset($_REQUEST['current_post_id'])) { $post_id = $_REQUEST['current_post_id']; } if ($post_id > 0) { static $title_collector = array(); if (in_array($post_id, $title_collector)) { return ""; } //+++ $data = array(); $data['cat_id'] = get_post_meta($post_id, self::$slug_cat, TRUE); $data['post_id'] = $post_id; //caching queries data while loop titles if (!isset(self::$cached_filter_posts[$data['cat_id']])) { self::$cached_filter_posts[$data['cat_id']] = MetaDataFilterPage::get_fiters_posts($data['cat_id']); } $data['filter_posts'] = self::$cached_filter_posts[$data['cat_id']]; $data['page_meta_data_filter'] = $data['cat_id'] > 0 ? get_post_meta($post_id, 'page_meta_data_filter', true) : array(); $title_collector[] = $post_id; $panel = self::render_html(self::get_application_path() . 'views/shortcode/post_features_panel.php', $data); } return $panel; }