public static function FilterPostsPagesList($where) { global $wpdb; if (isset($_GET['filter-posts'])) { $panel_id = $_GET['custom-write-panel-id']; $where .= " and {$wpdb->postmeta}.meta_key = '_mf_write_panel_id' and {$wpdb->postmeta}.meta_value = '{$panel_id}' "; } return $where; }