PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 4.0.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v4.0.1
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | classes/Visualizer/Module/Chart.php +9 -17 4.0.54.0.1 View file →
@@ -169,12 +169,8 @@
169 169 */
170 170 public function getJsonRoots() {
171 171 check_ajax_referer( Visualizer_Plugin::ACTION_JSON_GET_ROOTS . Visualizer_Plugin::VERSION, 'security' );
172 172
173 - if ( ! current_user_can( 'edit_posts' ) ) {
174 - wp_send_json_error( array( 'msg' => esc_html__( 'You do not have permission to perform this action.', 'visualizer' ) ) );
175 - }
176 -
177 173 $params = wp_parse_args( $_POST['params'] );
178 174
179 175 $source = new Visualizer_Source_Json( $params );
180 176
@@ -195,12 +191,8 @@
195 191 */
196 192 public function getJsonData() {
197 193 check_ajax_referer( Visualizer_Plugin::ACTION_JSON_GET_DATA . Visualizer_Plugin::VERSION, 'security' );
198 194
199 - if ( ! current_user_can( 'edit_posts' ) ) {
200 - wp_send_json_error( array( 'msg' => esc_html__( 'You do not have permission to perform this action.', 'visualizer' ) ) );
201 - }
202 -
203 195 $params = wp_parse_args( $_POST['params'] );
204 196
205 197 $chart_id = $params['chart'];
206 198
@@ -303,9 +295,9 @@
303 295 $render->data = json_encode( $source->getRawData( get_post_meta( $chart_id, Visualizer_Plugin::CF_EDITABLE_TABLE, true ) ) );
304 296 $render->series = json_encode( $source->getSeries() );
305 297 $render->render();
306 298
307 - ( defined( 'WP_TESTS_DOMAIN' ) && function_exists( 'tests_add_filter' ) ) ? wp_die() : exit();
299 + defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
308 300 }
309 301
310 302
311 303 /**
@@ -439,9 +431,9 @@
439 431 public static function _sendResponse( $results ) {
440 432 header( 'Content-type: application/json' );
441 433 nocache_headers();
442 434 echo json_encode( $results );
443 - ( defined( 'WP_TESTS_DOMAIN' ) && function_exists( 'tests_add_filter' ) ) ? wp_die() : exit();
435 + defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
444 436 }
445 437
446 438 /**
447 439 * Deletes a chart from database.
@@ -621,9 +613,9 @@
621 613 do_action( 'visualizer_pro_new_chart_defaults', $chart_id );
622 614 }
623 615 wp_redirect( esc_url_raw( add_query_arg( 'chart', (int) $chart_id ) ) );
624 616
625 - if ( defined( 'WP_TESTS_DOMAIN' ) && function_exists( 'tests_add_filter' ) ) {
617 + if ( defined( 'WP_TESTS_DOMAIN' ) ) {
626 618 wp_die();
627 619 }
628 620 exit();
629 621 }
@@ -719,9 +711,9 @@
719 711 default:
720 712 // this should never happen.
721 713 break;
722 714 }
723 - ( defined( 'WP_TESTS_DOMAIN' ) && function_exists( 'tests_add_filter' ) ) ? wp_die() : exit();
715 + defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
724 716 }
725 717
726 718 /**
727 719 * Load code editor assets.
@@ -1389,9 +1381,9 @@
1389 1381 $render->render();
1390 1382 if ( ! $can_die ) {
1391 1383 return;
1392 1384 }
1393 - ( defined( 'WP_TESTS_DOMAIN' ) && function_exists( 'tests_add_filter' ) ) ? wp_die() : exit();
1385 + defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
1394 1386 }
1395 1387
1396 1388 /**
1397 1389 * Clones the chart.
@@ -1445,9 +1437,9 @@
1445 1437 );
1446 1438 }
1447 1439 }
1448 1440
1449 - if ( defined( 'WP_TESTS_DOMAIN' ) && function_exists( 'tests_add_filter' ) ) {
1441 + if ( defined( 'WP_TESTS_DOMAIN' ) ) {
1450 1442 wp_die();
1451 1443 }
1452 1444 wp_redirect( $redirect );
1453 1445 exit;
@@ -1480,9 +1472,9 @@
1480 1472 }
1481 1473 }
1482 1474 }
1483 1475
1484 - ( defined( 'WP_TESTS_DOMAIN' ) && function_exists( 'tests_add_filter' ) ) ? wp_die() : exit();
1476 + defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
1485 1477 }
1486 1478
1487 1479 /**
1488 1480 * Handles chart data page.
@@ -1645,9 +1637,9 @@
1645 1637 }
1646 1638 }
1647 1639 $render->render();
1648 1640 if ( ! ( defined( 'VISUALIZER_DO_NOT_DIE' ) && VISUALIZER_DO_NOT_DIE ) ) {
1649 - ( defined( 'WP_TESTS_DOMAIN' ) && function_exists( 'tests_add_filter' ) ) ? wp_die() : exit();
1641 + defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
1650 1642 }
1651 1643 }
1652 1644
1653 1645
@@ -1688,9 +1680,9 @@
1688 1680
1689 1681 do_action( 'visualizer_save_filter', $chart_id, $hours );
1690 1682
1691 1683 if ( ! ( defined( 'VISUALIZER_DO_NOT_DIE' ) && VISUALIZER_DO_NOT_DIE ) ) {
1692 - ( defined( 'WP_TESTS_DOMAIN' ) && function_exists( 'tests_add_filter' ) ) ? wp_die() : exit();
1684 + defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
1693 1685 }
1694 1686 }
1695 1687
1696 1688 /**