| @@ -82,13 +82,8 @@ | ||
| 82 | 82 | ) |
| 83 | 83 | ), |
| 84 | 84 | ); |
| 85 | 85 | $filter = filter_input( INPUT_GET, 's', FILTER_SANITIZE_STRING ); |
| 86 | - if ( empty( $filter ) ) { | |
| 87 | - // 'filter' is from the modal from the add media button. | |
| 88 | - $filter = filter_input( INPUT_GET, 'filter', FILTER_SANITIZE_STRING ); | |
| 89 | - } | |
| 90 | - | |
| 91 | 86 | if ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes() ) ) { |
| 92 | 87 | $query_args['meta_query'] = array( |
| 93 | 88 | array( |
| 94 | 89 | 'key' => Visualizer_Plugin::CF_CHART_TYPE, |
| @@ -266,16 +261,11 @@ | ||
| 266 | 261 | } |
| 267 | 262 | // dispatch pages |
| 268 | 263 | $this->_chart = get_post( $chart_id ); |
| 269 | 264 | $tab = isset( $_GET['tab'] ) && ! empty( $_GET['tab'] ) ? $_GET['tab'] : 'visualizer'; |
| 270 | - | |
| 271 | - // skip chart type pages only for existing charts. | |
| 272 | - if ( VISUALIZER_SKIP_CHART_TYPE_PAGE && 'auto-draft' !== $this->_chart->post_status ) { | |
| 273 | - $tab = 'settings'; | |
| 274 | - } | |
| 275 | - | |
| 276 | 265 | switch ( $tab ) { |
| 277 | 266 | case 'settings': |
| 267 | + // changed by Ash/Upwork | |
| 278 | 268 | $this->_handleDataAndSettingsPage(); |
| 279 | 269 | break; |
| 280 | 270 | case 'type': // fall through. |
| 281 | 271 | case 'visualizer': // fall through. |