PluginProbe
Chartify – WordPress Chart Plugin / 3.5.4
Chartify – WordPress Chart Plugin v3.5.4
3.8.0 3.7.9 3.7.8 3.7.7 3.7.6 3.7.5 trunk 1.0.0 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 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.1.4 3.1.5 3.1.6 All 83 releases
← All changes | admin/class-chart-builder-admin.php +1630 -478 3.0.13.5.4 View file →
@@ -173,9 +173,9 @@
173 173 wp_enqueue_script( $this->plugin_name . '-chart-js', plugin_dir_url(__FILE__) . 'js/chart-js.js', array('jquery'), $this->version, true);
174 174
175 175 wp_enqueue_script( $this->plugin_name . '-functions', plugin_dir_url( __FILE__ ) . 'js/functions.js', array( 'jquery' ), $this->version, true );
176 176
177 - wp_register_script( $this->plugin_name . '-localized', '' );
177 + wp_register_script( $this->plugin_name . '-localized', '' , array('jquery'), $this->version, true);
178 178
179 179 wp_localize_script( $this->plugin_name . '-localized', 'aysChartBuilderAdmin', array(
180 180 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
181 181 'selectUser' => __( 'Select author', "chart-builder" ),
@@ -204,9 +204,9 @@
204 204 'activated' => __( "Activated", "chart-builder" ),
205 205 'errorMsg' => __( "Error", "chart-builder" ),
206 206 'loadResource' => __( "Can't load resource.", "chart-builder" ),
207 207 'somethingWentWrong' => __( "Maybe something went wrong.", "chart-builder" ),
208 - ) );
208 + ) );
209 209
210 210 wp_localize_script( $this->plugin_name . '-localized', 'aysChartBuilderChartSettings', array(
211 211 'types' => CBFunctions()->getAllowedTypes(),
212 212 'max_selected_options' => 2,
@@ -224,8 +224,9 @@
224 224 'filter_get_data' => wp_create_nonce( 'cbuilder-fetch-post-type-data' ),
225 225 'quiz_maker_get_data' => wp_create_nonce( 'cbuilder-fetch-quiz-maker-data' ),
226 226 'quiz_maker_save_data' => wp_create_nonce( 'cbuilder-save-quiz-maker-data' ),
227 227 'author_user_search' => wp_create_nonce( 'cbuilder-author-user-search' ),
228 +
228 229 ),
229 230 'actions' => array(
230 231 'filter_get_props' => 'fetch_post_type_props',
231 232 'filter_get_data' => 'fetch_post_type_data',
@@ -241,9 +242,9 @@
241 242
242 243 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
243 244 wp_enqueue_script( $this->plugin_name . '-google', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-google.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
244 245 wp_enqueue_script( $this->plugin_name . '-chartjs', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-chartjs.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
245 - wp_enqueue_script( $this->plugin_name . '-general-js', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-general.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version, true );
246 + wp_enqueue_script( $this->plugin_name . '-general-js', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-general.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
246 247
247 248 if ( false !== strpos( $hook_suffix, 'settings' ) ) {
248 249 wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true );
249 250
@@ -248,20 +249,20 @@
248 249 wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true );
249 250
250 251 wp_localize_script( $this->plugin_name . '-settings', 'aysChartBuilderAdminSettings', array(
251 252 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
252 - 'selectUserRoles' => __( 'Select user roles', $this->plugin_name ),
253 - 'delete' => __( 'Delete', $this->plugin_name ),
254 - 'selectQuestionDefaultType' => __( 'Select question default type', $this->plugin_name ),
255 - 'yes' => __( 'Yes', $this->plugin_name ),
256 - 'cancel' => __( 'Cancel', $this->plugin_name ),
257 - 'somethingWentWrong' => __( "Maybe something went wrong.", $this->plugin_name ),
258 - 'failed' => __( 'Failed', $this->plugin_name ),
259 - 'selectPage' => __( 'Select page', $this->plugin_name ),
260 - 'selectPostType' => __( 'Select post type', $this->plugin_name ),
261 - 'copied' => __( 'Copied!', $this->plugin_name),
262 - 'clickForCopy' => __( 'Click to copy', $this->plugin_name),
263 - 'selectForm' => __( 'Select form', $this->plugin_name),
253 + 'selectUserRoles' => __( 'Select user roles', 'chart-builder' ),
254 + 'delete' => __( 'Delete', 'chart-builder' ),
255 + 'selectQuestionDefaultType' => __( 'Select question default type', 'chart-builder' ),
256 + 'yes' => __( 'Yes', 'chart-builder' ),
257 + 'cancel' => __( 'Cancel', 'chart-builder' ),
258 + 'somethingWentWrong' => __( "Maybe something went wrong.", 'chart-builder' ),
259 + 'failed' => __( 'Failed', 'chart-builder' ),
260 + 'selectPage' => __( 'Select page', 'chart-builder' ),
261 + 'selectPostType' => __( 'Select post type', 'chart-builder' ),
262 + 'copied' => __( 'Copied!', 'chart-builder'),
263 + 'clickForCopy' => __( 'Click to copy', 'chart-builder'),
264 + 'selectForm' => __( 'Select form', 'chart-builder'),
264 265 ) );
265 266 }
266 267 }
267 268
@@ -277,8 +278,38 @@
277 278 wp_deregister_script('mwai-vendor');
278 279 wp_dequeue_script('mwai');
279 280 wp_dequeue_script('mwai-vendor');
280 281 }
282 +
283 + if (is_plugin_active('html5-video-player/html5-video-player.php')) {
284 + wp_dequeue_style('h5vp-admin');
285 + wp_dequeue_style('fs_common');
286 + }
287 +
288 + if (is_plugin_active('panorama/panorama.php')) {
289 + wp_dequeue_style('bppiv_admin_custom_css');
290 + wp_dequeue_style('bppiv-custom-style');
291 + }
292 +
293 + if (is_plugin_active('wp-social/wp-social.php')) {
294 + wp_dequeue_style('wp_social_select2_css');
295 + wp_deregister_script('wp_social_select2_js');
296 + wp_dequeue_script('wp_social_select2_js');
297 + }
298 +
299 + if (is_plugin_active('real-media-library-lite/index.php')) {
300 + wp_dequeue_style('real-media-library-lite-rml');
301 + }
302 +
303 + // Theme | Phlox 2.17.6
304 + wp_dequeue_style('auxin-admin-style');
305 +
306 + // Theme | Pixel Ebook Store
307 + wp_dequeue_style('pixel-ebook-store-free-demo-content-style');
308 +
309 + // Theme | Interactive Education
310 + wp_dequeue_style('interactive-education-free-demo-content-style');
311 +
281 312 }
282 313 }
283 314
284 315 /**
@@ -314,10 +345,10 @@
314 345
315 346 public function add_plugin_charts_submenu(){
316 347 $hook_page_view = add_submenu_page(
317 348 $this->plugin_name,
318 - __('All Charts', $this->plugin_name),
319 - __('All Charts', $this->plugin_name),
349 + __('All Charts', 'chart-builder'),
350 + __('All Charts', 'chart-builder'),
320 351 'manage_options',
321 352 $this->plugin_name,
322 353 array($this, 'display_plugin_charts_page')
323 354 );
@@ -327,10 +358,10 @@
327 358
328 359 public function add_plugin_add_new_submenu(){
329 360 $hook_charts = add_submenu_page(
330 361 $this->plugin_name,
331 - __('Add New', $this->plugin_name),
332 - __('Add New', $this->plugin_name),
362 + __('Add New', 'chart-builder'),
363 + __('Add New', 'chart-builder'),
333 364 'manage_options',
334 365 $this->plugin_name."&action=add",
335 366 array($this, 'display_plugin_addnew_page')
336 367 );
@@ -339,10 +370,10 @@
339 370
340 371 public function add_plugin_dashboard_submenu(){
341 372 $hook_charts = add_submenu_page(
342 373 $this->plugin_name,
343 - __('How to use', $this->plugin_name),
344 - __('How to use', $this->plugin_name),
374 + __('How to use', 'chart-builder'),
375 + __('How to use', 'chart-builder'),
345 376 'manage_options',
346 377 $this->plugin_name . '-dashboard',
347 378 array($this, 'display_plugin_setup_page')
348 379 );
@@ -350,10 +381,10 @@
350 381 }
351 382
352 383 public function add_plugin_general_settings_submenu(){
353 384 $hook_settings = add_submenu_page( $this->plugin_name,
354 - __('General Settings', $this->plugin_name),
355 - __('General Settings', $this->plugin_name),
385 + __('General Settings', 'chart-builder'),
386 + __('General Settings', 'chart-builder'),
356 387 'manage_options',
357 388 $this->plugin_name . '-settings',
358 389 array($this, 'display_plugin_settings_page')
359 390 );
@@ -361,10 +392,10 @@
361 392 }
362 393
363 394 public function add_plugin_featured_plugins_submenu(){
364 395 $hook_our_products = add_submenu_page( $this->plugin_name,
365 - __('Our products', $this->plugin_name),
366 - __('Our products', $this->plugin_name),
396 + __('Our products', 'chart-builder'),
397 + __('Our products', 'chart-builder'),
367 398 'manage_options',
368 399 $this->plugin_name . '-featured-plugins',
369 400 array($this, 'display_plugin_featured_plugins_page')
370 401 );
@@ -374,10 +405,10 @@
374 405
375 406 public function add_plugin_chart_features_submenu(){
376 407 $hook_pro_features = add_submenu_page(
377 408 $this->plugin_name,
378 - __('PRO Features', $this->plugin_name),
379 - __('PRO Features', $this->plugin_name),
409 + __('PRO Features', 'chart-builder'),
410 + __('PRO Features', 'chart-builder'),
380 411 'manage_options',
381 412 $this->plugin_name . '-chart-features',
382 413 array($this, 'display_plugin_chart_features_page')
383 414 );
@@ -392,8 +423,9 @@
392 423 'default' => 5,
393 424 'option' => 'cb_charts_per_page'
394 425 );
395 426
427 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
396 428 if( ! ( isset( $_GET['action'] ) && ( $_GET['action'] == 'add' || $_GET['action'] == 'edit' ) ) ){
397 429 add_screen_option( $option, $args );
398 430 }
399 431
@@ -411,17 +443,28 @@
411 443 return;
412 444 }
413 445 }
414 446
447 + private function check_permissions_and_nonce($nonce_action) {
448 + if (!is_user_logged_in() || !current_user_can('manage_options')) {
449 + wp_die(__('Access denied.', 'chart-builder'));
450 + }
451 +
452 + if (!isset($_GET['_wpnonce']) || !wp_verify_nonce($_GET['_wpnonce'], $this->plugin_name . '-' . $nonce_action)) {
453 + wp_die(__('Security check failed. Invalid or missing nonce.', 'chart-builder'));
454 + }
455 + }
415 456 public function display_plugin_charts_page(){
416 457 global $ays_chart_db_actions;
417 458
418 - $action = (isset($_GET['action'])) ? sanitize_text_field( $_GET['action'] ) : '';
419 - $id = (isset($_GET['id'])) ? absint( esc_attr($_GET['id']) ) : 0;
420 -
421 - if (isset($_POST['bulk_delete_confirm'])) {
459 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
460 + $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : '';
461 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
462 + $id = (isset($_GET['id'])) ? absint( wp_unslash( $_GET['id'] ) ) : 0;
463 + if (isset($_POST['bulk_delete_confirm'])) {
422 464 if (isset($_POST['bulk-delete']) && !empty($_POST['bulk-delete'])) {
423 - $ids = $_POST['bulk-delete'];
465 + $ids = wp_unslash( $_POST['bulk-delete'] );
466 + $ids = array_map( 'absint', (array) $ids );
424 467 foreach ($ids as $id) {
425 468 if ($id > 0) {
426 469 $this->db_obj->delete_item( $id );
427 470 }
@@ -436,9 +479,10 @@
436 479 }
437 480
438 481 switch ($action) {
439 482 case 'trash':
440 - if( $id > 0 ){
483 + $this->check_permissions_and_nonce('trash-item');
484 + if ($id > 0){
441 485 $this->db_obj->trash_item( $id );
442 486 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
443 487 $url = esc_url_raw( add_query_arg( array(
444 488 "status" => 'trashed'
@@ -447,9 +491,10 @@
447 491 exit;
448 492 }
449 493 break;
450 494 case 'restore':
451 - if( $id > 0 ){
495 + $this->check_permissions_and_nonce('delete-item');
496 + if ($id > 0 ) {
452 497 $this->db_obj->restore_item( $id );
453 498 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
454 499 $url = esc_url_raw( add_query_arg( array(
455 500 "status" => 'restored'
@@ -458,9 +503,10 @@
458 503 exit;
459 504 }
460 505 break;
461 506 case 'delete':
462 - if( $id > 0 ){
507 + $this->check_permissions_and_nonce('delete-item');
508 + if ($id > 0) {
463 509 $this->db_obj->delete_item( $id );
464 510 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
465 511 $url = esc_url_raw( add_query_arg( array(
466 512 "status" => 'deleted'
@@ -469,9 +515,10 @@
469 515 exit;
470 516 }
471 517 break;
472 518 case 'publish':
473 - if( $id > 0 ){
519 + $this->check_permissions_and_nonce('publish-item');
520 + if ($id > 0) {
474 521 $this->db_obj->publish_item( $id );
475 522 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
476 523 $url = esc_url_raw( add_query_arg( array(
477 524 "status" => 'published'
@@ -480,9 +527,10 @@
480 527 exit;
481 528 }
482 529 break;
483 530 case 'unpublish':
484 - if( $id > 0 ){
531 + $this->check_permissions_and_nonce('unpublish-item');
532 + if ($id > 0) {
485 533 $this->db_obj->restore_item( $id );
486 534 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
487 535 $url = esc_url_raw( add_query_arg( array(
488 536 "status" => 'unpublished'
@@ -491,9 +539,10 @@
491 539 exit;
492 540 }
493 541 break;
494 542 case 'duplicate':
495 - if( $id > 0 ){
543 + $this->check_permissions_and_nonce('duplicate-item');
544 + if ($id > 0) {
496 545 $this->db_obj->duplicate_item( $id );
497 546 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
498 547 $url = esc_url_raw( add_query_arg( array(
499 548 "status" => 'duplicated'
@@ -511,9 +560,66 @@
511 560 default:
512 561 include_once('partials/charts/chart-builder-charts-display.php');
513 562 }
514 563 }
564 + public static function chart_builder_svg_sanitize_allowed_properties(){
515 565
566 + $allowed_properties = array(
567 + 'div' => array(
568 + 'id' => true,
569 + 'class' => true,
570 + 'style' => true,
571 + ),
572 + 'svg' => array(
573 + 'class' => true,
574 + 'version' => true,
575 + 'overflow' => true,
576 + 'preserveAspectRatio' => true,
577 + 'preserveaspectratio' => true,
578 + 'fill' => true,
579 + 'viewBox' => true,
580 + 'viewbox' => true,
581 + 'height' => true,
582 + 'width' => true,
583 + 'xmlns' => true,
584 + 'xmlns:xlink' => true,
585 + 'id' => true,
586 + 'title' => true,
587 + ),
588 + 'g' => array(
589 + 'id' => true,
590 + 'class' => true,
591 + 'stroke-width' => true,
592 + 'stroke-linecap' => true,
593 + 'stroke-linejoin' => true,
594 + ),
595 + 'path' => array(
596 + 'id' => true,
597 + 'class' => true,
598 + 'd' => true,
599 + 'fill' => true,
600 + 'vector-effect' => true,
601 + 'xmlns:default' => true,
602 + ),
603 + 'span' => array(
604 + 'class' => true,
605 + ),
606 + 'img' => array(
607 + 'src' => true,
608 + 'alt' => true,
609 + ),
610 + );
611 +
612 + return $allowed_properties;
613 + }
614 +
615 + public static function get_allowed_tags_for_loader() {
616 + return array(
617 + 'span' => array('class' => array()),
618 + 'img' => array('src' => array(), 'alt' => array()),
619 + );
620 + }
621 +
516 622 public function display_plugin_setup_page(){
517 623 include_once('partials/chart-builder-admin-display.php');
518 624 }
519 625
@@ -571,11 +677,11 @@
571 677
572 678 $response = array(
573 679 "status" => false
574 680 );
681 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
682 + $function = isset( $_REQUEST['function'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['function'] ) ) : null;
575 683
576 - $function = isset($_REQUEST['function']) ? sanitize_text_field( $_REQUEST['function'] ) : null;
577 -
578 684 if($function !== null){
579 685 $response = array();
580 686 if( is_callable( array( $this, $function ) ) ){
581 687 $response = $this->$function();
@@ -595,10 +701,14 @@
595 701 }
596 702
597 703 public function deactivate_plugin_option(){
598 704 // Run a security check.
599 - check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
600 -
705 + if ( isset( $_REQUEST['_ajax_nonce'] ) ) {
706 + check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
707 + } else {
708 + wp_die();
709 + }
710 +
601 711 // Check for permissions.
602 712 if ( ! current_user_can( 'manage_options' ) ) {
603 713 ob_end_clean();
604 714 $ob_get_clean = ob_get_clean();
@@ -608,9 +718,9 @@
608 718 wp_die();
609 719 }
610 720
611 721 if( is_user_logged_in() ) {
612 - $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( $_REQUEST['upgrade_plugin'] ) : '';
722 + $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['upgrade_plugin'] ) ) : '';
613 723 $upgrade_option = get_option( 'ays_chart_builder_upgrade_plugin', '' );
614 724
615 725 if ( $upgrade_option === '' ) {
616 726 add_option( 'ays_chart_builder_upgrade_plugin', $request_value );
@@ -633,17 +743,17 @@
633 743 }
634 744 }
635 745
636 746 public function chart_builder_admin_footer($a){
637 - if(isset($_REQUEST['page'])){
638 - if(false !== strpos( sanitize_text_field( $_REQUEST['page'] ), $this->plugin_name)){
747 + if(isset($_REQUEST['page'])){// phpcs:ignore WordPress.Security.NonceVerification.Recommended
748 + if(false !== strpos( sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ), $this->plugin_name)){// phpcs:ignore WordPress.Security.NonceVerification.Recommended
639 749 ?>
640 750 <div class="ays-chart-footer-support-box">
641 - <span class="ays-chart-footer-link-row"><a href="https://wordpress.org/support/plugin/chart-builder" target="_blank"><?php echo __( "Support", "chart-builder"); ?></a></span>
751 + <span class="ays-chart-footer-link-row"><a href="https://wordpress.org/support/plugin/chart-builder" target="_blank"><?php echo esc_html__( "Support", "chart-builder"); ?></a></span>
642 752 <span class="ays-chart-footer-slash-row">/</span>
643 - <span class="ays-chart-footer-link-row"><a href="https://ays-pro.com/wordpress-chart-builder-plugin-user-manual" target="_blank"><?php echo __( "Docs", "chart-builder"); ?></a></span>
753 + <span class="ays-chart-footer-link-row"><a href="https://ays-pro.com/wordpress-chart-builder-plugin-user-manual" target="_blank"><?php echo esc_html__( "Docs", "chart-builder"); ?></a></span>
644 754 <span class="ays-chart-footer-slash-row">/</span>
645 - <span class="ays-chart-footer-link-row"><a href="https://ays-demo.com/chart-builder-plugin-suggestion-box" target="_blank"><?php echo __( "Suggest a Feature", "chart-builder"); ?></a></span>
755 + <span class="ays-chart-footer-link-row"><a href="https://ays-demo.com/chart-builder-plugin-suggestion-box" target="_blank"><?php echo esc_html__( "Suggest a Feature", "chart-builder"); ?></a></span>
646 756 </div>
647 757 <p style="font-size:13px;text-align:center;font-style:italic;">
648 758 <span style="margin-left:0px;margin-right:10px;" class="ays_heart_beat"><i class="ays_fa ays_fa_heart_o animated"></i></span>
649 759 <span><?php echo esc_html(__( "If you love our plugin, please do big favor and rate us on", "chart-builder")); ?></span>
@@ -683,11 +793,12 @@
683 793 }
684 794 }
685 795
686 796 public function fetch_post_type_props(){
687 - $nonce = isset( $_POST['nonce'] ) ? wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'cbuilder-fetch-post-type-props' ) : '';
688 - if ( $nonce ) {
689 - $results = CBFunctions()->get_post_type_properties( sanitize_text_field( $_POST['post_type'] ) );
797 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
798 + $nonce = isset( $_POST['nonce'] ) ? wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'cbuilder-fetch-post-type-props' ) : '';
799 + if ( $nonce ) {// phpcs:ignore WordPress.Security.NonceVerification.Recommended
800 + $results = isset($_POST['post_type']) ? CBFunctions()->get_post_type_properties( sanitize_text_field( wp_unslash($_POST['post_type']) ) ) : '';
690 801
691 802 return array(
692 803 'success' => true,
693 804 'fields' => $results,
@@ -753,17 +864,18 @@
753 864 }
754 865
755 866 $ays_chart_builder_flag = intval(get_option('ays_chart_sale_btn'));
756 867 if( $ays_chart_builder_flag == 0 ){
757 - if (isset($_GET['page']) && strpos($_GET['page'], CHART_BUILDER_NAME) !== false) {
868 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
869 + if ( isset( $_GET['page'] ) && strpos( sanitize_text_field( wp_unslash( $_GET['page'] ) ), CHART_BUILDER_NAME ) !== false ) {
758 870 if( !(Chart_Builder_Admin::get_max_id('charts') <= 1) ){
759 871 // $this->ays_chart_sale_message_30_emma($ays_chart_builder_flag);
760 - // $this->ays_chart_sale_message20($ays_chart_builder_flag);
872 + $this->ays_chart_new_silver_bundle_message_2025($ays_chart_builder_flag);
761 873 // $this->ays_chart_helloween_message($ays_chart_builder_flag);
762 - // $this->ays_chart_black_friday_message($ays_chart_builder_flag);
763 874 // $this->ays_chart_christmas_message($ays_chart_builder_flag);
764 875 // $this->ays_chart_silver_bundle_message($ays_chart_builder_flag);
765 - $this->ays_chart_black_friday_message_2024($ays_chart_builder_flag);
876 + // $this->ays_chart_black_friday_message_2024($ays_chart_builder_flag);
877 + // $this->ays_chart_christmas_message_2024($ays_chart_builder_flag);
766 878 }
767 879 }
768 880 }
769 881 }
@@ -774,9 +886,9 @@
774 886 'status' => false,
775 887 );
776 888
777 889 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'ays_chart_dismiss_button') {
778 - if( (isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( $_REQUEST['_ajax_nonce'], $this->plugin_name . '-sale-banner' )) && current_user_can( 'manage_options' )){
890 + if ( isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_ajax_nonce'] ) ), $this->plugin_name . '-sale-banner' ) && current_user_can( 'manage_options' ) ) {
779 891 update_option('ays_chart_sale_btn', 1);
780 892 update_option('ays_chart_sale_date', current_time( 'mysql' ));
781 893 $data['status'] = true;
782 894 }
@@ -806,9 +918,9 @@
806 918 </div>';
807 919 $content[] = '</div>';
808 920
809 921 $content[] = '<div style="font-size: 17px;">';
810 - $content[] = '<img style="width: 24px;height: 24px;" src="' . esc_attr(CHART_BUILDER_ADMIN_URL) . '/images/icons/guarantee-new.png">';
922 + $content[] = '<img style="width: 24px; height: 24px;" src="' . esc_url(plugins_url('admin/images/icons/guarantee-new.png', dirname(__FILE__))) . '">';// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
811 923 $content[] = '<span style="padding-left: 4px; font-size: 14px; font-weight: 600;"> 30 Day Money Back Guarantee</span>';
812 924
813 925 $content[] = '</div>';
814 926
@@ -868,9 +980,10 @@
868 980 $content[] = '</div>';
869 981 $content[] = '</div>';
870 982
871 983 $content = implode( '', $content );
872 - echo html_entity_decode(esc_html( $content ));
984 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
985 +
873 986 }
874 987 }
875 988
876 989 // Self 20% sale
@@ -885,18 +998,26 @@
885 998 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
886 999
887 1000 $content[] = '<div class="ays-chart-dicount-sale-name-discount-box">';
888 1001 $content[] = '<span class="ays-chart-new-chart-pro-title">';
889 - $content[] = __( "<span><a href='https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-plugin-name' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>", CHART_BUILDER_NAME );
1002 + // Translators: %s is the URL to the Chart Builder plugin page.
1003 + $content[] = sprintf(
1004 + /* translators: %s is the Chart Builder plugin URL. */
1005 + __(
1006 + "<span><a href='%s' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>",
1007 + 'chart-builder'
1008 + ),
1009 + "https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-plugin-name" . CHART_BUILDER_VERSION
1010 + );
890 1011 $content[] = '</span>';
891 1012 $content[] = '<div>';
892 - $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-sale-30.svg" style="width: 70px;">';
1013 + $content[] = '<img src="' . esc_url(plugins_url('admin/images/ays-chart-banner-sale-30.svg', dirname(__FILE__))) . '" style="width: 70px;">';// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
893 1014 $content[] = '</div>';
894 1015 $content[] = '</div>';
895 1016
896 1017 $content[] = '<span class="ays-chart-new-chart-pro-desc">';
897 - $content[] = '<img class="ays-chart-new-chart-pro-guaranteeicon" src="' . CHART_BUILDER_ADMIN_URL . '/images/chart-builder-guaranteeicon.webp" style="width: 30px;">';
898 - $content[] = __( "30 Days Money Back Guarantee", CHART_BUILDER_NAME );
1018 + $content[] = '<img class="ays-chart-new-chart-pro-guaranteeicon" src="' . esc_url(plugins_url('admin/images/chart-builder-guaranteeicon.webp', dirname(__FILE__))) . '" style="width: 30px;">'; // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
1019 + $content[] = esc_html__( "30 Days Money Back Guarantee", 'chart-builder' );
899 1020 $content[] = '</span>';
900 1021
901 1022 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-chart">';
902 1023 $content[] = '<form method="POST">';
@@ -915,15 +1036,15 @@
915 1036
916 1037 $content[] = '<div id="ays-chart-countdown-main-container">';
917 1038 $content[] = '<div class="ays-chart-countdown-container">';
918 1039 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
919 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1040 + $content[] = esc_html__( "Offer ends in:", 'chart-builder' );
920 1041
921 1042 $content[] = '<ul style="padding: 0">';
922 - $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
923 - $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
924 - $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
925 - $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . __( 'Seconds', CHART_BUILDER_NAME ) . '</li>';
1043 + $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . esc_html__( 'Days', 'chart-builder' ) . '</li>';
1044 + $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . esc_html__( 'Hours', 'chart-builder' ) . '</li>';
1045 + $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . esc_html__( 'Minutes', 'chart-builder' ) . '</li>';
1046 + $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . esc_html__( 'Seconds', 'chart-builder' ) . '</li>';
926 1047 $content[] = '</ul>';
927 1048 $content[] = '</div>';
928 1049
929 1050 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
@@ -937,11 +1058,11 @@
937 1058
938 1059 $content[] = '</div>';
939 1060
940 1061 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
941 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-button" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . __( 'Buy Now', CHART_BUILDER_NAME ) . '</a>';
1062 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-button'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . esc_html__( 'Buy Now', 'chart-builder' ) . '</a>';
942 1063 $content[] = '<span class="ays-chart-dicount-one-time-text">';
943 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1064 + $content[] = esc_html__( "One-time payment", 'chart-builder' );
944 1065 $content[] = '</span>';
945 1066 $content[] = '</div>';
946 1067
947 1068 $content[] = '</div>';
@@ -948,9 +1069,9 @@
948 1069
949 1070 $content[] = '</div>';
950 1071
951 1072 $content = implode( '', $content );
952 - echo $content;
1073 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
953 1074 }
954 1075 }
955 1076
956 1077 // Helloween banner
@@ -972,15 +1093,15 @@
972 1093 <span style='' class='ays-chart-helloween-bundle'>
973 1094 <a href='https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner' target='_blank' class='ays-chart-dicount-wrap-color-helloween ays-chart-dicount-wrap-text-decoration-helloween' style='display:block; color:#b2ff00;margin-right:6px;'>
974 1095 Chart Builder
975 1096 </a>
976 - </span>", CHART_BUILDER_NAME );
1097 + </span>", 'chart-builder' );
977 1098 $content[] = '</p>';
978 1099 $content[] = '<p>';
979 1100 $content[] = __( "Hurry up!
980 1101 <a href='https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner' target='_blank' style='color:#ffc700;'>
981 1102 Check it out!
982 - </a>", CHART_BUILDER_NAME );
1103 + </a>", 'chart-builder' );
983 1104 $content[] = '</p>';
984 1105
985 1106 $content[] = '</div>';
986 1107
@@ -1010,9 +1131,9 @@
1010 1131 $content[] = '</div>';
1011 1132
1012 1133 $content[] = '</div>';
1013 1134 $content[] = '<div class="ays-chart-dicount-wrap-box ays-buy-now-button-box-helloween">';
1014 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner" class="button button-primary ays-buy-now-button-helloween" id="ays-button-top-buy-now-helloween" target="_blank" style="" >' . __( 'Buy Now !', CHART_BUILDER_NAME ) . '</a>';
1135 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner" class="button button-primary ays-buy-now-button-helloween" id="ays-button-top-buy-now-helloween" target="_blank" style="" >' . __( 'Buy Now !', 'chart-builder' ) . '</a>';
1015 1136 $content[] = '</div>';
1016 1137 $content[] = '</div>';
1017 1138
1018 1139 $content[] = '</div>';
@@ -1033,9 +1154,9 @@
1033 1154 $content[] = '</div>';
1034 1155
1035 1156 $content = implode( '', $content );
1036 1157
1037 - echo $content;
1158 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1038 1159 }
1039 1160 }
1040 1161
1041 1162 // Black Friday banner
@@ -1095,9 +1216,9 @@
1095 1216 $content[] = '</div>';
1096 1217
1097 1218 $content = implode( '', $content );
1098 1219
1099 - echo $content;
1220 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1100 1221 }
1101 1222 }
1102 1223
1103 1224 // Christmas banner
@@ -1108,10 +1229,10 @@
1108 1229 $content[] = '<div id="ays-chart-dicount-christmas-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1109 1230 $content[] = '<div id="ays-chart-dicount-christmas-month" class="ays_chart_dicount_month">';
1110 1231 $content[] = '<div class="ays-chart-dicount-christmas-box">';
1111 1232 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box ays-chart-dicount-christmas-wrap-box-80">';
1112 - $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Limited Time', CHART_BUILDER_NAME ) .' '. '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-sale" target="_blank">' . __( '40%', CHART_BUILDER_NAME ) . '</a>' . ' SALE</div>';
1113 - $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', CHART_BUILDER_NAME ) . '</div>';
1233 + $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Limited Time', 'chart-builder' ) .' '. '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-sale" target="_blank">' . __( '40%', 'chart-builder' ) . '</a>' . ' SALE</div>';
1234 + $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', 'chart-builder' ) . '</div>';
1114 1235 $content[] = '</div>';
1115 1236
1116 1237 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1117 1238 $content[] = '<div id="ays-chart-countdown-main-container">';
@@ -1117,12 +1238,12 @@
1117 1238 $content[] = '<div id="ays-chart-countdown-main-container">';
1118 1239 $content[] = '<div class="ays-chart-countdown-container">';
1119 1240 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1120 1241 $content[] = '<ul>';
1121 - $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
1122 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
1123 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
1124 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', CHART_BUILDER_NAME ) . '</li>';
1242 + $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', 'chart-builder' ) . '</li>';
1243 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', 'chart-builder' ) . '</li>';
1244 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', 'chart-builder' ) . '</li>';
1245 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', 'chart-builder' ) . '</li>';
1125 1246 $content[] = '</ul>';
1126 1247 $content[] = '</div>';
1127 1248 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1128 1249 $content[] = '<span>🚀</span>';
@@ -1134,9 +1255,9 @@
1134 1255 $content[] = '</div>';
1135 1256 $content[] = '</div>';
1136 1257
1137 1258 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1138 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-buy-now" target="_blank">' . __( 'BUY NOW!', CHART_BUILDER_NAME ) . '</a>';
1259 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-buy-now" target="_blank">' . __( 'BUY NOW!', 'chart-builder' ) . '</a>';
1139 1260 $content[] = '</div>';
1140 1261 $content[] = '</div>';
1141 1262 $content[] = '</div>';
1142 1263
@@ -1142,9 +1263,9 @@
1142 1263
1143 1264 $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-christmas">';
1144 1265 $content[] = '<form method="POST">';
1145 1266 $content[] = '<div id="ays-chart-dismiss-buttons-content-christmas">';
1146 - $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', CHART_BUILDER_NAME ) . '</button>';
1267 + $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', 'chart-builder' ) . '</button>';
1147 1268 $content[] = '</div>';
1148 1269 $content[] = '</form>';
1149 1270 $content[] = '</div>';
1150 1271 $content[] = '</div>';
@@ -1150,9 +1271,9 @@
1150 1271 $content[] = '</div>';
1151 1272
1152 1273 $content = implode( '', $content );
1153 1274
1154 - echo $content;
1275 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1155 1276 }
1156 1277 }
1157 1278
1158 1279 // Silver Bundle
@@ -1161,20 +1282,20 @@
1161 1282 $content = array();
1162 1283
1163 1284 $content[] = '<div id="ays-chart-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1164 1285 $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1165 - $content[] = '<a href="https://ays-pro.com/silver-bundle" target="_blank" class="ays-chart-sale-banner-link"><img src="' . CHART_BUILDER_ADMIN_URL . '/images/silver_bundle_logo_box.png"></a>';
1286 + $content[] = '<a href="https://ays-pro.com/silver-bundle" target="_blank" class="ays-chart-sale-banner-link"><img src="' . esc_url(plugins_url('/images/silver_bundle_logo_box.png', dirname(__FILE__))) . '"></a>';// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
1166 1287
1167 1288 $content[] = '<div class="ays-chart-dicount-wrap-box">';
1168 1289
1169 1290 $content[] = '<strong style="font-weight: bold;">';
1170 - $content[] = __( "Limited Time <span style='color:#E85011;'>50%</span> SALE on <br><span><a href='https://ays-pro.com/silver-bundle' target='_blank' style='color:#E85011; text-decoration: underline;'>Silver Bundle</a></span> (Quiz + Chart + Form)!", CHART_BUILDER_NAME );
1291 + $content[] = __( "Limited Time <span style='color:#E85011;'>50%</span> SALE on <br><span><a href='https://ays-pro.com/silver-bundle' target='_blank' style='color:#E85011; text-decoration: underline;'>Silver Bundle</a></span> (Quiz + Chart + Form)!", 'chart-builder' );
1171 1292 $content[] = '</strong>';
1172 1293
1173 1294 $content[] = '<br>';
1174 1295
1175 1296 $content[] = '<strong>';
1176 - $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", CHART_BUILDER_NAME );
1297 + $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", 'chart-builder' );
1177 1298 $content[] = '</strong>';
1178 1299
1179 1300 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1180 1301
@@ -1213,14 +1334,14 @@
1213 1334 $content[] = '</div>';
1214 1335
1215 1336 $content[] = '</div>';
1216 1337
1217 - $content[] = '<a href="https://ays-pro.com/silver-bundle" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="height: 32px; display: flex; align-items: center; font-weight: 500; " >' . __( 'Buy Now !', CHART_BUILDER_NAME ) . '</a>';
1338 + $content[] = '<a href="https://ays-pro.com/silver-bundle" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="height: 32px; display: flex; align-items: center; font-weight: 500; " >' . __( 'Buy Now !', 'chart-builder' ) . '</a>';
1218 1339 $content[] = '</div>';
1219 1340 $content[] = '</div>';
1220 1341
1221 1342 $content = implode( '', $content );
1222 - echo $content;
1343 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1223 1344 }
1224 1345 }
1225 1346
1226 1347 // Black Friday 2024
@@ -1238,20 +1359,144 @@
1238 1359
1239 1360 $content[] = '<div id="ays-chart-countdown">';
1240 1361
1241 1362 $content[] = '<div>';
1242 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1363 + $content[] = __( "Offer ends in:", 'chart-builder' );
1243 1364 $content[] = '</div>';
1244 1365
1245 1366 $content[] = '<ul>';
1246 - $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", CHART_BUILDER_NAME ) .'</li>';
1247 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", CHART_BUILDER_NAME ) .'</li>';
1248 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", CHART_BUILDER_NAME ) .'</li>';
1249 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", CHART_BUILDER_NAME ) .'</li>';
1367 + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>';
1368 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>';
1369 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>';
1370 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>';
1250 1371 $content[] = '</ul>';
1251 1372 $content[] = '</div>';
1252 1373
1253 1374 $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
1375 + $content[] = '<span>🚀</span>';
1376 + $content[] = '<span>⌛</span>';
1377 + $content[] = '<span>🔥</span>';
1378 + $content[] = '<span>💣</span>';
1379 + $content[] = '</div>';
1380 +
1381 + $content[] = '</div>';
1382 + $content[] = '</div>';
1383 +
1384 + $content[] = '</div>';
1385 +
1386 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1387 + $content[] = '<div>';
1388 +
1389 + $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1390 + $content[] = __( "<span><a href='https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner' class='ays-chart-black-friday-bundle-title-link' target='_blank'>Black Friday Sale</a></span>", 'chart-builder' );
1391 + $content[] = '</span>';
1392 +
1393 + $content[] = '</br>';
1394 +
1395 + $content[] = '<span class="ays-chart-black-friday-bundle-desc">';
1396 + $content[] = '<a class="ays-chart-black-friday-bundle-desc" href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner" class="ays-chart-black-friday-bundle-title-link" target="_blank">';
1397 + $content[] = __( "50% OFF", 'chart-builder' );
1398 + $content[] = '</a>';
1399 + $content[] = '</span>';
1400 + $content[] = '</div>';
1401 +
1402 + $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1403 +
1404 + $content[] = '<form action="" method="POST">';
1405 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1406 + if( current_user_can( 'manage_options' ) ){
1407 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
1408 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1409 + }
1410 + $content[] = '</div>';
1411 + $content[] = '</form>';
1412 +
1413 + $content[] = '</div>';
1414 +
1415 + $content[] = '</div>';
1416 +
1417 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1418 + $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1419 + $content[] = '<a class="ays-chart-black-friday-bundle-title-link" href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner" target="_blank">';
1420 + $content[] = __( 'Silver Bundle', 'chart-builder' );
1421 + $content[] = '</a>';
1422 + $content[] = '</span>';
1423 + $content[] = '</div>';
1424 +
1425 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1426 + $content[] = '<a href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', 'chart-builder' ) . '</a>';
1427 + $content[] = '<span class="ays-chart-dicount-one-time-text">';
1428 + $content[] = __( "One-time payment", 'chart-builder' );
1429 + $content[] = '</span>';
1430 + $content[] = '</div>';
1431 + $content[] = '</div>';
1432 + $content[] = '</div>';
1433 +
1434 + $content = implode( '', $content );
1435 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1436 + }
1437 + }
1438 +
1439 + //silver bundle
1440 + public function ays_chart_new_silver_bundle_message_2025($ishmar){
1441 + if($ishmar == 0 ){
1442 + $content = array();
1443 +
1444 + $content[] = '<div id="ays-chart-new-silver-bundle-2025-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1445 + $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1446 +
1447 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1448 + $content[] = '<div>';
1449 +
1450 + $content[] = '<span class="ays-chart-new-silver-bundle-2025-title">';
1451 + $content[] = __( "<span><a href='https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=new_silver_bundle_message_2025' style='color:#ffffff; text-decoration: underline;'>Silver Bundle</a></span> (Quiz + Form + Chart)", 'quiz-maker' );
1452 + $content[] = '<span>';
1453 + $content[] = '<img class="ays-chart-new-silver-bundle-discount" src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-50.svg" style="width: 60px;">';
1454 + $content[] = '</span>';
1455 +
1456 + $content[] = '</span>';
1457 +
1458 + $content[] = '</br>';
1459 +
1460 + $content[] = '<span class="ays-chart-new-silver-bundle-2025-desc">';
1461 + $content[] = '<span>';
1462 + $content[] = '<img class="ays-chart-new-silver-bundle-guaranteeicon" src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-guaranteeicon.svg" style="width: 30px;">';
1463 + $content[] = '</span>';
1464 + $content[] = __( "30 Day Money Back Guarantee", 'chart-builder' );
1465 + $content[] = '</span>';
1466 + $content[] = '</div>';
1467 +
1468 + $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1469 +
1470 + $content[] = '<form action="" method="POST">';
1471 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1472 + if( current_user_can( 'manage_options' ) ){
1473 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
1474 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1475 + }
1476 + $content[] = '</div>';
1477 + $content[] = '</form>';
1478 +
1479 + $content[] = '</div>';
1480 +
1481 + $content[] = '</div>';
1482 +
1483 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
1484 +
1485 + $content[] = '<div id="ays-chart-countdown-main-container">';
1486 + $content[] = '<div class="ays-chart-countdown-container">';
1487 +
1488 + $content[] = '<div id="ays-chart-countdown">';
1489 +
1490 + $content[] = '<ul>';
1491 + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>';
1492 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>';
1493 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>';
1494 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>';
1495 + $content[] = '</ul>';
1496 + $content[] = '</div>';
1497 +
1498 + $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
1254 1499 $content[] = '<span></span>';
1255 1500 $content[] = '<span></span>';
1256 1501 $content[] = '<span></span>';
1257 1502 $content[] = '<span></span>';
@@ -1261,20 +1506,81 @@
1261 1506 $content[] = '</div>';
1262 1507
1263 1508 $content[] = '</div>';
1264 1509
1510 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1511 + $content[] = '<a href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=new-silver-bundle-message-2025" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Buy Now', 'chart-builder' ) . '</a>';
1512 + $content[] = '<span class="ays-chart-dicount-one-time-text">';
1513 + $content[] = __( "One-time payment", 'chart-builder' );
1514 + $content[] = '</span>';
1515 + $content[] = '</div>';
1516 + $content[] = '</div>';
1517 + $content[] = '</div>';
1518 +
1519 + $content = implode( '', $content );
1520 + echo wp_kses_post($content);
1521 + }
1522 + }
1523 +
1524 +
1525 + // Christmas Top Banner 2024
1526 + public function ays_chart_christmas_message_2024($ishmar){
1527 + if($ishmar == 0 ){
1528 + $content = array();
1529 +
1530 + $content[] = '<div id="ays-chart-christmas-top-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1531 + $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1532 +
1533 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
1534 +
1535 + $content[] = '<div id="ays-chart-countdown-main-container">';
1536 + $content[] = '<div class="ays-chart-countdown-container">';
1537 +
1538 + $content[] = '<div id="ays-chart-countdown">';
1539 +
1540 + $content[] = '<div>';
1541 + $content[] = __( "Offer ends in:", 'chart-builder' );
1542 + $content[] = '</div>';
1543 +
1544 + $content[] = '<ul style="padding-left: 0;">';
1545 + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>';
1546 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>';
1547 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>';
1548 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>';
1549 + $content[] = '</ul>';
1550 + $content[] = '</div>';
1551 +
1552 + $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
1553 + $content[] = '<span>🚀</span>';
1554 + $content[] = '<span>⌛</span>';
1555 + $content[] = '<span>🔥</span>';
1556 + $content[] = '<span>💣</span>';
1557 + $content[] = '</div>';
1558 +
1559 + $content[] = '</div>';
1560 + $content[] = '</div>';
1561 +
1562 + $content[] = '</div>';
1563 +
1265 1564 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1266 1565 $content[] = '<div>';
1267 1566
1268 - $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1269 - $content[] = __( "<span><a href='https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-sale-banner' class='ays-chart-black-friday-bundle-title-link' target='_blank'>Black Friday Sale</a></span>", CHART_BUILDER_NAME );
1567 + $content[] = '<span class="ays-chart-christmas-top-bundle-title">';
1568 + $content[] = sprintf(
1569 + /* translators: %s is the Chart Builder plugin URL with version parameter. */
1570 + __(
1571 + "<span><a href='%s' class='ays-chart-christmas-top-bundle-title-link' target='_blank'>Christmas Sale</a></span>",
1572 + 'chart-builder'
1573 + ),
1574 + "https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner" . CHART_BUILDER_VERSION
1575 + );
1270 1576 $content[] = '</span>';
1271 1577
1272 1578 $content[] = '</br>';
1273 1579
1274 - $content[] = '<span class="ays-chart-black-friday-bundle-desc">';
1275 - $content[] = '<a class="ays-chart-black-friday-bundle-desc" href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-sale-banner" class="ays-chart-black-friday-bundle-title-link" target="_blank">';
1276 - $content[] = __( "20% OFF", CHART_BUILDER_NAME );
1580 + $content[] = '<span class="ays-chart-christmas-top-bundle-desc">';
1581 + $content[] = '<a class="ays-chart-christmas-top-bundle-desc" href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner'.CHART_BUILDER_VERSION.'" class="ays-chart-christmas-top-bundle-title-link" target="_blank">';
1582 + $content[] = __( "20% Extra OFF", 'chart-builder' );
1277 1583 $content[] = '</a>';
1278 1584 $content[] = '</span>';
1279 1585 $content[] = '</div>';
1280 1586
@@ -1282,9 +1588,9 @@
1282 1588
1283 1589 $content[] = '<form action="" method="POST">';
1284 1590 $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1285 1591 if( current_user_can( 'manage_options' ) ){
1286 - $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", CHART_BUILDER_NAME ) .'</button>';
1592 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
1287 1593 $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1288 1594 }
1289 1595 $content[] = '</div>';
1290 1596 $content[] = '</form>';
@@ -1292,22 +1598,21 @@
1292 1598 $content[] = '</div>';
1293 1599
1294 1600 $content[] = '</div>';
1295 1601
1296 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-black-friday-bundle-coupon-text-box">';
1297 - $content[] = '<div class="ays-chart-black-friday-bundle-coupon-row">';
1298 - $content[] = 'bfdeal20off';
1602 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-christmas-top-bundle-coupon-text-box">';
1603 + $content[] = '<div class="ays-chart-christmas-top-bundle-coupon-row">';
1604 + $content[] = 'xmas20off';
1299 1605 $content[] = '</div>';
1300 -
1301 - $content[] = '<div class="ays-chart-black-friday-bundle-text-row">';
1302 - $content[] = __( '20% Extra Discount Coupon', CHART_BUILDER_NAME );
1606 + $content[] = '<div class="ays-chart-christmas-top-bundle-text-row">';
1607 + $content[] = __( '20% Extra Discount Coupon', 'chart-builder' );
1303 1608 $content[] = '</div>';
1304 1609 $content[] = '</div>';
1305 1610
1306 1611 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1307 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-sale-banner" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', CHART_BUILDER_NAME ) . '</a>';
1612 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', 'chart-builder' ) . '</a>';
1308 1613 $content[] = '<span class="ays-chart-dicount-one-time-text">';
1309 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1614 + $content[] = __( "One-time payment", 'chart-builder' );
1310 1615 $content[] = '</span>';
1311 1616 $content[] = '</div>';
1312 1617 $content[] = '</div>';
1313 1618 $content[] = '</div>';
@@ -1312,18 +1617,17 @@
1312 1617 $content[] = '</div>';
1313 1618 $content[] = '</div>';
1314 1619
1315 1620 $content = implode( '', $content );
1316 - echo $content;
1621 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1317 1622 }
1318 1623 }
1319 1624
1320 -
1321 1625 public function ays_chart_update_banner_time(){
1322 1626
1323 1627 $date = time() + ( 3 * 24 * 60 * 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1324 1628 // $date = time() + ( 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS); // for testing | 1 min
1325 - $next_3_days = date('M d, Y H:i:s', $date);
1629 + $next_3_days = gmdate('M d, Y H:i:s', $date);
1326 1630
1327 1631 $ays_chart_banner_time = get_option('ays_chart_20_bundle_banner_time');
1328 1632
1329 1633 if ( !$ays_chart_banner_time || is_null( $ays_chart_banner_time ) ) {
@@ -1348,9 +1652,9 @@
1348 1652 }
1349 1653
1350 1654 public function author_user_search() {
1351 1655 check_ajax_referer( 'cbuilder-author-user-search', 'security' );
1352 - $params = $_REQUEST['params'];
1656 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1353 1657 $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null;
1354 1658 $checked = isset($params['val']) && $params['val'] !='' ? sanitize_text_field( $params['val'] ) : null;
1355 1659 $args = 'search=';
1356 1660 if ($search !== null) {
@@ -1467,9 +1771,11 @@
1467 1771 */
1468 1772 public function ays_chart_activate_plugin() {
1469 1773
1470 1774 // Run a security check.
1471 - check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
1775 + if ( isset( $_REQUEST['_ajax_nonce'] ) ) {
1776 + check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
1777 + }
1472 1778
1473 1779 // Check for permissions.
1474 1780 if ( ! current_user_can( 'activate_plugins' ) ) {
1475 1781 wp_send_json_error( esc_html__( 'Plugin activation is disabled for you on this site.', 'chart-builder' ) );
@@ -1510,9 +1816,11 @@
1510 1816 */
1511 1817 public function ays_chart_install_plugin() {
1512 1818
1513 1819 // Run a security check.
1514 - check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
1820 + if ( isset( $_REQUEST['_ajax_nonce'] ) ) {
1821 + check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
1822 + }
1515 1823
1516 1824 $generic_error = esc_html__( 'There was an error while performing your request.', 'chart-builder' );
1517 1825 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : '';
1518 1826
@@ -1629,8 +1937,9 @@
1629 1937
1630 1938 $images_url = CHART_BUILDER_ADMIN_URL . '/images/icons/';
1631 1939
1632 1940 $plugin_slug = array(
1941 + 'fox-lms',
1633 1942 'quiz-maker',
1634 1943 'survey-maker',
1635 1944 'poll-maker',
1636 1945 'ays-popup-box',
@@ -1643,9 +1952,9 @@
1643 1952 $plugin_url_arr = array();
1644 1953 foreach ($plugin_slug as $key => $slug) {
1645 1954 if ( isset( $_SESSION['ays_chart_our_product_links'] ) && !empty( $_SESSION['ays_chart_our_product_links'] )
1646 1955 && isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && !empty( $_SESSION['ays_chart_our_product_links'][$slug] ) ) {
1647 - $plugin_url = (isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && $_SESSION['ays_chart_our_product_links'][$slug] != "") ? esc_url( $_SESSION['ays_chart_our_product_links'][$slug] ) : "";
1956 + $plugin_url = (isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && $_SESSION['ays_chart_our_product_links'][$slug] != "") ? esc_url_raw(sanitize_text_field($_SESSION['ays_chart_our_product_links'][$slug])) : "";
1648 1957 } else {
1649 1958 $latest_version = $this->ays_chart_get_latest_plugin_version($slug);
1650 1959 $plugin_url = 'https://downloads.wordpress.org/plugin/'. $slug .'.zip';
1651 1960 if ( $latest_version != '' ) {
@@ -1657,13 +1966,22 @@
1657 1966 $plugin_url_arr[$slug] = $plugin_url;
1658 1967 }
1659 1968
1660 1969 $plugins_array = array(
1970 + 'fox-lms/fox-lms.php' => array(
1971 + 'icon' => $images_url . 'icon-fox-lms-128x128.png',
1972 + 'name' => __( 'Fox LMS', 'chart-builder' ),
1973 + 'desc' => __( 'Build and manage online courses directly on your WordPress site.', 'chart-builder' ),
1974 + 'desc_hidden' => __( 'With the FoxLMS plugin, you can create, sell, and organize courses, lessons, and quizzes, transforming your website into a dynamic e-learning platform.', 'chart-builder' ),
1975 + 'wporg' => 'https://wordpress.org/plugins/fox-lms/',
1976 + 'buy_now' => 'https://foxlms.com/pricing/?utm_source=dashboard&utm_medium=chart-free&utm_campaign=fox-lms-our-products-page',
1977 + 'url' => $plugin_url_arr['fox-lms'],
1978 + ),
1661 1979 'quiz-maker/quiz-maker.php' => array(
1662 1980 'icon' => $images_url . 'icon-quiz-128x128.png',
1663 - 'name' => __( 'Quiz Maker', "easy-form" ),
1664 - 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', "easy-form" ),
1665 - 'desc_hidden' => __( 'Build an unlimited number of quizzes and questions.', "easy-form" ),
1981 + 'name' => __( 'Quiz Maker', 'chart-builder' ),
1982 + 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', 'chart-builder' ),
1983 + 'desc_hidden' => __( 'Build an unlimited number of quizzes and questions.', 'chart-builder' ),
1666 1984 'wporg' => 'https://wordpress.org/plugins/quiz-maker/',
1667 1985 'buy_now' => 'https://ays-pro.com/wordpress/quiz-maker/',
1668 1986 'url' => $plugin_url_arr['quiz-maker'],
1669 1987 ),
@@ -1703,9 +2021,9 @@
1703 2021 'buy_now' => 'https://ays-pro.com/wordpress/secure-copy-content-protection/',
1704 2022 'url' => $plugin_url_arr['secure-copy-content-protection'],
1705 2023 ),
1706 2024 'gallery-photo-gallery/gallery-photo-gallery.php' => array(
1707 - 'icon' => $images_url . 'icon-gallery-128x128.jpg',
2025 + 'icon' => $images_url . 'icon-gallery-128x128.png',
1708 2026 'name' => __( 'Gallery Photo Gallery', 'chart-builder' ),
1709 2027 'desc' => __( 'Create unlimited galleries and include unlimited images in those galleries.', 'chart-builder' ),
1710 2028 'desc_hidden' => __( 'Represent images in an attractive way. Attract people with your own single and multiple free galleries from your photo library.', 'chart-builder' ),
1711 2029 'wporg' => 'https://wordpress.org/plugins/gallery-photo-gallery/',
@@ -1762,9 +2080,10 @@
1762 2080 if ( is_wp_error( $call_api ) ) {
1763 2081 $api_error = $call_api->get_error_message();
1764 2082 } else {
1765 2083
1766 - //echo $call_api; // everything ##
2084 + //echo $call_api;
2085 + // everything ##
1767 2086 if ( ! empty( $call_api->version ) ) {
1768 2087 $version_latest = $call_api->version;
1769 2088 }
1770 2089 }
@@ -1904,9 +2223,9 @@
1904 2223 <span aria-hidden="true" class="dashicons dashicons-external"></span>
1905 2224 </a>';
1906 2225 }
1907 2226 $content .='
1908 - <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', $this->plugin_name) .'</a>
2227 + <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', 'chart-builder') .'</a>
1909 2228 </div>
1910 2229 </div>';
1911 2230 }
1912 2231 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
@@ -1912,9 +2231,9 @@
1912 2231 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
1913 2232 $content.= '<input type="hidden" id="ays_chart_ajax_install_plugin_nonce" name="ays_chart_ajax_install_plugin_nonce" value="'. $install_plugin_nonce .'">';
1914 2233 $content.= '</div>';
1915 2234
1916 - echo $content;
2235 + echo html_entity_decode($content);
1917 2236 }
1918 2237
1919 2238 /**
1920 2239 * Returns the data from Quiz maker.
@@ -1923,9 +2242,9 @@
1923 2242 */
1924 2243 public function fetch_quiz_maker_data(){
1925 2244 check_ajax_referer( 'cbuilder-fetch-quiz-maker-data', 'security' );
1926 2245
1927 - $params = $_POST['params'];
2246 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1928 2247 if ( !isset($params) || empty($params) ) {
1929 2248 return array(
1930 2249 'success' => false,
1931 2250 'data' => array(
@@ -2047,9 +2366,9 @@
2047 2366 */
2048 2367 public function save_quiz_maker_data() {
2049 2368 check_ajax_referer( 'cbuilder-save-quiz-maker-data', 'security' );
2050 2369
2051 - $params = $_POST['params'];
2370 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
2052 2371 if ( !isset($params) || empty($params) ) {
2053 2372 return array(
2054 2373 'success' => false,
2055 2374 'data' => array(
@@ -2163,9 +2482,9 @@
2163 2482 'data' => array(
2164 2483 'msg' => __( 'Data was successfully saved.', "chart-builder" )
2165 2484 )
2166 2485 );
2167 - }
2486 + }
2168 2487
2169 2488 /**
2170 2489 * Chart page action hooks
2171 2490 */
@@ -2209,9 +2528,9 @@
2209 2528
2210 2529 $sources[] = $content;
2211 2530 }
2212 2531 $content_for_escape = implode('' , $sources );
2213 - echo html_entity_decode(esc_html( $content_for_escape ));
2532 + echo html_entity_decode( esc_html($content_for_escape) );
2214 2533 }
2215 2534
2216 2535 public function source_contents_import_from_csv_settings( $sources, $args ){
2217 2536 $html_class_prefix = $args['html_class_prefix'];
@@ -2223,25 +2542,25 @@
2223 2542 <div class="ays-pro-features-v2-big-buttons-box">
2224 2543 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2225 2544 <div class="ays-pro-features-v2-video-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24_Hover.svg"></div>
2226 2545 <div class="ays-pro-features-v2-video-text">
2227 - <?php echo __("Watch Video" , "chart-builder"); ?>
2546 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2228 2547 </div>
2229 2548 </a>
2230 2549 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2231 2550 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
2232 2551 <div class="ays-pro-features-v2-upgrade-text">
2233 - <?php echo __("Upgrade" , "chart-builder"); ?>
2552 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2234 2553 </div>
2235 2554 </a>
2236 2555 </div>
2237 - <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main">
2556 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main ays-accordion-data-main-wrap">
2238 2557 <div class="<?php echo esc_attr($html_class_prefix) ?>file-import-form">
2239 - <h6><?php echo __("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6>
2558 + <h6><?php echo esc_html__("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6>
2240 2559 <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>import-files-file-type">
2241 2560 <option value="csv">CSV File</option>
2242 2561 </select>
2243 - <span style="display: block; font-style: italic; color: gray; font-size: 12px; margin: 5px 0;" class="<?php echo esc_attr($html_class_prefix) ?>small-hint-text"><?php echo __("Choose the format of the file you are going to import.", "chart-builder"); ?></span>
2562 + <span style="display: block; font-style: italic; color: gray; font-size: 12px; margin: 5px 0;" class="<?php echo esc_attr($html_class_prefix) ?>small-hint-text"><?php echo esc_html__("Choose the format of the file you are going to import.", "chart-builder"); ?></span>
2244 2563 <p class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example" style="font-size: 15px; font-style: italic;">Example:
2245 2564 <a class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example-link <?php echo esc_attr($html_class_prefix) ?>csv-export-example-link-other-types" style="cursor: pointer;">example.csv</a>
2246 2565 </p>
2247 2566 <div>
@@ -2250,16 +2569,16 @@
2250 2569 <div class='ays-chart-file-import-success'></div>
2251 2570 <div class='ays-chart-file-import-error'></div>
2252 2571 <div class="ays-chart-buttons-group">
2253 2572 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-fetch">
2254 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2573 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2255 2574 </button>
2256 2575 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-show-on-chart">
2257 2576 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.722 6.59785C12.2407 3.47754 10.0017 1.90723 7.00009 1.90723C3.99697 1.90723 1.75947 3.47754 0.278215 6.59941C0.218802 6.72522 0.187988 6.86263 0.187988 7.00176C0.187988 7.14089 0.218802 7.27829 0.278215 7.4041C1.75947 10.5244 3.99853 12.0947 7.00009 12.0947C10.0032 12.0947 12.2407 10.5244 13.722 7.40254C13.8423 7.14941 13.8423 6.85566 13.722 6.59785ZM7.00009 10.9697C4.47978 10.9697 2.63447 9.6916 1.3329 7.00098C2.63447 4.31035 4.47978 3.03223 7.00009 3.03223C9.5204 3.03223 11.3657 4.31035 12.6673 7.00098C11.3673 9.6916 9.52197 10.9697 7.00009 10.9697ZM6.93759 4.25098C5.41884 4.25098 4.18759 5.48223 4.18759 7.00098C4.18759 8.51973 5.41884 9.75098 6.93759 9.75098C8.45634 9.75098 9.68759 8.51973 9.68759 7.00098C9.68759 5.48223 8.45634 4.25098 6.93759 4.25098ZM6.93759 8.75098C5.9704 8.75098 5.18759 7.96816 5.18759 7.00098C5.18759 6.03379 5.9704 5.25098 6.93759 5.25098C7.90478 5.25098 8.68759 6.03379 8.68759 7.00098C8.68759 7.96816 7.90478 8.75098 6.93759 8.75098Z" fill="#14524A" /></svg>
2258 - <?php echo __( 'Preview', "chart-builder" ); ?>
2577 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2259 2578 </button>
2260 2579 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-save">
2261 - <?php echo __( 'Save data', "chart-builder" ); ?>
2580 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2262 2581 </button>
2263 2582 </div>
2264 2583 </div>
2265 2584 </div>
@@ -2289,38 +2608,38 @@
2289 2608 <div class="ays-pro-features-v2-big-buttons-box">
2290 2609 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2291 2610 <div class="ays-pro-features-v2-video-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24_Hover.svg"></div>
2292 2611 <div class="ays-pro-features-v2-video-text">
2293 - <?php echo __("Watch Video" , "chart-builder"); ?>
2612 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2294 2613 </div>
2295 2614 </a>
2296 2615 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2297 2616 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
2298 2617 <div class="ays-pro-features-v2-upgrade-text">
2299 - <?php echo __("Upgrade" , "chart-builder"); ?>
2618 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2300 2619 </div>
2301 2620 </a>
2302 2621 </div>
2303 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2304 - <div class="<?= $html_class_prefix ?>chart-source-data-main">
2622 + <div class="<?php echo esc_attr( $html_class_prefix ) ?>source-data-main-wrap ays-accordion-data-main-wrap ">
2623 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main">
2305 2624 <div id="ays-chart-db-query">
2306 - <div class="<?= $html_class_prefix ?>-db-query-form">
2625 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2307 2626 <div id="db-query-form">
2308 2627 <input type="hidden" name="chart_id" value="1">
2309 - <textarea name="query" class="<?= $html_class_prefix ?>db-query" placeholder="<?php echo __( "Add your query here.", $this->plugin_name ); ?>"></textarea>
2628 + <textarea name="query" class="<?php echo esc_attr($html_class_prefix) ?>db-query" placeholder="<?php echo esc_html__( "Add your query here.", 'chart-builder' ); ?>"></textarea>
2310 2629 <div class='db-wizard-success'></div>
2311 2630 <div class='db-wizard-error'></div>
2312 2631 </div>
2313 2632 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2314 2633 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-fetch">
2315 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2634 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2316 2635 </button>
2317 2636 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-show-on-chart">
2318 2637 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.722 6.59785C12.2407 3.47754 10.0017 1.90723 7.00009 1.90723C3.99697 1.90723 1.75947 3.47754 0.278215 6.59941C0.218802 6.72522 0.187988 6.86263 0.187988 7.00176C0.187988 7.14089 0.218802 7.27829 0.278215 7.4041C1.75947 10.5244 3.99853 12.0947 7.00009 12.0947C10.0032 12.0947 12.2407 10.5244 13.722 7.40254C13.8423 7.14941 13.8423 6.85566 13.722 6.59785ZM7.00009 10.9697C4.47978 10.9697 2.63447 9.6916 1.3329 7.00098C2.63447 4.31035 4.47978 3.03223 7.00009 3.03223C9.5204 3.03223 11.3657 4.31035 12.6673 7.00098C11.3673 9.6916 9.52197 10.9697 7.00009 10.9697ZM6.93759 4.25098C5.41884 4.25098 4.18759 5.48223 4.18759 7.00098C4.18759 8.51973 5.41884 9.75098 6.93759 9.75098C8.45634 9.75098 9.68759 8.51973 9.68759 7.00098C9.68759 5.48223 8.45634 4.25098 6.93759 4.25098ZM6.93759 8.75098C5.9704 8.75098 5.18759 7.96816 5.18759 7.00098C5.18759 6.03379 5.9704 5.25098 6.93759 5.25098C7.90478 5.25098 8.68759 6.03379 8.68759 7.00098C8.68759 7.96816 7.90478 8.75098 6.93759 8.75098Z" fill="#14524A" /></svg>
2319 - <?php echo __( 'Preview', "chart-builder" ); ?>
2638 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2320 2639 </button>
2321 2640 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-save">
2322 - <?php echo __( 'Save data', "chart-builder" ); ?>
2641 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2323 2642 </button>
2324 2643 </div>
2325 2644 </div>
2326 2645 <div class="db-wizard-hints">
@@ -2325,9 +2644,18 @@
2325 2644 </div>
2326 2645 <div class="db-wizard-hints">
2327 2646 <ul>
2328 2647 <!-- <li><//?php echo sprintf( __( 'For examples of queries and links to resources that you can use with this feature, please click %1$shere%2$s', $this->plugin_name ), '<a href="' . '#' . '" target="_blank">', '</a>' ); ?></li> -->
2329 - <li><?php echo sprintf( __( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', $this->plugin_name ), '<span class="ays-chart-emboss">', '</span>' ); ?></li>
2648 + <li>
2649 + <?php
2650 + echo sprintf(
2651 + /* translators: %1$s and %2$s are HTML span tags for styling. */
2652 + esc_html__( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', 'chart-builder' ),
2653 + '<span class="ays-chart-emboss">',
2654 + '</span>'
2655 + );
2656 + ?>
2657 + </li>
2330 2658 </ul>
2331 2659 </div>
2332 2660 </div>
2333 2661 </div>
@@ -2335,9 +2663,9 @@
2335 2663 </div>
2336 2664 <?php
2337 2665 $content = ob_get_clean();
2338 2666
2339 - $title = __( 'Connect to Database', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" title="' . __("Insert the Database query and the appropriate information from your Database will be displayed in the chart.",$this->plugin_name) . '">
2667 + $title = __( 'Connect to Database', 'chart-builder') . ' <a class="ays_help" data-bs-toggle="tooltip" title="' . __("Insert the Database query and the appropriate information from your Database will be displayed in the chart.", 'chart-builder') . '">
2340 2668 <i class="ays_fa ays_fa_info_circle"></i>
2341 2669 </a>';
2342 2670
2343 2671 $sources['import_from_db'] = array(
@@ -2358,16 +2686,16 @@
2358 2686 <div class="ays-pro-features-v2-big-buttons-box">
2359 2687 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2360 2688 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
2361 2689 <div class="ays-pro-features-v2-upgrade-text">
2362 - <?php echo __("Upgrade" , "chart-builder"); ?>
2690 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2363 2691 </div>
2364 2692 </a>
2365 2693 </div>
2366 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2367 - <div class="<?= $html_class_prefix ?>chart-source-data-main">
2694 + <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap ays-accordion-data-main-wrap ">
2695 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main">
2368 2696 <div class="form-group row mb-2">
2369 - <div class="col-sm-5 <?php echo esc_attr($html_class_prefix) ?>option-title">
2697 + <div class="col-sm-8 <?php echo esc_attr($html_class_prefix) ?>option-title">
2370 2698 <label class="form-label">
2371 2699 <?php echo esc_html(__('Use custom database settings for this chart', "chart-builder")); ?>
2372 2700 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __(".","chart-builder") ); ?>">
2373 2701 <i class="ays_fa ays_fa_info_circle"></i>
@@ -2373,9 +2701,9 @@
2373 2701 <i class="ays_fa ays_fa_info_circle"></i>
2374 2702 </a>
2375 2703 </label>
2376 2704 </div>
2377 - <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
2705 + <div class="col-sm-3 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
2378 2706 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
2379 2707 <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" type="checkbox" />
2380 2708 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
2381 2709 </label>
@@ -2381,25 +2709,25 @@
2381 2709 </label>
2382 2710 </div>
2383 2711 </div>
2384 2712 <div id="ays-chart-external-db-query">
2385 - <div class="<?= $html_class_prefix ?>-db-query-form">
2713 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2386 2714 <div id="external-db-query-form">
2387 2715 <input type="hidden" name="chart_id" value="1">
2388 - <textarea name="query" class="<?= $html_class_prefix ?>external-db-query" placeholder="<?php echo __( "Add your query here.", $this->plugin_name ); ?>"></textarea>
2716 + <textarea name="query" class="<?php echo esc_attr($html_class_prefix) ?>external-db-query" placeholder="<?php echo esc_html__( "Add your query here.", 'chart-builder' ); ?>"></textarea>
2389 2717 <div class='db-wizard-success'></div>
2390 2718 <div class='db-wizard-error'></div>
2391 2719 </div>
2392 2720 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2393 2721 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-fetch">
2394 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2722 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2395 2723 </button>
2396 2724 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-show-on-chart">
2397 2725 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.722 6.59785C12.2407 3.47754 10.0017 1.90723 7.00009 1.90723C3.99697 1.90723 1.75947 3.47754 0.278215 6.59941C0.218802 6.72522 0.187988 6.86263 0.187988 7.00176C0.187988 7.14089 0.218802 7.27829 0.278215 7.4041C1.75947 10.5244 3.99853 12.0947 7.00009 12.0947C10.0032 12.0947 12.2407 10.5244 13.722 7.40254C13.8423 7.14941 13.8423 6.85566 13.722 6.59785ZM7.00009 10.9697C4.47978 10.9697 2.63447 9.6916 1.3329 7.00098C2.63447 4.31035 4.47978 3.03223 7.00009 3.03223C9.5204 3.03223 11.3657 4.31035 12.6673 7.00098C11.3673 9.6916 9.52197 10.9697 7.00009 10.9697ZM6.93759 4.25098C5.41884 4.25098 4.18759 5.48223 4.18759 7.00098C4.18759 8.51973 5.41884 9.75098 6.93759 9.75098C8.45634 9.75098 9.68759 8.51973 9.68759 7.00098C9.68759 5.48223 8.45634 4.25098 6.93759 4.25098ZM6.93759 8.75098C5.9704 8.75098 5.18759 7.96816 5.18759 7.00098C5.18759 6.03379 5.9704 5.25098 6.93759 5.25098C7.90478 5.25098 8.68759 6.03379 8.68759 7.00098C8.68759 7.96816 7.90478 8.75098 6.93759 8.75098Z" fill="#14524A" /></svg>
2398 - <?php echo __( 'Preview', "chart-builder" ); ?>
2726 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2399 2727 </button>
2400 2728 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-save">
2401 - <?php echo __( 'Save data', "chart-builder" ); ?>
2729 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2402 2730 </button>
2403 2731 </div>
2404 2732 </div>
2405 2733 <div class="db-wizard-hints">
@@ -2404,9 +2732,18 @@
2404 2732 </div>
2405 2733 <div class="db-wizard-hints">
2406 2734 <ul>
2407 2735 <!-- <li><//?php echo sprintf( __( 'For examples of queries and links to resources that you can use with this feature, please click %1$shere%2$s', $this->plugin_name ), '<a href="' . '#' . '" target="_blank">', '</a>' ); ?></li> -->
2408 - <li><?php echo sprintf( __( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', $this->plugin_name ), '<span class="ays-chart-emboss">', '</span>' ); ?></li>
2736 + <li>
2737 + <?php
2738 + echo sprintf(
2739 + /* translators: %1$s and %2$s are HTML span tags for styling. */
2740 + esc_html__( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', 'chart-builder' ),
2741 + '<span class="ays-chart-emboss">',
2742 + '</span>'
2743 + );
2744 + ?>
2745 + </li>
2409 2746 </ul>
2410 2747 </div>
2411 2748 </div>
2412 2749 </div>
@@ -2414,9 +2751,9 @@
2414 2751 </div>
2415 2752 <?php
2416 2753 $content = ob_get_clean();
2417 2754
2418 - $title = __( 'Connect to External Database', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" title="' . __("Insert the Database query and fetch data from an external database.", $this->plugin_name) . '">
2755 + $title = __( 'Connect to External Database', 'chart-builder' ) . ' <a class="ays_help" data-bs-toggle="tooltip" title="' . __("Insert the Database query and fetch data from an external database.", 'chart-builder') . '">
2419 2756 <i class="ays_fa ays_fa_info_circle"></i>
2420 2757 </a>';
2421 2758
2422 2759 $sources['import_from_external_db'] = array(
@@ -2450,35 +2787,42 @@
2450 2787 // );
2451 2788
2452 2789 return $sources;
2453 2790 }
2791 + $quizes = $wpdb->get_results( // phpcs:ignore
2792 + $wpdb->prepare(
2793 + "SELECT `title`, `id` FROM {$wpdb->prefix}aysquiz_quizes
2794 + WHERE `published` = %d AND `question_ids` <> %s",
2795 + 1,
2796 + ''
2797 + ),
2798 + ARRAY_A
2799 + );
2800 +
2454 2801
2455 - $sql = "SELECT `title`, `id` FROM " . $wpdb->prefix . "aysquiz_quizes WHERE `published` = 1 AND `question_ids` <> ''";
2456 - $quizes = $wpdb->get_results($sql, "ARRAY_A");
2457 -
2458 2802 ob_start();
2459 2803 ?>
2460 2804 <div class="ays-accordion-data-main-wrap">
2461 2805 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main cb-changable-tab cb-pie_chart-tab cb-donut_chart-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
2462 2806 <div id="<?php echo esc_attr($html_class_prefix) ?>quiz-maker-form">
2463 - <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?= $chart_id ?>">
2464 - <div class="<?= $html_class_prefix ?>select-quiz-maker-data-query-container" id="<?= $html_class_prefix ?>quiz-queries">
2465 - <a class="ays_help <?= $html_class_prefix ?>quiz-query-tooltip" data-bs-toggle="tooltip" data-bs-html="true" title="<?php echo isset($quiz_query) ? $quiz_query_tooltips[$quiz_query] : __( 'Select a query to display quiz data.', $this->plugin_name ) ?>">
2807 + <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?php echo esc_attr($chart_id) ?>">
2808 + <div class="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-data-query-container" id="<?php echo esc_attr($html_class_prefix) ?>quiz-queries">
2809 + <a class="ays_help <?php echo esc_attr($html_class_prefix) ?>quiz-query-tooltip" data-bs-toggle="tooltip" data-bs-html="true" title="<?php echo isset($quiz_query) ? esc_attr($quiz_query_tooltips[$quiz_query]) : esc_html__( 'Select a query to display quiz data.', 'chart-builder' ) ?>">
2466 2810 <i class="ays_fa ays_fa_info_circle"></i>
2467 2811 </a>
2468 - <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-data-query" name="<?= $html_name_prefix ?>quiz_query">
2469 - <option value=""><?= __( "Select query", "chart-builder" ) ?></option>
2812 + <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-data-query" name="<?php echo esc_attr($html_name_prefix) ?>quiz_query">
2813 + <option value=""><?php echo esc_html__( "Select query", "chart-builder" ) ?></option>
2470 2814 <?php foreach ( $quiz_queries as $id => $q):
2471 2815 $disabled = preg_replace('/[^0-9]/', '', $id) <= 6 ? "false" : "true" ; ?>
2472 - <option value="<?= $id ?>" <?= $quiz_query == $id ? 'selected' : '' ?> <?php echo 'is-pro="'.$disabled.'"'; ?>><?= $q ?></option>
2816 + <option value="<?php echo esc_attr($id) ?>" <?php echo $quiz_query == $id ? 'selected' : '' ?> <?php echo 'is-pro="'.esc_attr($disabled).'"'; ?>><?php echo esc_attr($q) ?></option>
2473 2817 <?php endforeach; ?>
2474 2818 </select>
2475 2819 </div>
2476 2820 <div class="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz-container">
2477 - <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz" name="<?= $html_name_prefix ?>quiz_id">
2478 - <option value="0"><?= __( "Select quiz", "chart-builder" ) ?></option>
2821 + <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz" name="<?php echo esc_attr($html_name_prefix) ?>quiz_id">
2822 + <option value="0"><?php echo esc_html__( "Select quiz", "chart-builder" ) ?></option>
2479 2823 <?php foreach ( $quizes as $quiz): ?>
2480 - <option value="<?= $quiz['id'] ?>" <?= $quiz_id == $quiz['id'] ? 'selected' : '' ?> ><?= $quiz['title'] ?></option>
2824 + <option value="<?php echo esc_attr($quiz['id']) ?>" <?php echo $quiz_id == $quiz['id'] ? 'selected' : '' ?> ><?php echo esc_html($quiz['title'] )?></option>
2481 2825 <?php endforeach; ?>
2482 2826 </select>
2483 2827 </div>
2484 2828 <div id="ays-chart-quiz-maker-success"></div>
@@ -2484,21 +2828,21 @@
2484 2828 <div id="ays-chart-quiz-maker-success"></div>
2485 2829 <div id="ays-chart-quiz-maker-error"></div>
2486 2830 <div class="ays-chart-buttons-group">
2487 2831 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-fetch">
2488 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2832 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2489 2833 </button>
2490 2834 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-show-on-chart">
2491 2835 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.722 6.59785C12.2407 3.47754 10.0017 1.90723 7.00009 1.90723C3.99697 1.90723 1.75947 3.47754 0.278215 6.59941C0.218802 6.72522 0.187988 6.86263 0.187988 7.00176C0.187988 7.14089 0.218802 7.27829 0.278215 7.4041C1.75947 10.5244 3.99853 12.0947 7.00009 12.0947C10.0032 12.0947 12.2407 10.5244 13.722 7.40254C13.8423 7.14941 13.8423 6.85566 13.722 6.59785ZM7.00009 10.9697C4.47978 10.9697 2.63447 9.6916 1.3329 7.00098C2.63447 4.31035 4.47978 3.03223 7.00009 3.03223C9.5204 3.03223 11.3657 4.31035 12.6673 7.00098C11.3673 9.6916 9.52197 10.9697 7.00009 10.9697ZM6.93759 4.25098C5.41884 4.25098 4.18759 5.48223 4.18759 7.00098C4.18759 8.51973 5.41884 9.75098 6.93759 9.75098C8.45634 9.75098 9.68759 8.51973 9.68759 7.00098C9.68759 5.48223 8.45634 4.25098 6.93759 4.25098ZM6.93759 8.75098C5.9704 8.75098 5.18759 7.96816 5.18759 7.00098C5.18759 6.03379 5.9704 5.25098 6.93759 5.25098C7.90478 5.25098 8.68759 6.03379 8.68759 7.00098C8.68759 7.96816 7.90478 8.75098 6.93759 8.75098Z" fill="#14524A" /></svg>
2492 - <?php echo __( 'Preview', "chart-builder" ); ?>
2836 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2493 2837 </button>
2494 2838 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-save">
2495 - <?php echo __( 'Save data', "chart-builder" ); ?>
2839 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2496 2840 </button>
2497 2841 </div>
2498 2842 </div>
2499 2843 <div>
2500 - <a href="https://www.youtube.com/watch?v=vqx76dw6NC8" target="_blank" style="text-decoration:none;font-style:italic"><?php echo __('How to Connect Quizzes to Charts', 'chart-builder'); ?></a>
2844 + <a href="https://www.youtube.com/watch?v=vqx76dw6NC8" target="_blank" style="text-decoration:none;font-style:italic"><?php echo esc_html__('How to Connect Quizzes to Charts', 'chart-builder'); ?></a>
2501 2845 </div>
2502 2846 </div>
2503 2847 </div>
2504 2848 <?php
@@ -2503,11 +2847,18 @@
2503 2847 </div>
2504 2848 <?php
2505 2849 $content = ob_get_clean();
2506 2850
2507 - $title = sprintf( __( 'Get Quiz Maker data', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' . __("By using this option, you can display the quiz statistics by charts.%s %sNote:%s The Quiz Maker plugin must be active.",$this->plugin_name) . '">
2508 - <i class="ays_fa ays_fa_info_circle"></i>
2509 - </a>', '<br>', '<b>', '</b>');
2851 + $title = sprintf(
2852 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
2853 + __( 'Get Quiz Maker data', 'chart-builder' ) .
2854 + ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' .
2855 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
2856 + __( 'By using this option, you can display the quiz statistics by charts.%1$s %2$sNote:%3$s The Quiz Maker plugin must be active.', 'chart-builder' ) . '">
2857 + <i class="ays_fa ays_fa_info_circle"></i>
2858 + </a>',
2859 + '<br>', '<b>', '</b>'
2860 + );
2510 2861 $sources['quiz_maker'] = array(
2511 2862 'content' => $content,
2512 2863 'title' => $title
2513 2864 );
@@ -2530,23 +2881,23 @@
2530 2881 <div class="ays-pro-features-v2-video-button"></div>
2531 2882 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2532 2883 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
2533 2884 <div class="ays-pro-features-v2-upgrade-text">
2534 - <?php echo __("Upgrade" , "chart-builder"); ?>
2885 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2535 2886 </div>
2536 2887 </a>
2537 2888 </div>
2538 - <div class="<?= $html_class_prefix ?>chart-source-data-main">
2889 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main ays-accordion-data-main-wrap ">
2539 2890 <div id="ays-chart-woocommerce-datas">
2540 - <div class="<?= $html_class_prefix ?>woocommerce-datas-form">
2891 + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-form">
2541 2892 <div id="woocommerce-datas-form">
2542 - <input type="hidden" name="chart_id" value="<?= $chart_id ?>">
2543 - <div class="<?= $html_class_prefix ?>woocommerce-datas-query-container" id="<?= $html_class_prefix ?>woocommerce-datas-container-id" >
2544 - <a class="ays_help <?= $html_class_prefix ?>woocommerce-datas-tooltip" data-bs-toggle="tooltip" data-bs-html="true" title="<?php echo __( 'Select a query to display data.', $this->plugin_name ) ?>">
2893 + <input type="hidden" name="chart_id" value="<?php echo esc_attr( $chart_id )?>">
2894 + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-query-container" id="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-container-id" >
2895 + <a class="ays_help <?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-tooltip" data-bs-toggle="tooltip" data-bs-html="true" title="<?php echo esc_html__( 'Select a query to display data.', 'chart-builder' ) ?>">
2545 2896 <i class="ays_fa ays_fa_info_circle"></i>
2546 2897 </a>
2547 - <select class="form-select" style="max-width: none;" id="<?= $html_class_prefix ?>woocommerce-datas-select" name="<?php echo esc_attr($html_name_prefix); ?>settings[woocommerce_data_id]">
2548 - <option value=""><?= __( 'Select query', $this->plugin_name ) ?></option>
2898 + <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-select" name="<?php echo esc_attr($html_name_prefix); ?>settings[woocommerce_data_id]">
2899 + <option value=""><?php echo esc_html__( 'Select query', 'chart-builder') ?></option>
2549 2900 </select>
2550 2901 </div>
2551 2902 <div class='ays-chart-woocommerce-datas-success'></div>
2552 2903 <div class='ays-chart-woocommerce-datas-error'></div>
@@ -2552,16 +2903,16 @@
2552 2903 <div class='ays-chart-woocommerce-datas-error'></div>
2553 2904 </div>
2554 2905 <div class="ays-chart-buttons-group">
2555 2906 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-fetch">
2556 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2907 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2557 2908 </button>
2558 2909 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-show-on-chart">
2559 2910 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.722 6.59785C12.2407 3.47754 10.0017 1.90723 7.00009 1.90723C3.99697 1.90723 1.75947 3.47754 0.278215 6.59941C0.218802 6.72522 0.187988 6.86263 0.187988 7.00176C0.187988 7.14089 0.218802 7.27829 0.278215 7.4041C1.75947 10.5244 3.99853 12.0947 7.00009 12.0947C10.0032 12.0947 12.2407 10.5244 13.722 7.40254C13.8423 7.14941 13.8423 6.85566 13.722 6.59785ZM7.00009 10.9697C4.47978 10.9697 2.63447 9.6916 1.3329 7.00098C2.63447 4.31035 4.47978 3.03223 7.00009 3.03223C9.5204 3.03223 11.3657 4.31035 12.6673 7.00098C11.3673 9.6916 9.52197 10.9697 7.00009 10.9697ZM6.93759 4.25098C5.41884 4.25098 4.18759 5.48223 4.18759 7.00098C4.18759 8.51973 5.41884 9.75098 6.93759 9.75098C8.45634 9.75098 9.68759 8.51973 9.68759 7.00098C9.68759 5.48223 8.45634 4.25098 6.93759 4.25098ZM6.93759 8.75098C5.9704 8.75098 5.18759 7.96816 5.18759 7.00098C5.18759 6.03379 5.9704 5.25098 6.93759 5.25098C7.90478 5.25098 8.68759 6.03379 8.68759 7.00098C8.68759 7.96816 7.90478 8.75098 6.93759 8.75098Z" fill="#14524A" /></svg>
2560 - <?php echo __( 'Preview', "chart-builder" ); ?>
2911 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2561 2912 </button>
2562 2913 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-save">
2563 - <?php echo __( 'Save data', "chart-builder" ); ?>
2914 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2564 2915 </button>
2565 2916 </div>
2566 2917 </div>
2567 2918 </div>
@@ -2568,12 +2919,19 @@
2568 2919 </div>
2569 2920 </div>
2570 2921 <?php
2571 2922 $content = ob_get_clean();
2572 -
2573 - $title = sprintf( __( 'Get WooCommerce data', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' . __("By using this option, you can display the WooCommerce statistics by charts.%s %sNote:%s The WooCommerce plugin must be active.",$this->plugin_name) . '">
2574 - <i class="ays_fa ays_fa_info_circle"></i>
2575 - </a>', '<br>', '<b>', '</b>');
2923 +
2924 + $title = sprintf(
2925 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
2926 + esc_html__( 'Get WooCommerce data', 'chart-builder' ) .
2927 + ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' .
2928 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
2929 + __( 'By using this option, you can display the WooCommerce statistics by charts.%1$s %2$sNote:%3$s The WooCommerce plugin must be active.', 'chart-builder' ) . '">
2930 + <i class="ays_fa ays_fa_info_circle"></i>
2931 + </a>',
2932 + '<br>', '<b>', '</b>'
2933 + );
2576 2934 $sources['woocommerce'] = array(
2577 2935 'content' => $content,
2578 2936 'title' => $title
2579 2937 );
@@ -2587,9 +2945,10 @@
2587 2945 $source = $args['source'];
2588 2946 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2589 2947 $settings = $args['settings'];
2590 2948 $source_chart_type = $args['source_chart_type'];
2591 - $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : 'add';
2949 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
2950 + $action = isset($_GET['action']) ? sanitize_text_field(wp_unslash($_GET['action'])) : 'add';
2592 2951
2593 2952 if (isset($source) && !empty($source)) {
2594 2953 if ( !isset( $source[0] ) ) {
2595 2954 if (count($source[1]) > 2) {
@@ -2594,15 +2953,15 @@
2594 2953 if ( !isset( $source[0] ) ) {
2595 2954 if (count($source[1]) > 2) {
2596 2955 $titles = array();
2597 2956 for ($i = 0; $i < count($source[1]); $i++) {
2598 - array_push($titles, __("Title", $this->plugin_name).$i);
2957 + array_push($titles, __("Title", 'chart-builder').$i);
2599 2958 }
2600 2959 $source[0] = $titles;
2601 2960 } else {
2602 2961 $source[0] = array(
2603 - __("Country", $this->plugin_name),
2604 - __("Population", $this->plugin_name),
2962 + __("Country", 'chart-builder'),
2963 + __("Population", 'chart-builder'),
2605 2964 );
2606 2965 }
2607 2966
2608 2967 ksort($source);
@@ -2624,9 +2983,9 @@
2624 2983 ?>
2625 2984 <div class="ays-accordion-data-main-wrap">
2626 2985 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2627 2986 <?php if($source_chart_type != 'org_chart'): ?>
2628 - <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?= $html_class_prefix ?>chart-source-data-manual cb-changable-manual cb-pie_chart-manual cb-bar_chart-manual cb-column_chart-manual cb-line_chart-manual cb-donut_chart-manual display_none">
2987 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?php echo esc_attr( $html_class_prefix) ?>chart-source-data-manual cb-changable-manual cb-pie_chart-manual cb-bar_chart-manual cb-column_chart-manual cb-line_chart-manual cb-donut_chart-manual display_none">
2629 2988 <!-- <div class="<//?= $html_class_prefix ?>icons-box">
2630 2989 <img class="<//?= $html_class_prefix ?>add-new-row" src="<//?php echo CHART_BUILDER_ADMIN_URL; ?>/images/icons/add-circle-outline.svg">
2631 2990 </div> -->
2632 2991 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
@@ -2637,14 +2996,14 @@
2637 2996 if ($source_id == 0): ?>
2638 2997 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2639 2998 <div class="ays-chart-empty-data-table-cell"></div>
2640 2999 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2641 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
3000 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-box <?php echo esc_attr($html_class_prefix) ?>chart-source-title-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2642 3001 <svg class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-remove-block <?php echo esc_attr($html_class_prefix) ?>chart-source-data-remove-col" data-trigger="hover" data-bs-toggle="tooltip" title="Delete column" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" width="10px">
2643 3002 <path d="M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" style="fill: #b8b8b8;" />
2644 3003 </svg>
2645 3004 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2646 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" <?php echo $each_source_id == 0 ? "style='min-width:100px'" : "" ?>>
3005 + <input type="text" class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo esc_attr(stripslashes($each_source_value)); ?>" <?php echo $each_source_id == 0 ? "style='min-width:100px'" : "" ?>>
2647 3006 <?php if ($each_source_id !== 0): ?>
2648 3007 <svg class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-sort" data-sort-order="asc" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512">
2649 3008 <path d="M137.4 41.4c12.5-12.5 32.8-12.5 45.3 0l128 128c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8H32c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9l128-128zm0 429.3l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128c-12.5 12.5-32.8 12.5-45.3 0z" style="fill: #b8b8b8;" />
2650 3009 </svg>
@@ -2666,14 +3025,14 @@
2666 3025 </svg>
2667 3026 </div>
2668 3027 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2669 3028 <?php if ($each_source_id == 0): ?>
2670 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-data-name-input-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2671 - <input type="text" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo htmlspecialchars(esc_attr($each_source_value)); ?>">
3029 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-box <?php echo esc_attr($html_class_prefix) ?>chart-source-data-name-input-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
3030 + <input type="text" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo esc_attr(htmlspecialchars($each_source_value)); ?>">
2672 3031 </div>
2673 3032 <?php else: ?>
2674 3033 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-box <?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-number" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2675 - <input type="number" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" step="any">
3034 + <input type="number" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo esc_attr(stripslashes($each_source_value)); ?>" step="any">
2676 3035 </div>
2677 3036 <?php endif; ?>
2678 3037 <?php endforeach; ?>
2679 3038 </div>
@@ -2680,16 +3039,16 @@
2680 3039 <?php endif; ?>
2681 3040 <?php endif; ?>
2682 3041 <?php endforeach; ?>
2683 3042 <?php else:?>
2684 - <div class="<?= $html_class_prefix ?>chart-source-data-edit-block">
3043 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block">
2685 3044 <div style="height: 63.11px; padding: 0 15px;"></div>
2686 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box">
3045 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-box <?php echo esc_attr($html_class_prefix) ?>chart-source-title-box">
2687 3046 <svg class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-remove-block <?php echo esc_attr($html_class_prefix) ?>chart-source-data-remove-col" data-trigger="hover" data-bs-toggle="tooltip" title="Delete column" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" width="10px">
2688 3047 <path d="M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" style="fill: #b8b8b8;" />
2689 3048 </svg>
2690 3049 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2691 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[0][]" style='min-width:100px'>
3050 + <input type="text" class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[0][]" style='min-width:100px'>
2692 3051 <svg class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-sort" data-sort-order="asc" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512">
2693 3052 <path d="M137.4 41.4c12.5-12.5 32.8-12.5 45.3 0l128 128c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8H32c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9l128-128zm0 429.3l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128c-12.5 12.5-32.8 12.5-45.3 0z" style="fill: #b8b8b8;" />
2694 3053 </svg>
2695 3054 </div>
@@ -2716,30 +3075,30 @@
2716 3075 <?php endif; ?>
2717 3076 </div>
2718 3077 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-column-box cb-changable-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt display_none">
2719 3078 <img class="<?php echo esc_attr($html_class_prefix) ?>add-new-column" src="<?php echo esc_url(CHART_BUILDER_ADMIN_URL); ?>/images/icons/add-circle-outline.svg">
2720 - <?php echo __( 'Add column', "chart-builder" ); ?>
3079 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2721 3080 </div>
2722 3081 </div>
2723 3082 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2724 3083 <img class="<?php echo esc_attr($html_class_prefix) ?>add-new-row" src="<?php echo esc_url(CHART_BUILDER_ADMIN_URL); ?>/images/icons/add-circle-outline.svg">
2725 - <?php echo __( 'Add row', "chart-builder" ); ?>
3084 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2726 3085 </div>
2727 3086 <br>
2728 3087 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns <?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttn">
2729 3088 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.722 6.59785C12.2407 3.47754 10.0017 1.90723 7.00009 1.90723C3.99697 1.90723 1.75947 3.47754 0.278215 6.59941C0.218802 6.72522 0.187988 6.86263 0.187988 7.00176C0.187988 7.14089 0.218802 7.27829 0.278215 7.4041C1.75947 10.5244 3.99853 12.0947 7.00009 12.0947C10.0032 12.0947 12.2407 10.5244 13.722 7.40254C13.8423 7.14941 13.8423 6.85566 13.722 6.59785ZM7.00009 10.9697C4.47978 10.9697 2.63447 9.6916 1.3329 7.00098C2.63447 4.31035 4.47978 3.03223 7.00009 3.03223C9.5204 3.03223 11.3657 4.31035 12.6673 7.00098C11.3673 9.6916 9.52197 10.9697 7.00009 10.9697ZM6.93759 4.25098C5.41884 4.25098 4.18759 5.48223 4.18759 7.00098C4.18759 8.51973 5.41884 9.75098 6.93759 9.75098C8.45634 9.75098 9.68759 8.51973 9.68759 7.00098C9.68759 5.48223 8.45634 4.25098 6.93759 4.25098ZM6.93759 8.75098C5.9704 8.75098 5.18759 7.96816 5.18759 7.00098C5.18759 6.03379 5.9704 5.25098 6.93759 5.25098C7.90478 5.25098 8.68759 6.03379 8.68759 7.00098C8.68759 7.96816 7.90478 8.75098 6.93759 8.75098Z" fill="#14524A" /></svg>
2730 - <?php echo __( 'Preview', "chart-builder" ); ?>
3089 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2731 3090 </button>
2732 3091 </div>
2733 3092 <?php endif; ?>
2734 - <div class="<?= $html_class_prefix ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
2735 - <div class="<?= $html_class_prefix ?>chart-source-data-content-org-type">
2736 - <ul id="<?= $html_class_prefix ?>chart-source-data-edit-tree-content">
3093 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
3094 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-org-type">
3095 + <ul id="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-tree-content">
2737 3096 </ul>
2738 3097 </div>
2739 3098 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns <?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttn">
2740 3099 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.722 6.59785C12.2407 3.47754 10.0017 1.90723 7.00009 1.90723C3.99697 1.90723 1.75947 3.47754 0.278215 6.59941C0.218802 6.72522 0.187988 6.86263 0.187988 7.00176C0.187988 7.14089 0.218802 7.27829 0.278215 7.4041C1.75947 10.5244 3.99853 12.0947 7.00009 12.0947C10.0032 12.0947 12.2407 10.5244 13.722 7.40254C13.8423 7.14941 13.8423 6.85566 13.722 6.59785ZM7.00009 10.9697C4.47978 10.9697 2.63447 9.6916 1.3329 7.00098C2.63447 4.31035 4.47978 3.03223 7.00009 3.03223C9.5204 3.03223 11.3657 4.31035 12.6673 7.00098C11.3673 9.6916 9.52197 10.9697 7.00009 10.9697ZM6.93759 4.25098C5.41884 4.25098 4.18759 5.48223 4.18759 7.00098C4.18759 8.51973 5.41884 9.75098 6.93759 9.75098C8.45634 9.75098 9.68759 8.51973 9.68759 7.00098C9.68759 5.48223 8.45634 4.25098 6.93759 4.25098ZM6.93759 8.75098C5.9704 8.75098 5.18759 7.96816 5.18759 7.00098C5.18759 6.03379 5.9704 5.25098 6.93759 5.25098C7.90478 5.25098 8.68759 6.03379 8.68759 7.00098C8.68759 7.96816 7.90478 8.75098 6.93759 8.75098Z" fill="#14524A" /></svg>
2741 - <?php echo __( 'Preview', "chart-builder" ); ?>
3100 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2742 3101 </button>
2743 3102 </div>
2744 3103 </div>
2745 3104 </div>
@@ -2764,15 +3123,16 @@
2764 3123 $source = $args['source'];
2765 3124 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2766 3125 $settings = $args['settings'];
2767 3126 $source_chart_type = $args['source_chart_type'];
2768 - $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : 'add';
3127 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
3128 + $action = isset($_GET['action']) ? sanitize_text_field((wp_unslash($_GET['action']))) : 'add';
2769 3129
2770 3130 ob_start();
2771 3131 ?>
2772 3132 <div class="ays-accordion-data-main-wrap">
2773 3133 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2774 - <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?= $html_class_prefix ?>chart-source-data-manual">
3134 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?php echo esc_attr($html_class_prefix) ?>chart-source-data-manual">
2775 3135 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
2776 3136 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content">
2777 3137 <?php if(!empty($source)):
2778 3138 foreach($source as $source_id => $source_value):
@@ -2780,14 +3140,14 @@
2780 3140 if ($source_id == 0): ?>
2781 3141 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2782 3142 <div class="ays-chart-empty-data-table-cell"></div>
2783 3143 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2784 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
3144 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-box <?php echo esc_attr($html_class_prefix) ?>chart-source-title-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2785 3145 <svg class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-remove-block <?php echo esc_attr($html_class_prefix) ?>chart-source-data-remove-col" data-trigger="hover" data-bs-toggle="tooltip" title="Delete column" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" width="10px">
2786 3146 <path d="M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" style="fill: #b8b8b8;" />
2787 3147 </svg>
2788 3148 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2789 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" <?php echo $each_source_id == 0 ? "style='min-width:100px'" : "" ?>>
3149 + <input type="text" class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo esc_attr(stripslashes($each_source_value)); ?>" <?php echo $each_source_id == 0 ? "style='min-width:100px'" : "" ?>>
2790 3150 <?php if ($each_source_id !== 0): ?>
2791 3151 <svg class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-sort" data-sort-order="asc" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512">
2792 3152 <path d="M137.4 41.4c12.5-12.5 32.8-12.5 45.3 0l128 128c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8H32c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9l128-128zm0 429.3l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128c-12.5 12.5-32.8 12.5-45.3 0z" style="fill: #b8b8b8;" />
2793 3153 </svg>
@@ -2809,14 +3169,14 @@
2809 3169 </svg>
2810 3170 </div>
2811 3171 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2812 3172 <?php if ($each_source_id == 0): ?>
2813 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-data-name-input-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2814 - <input type="text" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo htmlspecialchars(esc_attr($each_source_value)); ?>">
3173 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-box <?php echo esc_attr($html_class_prefix) ?>chart-source-data-name-input-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
3174 + <input type="text" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo esc_attr(htmlspecialchars($each_source_value)); ?>">
2815 3175 </div>
2816 3176 <?php else: ?>
2817 3177 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-box <?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-number" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2818 - <input type="number" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" step="any">
3178 + <input type="number" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo esc_attr(stripslashes($each_source_value)); ?>" step="any">
2819 3179 </div>
2820 3180 <?php endif; ?>
2821 3181 <?php endforeach; ?>
2822 3182 </div>
@@ -2823,16 +3183,16 @@
2823 3183 <?php endif; ?>
2824 3184 <?php endif; ?>
2825 3185 <?php endforeach; ?>
2826 3186 <?php else:?>
2827 - <div class="<?= $html_class_prefix ?>chart-source-data-edit-block">
3187 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block">
2828 3188 <div style="height: 63.11px; padding: 0 15px;"></div>
2829 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box">
3189 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-input-box <?php echo esc_attr($html_class_prefix) ?>chart-source-title-box">
2830 3190 <svg class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-remove-block <?php echo esc_attr($html_class_prefix) ?>chart-source-data-remove-col" data-trigger="hover" data-bs-toggle="tooltip" title="Delete column" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" width="10px">
2831 3191 <path d="M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" style="fill: #b8b8b8;" />
2832 3192 </svg>
2833 3193 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2834 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[0][]" style='min-width:100px'>
3194 + <input type="text" class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[0][]" style='min-width:100px'>
2835 3195 <svg class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-sort" data-sort-order="asc" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512">
2836 3196 <path d="M137.4 41.4c12.5-12.5 32.8-12.5 45.3 0l128 128c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8H32c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9l128-128zm0 429.3l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128c-12.5 12.5-32.8 12.5-45.3 0z" style="fill: #b8b8b8;" />
2837 3197 </svg>
2838 3198 </div>
@@ -2859,19 +3219,19 @@
2859 3219 <?php endif; ?>
2860 3220 </div>
2861 3221 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-column-box cb-changable-opt cb-bar_chart-opt cb-line_chart-opt display_none">
2862 3222 <img class="<?php echo esc_attr($html_class_prefix) ?>add-new-column" src="<?php echo esc_url(CHART_BUILDER_ADMIN_URL); ?>/images/icons/add-circle-outline.svg">
2863 - <?php echo __( 'Add column', "chart-builder" ); ?>
3223 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2864 3224 </div>
2865 3225 </div>
2866 3226 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2867 3227 <img class="<?php echo esc_attr($html_class_prefix) ?>add-new-row" src="<?php echo esc_url(CHART_BUILDER_ADMIN_URL); ?>/images/icons/add-circle-outline.svg">
2868 - <?php echo __( 'Add row', "chart-builder" ); ?>
3228 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2869 3229 </div>
2870 3230 <br>
2871 3231 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns <?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttn">
2872 3232 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.722 6.59785C12.2407 3.47754 10.0017 1.90723 7.00009 1.90723C3.99697 1.90723 1.75947 3.47754 0.278215 6.59941C0.218802 6.72522 0.187988 6.86263 0.187988 7.00176C0.187988 7.14089 0.218802 7.27829 0.278215 7.4041C1.75947 10.5244 3.99853 12.0947 7.00009 12.0947C10.0032 12.0947 12.2407 10.5244 13.722 7.40254C13.8423 7.14941 13.8423 6.85566 13.722 6.59785ZM7.00009 10.9697C4.47978 10.9697 2.63447 9.6916 1.3329 7.00098C2.63447 4.31035 4.47978 3.03223 7.00009 3.03223C9.5204 3.03223 11.3657 4.31035 12.6673 7.00098C11.3673 9.6916 9.52197 10.9697 7.00009 10.9697ZM6.93759 4.25098C5.41884 4.25098 4.18759 5.48223 4.18759 7.00098C4.18759 8.51973 5.41884 9.75098 6.93759 9.75098C8.45634 9.75098 9.68759 8.51973 9.68759 7.00098C9.68759 5.48223 8.45634 4.25098 6.93759 4.25098ZM6.93759 8.75098C5.9704 8.75098 5.18759 7.96816 5.18759 7.00098C5.18759 6.03379 5.9704 5.25098 6.93759 5.25098C7.90478 5.25098 8.68759 6.03379 8.68759 7.00098C8.68759 7.96816 7.90478 8.75098 6.93759 8.75098Z" fill="#14524A" /></svg>
2873 - <?php echo __( 'Preview', "chart-builder" ); ?>
3233 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2874 3234 </button>
2875 3235 </div>
2876 3236 </div>
2877 3237 </div>
@@ -2927,9 +3287,9 @@
2927 3287
2928 3288 $sources[] = $content;
2929 3289 }
2930 3290 $content_for_escape = implode('' , $sources );
2931 - echo html_entity_decode(esc_html( $content_for_escape ));
3291 + echo html_entity_decode( $content_for_escape );
2932 3292 }
2933 3293
2934 3294 public function settings_contents_general_settings( $sources, $args ){
2935 3295 $html_class_prefix = $args['html_class_prefix'];
@@ -3204,9 +3564,9 @@
3204 3564 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3205 3565 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3206 3566 <label for="ays-chart-option-tooltip-trigger">
3207 3567 <?php echo esc_html(__( "Trigger", "chart-builder" )); ?>
3208 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") ); ?>">
3568 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") )); ?>">
3209 3569 <i class="ays_fa ays_fa_info_circle"></i>
3210 3570 </a>
3211 3571 </label>
3212 3572 </div>
@@ -3255,9 +3615,9 @@
3255 3615 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3256 3616 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3257 3617 <label for="ays-chart-option-tooltip-font-size" class="form-label">
3258 3618 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3259 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size for all text within the chart tooltip, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") ); ?>">
3619 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("The font size for all text within the chart tooltip, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") )); ?>">
3260 3620 <i class="ays_fa ays_fa_info_circle"></i>
3261 3621 </a>
3262 3622 </label>
3263 3623 </div>
@@ -3285,9 +3645,9 @@
3285 3645 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3286 3646 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3287 3647 <label for="ays-chart-option-tooltip-bold">
3288 3648 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
3289 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") ); ?>">
3649 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") )); ?>">
3290 3650 <i class="ays_fa ays_fa_info_circle"></i>
3291 3651 </a>
3292 3652 </label>
3293 3653 </div>
@@ -3318,8 +3678,47 @@
3318 3678
3319 3679 return $sources;
3320 3680 }
3321 3681
3682 + public function settings_contents_tooltip_settings_chartjs( $sources, $args ){
3683 + $html_class_prefix = $args['html_class_prefix'];
3684 + $html_name_prefix = $args['html_name_prefix'];
3685 + $settings = $args['settings'];
3686 +
3687 + $tooltip_text_color = $settings['tooltip_text_color'];
3688 +
3689 + ob_start();
3690 + ?>
3691 + <div class="ays-accordion-data-main-wrap ">
3692 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3693 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3694 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3695 + <label for="ays-chart-option-tooltip-text-color">
3696 + <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
3697 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the tooltip text.","chart-builder") ); ?>">
3698 + <i class="ays_fa ays_fa_info_circle"></i>
3699 + </a>
3700 + </label>
3701 + </div>
3702 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
3703 + <input id="ays-chart-option-tooltip-text-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[tooltip_text_color]" value="<?php echo esc_attr($tooltip_text_color) ?>">
3704 + </div>
3705 + </div> <!-- Text color -->
3706 + </div>
3707 + </div>
3708 + <?php
3709 + $content = ob_get_clean();
3710 +
3711 + $title = __( 'Tooltip', "chart-builder" );
3712 +
3713 + $sources['tooltip'] = array(
3714 + 'content' => $content,
3715 + 'title' => $title
3716 + );
3717 +
3718 + return $sources;
3719 + }
3720 +
3322 3721 public function settings_contents_legend_settings( $sources, $args ){
3323 3722 $html_class_prefix = $args['html_class_prefix'];
3324 3723 $html_name_prefix = $args['html_name_prefix'];
3325 3724 $settings = $args['settings'];
@@ -3339,9 +3738,9 @@
3339 3738 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3340 3739 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3341 3740 <label for="ays-chart-option-legend-position">
3342 3741 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3343 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") ); ?>">
3742 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") )); ?>">
3344 3743 <i class="ays_fa ays_fa_info_circle"></i>
3345 3744 </a>
3346 3745 </label>
3347 3746 </div>
@@ -3372,9 +3771,9 @@
3372 3771 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3373 3772 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3374 3773 <label for="ays-chart-option-legend-alignment">
3375 3774 <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
3376 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") ); ?>">
3775 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") )); ?>">
3377 3776 <i class="ays_fa ays_fa_info_circle"></i>
3378 3777 </a>
3379 3778 </label>
3380 3779 </div>
@@ -3394,9 +3793,9 @@
3394 3793 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3395 3794 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3396 3795 <label for="ays-chart-option-legend-font-color">
3397 3796 <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
3398 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") ); ?>">
3797 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") )); ?>">
3399 3798 <i class="ays_fa ays_fa_info_circle"></i>
3400 3799 </a>
3401 3800 </label>
3402 3801 </div>
@@ -3407,9 +3806,9 @@
3407 3806 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3408 3807 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3409 3808 <label for="ays-chart-option-legend-font-size" class="form-label">
3410 3809 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3411 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size for all text within the chart legend, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") ); ?>">
3810 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("The font size for all text within the chart legend, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") )); ?>">
3412 3811 <i class="ays_fa ays_fa_info_circle"></i>
3413 3812 </a>
3414 3813 </label>
3415 3814 </div>
@@ -3464,8 +3863,159 @@
3464 3863
3465 3864 return $sources;
3466 3865 }
3467 3866
3867 + public function settings_contents_legend_settings_chartjs( $sources, $args ){
3868 + $html_class_prefix = $args['html_class_prefix'];
3869 + $html_name_prefix = $args['html_name_prefix'];
3870 + $settings = $args['settings'];
3871 + $legend_positions = $settings['legend_positions'];
3872 + $legend_position = $settings['legend_position'];
3873 + $legend_alignments = $settings['legend_alignments'];
3874 + $legend_alignment = $settings['legend_alignment'];
3875 + $legend_color = $settings['legend_color'];
3876 + $legend_font_size = $settings['legend_font_size'];
3877 + $legend_reverse = $settings['legend_reverse'];
3878 + $legend_bold = $settings['legend_bold'];
3879 + $legend_italic = $settings['legend_italic'];
3880 + ob_start();
3881 + ?>
3882 + <div class="ays-accordion-data-main-wrap">
3883 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3884 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3885 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3886 + <label for="ays-chart-option-legend-position">
3887 + <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3888 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") )); ?>">
3889 + <i class="ays_fa ays_fa_info_circle"></i>
3890 + </a>
3891 + </label>
3892 + </div>
3893 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
3894 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-legend-position" name="<?php echo esc_attr($html_name_prefix); ?>settings[legend_position]">
3895 + <?php
3896 + foreach ( $legend_positions as $option_slug => $option ):
3897 + $selected = ( $legend_position == $option_slug ) ? 'selected' : '';
3898 + ?>
3899 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?> ><?php echo esc_html($option); ?></option>
3900 + <?php
3901 + endforeach;
3902 + ?>
3903 + </select>
3904 + </div>
3905 + </div> <!-- Legend position -->
3906 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3907 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3908 + <label for="ays-chart-option-legend-alignment">
3909 + <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
3910 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") )); ?>">
3911 + <i class="ays_fa ays_fa_info_circle"></i>
3912 + </a>
3913 + </label>
3914 + </div>
3915 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
3916 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-legend-alignment" name="<?php echo esc_attr($html_name_prefix); ?>settings[legend_alignment]">
3917 + <?php
3918 + foreach ( $legend_alignments as $option_slug => $option ):
3919 + $selected = ( $legend_alignment == $option_slug ) ? 'selected' : '';
3920 + ?>
3921 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
3922 + <?php
3923 + endforeach;
3924 + ?>
3925 + </select>
3926 + </div>
3927 + </div> <!-- Legend alignment -->
3928 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3929 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3930 + <label for="ays-chart-option-legend-font-color">
3931 + <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
3932 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") )); ?>">
3933 + <i class="ays_fa ays_fa_info_circle"></i>
3934 + </a>
3935 + </label>
3936 + </div>
3937 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
3938 + <input id="ays-chart-option-legend-font-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[legend_color]" value="<?php echo esc_attr($legend_color) ?>">
3939 + </div>
3940 + </div> <!-- Legend font color -->
3941 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3942 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3943 + <label for="ays-chart-option-legend-font-size" class="form-label">
3944 + <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3945 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("The font size for all text within the chart legend, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") )); ?>">
3946 + <i class="ays_fa ays_fa_info_circle"></i>
3947 + </a>
3948 + </label>
3949 + </div>
3950 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
3951 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-legend-font-size" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[legend_font_size]" value="<?php echo esc_attr($legend_font_size) ?>">
3952 + <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
3953 + </div>
3954 + </div> <!-- Font size -->
3955 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3956 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3957 + <label for="ays-chart-option-legend-italic">
3958 + <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
3959 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart legend text italic.","chart-builder") ); ?>">
3960 + <i class="ays_fa ays_fa_info_circle"></i>
3961 + </a>
3962 + </label>
3963 + </div>
3964 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
3965 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
3966 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-legend-italic" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[legend_italic]" value="on" <?php echo esc_attr($legend_italic); ?> >
3967 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
3968 + </label>
3969 + </div>
3970 + </div> <!-- Italic text -->
3971 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3972 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3973 + <label for="ays-chart-option-legend-bold">
3974 + <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
3975 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart legend text bold.","chart-builder") ); ?>">
3976 + <i class="ays_fa ays_fa_info_circle"></i>
3977 + </a>
3978 + </label>
3979 + </div>
3980 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
3981 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
3982 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-legend-bold" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[legend_bold]" value="on" <?php echo esc_attr($legend_bold); ?> >
3983 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
3984 + </label>
3985 + </div>
3986 + </div> <!-- Bold text -->
3987 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt">
3988 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3989 + <label for="ays-chart-option-legend-revers">
3990 + <?php echo esc_html(__( "Show datasets in reverse order", "chart-builder" )); ?>
3991 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this toggle to show datasets in reverse ordering.","chart-builder") ); ?>">
3992 + <i class="ays_fa ays_fa_info_circle"></i>
3993 + </a>
3994 + </label>
3995 + </div>
3996 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
3997 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
3998 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-legend-reverse" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[legend_reverse]" value="on" <?php echo esc_attr($legend_reverse); ?> >
3999 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4000 + </label>
4001 + </div>
4002 + </div> <!-- reverse datasets -->
4003 + </div>
4004 + </div>
4005 + <?php
4006 + $content = ob_get_clean();
4007 +
4008 + $title = __( 'Legend', "chart-builder" );
4009 +
4010 + $sources['legend'] = array(
4011 + 'content' => $content,
4012 + 'title' => $title
4013 + );
4014 +
4015 + return $sources;
4016 + }
4017 +
3468 4018 public function settings_contents_horizontal_axis_settings( $sources, $args ){
3469 4019 $html_class_prefix = $args['html_class_prefix'];
3470 4020 $html_name_prefix = $args['html_name_prefix'];
3471 4021 $settings = $args['settings'];
@@ -3481,8 +4031,9 @@
3481 4031 $haxis_slanted_text_angle = $settings['haxis_slanted_text_angle'];
3482 4032 $haxis_show_text_every = $settings['haxis_show_text_every'];
3483 4033 $haxis_format_options = $settings['axes_format_options'];
3484 4034 $haxis_format = $settings['haxis_format'];
4035 + $haxis_enable_divide_percent = $settings['haxis_enable_divide_percent'];
3485 4036 $haxis_label_font_size = $settings['haxis_label_font_size'];
3486 4037 $haxis_max_value = $settings['haxis_max_value'];
3487 4038 $haxis_min_value = $settings['haxis_min_value'];
3488 4039 $haxis_text_font_size = $settings['haxis_text_font_size'];
@@ -3496,9 +4047,9 @@
3496 4047 $haxis_minor_gridlines_color = $settings['haxis_minor_gridlines_color'];
3497 4048
3498 4049 ob_start();
3499 4050 ?>
3500 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-haxis-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
4051 + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-haxis-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
3501 4052 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3502 4053 <h6>Label</h6>
3503 4054 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3504 4055 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3503,9 +4054,9 @@
3503 4054 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3504 4055 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3505 4056 <label for="ays-chart-option-haxis-title" class="form-label">
3506 4057 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3507 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The title of the horizontal axis","chart-builder") ); ?>">
4058 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the horizontal axis","chart-builder") ); ?>">
3508 4059 <i class="ays_fa ays_fa_info_circle"></i>
3509 4060 </a>
3510 4061 </label>
3511 4062 </div>
@@ -3590,9 +4141,9 @@
3590 4141 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3591 4142 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3592 4143 <label for="ays-chart-option-haxis-text-position" class="form-label">
3593 4144 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3594 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Position of the horizontal axis text, relative to the chart area.","chart-builder") ); ?>">
4145 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Position of the horizontal axis text, relative to the chart area.","chart-builder") ); ?>">
3595 4146 <i class="ays_fa ays_fa_info_circle"></i>
3596 4147 </a>
3597 4148 </label>
3598 4149 </div>
@@ -3773,32 +4324,40 @@
3773 4324 <input id="ays-chart-option-haxis-baseline-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[haxis_baseline_color]" value="<?php echo esc_attr($haxis_baseline_color) ?>">
3774 4325 </div>
3775 4326 </div> <!-- Horizontal axis baseline color -->
3776 4327
3777 - <br>
3778 - <h6>Format</h6>
3779 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4328 + <br class="cb-changable-opt cb-bar_chart-opt " >
4329 + <h6 class="cb-changable-opt cb-bar_chart-opt">Format</h6>
4330 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt " >
3780 4331 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3781 4332 <label for="ays-chart-option-haxis-format" class="form-label">
3782 4333 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
3783 4334 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
3784 - echo htmlspecialchars( sprintf (
3785 - "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
3786 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
3787 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
3788 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
3789 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
3790 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
3791 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
3792 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
3793 - '<em>', '</em>',
3794 - '<em>', '</em>',
3795 - '<em>', '</em>',
3796 - '<em>', '</em>',
3797 - '<em>', '</em>',
3798 - '<em>', '</em>',
3799 - '<em>', '</em>'
3800 - ) );
4335 + echo esc_attr( sprintf(
4336 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4337 + "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4338 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4339 + __('%1$sNone:%2$s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
4340 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4341 + __('%1$sDecimal:%2$s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
4342 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4343 + __('%1$sScientific:%2$s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
4344 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4345 + __('%1$sCurrency:%2$s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
4346 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4347 + __('%1$sPercent:%2$s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
4348 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4349 + __('%1$sShort:%2$s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
4350 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4351 + __('%1$sLong:%2$s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
4352 + '<em>', '</em>',
4353 + '<em>', '</em>',
4354 + '<em>', '</em>',
4355 + '<em>', '</em>',
4356 + '<em>', '</em>',
4357 + '<em>', '</em>',
4358 + '<em>', '</em>'
4359 + ));
3801 4360 ?>">
3802 4361 <i class="ays_fa ays_fa_info_circle"></i>
3803 4362 </a>
3804 4363 </label>
@@ -3815,10 +4374,26 @@
3815 4374 ?>
3816 4375 </select>
3817 4376 </div>
3818 4377 </div> <!-- Horizontal axis format -->
3819 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4378 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section option-haxis-enable-divide-percent cb-changable-opt cb-bar_chart-opt" style="<?php echo ($haxis_format == 'percent') ? '' : 'display: none;'; ?>">
3820 4379 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4380 + <label for="ays-chart-option-haxis-enable-divide-percent">
4381 + <?php echo esc_html(__( "Remove Extra Zeros ", "chart-builder" )); ?>
4382 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to hide extra 00's from the axis text if the Format option is set to 'Percent'. Note: Make sure to save chart, to see changes.","chart-builder") ); ?>">
4383 + <i class="ays_fa ays_fa_info_circle"></i>
4384 + </a>
4385 + </label>
4386 + </div>
4387 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4388 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
4389 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-haxis-enable-divide-percent" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[haxis_enable_divide_percent]" value="on" <?php echo esc_attr($haxis_enable_divide_percent); ?> >
4390 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4391 + </label>
4392 + </div>
4393 + </div> <!--Remove Extra Zeros"-->
4394 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt" >
4395 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3821 4396 <label for="ays-chart-option-haxis-max-value" class="form-label">
3822 4397 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
3823 4398 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
3824 4399 <i class="ays_fa ays_fa_info_circle"></i>
@@ -3828,9 +4403,9 @@
3828 4403 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right">
3829 4404 <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-haxis-max-value" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[haxis_max_value]" value="<?php echo esc_attr($haxis_max_value) ?>">
3830 4405 </div>
3831 4406 </div> <!-- Horizontal axis max value -->
3832 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4407 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt" >
3833 4408 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3834 4409 <label for="ays-chart-option-haxis-min-value" class="form-label">
3835 4410 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
3836 4411 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -3869,8 +4444,9 @@
3869 4444 $vaxis_text_color = $settings['vaxis_text_color'];
3870 4445 $vaxis_baseline_color = $settings['vaxis_baseline_color'];
3871 4446 $vaxis_format_options = $settings['axes_format_options'];
3872 4447 $vaxis_format = $settings['vaxis_format'];
4448 + $vaxis_enable_divide_percent = $settings['vaxis_enable_divide_percent'];
3873 4449 $vaxis_label_font_size = $settings['vaxis_label_font_size'];
3874 4450 $vaxis_max_value = $settings['vaxis_max_value'];
3875 4451 $vaxis_min_value = $settings['vaxis_min_value'];
3876 4452 $vaxis_text_font_size = $settings['vaxis_text_font_size'];
@@ -3884,9 +4460,9 @@
3884 4460 $vaxis_minor_gridlines_color = $settings['vaxis_minor_gridlines_color'];
3885 4461
3886 4462 ob_start();
3887 4463 ?>
3888 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-vaxis-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
4464 + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-vaxis-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
3889 4465 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3890 4466 <h6>Label</h6>
3891 4467 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3892 4468 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3891,9 +4467,9 @@
3891 4467 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3892 4468 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3893 4469 <label for="ays-chart-option-vaxis-title" class="form-label">
3894 4470 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3895 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The title of the vertical axis","chart-builder") ); ?>">
4471 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the vertical axis","chart-builder") ); ?>">
3896 4472 <i class="ays_fa ays_fa_info_circle"></i>
3897 4473 </a>
3898 4474 </label>
3899 4475 </div>
@@ -3965,9 +4541,9 @@
3965 4541 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3966 4542 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3967 4543 <label for="ays-chart-option-vaxis-text-position" class="form-label">
3968 4544 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3969 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Position of the vertical axis text, relative to the chart area.","chart-builder") ); ?>">
4545 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Position of the vertical axis text, relative to the chart area.","chart-builder") ); ?>">
3970 4546 <i class="ays_fa ays_fa_info_circle"></i>
3971 4547 </a>
3972 4548 </label>
3973 4549 </div>
@@ -4113,24 +4689,32 @@
4113 4689 <input id="ays-chart-option-vaxis-baseline-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[vaxis_baseline_color]" value="<?php echo esc_attr($vaxis_baseline_color) ?>">
4114 4690 </div>
4115 4691 </div> <!-- Vertical axis baseline color -->
4116 4692
4117 - <br>
4118 - <h6>Format</h6>
4119 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4693 + <br class="cb-changable-opt cb-column_chart-opt cb-line_chart-opt">
4694 + <h6 class="cb-changable-opt cb-column_chart-opt cb-line_chart-opt">Format</h6>
4695 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-column_chart-opt cb-line_chart-opt">
4120 4696 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4121 4697 <label for="ays-chart-option-vaxis-format" class="form-label">
4122 4698 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
4123 4699 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4124 - echo htmlspecialchars( sprintf (
4700 + echo esc_attr( sprintf(
4701 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4125 4702 "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4126 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
4127 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
4128 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
4129 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
4130 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
4131 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
4132 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
4703 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4704 + __('%1$sNone:%2$s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
4705 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4706 + __('%1$sDecimal:%2$s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
4707 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4708 + __('%1$sScientific:%2$s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
4709 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4710 + __('%1$sCurrency:%2$s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
4711 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4712 + __('%1$sPercent:%2$s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
4713 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4714 + __('%1$sShort:%2$s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
4715 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4716 + __('%1$sLong:%2$s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
4133 4717 '<em>', '</em>',
4134 4718 '<em>', '</em>',
4135 4719 '<em>', '</em>',
4136 4720 '<em>', '</em>',
@@ -4136,9 +4720,9 @@
4136 4720 '<em>', '</em>',
4137 4721 '<em>', '</em>',
4138 4722 '<em>', '</em>',
4139 4723 '<em>', '</em>'
4140 - ) );
4724 + ));
4141 4725 ?>">
4142 4726 <i class="ays_fa ays_fa_info_circle"></i>
4143 4727 </a>
4144 4728 </label>
@@ -4155,10 +4739,26 @@
4155 4739 ?>
4156 4740 </select>
4157 4741 </div>
4158 4742 </div> <!-- Vertical axis format -->
4159 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4743 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section option-vaxis-enable-divide-percent cb-changable-opt cb-column_chart-opt cb-line_chart-opt" style="<?php echo ($vaxis_format == 'percent') ? '' : 'display: none;'; ?>">
4160 4744 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4745 + <label for="ays-chart-option-vaxis-enable-divide-percent">
4746 + <?php echo esc_html(__( "Remove Extra Zeros", "chart-builder" )); ?>
4747 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to hide extra 00's from the axis text if the Format option is set to 'Percent'. Note: Make sure to save chart, to see changes.","chart-builder") ); ?>">
4748 + <i class="ays_fa ays_fa_info_circle"></i>
4749 + </a>
4750 + </label>
4751 + </div>
4752 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4753 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
4754 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-vaxis-enable-divide-percent" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[vaxis_enable_divide_percent]" value="on" <?php echo esc_attr($vaxis_enable_divide_percent); ?> >
4755 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4756 + </label>
4757 + </div>
4758 + </div> <!--Remove Extra Zeros-->
4759 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-column_chart-opt cb-line_chart-opt">
4760 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4161 4761 <label for="ays-chart-option-vaxis-max-value" class="form-label">
4162 4762 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
4163 4763 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
4164 4764 <i class="ays_fa ays_fa_info_circle"></i>
@@ -4168,9 +4768,9 @@
4168 4768 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4169 4769 <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-vaxis-max-value" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[vaxis_max_value]" value="<?php echo esc_attr($vaxis_max_value) ?>">
4170 4770 </div>
4171 4771 </div> <!-- Vertical axis max value -->
4172 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4772 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-column_chart-opt cb-line_chart-opt">
4173 4773 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4174 4774 <label for="ays-chart-option-vaxis-min-value" class="form-label">
4175 4775 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
4176 4776 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -4209,9 +4809,9 @@
4209 4809 $animation_easing = $settings['animation_easing'];
4210 4810
4211 4811 ob_start();
4212 4812 ?>
4213 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-animation-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
4813 + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-animation-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
4214 4814 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4215 4815 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4216 4816 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4217 4817 <label for="ays-chart-option-enable-animation">
@@ -4262,23 +4862,24 @@
4262 4862 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4263 4863 <label for="ays-chart-option-animation-easing" class="form-label">
4264 4864 <?php echo esc_html(__( "Easing", "chart-builder" )); ?>
4265 4865 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4266 - echo htmlspecialchars( sprintf(
4866 + echo esc_attr( sprintf(
4867 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4267 4868 "<p>" . __('The easing function applied to the chart animation. The following options are available:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4268 - __('%sLinear:%s Constant speed.', "chart-builder") . "</li><li>" .
4269 - __('%sEase in:%s Start slow and speed up.', "chart-builder") . "</li><li>" .
4270 - __('%sEase out:%s Start fast and slow down.', "chart-builder") . "</li><li>" .
4271 - __('%sEase in and out:%s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
4272 - '<em>',
4273 - '</em>',
4274 - '<em>',
4275 - '</em>',
4276 - '<em>',
4277 - '</em>',
4278 - '<em>',
4279 - '</em>'
4280 - ) );
4869 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4870 + __('%1$sLinear:%2$s Constant speed.', "chart-builder") . "</li><li>" .
4871 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4872 + __('%1$sEase in:%2$s Start slow and speed up.', "chart-builder") . "</li><li>" .
4873 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4874 + __('%1$sEase out:%2$s Start fast and slow down.', "chart-builder") . "</li><li>" .
4875 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4876 + __('%1$sEase in and out:%2$s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
4877 + '<em>', '</em>',
4878 + '<em>', '</em>',
4879 + '<em>', '</em>',
4880 + '<em>', '</em>'
4881 + ));
4281 4882 ?>">
4282 4883 <i class="ays_fa ays_fa_info_circle"></i>
4283 4884 </a>
4284 4885 </label>
@@ -4317,9 +4918,9 @@
4317 4918 $html_name_prefix = $args['html_name_prefix'];
4318 4919
4319 4920 ob_start();
4320 4921 ?>
4321 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-live-chart-settings-tab">
4922 + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-live-chart-settings-tab">
4322 4923 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4323 4924 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4324 4925 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4325 4926 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4324,15 +4925,15 @@
4324 4925 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4325 4926 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4326 4927 <div class="ays-pro-features-v2-video-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24_Hover.svg"></div>
4327 4928 <div class="ays-pro-features-v2-video-text">
4328 - <?php echo __("Watch Video" , "chart-builder"); ?>
4929 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4329 4930 </div>
4330 4931 </a>
4331 4932 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4332 4933 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
4333 4934 <div class="ays-pro-features-v2-upgrade-text">
4334 - <?php echo __("Upgrade" , "chart-builder"); ?>
4935 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4335 4936 </div>
4336 4937 </a>
4337 4938 </div>
4338 4939 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4354,15 +4955,15 @@
4354 4955 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4355 4956 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4356 4957 <div class="ays-pro-features-v2-video-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24_Hover.svg"></div>
4357 4958 <div class="ays-pro-features-v2-video-text">
4358 - <?php echo __("Watch Video" , "chart-builder"); ?>
4959 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4359 4960 </div>
4360 4961 </a>
4361 4962 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4362 4963 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
4363 4964 <div class="ays-pro-features-v2-upgrade-text">
4364 - <?php echo __("Upgrade" , "chart-builder"); ?>
4965 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4365 4966 </div>
4366 4967 </a>
4367 4968 </div>
4368 4969 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4402,9 +5003,9 @@
4402 5003 $enable_img = $settings['enable_img'];
4403 5004
4404 5005 ob_start();
4405 5006 ?>
4406 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-export-tab cb-changable-tab cb-pie_chart-tab cb-donut_chart-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
5007 + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-export-tab cb-changable-tab cb-pie_chart-tab cb-donut_chart-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
4407 5008 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4408 5009 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4409 5010 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4410 5011 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4409,15 +5010,15 @@
4409 5010 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4410 5011 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4411 5012 <div class="ays-pro-features-v2-video-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24_Hover.svg"></div>
4412 5013 <div class="ays-pro-features-v2-video-text">
4413 - <?php echo __("Watch Video" , "chart-builder"); ?>
5014 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4414 5015 </div>
4415 5016 </a>
4416 5017 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4417 5018 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
4418 5019 <div class="ays-pro-features-v2-upgrade-text">
4419 - <?php echo __("Upgrade" , "chart-builder"); ?>
5020 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4420 5021 </div>
4421 5022 </a>
4422 5023 </div>
4423 5024 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4439,15 +5040,15 @@
4439 5040 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4440 5041 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4441 5042 <div class="ays-pro-features-v2-video-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24_Hover.svg"></div>
4442 5043 <div class="ays-pro-features-v2-video-text">
4443 - <?php echo __("Watch Video" , "chart-builder"); ?>
5044 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4444 5045 </div>
4445 5046 </a>
4446 5047 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4447 5048 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
4448 5049 <div class="ays-pro-features-v2-upgrade-text">
4449 - <?php echo __("Upgrade" , "chart-builder"); ?>
5050 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4450 5051 </div>
4451 5052 </a>
4452 5053 </div>
4453 5054 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4469,15 +5070,15 @@
4469 5070 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4470 5071 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4471 5072 <div class="ays-pro-features-v2-video-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24_Hover.svg"></div>
4472 5073 <div class="ays-pro-features-v2-video-text">
4473 - <?php echo __("Watch Video" , "chart-builder"); ?>
5074 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4474 5075 </div>
4475 5076 </a>
4476 5077 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4477 5078 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
4478 5079 <div class="ays-pro-features-v2-upgrade-text">
4479 - <?php echo __("Upgrade" , "chart-builder"); ?>
5080 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4480 5081 </div>
4481 5082 </a>
4482 5083 </div>
4483 5084 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4499,15 +5100,15 @@
4499 5100 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4500 5101 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4501 5102 <div class="ays-pro-features-v2-video-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Video_24x24_Hover.svg"></div>
4502 5103 <div class="ays-pro-features-v2-video-text">
4503 - <?php echo __("Watch Video" , "chart-builder"); ?>
5104 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4504 5105 </div>
4505 5106 </a>
4506 5107 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4507 5108 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
4508 5109 <div class="ays-pro-features-v2-upgrade-text">
4509 - <?php echo __("Upgrade" , "chart-builder"); ?>
5110 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4510 5111 </div>
4511 5112 </a>
4512 5113 </div>
4513 5114 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4535,9 +5136,9 @@
4535 5136 </label>
4536 5137 </div>
4537 5138 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4538 5139 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
4539 - <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-export-img" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[enable_img]" value="on" <?php echo $enable_img?> >
5140 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-export-img" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[enable_img]" value="on" <?php echo esc_attr($enable_img)?> >
4540 5141 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4541 5142 </label>
4542 5143 </div>
4543 5144 </div> <!-- IMG option end -->
@@ -4594,9 +5195,9 @@
4594 5195
4595 5196 $sources[] = $content;
4596 5197 }
4597 5198 $content_for_escape = implode('' , $sources );
4598 - echo html_entity_decode(esc_html( $content_for_escape ));
5199 + echo html_entity_decode( esc_html($content_for_escape) );
4599 5200 }
4600 5201
4601 5202 public function settings_contents_chart_styles_settings( $sources, $args ){
4602 5203 $html_class_prefix = $args['html_class_prefix'];
@@ -4616,12 +5217,19 @@
4616 5217 $org_chart_font_size = $settings['org_chart_font_size'];
4617 5218 $background_color = $settings['background_color'];
4618 5219 $transparent_background = $settings['transparent_background'];
4619 5220 $border_width = $settings['border_width'];
5221 + $border_width_with_title = $settings['border_width_with_title'];
5222 + $border_radius_with_title = $settings['border_radius_with_title'];
5223 + $border_color_with_title = $settings['border_color_with_title'];
5224 + $border_style_with_title = $settings['border_style_with_title'];
5225 + $border_style = $settings['border_style'];
5226 + $border_styles = $settings['border_styles'];
4620 5227 $border_radius = $settings['border_radius'];
4621 5228 $border_color = $settings['border_color'];
4622 5229 $box_shadow = $settings['box_shadow'];
4623 5230 $box_shadow_color = $settings['box_shadow_color'];
5231 + $padding_outer = $settings['padding_outer'];
4624 5232 ob_start();
4625 5233 ?>
4626 5234 <div class="ays-accordion-data-main-wrap">
4627 5235 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -4628,9 +5236,9 @@
4628 5236 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4629 5237 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4630 5238 <label for="ays-chart-option-width" class="form-label">
4631 5239 <?php echo esc_html(__( "Width", "chart-builder" )); ?>
4632 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container, in percents.","chart-builder") ); ?>">
5240 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container, in percents.","chart-builder") ); ?>">
4633 5241 <i class="ays_fa ays_fa_info_circle"></i>
4634 5242 </a>
4635 5243 </label>
4636 5244 </div>
@@ -4651,9 +5259,9 @@
4651 5259 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4652 5260 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4653 5261 <label for="ays-chart-option-responsive-width" class="form-label">
4654 5262 <?php echo esc_html(__( "Responsive Width", "chart-builder" )); ?>
4655 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to keep the chart's width fixed at 100%, no matter what is set for the Width option. This makes the chart more responsive.","chart-builder") ); ?>">
5263 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to keep the chart's width fixed at 100%, no matter what is set for the Width option. This makes the chart more responsive.","chart-builder") ); ?>">
4656 5264 <i class="ays_fa ays_fa_info_circle"></i>
4657 5265 </a>
4658 5266 </label>
4659 5267 </div>
@@ -4667,9 +5275,9 @@
4667 5275 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4668 5276 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4669 5277 <label for="ays-chart-option-position">
4670 5278 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4671 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart. Note: The changes will be visible when the width option is not set to 100%","chart-builder") ); ?>">
5279 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart. Note: The changes will be visible when the width option is not set to 100%","chart-builder") ); ?>">
4672 5280 <i class="ays_fa ays_fa_info_circle"></i>
4673 5281 </a>
4674 5282 </label>
4675 5283 </div>
@@ -4684,14 +5292,14 @@
4684 5292 endforeach;
4685 5293 ?>
4686 5294 </select>
4687 5295 </div>
4688 - </div> <!-- Title position -->
5296 + </div> <!-- Position -->
4689 5297 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4690 5298 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4691 5299 <label for="ays-chart-option-height" class="form-label">
4692 5300 <?php echo esc_html(__( "Height", "chart-builder" )); ?>
4693 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
5301 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
4694 5302 <i class="ays_fa ays_fa_info_circle"></i>
4695 5303 </a>
4696 5304 </label>
4697 5305 </div>
@@ -4712,9 +5320,9 @@
4712 5320 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
4713 5321 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4714 5322 <label for="ays-chart-option-font-size" class="form-label">
4715 5323 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
4716 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart text.","chart-builder") ); ?>">
5324 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart text.","chart-builder") ); ?>">
4717 5325 <i class="ays_fa ays_fa_info_circle"></i>
4718 5326 </a>
4719 5327 </label>
4720 5328 </div>
@@ -4722,24 +5330,24 @@
4722 5330 <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-font-size" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[font_size]" value="<?php echo esc_attr($font_size) ?>">
4723 5331 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
4724 5332 </div>
4725 5333 </div> <!-- Font size -->
4726 - <div class="form-group row mb-2 <?= $html_class_prefix ?>options-section cb-changable-opt cb-org_chart-opt display_none">
4727 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
5334 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none">
5335 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4728 5336 <label for="ays-chart-option-org-chart-font-size" class="form-label">
4729 - <?php echo __( "Element size", $this->plugin_name ); ?>
4730 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The size of the chart element.","chart-builder") ); ?>">
5337 + <?php echo esc_html(__( "Element size", 'chart-builder' )); ?>
5338 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The size of the chart element.","chart-builder") ); ?>">
4731 5339 <i class="ays_fa ays_fa_info_circle"></i>
4732 5340 </a>
4733 5341 </label>
4734 5342 </div>
4735 5343 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
4736 - <select class="<?= $html_class_prefix ?>option-select-input form-select" id="ays-chart-option-org-chart-font-size" name="<?php echo $html_name_prefix; ?>settings[org_chart_font_size]">
5344 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-org-chart-font-size" name="<?php echo esc_attr($html_name_prefix); ?>settings[org_chart_font_size]">
4737 5345 <?php
4738 5346 foreach ( $org_chart_font_size_options as $option_slug => $option ):
4739 5347 $selected = ( $org_chart_font_size == $option_slug ) ? 'selected' : '';
4740 5348 ?>
4741 - <option value="<?php echo $option_slug; ?>" <?php echo $selected; ?>><?php echo $option; ?></option>
5349 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_attr($option); ?></option>
4742 5350 <?php
4743 5351 endforeach;
4744 5352 ?>
4745 5353 </select>
@@ -4748,9 +5356,9 @@
4748 5356 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
4749 5357 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4750 5358 <label for="ays-chart-option-background-color">
4751 5359 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4752 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart container.","chart-builder") ); ?>">
5360 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart container.","chart-builder") ); ?>">
4753 5361 <i class="ays_fa ays_fa_info_circle"></i>
4754 5362 </a>
4755 5363 </label>
4756 5364 </div>
@@ -4761,9 +5369,9 @@
4761 5369 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
4762 5370 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4763 5371 <label for="ays-chart-option-transparent-background" class="form-label">
4764 5372 <?php echo esc_html(__( "Transparent background", "chart-builder" )); ?>
4765 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart's background transparent. When enabled, both Background Color and Chart Area Background Color options will not work","chart-builder") ); ?>">
5373 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to make the chart's background transparent. When enabled, both Background Color and Chart Area Background Color options will not work","chart-builder") ); ?>">
4766 5374 <i class="ays_fa ays_fa_info_circle"></i>
4767 5375 </a>
4768 5376 </label>
4769 5377 </div>
@@ -4777,9 +5385,9 @@
4777 5385 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
4778 5386 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4779 5387 <label for="ays-chart-option-border-width">
4780 5388 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4781 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container border.","chart-builder") ); ?>">
5389 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border.","chart-builder") ); ?>">
4782 5390 <i class="ays_fa ays_fa_info_circle"></i>
4783 5391 </a>
4784 5392 </label>
4785 5393 </div>
@@ -4790,9 +5398,9 @@
4790 5398 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
4791 5399 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4792 5400 <label for="ays-chart-option-border-color">
4793 5401 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4794 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart container.","chart-builder") ); ?>">
5402 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart container.","chart-builder") ); ?>">
4795 5403 <i class="ays_fa ays_fa_info_circle"></i>
4796 5404 </a>
4797 5405 </label>
4798 5406 </div>
@@ -4803,9 +5411,9 @@
4803 5411 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
4804 5412 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4805 5413 <label for="ays-chart-option-border-radius">
4806 5414 <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
4807 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border radius of the chart container.","chart-builder") ); ?>">
5415 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border radius of the chart container.","chart-builder") ); ?>">
4808 5416 <i class="ays_fa ays_fa_info_circle"></i>
4809 5417 </a>
4810 5418 </label>
4811 5419 </div>
@@ -4814,11 +5422,33 @@
4814 5422 </div>
4815 5423 </div> <!-- Border radius -->
4816 5424 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
4817 5425 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5426 + <label for="ays-chart-option-border-style">
5427 + <?php echo esc_html(__( "Border Style", "chart-builder" )); ?>
5428 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border.","chart-builder") ); ?>">
5429 + <i class="ays_fa ays_fa_info_circle"></i>
5430 + </a>
5431 + </label>
5432 + </div>
5433 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5434 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-border-style" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_style]">
5435 + <?php
5436 + foreach ( $border_styles as $option_slug => $option ):
5437 + $selected = ( $border_style == $option_slug ) ? 'selected' : '';
5438 + ?>
5439 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
5440 + <?php
5441 + endforeach;
5442 + ?>
5443 + </select>
5444 + </div>
5445 + </div> <!-- Border style -->
5446 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
5447 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4818 5448 <label for="ays-chart-option-box-shadow" class="form-label">
4819 5449 <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
4820 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add shadow to chart's container.","chart-builder") ); ?>">
5450 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to add shadow to chart's container.","chart-builder") ); ?>">
4821 5451 <i class="ays_fa ays_fa_info_circle"></i>
4822 5452 </a>
4823 5453 </label>
4824 5454 </div>
@@ -4832,9 +5462,9 @@
4832 5462 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
4833 5463 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4834 5464 <label for="ays-chart-option-box-shadow-color" class="form-label">
4835 5465 <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
4836 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
5466 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
4837 5467 <i class="ays_fa ays_fa_info_circle"></i>
4838 5468 </a>
4839 5469 </label>
4840 5470 </div>
@@ -4841,8 +5471,82 @@
4841 5471 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4842 5472 <input id="ays-chart-option-box-shadow-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[box_shadow_color]" value="<?php echo esc_attr($box_shadow_color) ?>">
4843 5473 </div>
4844 5474 </div> <!-- box shadow color -->
5475 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
5476 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5477 + <label for="ays-chart-option-border-width-with-title">
5478 + <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?>
5479 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border including chart title and description.","chart-builder") ); ?>">
5480 + <i class="ays_fa ays_fa_info_circle"></i>
5481 + </a>
5482 + </label>
5483 + </div>
5484 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5485 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-border-width-with-title" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_width_with_title]" value="<?php echo esc_attr($border_width_with_title) ?>">
5486 + </div>
5487 + </div> <!-- Border Width with title -->
5488 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
5489 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5490 + <label for="ays-chart-option-border-radius-with-title">
5491 + <?php echo esc_html(__( "Border radius (including title)", "chart-builder" )); ?>
5492 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The radius of the chart container border including chart title and description.","chart-builder") ); ?>">
5493 + <i class="ays_fa ays_fa_info_circle"></i>
5494 + </a>
5495 + </label>
5496 + </div>
5497 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5498 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-border-radius-with-title" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_radius_with_title]" value="<?php echo esc_attr($border_radius_with_title) ?>">
5499 + </div>
5500 + </div> <!-- Border radius with title -->
5501 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
5502 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5503 + <label for="ays-chart-option-border-color-with-title">
5504 + <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?>
5505 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart container border including chart title and description.","chart-builder") ); ?>">
5506 + <i class="ays_fa ays_fa_info_circle"></i>
5507 + </a>
5508 + </label>
5509 + </div>
5510 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5511 + <input id="ays-chart-option-border-color-with-title" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_color_with_title]" value="<?php echo esc_attr($border_color_with_title) ?>">
5512 + </div>
5513 + </div> <!-- Border color with title -->
5514 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
5515 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5516 + <label for="ays-chart-option-border-style-with-title">
5517 + <?php echo esc_html(__( "Border Style (including title)", "chart-builder" )); ?>
5518 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border including chart title and description.","chart-builder") ); ?>">
5519 + <i class="ays_fa ays_fa_info_circle"></i>
5520 + </a>
5521 + </label>
5522 + </div>
5523 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5524 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-border-style-with-title" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_style_with_title]">
5525 + <?php
5526 + foreach ( $border_styles as $option_slug => $option ):
5527 + $selected = ( $border_style_with_title == $option_slug ) ? 'selected' : '';
5528 + ?>
5529 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
5530 + <?php
5531 + endforeach;
5532 + ?>
5533 + </select>
5534 + </div>
5535 + </div> <!-- Border style with title -->
5536 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
5537 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5538 + <label for="ays-chart-option-padding-outer">
5539 + <?php echo esc_html(__( "Padding", "chart-builder" )); ?>
5540 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The padding of the chart container.","chart-builder") ); ?>">
5541 + <i class="ays_fa ays_fa_info_circle"></i>
5542 + </a>
5543 + </label>
5544 + </div>
5545 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5546 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-padding-outer" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[padding_outer]" value="<?php echo esc_attr($padding_outer) ?>">
5547 + </div>
5548 + </div> <!-- Padding outer -->
4845 5549 </div>
4846 5550 </div>
4847 5551 <?php
4848 5552 $content = ob_get_clean();
@@ -4856,8 +5560,273 @@
4856 5560
4857 5561 return $sources;
4858 5562 }
4859 5563
5564 + public function settings_contents_chart_styles_settings_chartjs( $sources, $args ){
5565 + $html_class_prefix = $args['html_class_prefix'];
5566 + $html_name_prefix = $args['html_name_prefix'];
5567 + $settings = $args['settings'];
5568 + $border_width_with_title = $settings['border_width_with_title'];
5569 + $border_radius_with_title = $settings['border_radius_with_title'];
5570 + $border_color_with_title = $settings['border_color_with_title'];
5571 + $border_style_with_title = $settings['border_style_with_title'];
5572 + $width = $settings['width'];
5573 + $width_format = $settings['width_format'];
5574 + $height = $settings['height'];
5575 + $height_format = $settings['height_format'];
5576 + $width_format_options = $settings['width_format_options'];
5577 + $border_width = $settings['border_width'];
5578 + $border_radius = $settings['border_radius'];
5579 + $border_color = $settings['border_color'];
5580 + $background_color_chart = $settings['background_color_chart'];
5581 + $border_style = $settings['border_style'];
5582 + $border_styles = $settings['border_styles'];
5583 + $box_shadow = $settings['box_shadow'];
5584 + $box_shadow_color = $settings['box_shadow_color'];
5585 + $padding_outer = $settings['padding_outer'];
5586 + ob_start();
5587 + ?>
5588 + <div class="ays-accordion-data-main-wrap">
5589 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
5590 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5591 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5592 + <label for="ays-chart-option-width" class="form-label">
5593 + <?php echo esc_html(__( "Width", "chart-builder" )); ?>
5594 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container, in percents.","chart-builder") ); ?>">
5595 + <i class="ays_fa ays_fa_info_circle"></i>
5596 + </a>
5597 + </label>
5598 + </div>
5599 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5600 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-width" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[width]" value="<?php echo esc_attr($width) ?>">
5601 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-width-format-change <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-width-format" name="<?php echo esc_attr($html_name_prefix); ?>settings[width_format]">
5602 + <?php
5603 + foreach ( $width_format_options as $option_slug => $option ):
5604 + $selected = ( $width_format == $option_slug ) ? 'selected' : '';
5605 + ?>
5606 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
5607 + <?php
5608 + endforeach;
5609 + ?>
5610 + </select>
5611 + </div>
5612 + </div> <!-- Width -->
5613 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5614 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5615 + <label for="ays-chart-option-height" class="form-label">
5616 + <?php echo esc_html(__( "Height", "chart-builder" )); ?>
5617 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
5618 + <i class="ays_fa ays_fa_info_circle"></i>
5619 + </a>
5620 + </label>
5621 + </div>
5622 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5623 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-height" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[height]" value="<?php echo esc_attr($height) ?>">
5624 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-width-format-change <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-height-format" name="<?php echo esc_attr($html_name_prefix); ?>settings[height_format]">
5625 + <?php
5626 + foreach ( $width_format_options as $option_slug => $option ):
5627 + $selected = ( $height_format == $option_slug ) ? 'selected' : '';
5628 + ?>
5629 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
5630 + <?php
5631 + endforeach;
5632 + ?>
5633 + </select>
5634 + </div>
5635 + </div> <!-- Height -->
5636 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5637 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5638 + <label for="ays-chart-option-border-width">
5639 + <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
5640 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border.","chart-builder") ); ?>">
5641 + <i class="ays_fa ays_fa_info_circle"></i>
5642 + </a>
5643 + </label>
5644 + </div>
5645 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5646 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-border-width" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_width]" value="<?php echo esc_attr($border_width) ?>">
5647 + </div>
5648 + </div> <!-- Border Width -->
5649 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5650 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5651 + <label for="ays-chart-option-border-radius">
5652 + <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
5653 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The radius of the chart container border.","chart-builder") ); ?>">
5654 + <i class="ays_fa ays_fa_info_circle"></i>
5655 + </a>
5656 + </label>
5657 + </div>
5658 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5659 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-border-radius" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_radius]" value="<?php echo esc_attr($border_radius) ?>">
5660 + </div>
5661 + </div> <!-- Border Radius -->
5662 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5663 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5664 + <label for="ays-chart-option-border-color">
5665 + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
5666 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart container.","chart-builder") ); ?>">
5667 + <i class="ays_fa ays_fa_info_circle"></i>
5668 + </a>
5669 + </label>
5670 + </div>
5671 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5672 + <input id="ays-chart-option-border-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_color]" value="<?php echo esc_attr($border_color) ?>">
5673 + </div>
5674 + </div> <!-- Border color -->
5675 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5676 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5677 + <label for="ays-chart-option-border-style">
5678 + <?php echo esc_html(__( "Border Style", "chart-builder" )); ?>
5679 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border.","chart-builder") ); ?>">
5680 + <i class="ays_fa ays_fa_info_circle"></i>
5681 + </a>
5682 + </label>
5683 + </div>
5684 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5685 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-border-style" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_style]">
5686 + <?php
5687 + foreach ( $border_styles as $option_slug => $option ):
5688 + $selected = ( $border_style == $option_slug ) ? 'selected' : '';
5689 + ?>
5690 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
5691 + <?php
5692 + endforeach;
5693 + ?>
5694 + </select>
5695 + </div>
5696 + </div> <!-- Border style -->
5697 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5698 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5699 + <label for="ays-chart-option-backgorund-color">
5700 + <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
5701 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("With the help of this feature, you will be able to add background color for the Chart JS.","chart-builder") ); ?>">
5702 + <i class="ays_fa ays_fa_info_circle"></i>
5703 + </a>
5704 + </label>
5705 + </div>
5706 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5707 + <input id="ays-chart-option-background-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[background_color_chart]" value="<?php echo esc_attr($background_color_chart) ?>">
5708 + </div>
5709 + </div><!-- Background color -->
5710 +
5711 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5712 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5713 + <label for="ays-chart-option-box-shadow" class="form-label">
5714 + <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
5715 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to add shadow to chart's container.","chart-builder") ); ?>">
5716 + <i class="ays_fa ays_fa_info_circle"></i>
5717 + </a>
5718 + </label>
5719 + </div>
5720 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5721 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5722 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-box-shadow" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[box_shadow]" value="on" <?php echo esc_attr($box_shadow); ?> >
5723 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5724 + </label>
5725 + </div>
5726 + </div> <!-- box shadow -->
5727 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5728 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5729 + <label for="ays-chart-option-box-shadow-color" class="form-label">
5730 + <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
5731 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
5732 + <i class="ays_fa ays_fa_info_circle"></i>
5733 + </a>
5734 + </label>
5735 + </div>
5736 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5737 + <input id="ays-chart-option-box-shadow-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[box_shadow_color]" value="<?php echo esc_attr($box_shadow_color) ?>">
5738 + </div>
5739 + </div> <!-- box shadow color -->
5740 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5741 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5742 + <label for="ays-chart-option-border-width-with-title">
5743 + <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?>
5744 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border including chart title and description.","chart-builder") ); ?>">
5745 + <i class="ays_fa ays_fa_info_circle"></i>
5746 + </a>
5747 + </label>
5748 + </div>
5749 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5750 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-border-width-with-title" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_width_with_title]" value="<?php echo esc_attr($border_width_with_title) ?>">
5751 + </div>
5752 + </div> <!-- Border Width with title -->
5753 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5754 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5755 + <label for="ays-chart-option-border-radius-with-title">
5756 + <?php echo esc_html(__( "Border Radius (including title)", "chart-builder" )); ?>
5757 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The radius of the chart container border including chart title and description.","chart-builder") ); ?>">
5758 + <i class="ays_fa ays_fa_info_circle"></i>
5759 + </a>
5760 + </label>
5761 + </div>
5762 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5763 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-border-radius-with-title" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_radius_with_title]" value="<?php echo esc_attr($border_radius_with_title) ?>">
5764 + </div>
5765 + </div> <!-- Border radius with title -->
5766 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
5767 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5768 + <label for="ays-chart-option-border-color-with-title">
5769 + <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?>
5770 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart container border including chart title and description.","chart-builder") ); ?>">
5771 + <i class="ays_fa ays_fa_info_circle"></i>
5772 + </a>
5773 + </label>
5774 + </div>
5775 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5776 + <input id="ays-chart-option-border-color-with-title" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_color_with_title]" value="<?php echo esc_attr($border_color_with_title) ?>">
5777 + </div>
5778 + </div> <!-- Border colro with title -->
5779 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
5780 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5781 + <label for="ays-chart-option-border-style-with-title">
5782 + <?php echo esc_html(__( "Border Style (including title)", "chart-builder" )); ?>
5783 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border including chart title and description.","chart-builder") ); ?>">
5784 + <i class="ays_fa ays_fa_info_circle"></i>
5785 + </a>
5786 + </label>
5787 + </div>
5788 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5789 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-border-style-with-title" name="<?php echo esc_attr($html_name_prefix); ?>settings[border_style_with_title]">
5790 + <?php
5791 + foreach ( $border_styles as $option_slug => $option ):
5792 + $selected = ( $border_style_with_title == $option_slug ) ? 'selected' : '';
5793 + ?>
5794 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
5795 + <?php
5796 + endforeach;
5797 + ?>
5798 + </select>
5799 + </div>
5800 + </div> <!-- Border style with title -->
5801 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt cb-donut_chart-opt">
5802 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5803 + <label for="ays-chart-option-padding-outer">
5804 + <?php echo esc_html(__( "Padding", "chart-builder" )); ?>
5805 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The padding of the chart container.","chart-builder") ); ?>">
5806 + <i class="ays_fa ays_fa_info_circle"></i>
5807 + </a>
5808 + </label>
5809 + </div>
5810 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5811 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-padding-outer" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[padding_outer]" value="<?php echo esc_attr($padding_outer) ?>">
5812 + </div>
5813 + </div> <!-- Padding outer -->
5814 + </div>
5815 + </div>
5816 + <?php
5817 + $content = ob_get_clean();
5818 +
5819 + $title = __( 'Chart', "chart-builder" );
5820 +
5821 + $sources['chart'] = array(
5822 + 'content' => $content,
5823 + 'title' => $title
5824 + );
5825 +
5826 + return $sources;
5827 + }
5828 +
4860 5829 public function settings_contents_chart_area_styles_settings( $sources, $args ){
4861 5830 $html_class_prefix = $args['html_class_prefix'];
4862 5831 $html_name_prefix = $args['html_name_prefix'];
4863 5832 $settings = $args['settings'];
@@ -4876,9 +5845,9 @@
4876 5845 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt">
4877 5846 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4878 5847 <label for="ays-chart-option-chart-background-color">
4879 5848 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4880 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart area.","chart-builder") ); ?>">
5849 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart area.","chart-builder") ); ?>">
4881 5850 <i class="ays_fa ays_fa_info_circle"></i>
4882 5851 </a>
4883 5852 </label>
4884 5853 </div>
@@ -4889,9 +5858,9 @@
4889 5858 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt">
4890 5859 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4891 5860 <label for="ays-chart-option-chart-border-width">
4892 5861 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4893 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border width of the chart area.","chart-builder") ); ?>">
5862 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border width of the chart area.","chart-builder") ); ?>">
4894 5863 <i class="ays_fa ays_fa_info_circle"></i>
4895 5864 </a>
4896 5865 </label>
4897 5866 </div>
@@ -4902,9 +5871,9 @@
4902 5871 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt cb-column_chart-opt cb-line_chart-opt">
4903 5872 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4904 5873 <label for="ays-chart-option-chart-border-color">
4905 5874 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4906 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart area.","chart-builder") ); ?>">
5875 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart area.","chart-builder") ); ?>">
4907 5876 <i class="ays_fa ays_fa_info_circle"></i>
4908 5877 </a>
4909 5878 </label>
4910 5879 </div>
@@ -4915,9 +5884,9 @@
4915 5884 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4916 5885 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4917 5886 <label for="ays-chart-option-chart-left-margin">
4918 5887 <?php echo esc_html(__( "Left Margin", "chart-builder" )); ?>
4919 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the chart's distance from the left border. Leave blank for auto-positioning.","chart-builder") ); ?>">
5888 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the chart's distance from the left border. Leave blank for auto-positioning.","chart-builder") ); ?>">
4920 5889 <i class="ays_fa ays_fa_info_circle"></i>
4921 5890 </a>
4922 5891 </label>
4923 5892 </div>
@@ -4928,9 +5897,9 @@
4928 5897 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4929 5898 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4930 5899 <label for="ays-chart-option-chart-right-margin">
4931 5900 <?php echo esc_html(__( "Right Margin", "chart-builder" )); ?>
4932 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the chart's distance from the right border. Leave blank for auto-positioning.","chart-builder") ); ?>">
5901 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the chart's distance from the right border. Leave blank for auto-positioning.","chart-builder") ); ?>">
4933 5902 <i class="ays_fa ays_fa_info_circle"></i>
4934 5903 </a>
4935 5904 </label>
4936 5905 </div>
@@ -4941,9 +5910,9 @@
4941 5910 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4942 5911 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4943 5912 <label for="ays-chart-option-chart-top-margin">
4944 5913 <?php echo esc_html(__( "Top Margin", "chart-builder" )); ?>
4945 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the chart's distance from the top border. Leave blank for auto-positioning.","chart-builder") ); ?>">
5914 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the chart's distance from the top border. Leave blank for auto-positioning.","chart-builder") ); ?>">
4946 5915 <i class="ays_fa ays_fa_info_circle"></i>
4947 5916 </a>
4948 5917 </label>
4949 5918 </div>
@@ -4954,9 +5923,9 @@
4954 5923 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4955 5924 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4956 5925 <label for="ays-chart-option-chart-bottom-margin">
4957 5926 <?php echo esc_html(__( "Bottom Margin", "chart-builder" )); ?>
4958 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the chart's distance from the bottom border. Leave blank for auto-positioning.","chart-builder") ); ?>">
5927 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the chart's distance from the bottom border. Leave blank for auto-positioning.","chart-builder") ); ?>">
4959 5928 <i class="ays_fa ays_fa_info_circle"></i>
4960 5929 </a>
4961 5930 </label>
4962 5931 </div>
@@ -5006,9 +5975,9 @@
5006 5975 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5007 5976 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5008 5977 <label for="ays-chart-option-title-color">
5009 5978 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5010 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>">
5979 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>">
5011 5980 <i class="ays_fa ays_fa_info_circle"></i>
5012 5981 </a>
5013 5982 </label>
5014 5983 </div>
@@ -5019,9 +5988,9 @@
5019 5988 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5020 5989 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5021 5990 <label for="ays-chart-option-title-font-size" class="form-label">
5022 5991 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5023 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>">
5992 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>">
5024 5993 <i class="ays_fa ays_fa_info_circle"></i>
5025 5994 </a>
5026 5995 </label>
5027 5996 </div>
@@ -5033,9 +6002,9 @@
5033 6002 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5034 6003 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5035 6004 <label for="ays-chart-option-title-bold" class="form-label">
5036 6005 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5037 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
6006 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
5038 6007 <i class="ays_fa ays_fa_info_circle"></i>
5039 6008 </a>
5040 6009 </label>
5041 6010 </div>
@@ -5049,9 +6018,9 @@
5049 6018 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5050 6019 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5051 6020 <label for="ays-chart-option-title-italic" class="form-label">
5052 6021 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5053 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
6022 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
5054 6023 <i class="ays_fa ays_fa_info_circle"></i>
5055 6024 </a>
5056 6025 </label>
5057 6026 </div>
@@ -5065,9 +6034,9 @@
5065 6034 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5066 6035 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5067 6036 <label for="ays-chart-option-title-position">
5068 6037 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5069 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>">
6038 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>">
5070 6039 <i class="ays_fa ays_fa_info_circle"></i>
5071 6040 </a>
5072 6041 </label>
5073 6042 </div>
@@ -5087,9 +6056,9 @@
5087 6056 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5088 6057 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5089 6058 <label for="ays-chart-option-title-gap" class="form-label">
5090 6059 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5091 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart container.","chart-builder") ); ?>">
6060 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title and the chart container.","chart-builder") ); ?>">
5092 6061 <i class="ays_fa ays_fa_info_circle"></i>
5093 6062 </a>
5094 6063 </label>
5095 6064 </div>
@@ -5101,9 +6070,9 @@
5101 6070 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5102 6071 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5103 6072 <label for="ays-chart-option-title-gap-description" class="form-label">
5104 6073 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5105 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart description.","chart-builder") ); ?>">
6074 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title and the chart description.","chart-builder") ); ?>">
5106 6075 <i class="ays_fa ays_fa_info_circle"></i>
5107 6076 </a>
5108 6077 </label>
5109 6078 </div>
@@ -5115,9 +6084,9 @@
5115 6084 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5116 6085 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5117 6086 <label for="ays-chart-option-title-text-transform">
5118 6087 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5119 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
6088 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
5120 6089 <i class="ays_fa ays_fa_info_circle"></i>
5121 6090 </a>
5122 6091 </label>
5123 6092 </div>
@@ -5137,9 +6106,9 @@
5137 6106 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5138 6107 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5139 6108 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5140 6109 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5141 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
6110 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
5142 6111 <i class="ays_fa ays_fa_info_circle"></i>
5143 6112 </a>
5144 6113 </label>
5145 6114 </div>
@@ -5151,9 +6120,9 @@
5151 6120 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5152 6121 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5153 6122 <label for="ays-chart-option-title-text-decoration">
5154 6123 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5155 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
6124 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
5156 6125 <i class="ays_fa ays_fa_info_circle"></i>
5157 6126 </a>
5158 6127 </label>
5159 6128 </div>
@@ -5173,9 +6142,9 @@
5173 6142 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5174 6143 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5175 6144 <label for="ays-chart-option-title-text-shadow" class="form-label">
5176 6145 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5177 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add a text shadow to chart title.","chart-builder") ); ?>">
6146 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to add a text shadow to chart title.","chart-builder") ); ?>">
5178 6147 <i class="ays_fa ays_fa_info_circle"></i>
5179 6148 </a>
5180 6149 </label>
5181 6150 </div>
@@ -5189,9 +6158,9 @@
5189 6158 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5190 6159 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5191 6160 <label for="ays-chart-option-title-shadow-color">
5192 6161 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5193 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>">
6162 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>">
5194 6163 <i class="ays_fa ays_fa_info_circle"></i>
5195 6164 </a>
5196 6165 </label>
5197 6166 </div>
@@ -5241,9 +6210,9 @@
5241 6210 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5242 6211 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5243 6212 <label for="ays-chart-option-title-color">
5244 6213 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5245 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>">
6214 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>">
5246 6215 <i class="ays_fa ays_fa_info_circle"></i>
5247 6216 </a>
5248 6217 </label>
5249 6218 </div>
@@ -5254,9 +6223,9 @@
5254 6223 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5255 6224 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5256 6225 <label for="ays-chart-option-title-font-size" class="form-label">
5257 6226 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5258 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>">
6227 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>">
5259 6228 <i class="ays_fa ays_fa_info_circle"></i>
5260 6229 </a>
5261 6230 </label>
5262 6231 </div>
@@ -5268,9 +6237,9 @@
5268 6237 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5269 6238 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5270 6239 <label for="ays-chart-option-title-bold" class="form-label">
5271 6240 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5272 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
6241 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
5273 6242 <i class="ays_fa ays_fa_info_circle"></i>
5274 6243 </a>
5275 6244 </label>
5276 6245 </div>
@@ -5284,9 +6253,9 @@
5284 6253 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5285 6254 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5286 6255 <label for="ays-chart-option-title-italic" class="form-label">
5287 6256 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5288 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
6257 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
5289 6258 <i class="ays_fa ays_fa_info_circle"></i>
5290 6259 </a>
5291 6260 </label>
5292 6261 </div>
@@ -5300,9 +6269,9 @@
5300 6269 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5301 6270 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5302 6271 <label for="ays-chart-option-title-position">
5303 6272 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5304 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>">
6273 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>">
5305 6274 <i class="ays_fa ays_fa_info_circle"></i>
5306 6275 </a>
5307 6276 </label>
5308 6277 </div>
@@ -5322,9 +6291,9 @@
5322 6291 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5323 6292 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5324 6293 <label for="ays-chart-option-title-gap" class="form-label">
5325 6294 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5326 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart container.","chart-builder") ); ?>">
6295 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title and the chart container.","chart-builder") ); ?>">
5327 6296 <i class="ays_fa ays_fa_info_circle"></i>
5328 6297 </a>
5329 6298 </label>
5330 6299 </div>
@@ -5336,9 +6305,9 @@
5336 6305 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5337 6306 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5338 6307 <label for="ays-chart-option-title-gap-description" class="form-label">
5339 6308 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5340 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart description.","chart-builder") ); ?>">
6309 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title and the chart description.","chart-builder") ); ?>">
5341 6310 <i class="ays_fa ays_fa_info_circle"></i>
5342 6311 </a>
5343 6312 </label>
5344 6313 </div>
@@ -5350,9 +6319,9 @@
5350 6319 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5351 6320 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5352 6321 <label for="ays-chart-option-title-text-transform">
5353 6322 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5354 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
6323 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
5355 6324 <i class="ays_fa ays_fa_info_circle"></i>
5356 6325 </a>
5357 6326 </label>
5358 6327 </div>
@@ -5372,9 +6341,9 @@
5372 6341 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5373 6342 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5374 6343 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5375 6344 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5376 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
6345 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
5377 6346 <i class="ays_fa ays_fa_info_circle"></i>
5378 6347 </a>
5379 6348 </label>
5380 6349 </div>
@@ -5386,9 +6355,9 @@
5386 6355 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5387 6356 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5388 6357 <label for="ays-chart-option-title-text-decoration">
5389 6358 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5390 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
6359 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
5391 6360 <i class="ays_fa ays_fa_info_circle"></i>
5392 6361 </a>
5393 6362 </label>
5394 6363 </div>
@@ -5408,9 +6377,9 @@
5408 6377 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5409 6378 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5410 6379 <label for="ays-chart-option-title-text-shadow" class="form-label">
5411 6380 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5412 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add a text shadow to chart title.","chart-builder") ); ?>">
6381 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to add a text shadow to chart title.","chart-builder") ); ?>">
5413 6382 <i class="ays_fa ays_fa_info_circle"></i>
5414 6383 </a>
5415 6384 </label>
5416 6385 </div>
@@ -5424,9 +6393,9 @@
5424 6393 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5425 6394 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5426 6395 <label for="ays-chart-option-title-shadow-color">
5427 6396 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5428 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>">
6397 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>">
5429 6398 <i class="ays_fa ays_fa_info_circle"></i>
5430 6399 </a>
5431 6400 </label>
5432 6401 </div>
@@ -5475,9 +6444,9 @@
5475 6444 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5476 6445 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5477 6446 <label for="ays-chart-option-description-color">
5478 6447 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5479 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>">
6448 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>">
5480 6449 <i class="ays_fa ays_fa_info_circle"></i>
5481 6450 </a>
5482 6451 </label>
5483 6452 </div>
@@ -5488,9 +6457,9 @@
5488 6457 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5489 6458 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5490 6459 <label for="ays-chart-option-description-font-size" class="form-label">
5491 6460 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5492 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>">
6461 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>">
5493 6462 <i class="ays_fa ays_fa_info_circle"></i>
5494 6463 </a>
5495 6464 </label>
5496 6465 </div>
@@ -5502,9 +6471,9 @@
5502 6471 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5503 6472 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5504 6473 <label for="ays-chart-option-description-bold" class="form-label">
5505 6474 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5506 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
6475 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
5507 6476 <i class="ays_fa ays_fa_info_circle"></i>
5508 6477 </a>
5509 6478 </label>
5510 6479 </div>
@@ -5518,9 +6487,9 @@
5518 6487 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5519 6488 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5520 6489 <label for="ays-chart-option-description-italic" class="form-label">
5521 6490 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5522 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
6491 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
5523 6492 <i class="ays_fa ays_fa_info_circle"></i>
5524 6493 </a>
5525 6494 </label>
5526 6495 </div>
@@ -5534,9 +6503,9 @@
5534 6503 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5535 6504 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5536 6505 <label for="ays-chart-option-description-position">
5537 6506 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5538 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>">
6507 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>">
5539 6508 <i class="ays_fa ays_fa_info_circle"></i>
5540 6509 </a>
5541 6510 </label>
5542 6511 </div>
@@ -5556,9 +6525,9 @@
5556 6525 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5557 6526 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5558 6527 <label for="ays-chart-option-description-text-transform">
5559 6528 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5560 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
6529 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
5561 6530 <i class="ays_fa ays_fa_info_circle"></i>
5562 6531 </a>
5563 6532 </label>
5564 6533 </div>
@@ -5578,9 +6547,9 @@
5578 6547 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5579 6548 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5580 6549 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5581 6550 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5582 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
6551 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
5583 6552 <i class="ays_fa ays_fa_info_circle"></i>
5584 6553 </a>
5585 6554 </label>
5586 6555 </div>
@@ -5592,9 +6561,9 @@
5592 6561 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5593 6562 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5594 6563 <label for="ays-chart-option-description-text-decoration">
5595 6564 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5596 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
6565 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
5597 6566 <i class="ays_fa ays_fa_info_circle"></i>
5598 6567 </a>
5599 6568 </label>
5600 6569 </div>
@@ -5614,9 +6583,9 @@
5614 6583 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5615 6584 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5616 6585 <label for="ays-chart-option-description-text-shadow" class="form-label">
5617 6586 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5618 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add a text shadow to chart description.","chart-builder") ); ?>">
6587 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to add a text shadow to chart description.","chart-builder") ); ?>">
5619 6588 <i class="ays_fa ays_fa_info_circle"></i>
5620 6589 </a>
5621 6590 </label>
5622 6591 </div>
@@ -5630,9 +6599,9 @@
5630 6599 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5631 6600 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5632 6601 <label for="ays-chart-option-description-shadow-color">
5633 6602 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5634 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>">
6603 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>">
5635 6604 <i class="ays_fa ays_fa_info_circle"></i>
5636 6605 </a>
5637 6606 </label>
5638 6607 </div>
@@ -5681,9 +6650,9 @@
5681 6650 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5682 6651 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5683 6652 <label for="ays-chart-option-description-color">
5684 6653 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5685 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>">
6654 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>">
5686 6655 <i class="ays_fa ays_fa_info_circle"></i>
5687 6656 </a>
5688 6657 </label>
5689 6658 </div>
@@ -5694,9 +6663,9 @@
5694 6663 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5695 6664 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5696 6665 <label for="ays-chart-option-description-font-size" class="form-label">
5697 6666 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5698 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>">
6667 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>">
5699 6668 <i class="ays_fa ays_fa_info_circle"></i>
5700 6669 </a>
5701 6670 </label>
5702 6671 </div>
@@ -5708,9 +6677,9 @@
5708 6677 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5709 6678 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5710 6679 <label for="ays-chart-option-description-bold" class="form-label">
5711 6680 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5712 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
6681 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
5713 6682 <i class="ays_fa ays_fa_info_circle"></i>
5714 6683 </a>
5715 6684 </label>
5716 6685 </div>
@@ -5724,9 +6693,9 @@
5724 6693 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5725 6694 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5726 6695 <label for="ays-chart-option-description-italic" class="form-label">
5727 6696 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5728 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
6697 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
5729 6698 <i class="ays_fa ays_fa_info_circle"></i>
5730 6699 </a>
5731 6700 </label>
5732 6701 </div>
@@ -5740,9 +6709,9 @@
5740 6709 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5741 6710 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5742 6711 <label for="ays-chart-option-description-position">
5743 6712 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5744 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>">
6713 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>">
5745 6714 <i class="ays_fa ays_fa_info_circle"></i>
5746 6715 </a>
5747 6716 </label>
5748 6717 </div>
@@ -5762,9 +6731,9 @@
5762 6731 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5763 6732 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5764 6733 <label for="ays-chart-option-description-text-transform">
5765 6734 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5766 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
6735 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
5767 6736 <i class="ays_fa ays_fa_info_circle"></i>
5768 6737 </a>
5769 6738 </label>
5770 6739 </div>
@@ -5784,9 +6753,9 @@
5784 6753 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5785 6754 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5786 6755 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5787 6756 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5788 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
6757 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
5789 6758 <i class="ays_fa ays_fa_info_circle"></i>
5790 6759 </a>
5791 6760 </label>
5792 6761 </div>
@@ -5798,9 +6767,9 @@
5798 6767 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5799 6768 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5800 6769 <label for="ays-chart-option-description-text-decoration">
5801 6770 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5802 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
6771 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
5803 6772 <i class="ays_fa ays_fa_info_circle"></i>
5804 6773 </a>
5805 6774 </label>
5806 6775 </div>
@@ -5820,9 +6789,9 @@
5820 6789 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5821 6790 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5822 6791 <label for="ays-chart-option-description-text-shadow" class="form-label">
5823 6792 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5824 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add a text shadow to chart description.","chart-builder") ); ?>">
6793 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Tick this option to add a text shadow to chart description.","chart-builder") ); ?>">
5825 6794 <i class="ays_fa ays_fa_info_circle"></i>
5826 6795 </a>
5827 6796 </label>
5828 6797 </div>
@@ -5836,9 +6805,9 @@
5836 6805 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5837 6806 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5838 6807 <label for="ays-chart-option-description-shadow-color">
5839 6808 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5840 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>">
6809 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>">
5841 6810 <i class="ays_fa ays_fa_info_circle"></i>
5842 6811 </a>
5843 6812 </label>
5844 6813 </div>
@@ -5899,9 +6868,9 @@
5899 6868
5900 6869 $sources[] = $content;
5901 6870 }
5902 6871 $content_for_escape = implode('' , $sources );
5903 - echo html_entity_decode(esc_html( $content_for_escape ));
6872 + echo html_entity_decode( esc_html($content_for_escape) );
5904 6873 }
5905 6874
5906 6875 public function settings_contents_advanced_settings( $sources, $args ){
5907 6876 $html_class_prefix = $args['html_class_prefix'];
@@ -6006,9 +6975,9 @@
6006 6975 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-donut_chart-opt display_none">
6007 6976 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6008 6977 <label for="ays-chart-option-slice-text">
6009 6978 <?php echo esc_html(__( "Slice text", "chart-builder" )); ?>
6010 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the content of the text to be displayed on the pie slice.","chart-builder") ); ?>">
6979 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose the content of the text to be displayed on the pie slice.","chart-builder") ); ?>">
6011 6980 <i class="ays_fa ays_fa_info_circle"></i>
6012 6981 </a>
6013 6982 </label>
6014 6983 </div>
@@ -6028,9 +6997,9 @@
6028 6997 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-donut_chart-opt display_none">
6029 6998 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6030 6999 <label for="ays-chart-option-tooltip-text">
6031 7000 <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?>
6032 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose how to display the text in the chart tooltip.","chart-builder") ); ?>">
7001 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose how to display the text in the chart tooltip.","chart-builder") ); ?>">
6033 7002 <i class="ays_fa ays_fa_info_circle"></i>
6034 7003 </a>
6035 7004 </label>
6036 7005 </div>
@@ -6063,9 +7032,9 @@
6063 7032 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-donut_chart-opt display_none">
6064 7033 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6065 7034 <label for="ays-chart-option-data-grouping-label" class="form-label">
6066 7035 <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?>
6067 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("A label for the combination slice that holds all slices below chart data grouping limit.","chart-builder") ); ?>">
7036 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("A label for the combination slice that holds all slices below chart data grouping limit.","chart-builder") ); ?>">
6068 7037 <i class="ays_fa ays_fa_info_circle"></i>
6069 7038 </a>
6070 7039 </label>
6071 7040 </div>
@@ -6106,17 +7075,18 @@
6106 7075 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6107 7076 <label for="ays-chart-option-focus-target">
6108 7077 <?php echo esc_html(__( "Focus target", "chart-builder" )); ?>
6109 7078 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6110 - echo htmlspecialchars( sprintf(
7079 + echo esc_html( sprintf(
7080 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6111 7081 "<p>" . __('There are two ways to focus the data table elements.', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6112 - __('%sSingle data:%s If you choose the Single Data option, the focus will be on the single data point. By this, the particular cell of the data table will be focused.', "chart-builder") . "</li><li>" .
6113 - __('%sGroup data:%s If you choose the Group Data option, the focus will be on the grouped data points. By this, a row of the data table will be focused.', "chart-builder") . "</li></ul>",
6114 - '<em>',
6115 - '</em>',
6116 - '<em>',
6117 - '</em>'
6118 - ) );
7082 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
7083 + __('%1$sSingle data:%2$s If you choose the Single Data option, the focus will be on the single data point. By this, the particular cell of the data table will be focused.', "chart-builder") . "</li><li>" .
7084 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
7085 + __('%1$sGroup data:%2$s If you choose the Group Data option, the focus will be on the grouped data points. By this, a row of the data table will be focused.', "chart-builder") . "</li></ul>",
7086 + '<em>', '</em>',
7087 + '<em>', '</em>'
7088 + ));
6119 7089 ?>">
6120 7090 <i class="ays_fa ays_fa_info_circle"></i>
6121 7091 </a>
6122 7092 </label>
@@ -6151,17 +7121,18 @@
6151 7121 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6152 7122 <label for="ays-chart-option-group-width">
6153 7123 <?php echo esc_html(__( "Bar width", "chart-builder" )); ?>
6154 7124 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6155 - echo htmlspecialchars( sprintf(
7125 + echo esc_html( sprintf(
7126 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6156 7127 "<p>" . __('The width of the bars, specified in either of these formats:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6157 - __('%sPixels:%s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
6158 - __('%sPercentage:%s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
6159 - '<em>',
6160 - '</em>',
6161 - '<em>',
6162 - '</em>'
6163 - ) );
7128 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
7129 + __('%1$sPixels:%2$s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
7130 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
7131 + __('%1$sPercentage:%2$s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
7132 + '<em>', '</em>',
7133 + '<em>', '</em>'
7134 + ));
6164 7135 ?>">
6165 7136 <i class="ays_fa ays_fa_info_circle"></i>
6166 7137 </a>
6167 7138 </label>
@@ -6213,23 +7184,24 @@
6213 7184 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6214 7185 <label for="ays-chart-option-multiple-data-format">
6215 7186 <?php echo esc_html(__( "Multiple data format", "chart-builder" )); ?>
6216 7187 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6217 - echo htmlspecialchars( sprintf(
7188 + echo esc_html( sprintf(
7189 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6218 7190 "<p>" . __('How multiple data selections are rolled up into tooltips:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6219 - __('%sCategory:%s Group selected data by row titles.', "chart-builder") . "</li><li>" .
6220 - __('%sSeries:%s Group selected data by column titles.', "chart-builder") . "</li><li>" .
6221 - __('%sAuto:%s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
6222 - __('%sNone:%s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
6223 - '<em>',
6224 - '</em>',
6225 - '<em>',
6226 - '</em>',
6227 - '<em>',
6228 - '</em>',
6229 - '<em>',
6230 - '</em>'
6231 - ) );
7191 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
7192 + __('%1$sCategory:%2$s Group selected data by row titles.', "chart-builder") . "</li><li>" .
7193 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
7194 + __('%1$sSeries:%2$s Group selected data by column titles.', "chart-builder") . "</li><li>" .
7195 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
7196 + __('%1$sAuto:%2$s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
7197 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
7198 + __('%1$sNone:%2$s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
7199 + '<em>', '</em>',
7200 + '<em>', '</em>',
7201 + '<em>', '</em>',
7202 + '<em>', '</em>'
7203 + ));
6232 7204 ?>">
6233 7205 <i class="ays_fa ays_fa_info_circle"></i>
6234 7206 </a>
6235 7207 </label>
@@ -6384,15 +7356,15 @@
6384 7356 <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-dash-style" type="text" name="<?php echo esc_attr($html_name_prefix); ?>settings[dash_style]" value="<?php echo esc_attr($dash_style) ?>">
6385 7357 </div>
6386 7358 </div> <!-- Line dash pattern -->
6387 7359 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-donut_chart-opt display_none">
6388 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
7360 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6389 7361 <label for="ays-chart-option-donut-hole-size">
6390 - <?php echo __( "Hole size", $this->plugin_name ); ?>
7362 + <?php echo esc_html(__( "Hole size", 'chart-builder' )); ?>
6391 7363 </label>
6392 7364 </div>
6393 - <div class="col-sm-7 <?= $html_class_prefix ?>input-align-right <?= $html_class_prefix ?>option-input">
6394 - <input class="ays-text-input form-control <?= $html_class_prefix ?>option-text-input" id="ays-chart-option-donut-hole-size" type="number" min="0" max="1" step=".1" name="<?php echo $html_name_prefix; ?>settings[donut_hole_size]" value="<?= $donut_hole_size ?>">
7365 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right <?php echo esc_attr($html_class_prefix) ?>option-input">
7366 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-donut-hole-size" type="number" min="0" max="1" step=".1" name="<?php echo esc_attr($html_name_prefix); ?>settings[donut_hole_size]" value="<?php echo esc_attr($donut_hole_size) ?>">
6395 7367 </div>
6396 7368 </div> <!-- Donut hole size -->
6397 7369 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-line_chart-opt display_none ays-pro-features-v2-main-box">
6398 7370 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
@@ -6399,20 +7371,20 @@
6399 7371 <div class="ays-pro-features-v2-video-button"></div>
6400 7372 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
6401 7373 <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div>
6402 7374 <div class="ays-pro-features-v2-upgrade-text">
6403 - <?php echo __("Upgrade" , "chart-builder"); ?>
7375 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
6404 7376 </div>
6405 7377 </a>
6406 7378 </div>
6407 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
7379 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix )?>option-title">
6408 7380 <label for="ays-chart-option-curve-type">
6409 - <?php echo __( "Line curve type", "chart-builder" ); ?>
7381 + <?php echo esc_html(__( "Line curve type", "chart-builder" )); ?>
6410 7382 </label>
6411 7383 </div>
6412 7384 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
6413 - <select class="<?= $html_class_prefix ?>option-select-input form-select" id="ays-chart-option-line-curve-type" name="<?php echo $html_name_prefix; ?>settings[line_curve_type]">
6414 - <option><?php echo __( "Straight", "chart-builder" ); ?></option>
7385 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-line-curve-type" name="<?php echo esc_attr($html_name_prefix); ?>settings[line_curve_type]">
7386 + <option><?php echo esc_html(__( "Straight", "chart-builder" )); ?></option>
6415 7387 </select>
6416 7388 </div>
6417 7389 </div> <!-- Line curve type -->
6418 7390 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none">
@@ -6460,9 +7432,9 @@
6460 7432 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none">
6461 7433 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6462 7434 <label for="ays-chart-option-org-classname" class="form-label">
6463 7435 <?php echo esc_html(__( "Custom CSS class", "chart-builder" )); ?>
6464 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("A class name to assign to node elements to specify styles for the chart elements.","chart-builder") ); ?>">
7436 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("A class name to assign to node elements to specify styles for the chart elements.","chart-builder") ); ?>">
6465 7437 <i class="ays_fa ays_fa_info_circle"></i>
6466 7438 </a>
6467 7439 </label>
6468 7440 </div>
@@ -6473,9 +7445,11 @@
6473 7445 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6474 7446 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none" style="background:transparent;box-shadow:unset;padding:10px 0">
6475 7447 <br>
6476 7448 <blockquote>
6477 - <?php echo sprintf(__( "%sNote:%s Custom CSS class must be set for the options below to take effect.", $this->plugin_name ), '<strong>', '</strong>'); ?>
7449 + <?php echo sprintf(
7450 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
7451 + esc_html(__( '%1$sNote:%2$s Custom CSS class must be set for the options below to take effect.', 'chart-builder' )), '<strong>', '</strong>'); ?>
6478 7452 </blockquote>
6479 7453 <br>
6480 7454 </div>
6481 7455 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none">
@@ -6573,9 +7547,9 @@
6573 7547 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none">
6574 7548 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6575 7549 <label for="ays-chart-option-org-selected-classname" class="form-label">
6576 7550 <?php echo esc_html(__( "Selected node custom CSS class", "chart-builder" )); ?>
6577 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("A class name to assign to node elements to specify styles for the selected chart elements.","chart-builder") ); ?>">
7551 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("A class name to assign to node elements to specify styles for the selected chart elements.","chart-builder") ); ?>">
6578 7552 <i class="ays_fa ays_fa_info_circle"></i>
6579 7553 </a>
6580 7554 </label>
6581 7555 </div>
@@ -6586,9 +7560,14 @@
6586 7560 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6587 7561 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none" style="background:transparent;box-shadow:unset;padding:10px 0">
6588 7562 <br>
6589 7563 <blockquote>
6590 - <?php echo sprintf(__( "%sNote:%s Selected node custom CSS class must be set for the options below to take effect.", $this->plugin_name ), '<strong>', '</strong>'); ?>
7564 + <?php echo sprintf(
7565 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
7566 + esc_html(__( '%1$sNote:%2$s Selected node custom CSS class must be set for the options below to take effect. Add the Custom CSS Class so that the Selected node custom CSS class can operate correctly for you.', 'chart-builder' )),
7567 + '<strong>',
7568 + '</strong>'
7569 + ); ?>
6591 7570 </blockquote>
6592 7571 <br>
6593 7572 </div>
6594 7573 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none">
@@ -6640,8 +7619,10 @@
6640 7619 $outer_radius = $settings['outer_radius'];
6641 7620 $slice_spacing = $settings['slice_spacing'];
6642 7621 $circumference = $settings['circumference'];
6643 7622 $start_angle = $settings['start_angle'];
7623 + $slice_border_color = $settings['slice_border_color'];
7624 + $slice_border_width = $settings['slice_border_width'];
6644 7625 // $index_axis = $settings['index_axis'];
6645 7626
6646 7627 ob_start();
6647 7628 ?>
@@ -6702,8 +7683,34 @@
6702 7683 <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-start-angle" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[start_angle]" value="<?php echo esc_attr($start_angle) ?>">
6703 7684 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">°</div>
6704 7685 </div>
6705 7686 </div> <!-- Start Angle -->
7687 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt ">
7688 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7689 + <label for="ays-chart-option-slice-border-width">
7690 + <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
7691 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the slice borders.","chart-builder") ); ?>">
7692 + <i class="ays_fa ays_fa_info_circle"></i>
7693 + </a>
7694 + </label>
7695 + </div>
7696 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7697 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-slice-border-width" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_border_width]" value="<?php echo esc_attr($slice_border_width) ?>">
7698 + </div>
7699 + </div> <!-- Border Width -->
7700 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt ">
7701 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7702 + <label for="ays-chart-option-slice-border-color">
7703 + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
7704 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the slice borders.","chart-builder") ); ?>">
7705 + <i class="ays_fa ays_fa_info_circle"></i>
7706 + </a>
7707 + </label>
7708 + </div>
7709 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7710 + <input id="ays-chart-option-slice-border-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_border_color]" value="<?php echo esc_attr($slice_border_color) ?>">
7711 + </div>
7712 + </div> <!-- Slice border color -->
6706 7713 <!-- <div class="form-group row mb-2 <?php // echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt cb-donut_chart-opt display_none">
6707 7714 <div class="col-sm-5 d-flex align-items-center <?php // echo esc_attr($html_class_prefix) ?>option-title">
6708 7715 <label for="ays-chart-option-index-axis">
6709 7716 <?php // echo esc_html(__( "Horizontal ", "chart-builder" )); ?>
@@ -6746,15 +7753,15 @@
6746 7753 if ( !isset( $source[0] ) ) {
6747 7754 if (count($source[1]) > 2) {
6748 7755 $titles = array();
6749 7756 for ($i = 0; $i < count($source[1]); $i++) {
6750 - array_push($titles, __("Title", $this->plugin_name).$i);
7757 + array_push($titles, __("Title", 'chart-builder').$i);
6751 7758 }
6752 7759 $source[0] = $titles;
6753 7760 } else {
6754 7761 $source[0] = array(
6755 - __("Country", $this->plugin_name),
6756 - __("Population", $this->plugin_name),
7762 + __("Country", 'chart-builder'),
7763 + __("Population", 'chart-builder'),
6757 7764 );
6758 7765 }
6759 7766
6760 7767 ksort($source);
@@ -6787,9 +7794,9 @@
6787 7794 <g>
6788 7795 <path xmlns:default="http://www.w3.org/2000/svg" d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z" style="fill: #c4c4c4;" vector-effect="non-scaling-stroke" />
6789 7796 </g>
6790 7797 </svg>
6791 - <span><?php echo $val[0]; ?></span>
7798 + <span><?php echo esc_html($val[0]); ?></span>
6792 7799 </legend>
6793 7800 <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
6794 7801 <div class="ays-slices-accordion-data-main-wrap">
6795 7802 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6796,9 +7803,9 @@
6796 7803 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6797 7804 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6798 7805 <label for="ays-chart-option-slice-color">
6799 7806 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
6800 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for this slice.","chart-builder") ); ?>">
7807 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice.","chart-builder") ); ?>">
6801 7808 <i class="ays_fa ays_fa_info_circle"></i>
6802 7809 </a>
6803 7810 </label>
6804 7811 </div>
@@ -6803,13 +7810,13 @@
6803 7810 </label>
6804 7811 </div>
6805 7812 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6806 7813 <input type="color"
6807 - id="ays-chart-option-slice-color-<?php echo $key; ?>"
7814 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
6808 7815 class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6809 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo $key; ?>]"
6810 - value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : $slice_colors_default[$key]; ?>"
6811 - data-slice-id="<?php echo $key; ?>">
7816 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo esc_attr($key); ?>]"
7817 + value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : esc_attr($slice_colors_default[$key]); ?>"
7818 + data-slice-id="<?php echo esc_attr($key); ?>">
6812 7819 </div>
6813 7820 </div> <!-- Slice color -->
6814 7821 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6815 7822 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6821,13 +7828,13 @@
6821 7828 </label>
6822 7829 </div>
6823 7830 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6824 7831 <input type="number"
6825 - id="ays-chart-option-slice-offset-<?php echo $key; ?>"
7832 + id="ays-chart-option-slice-offset-<?php echo esc_attr($key); ?>"
6826 7833 class="ays-chart-option-slice-offset ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
6827 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo $key; ?>]"
7834 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo esc_attr($key); ?>]"
6828 7835 value="<?php echo isset($slice_offset[$key]) ? esc_attr($slice_offset[$key]) : 0 ; ?>"
6829 - data-slice-id="<?php echo $key; ?>"
7836 + data-slice-id="<?php echo esc_attr($key); ?>"
6830 7837 step=".01" min="0.0" max="1.0">
6831 7838 </div>
6832 7839 </div> <!-- Slice offset -->
6833 7840 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
@@ -6833,9 +7840,9 @@
6833 7840 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6834 7841 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6835 7842 <label for="ays-chart-option-slice-text-color">
6836 7843 <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
6837 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for the text of this slice.","chart-builder") ); ?>">
7844 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for the text of this slice.","chart-builder") ); ?>">
6838 7845 <i class="ays_fa ays_fa_info_circle"></i>
6839 7846 </a>
6840 7847 </label>
6841 7848 </div>
@@ -6840,13 +7847,13 @@
6840 7847 </label>
6841 7848 </div>
6842 7849 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6843 7850 <input type="color"
6844 - id="ays-chart-option-slice-text-color-<?php echo $key; ?>"
7851 + id="ays-chart-option-slice-text-color-<?php echo esc_attr($key); ?>"
6845 7852 class="ays-chart-option-slice-text-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6846 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo $key; ?>]"
7853 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo esc_attr($key); ?>]"
6847 7854 value="<?php echo isset($slice_text_color[$key]) ? esc_attr($slice_text_color[$key]) : '#ffffff'; ?>"
6848 - data-slice-id="<?php echo $key; ?>">
7855 + data-slice-id="<?php echo esc_attr($key); ?>">
6849 7856 </div>
6850 7857 </div> <!-- Slice color -->
6851 7858 </div>
6852 7859 </div>
@@ -6858,9 +7865,9 @@
6858 7865 </div>
6859 7866 </div>
6860 7867 <br>
6861 7868 <blockquote>
6862 - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?>
7869 + <?php echo esc_html(__( "Save the chart to update the data.", "chart-builder" )); ?>
6863 7870 </blockquote>
6864 7871 </div>
6865 7872 <?php
6866 7873
@@ -6871,9 +7878,9 @@
6871 7878 }
6872 7879
6873 7880 $content = ob_get_clean();
6874 7881
6875 - $title = __( 'Slices settings', "chart-builder" );
7882 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
6876 7883
6877 7884 $sources['slices_settings'] = array(
6878 7885 'content' => $content,
6879 7886 'title' => $title
@@ -6880,9 +7887,120 @@
6880 7887 );
6881 7888
6882 7889 return $sources;
6883 7890 }
7891 +
7892 + public function settings_contents_slices_settings_chartjs( $sources, $args ){
7893 + $html_class_prefix = $args['html_class_prefix'];
7894 + $html_name_prefix = $args['html_name_prefix'];
7895 + $settings = $args['settings'];
7896 + $source = $args['source'];
7897 + $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
7898 + $source_chart_type = $args['source_chart_type'];
7899 + $settings = $args['settings'];
7900 + $title_row = array_shift($source);
6884 7901
7902 + if (isset($source) && !empty($source)) {
7903 + if ( !isset( $source[0] ) ) {
7904 + if (count($source[1]) > 2) {
7905 + $titles = array();
7906 + for ($i = 0; $i < count($source[1]); $i++) {
7907 + array_push($titles, __("Title", 'chart-builder').$i);
7908 + }
7909 + $source[0] = $titles;
7910 + } else {
7911 + $source[0] = array(
7912 + __("Country", 'chart-builder'),
7913 + __("Population", 'chart-builder'),
7914 + );
7915 + }
7916 +
7917 + ksort($source);
7918 + }
7919 + }
7920 +
7921 + if ($source_chart_type == 'pie_chart') {
7922 + foreach ($source as $key => $row) {
7923 + $source[$key] = array_slice($row, 0, 2);
7924 + }
7925 + }
7926 +
7927 + ob_start();
7928 + if ($source_chart_type == 'pie_chart') {
7929 + $slice_color = $settings['slice_color'];
7930 + $slice_colors_default = $settings['slice_colors_default'];
7931 +
7932 + ?>
7933 + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-slices-settings-tab cb-changable-tab cb-pie_chart-tab cb-donut_chart-tab">
7934 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
7935 + <div class="<?php echo esc_attr($html_class_prefix) ?>slices-settings">
7936 + <?php
7937 + foreach ( $source as $key => $val ):
7938 + ?>
7939 + <fieldset class="ays-slices-accordion-options-container <?php echo esc_attr($html_class_prefix) ?>options-slices-<?php echo esc_attr($key); ?>" data-collapsed="true">
7940 + <legend class="ays-slices-accordion-options-header">
7941 + <svg class="ays-slices-accordion-arrow ays-slices-accordion-arrow-right" version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="visible" preserveAspectRatio="none" viewBox="0 0 24 24" width="20" height="20">
7942 + <g>
7943 + <path xmlns:default="http://www.w3.org/2000/svg" d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z" style="fill: #c4c4c4;" vector-effect="non-scaling-stroke" />
7944 + </g>
7945 + </svg>
7946 + <span><?php echo esc_html($val[0]); ?></span>
7947 + </legend>
7948 + <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
7949 + <div class="ays-slices-accordion-data-main-wrap">
7950 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
7951 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7952 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7953 + <label for="ays-chart-option-slice-color">
7954 + <?php echo esc_html(__( "Color", "chart-builder" )); ?>
7955 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice.","chart-builder") ); ?>">
7956 + <i class="ays_fa ays_fa_info_circle"></i>
7957 + </a>
7958 + </label>
7959 + </div>
7960 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7961 + <input type="color"
7962 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
7963 + class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7964 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo esc_attr($key); ?>]"
7965 + value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : esc_attr($slice_colors_default[$key]); ?>"
7966 + data-slice-id="<?php echo esc_attr($key); ?>">
7967 + </div>
7968 + </div> <!-- Slice color -->
7969 + </div>
7970 + </div>
7971 + </div>
7972 + </fieldset>
7973 + <?php
7974 + endforeach;
7975 + ?>
7976 + </div>
7977 + </div>
7978 + <br>
7979 + <blockquote>
7980 + <?php echo esc_html(__( "Save the chart to update the data.", "chart-builder" )); ?>
7981 + </blockquote>
7982 + </div>
7983 + <?php
7984 +
7985 + } else {
7986 + ?>
7987 + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-slices-settings-tab cb-changable-tab cb-pie_chart-tab cb-donut_chart-tab"></div>
7988 + <?php
7989 + }
7990 +
7991 + $content = ob_get_clean();
7992 +
7993 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
7994 +
7995 + $sources['slices_settings'] = array(
7996 + 'content' => $content,
7997 + 'title' => $title
7998 + );
7999 +
8000 + return $sources;
8001 + }
8002 +
6885 8003 public function settings_contents_series_settings( $sources, $args ){
6886 8004 $html_class_prefix = $args['html_class_prefix'];
6887 8005 $html_name_prefix = $args['html_name_prefix'];
6888 8006 $settings = $args['settings'];
@@ -6899,15 +8017,15 @@
6899 8017 if ( !isset( $source[0] ) ) {
6900 8018 if (count($source[1]) > 2) {
6901 8019 $titles = array();
6902 8020 for ($i = 0; $i < count($source[1]); $i++) {
6903 - array_push($titles, __("Title", $this->plugin_name).$i);
8021 + array_push($titles, __("Title", "chart-builder").$i);
6904 8022 }
6905 8023 $source[0] = $titles;
6906 8024 } else {
6907 8025 $source[0] = array(
6908 - __("Country", $this->plugin_name),
6909 - __("Population", $this->plugin_name),
8026 + __("Country", "chart-builder"),
8027 + __("Population", "chart-builder"),
6910 8028 );
6911 8029 }
6912 8030
6913 8031 ksort($source);
@@ -6925,8 +8043,9 @@
6925 8043 $series_row = array_shift($source);
6926 8044 $title = array_shift($series_row);
6927 8045 $series_color = $settings['series_color'];
6928 8046 $series_colors_default = $settings['series_colors_default'];
8047 + $series_format = $settings['series_format'];
6929 8048 $series_visible_in_legend = $settings['series_visible_in_legend'];
6930 8049 $series_line_width = $settings['series_line_width'];
6931 8050 $series_point_size = $settings['series_point_size'];
6932 8051 $series_point_shape = $settings['series_point_shape'];
@@ -6944,9 +8063,9 @@
6944 8063 <g>
6945 8064 <path xmlns:default="http://www.w3.org/2000/svg" d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z" style="fill: #c4c4c4;" vector-effect="non-scaling-stroke" />
6946 8065 </g>
6947 8066 </svg>
6948 - <span><?php echo $val; ?></span>
8067 + <span><?php echo esc_attr($val); ?></span>
6949 8068 </legend>
6950 8069 <div class="ays-series-accordion-options-content ays-series-accordion-options-content">
6951 8070 <div class="ays-series-accordion-data-main-wrap">
6952 8071 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6957,13 +8076,13 @@
6957 8076 </label>
6958 8077 </div>
6959 8078 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6960 8079 <input type="color"
6961 - id="ays-chart-option-series-color-<?php echo $key; ?>"
8080 + id="ays-chart-option-series-color-<?php echo esc_attr($key); ?>"
6962 8081 class="ays-chart-option-series-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6963 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo $key; ?>]"
6964 - value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : $series_colors_default[$key]; ?>"
6965 - data-series-id="<?php echo $key; ?>">
8082 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo esc_attr($key); ?>]"
8083 + value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : esc_attr($series_colors_default[$key]); ?>"
8084 + data-series-id="<?php echo esc_attr($key); ?>">
6966 8085 </div>
6967 8086 </div> <!-- series color -->
6968 8087 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6969 8088 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6976,18 +8095,36 @@
6976 8095 </div>
6977 8096 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6978 8097 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
6979 8098 <input type="checkbox"
6980 - id="ays-chart-option-series-visible-in-legend-<?php echo $key; ?>"
8099 + id="ays-chart-option-series-visible-in-legend-<?php echo esc_attr($key); ?>"
6981 8100 class="ays-chart-option-series-visible-in-legend <?php echo esc_attr($html_class_prefix) ?>toggle-switch"
6982 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo $key; ?>]"
8101 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo esc_attr($key); ?>]"
6983 8102 value="on"
6984 - data-series-id="<?php echo $key; ?>"
8103 + data-series-id="<?php echo esc_attr($key); ?>"
6985 8104 <?php echo isset($series_visible_in_legend[$key]) && $series_visible_in_legend[$key] == 'on' ? 'checked' : (!isset($series_color[$key]) ? 'checked' : ''); ?> >
6986 8105 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
6987 8106 </label>
6988 8107 </div>
6989 8108 </div> <!-- Series visible in legend -->
8109 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
8110 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
8111 + <label for="ays-chart-option-series-color">
8112 + <?php echo esc_html(__( "Format", "chart-builder" )); ?>
8113 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The format of series data. The format string is a subset of the ICU pattern set . For instance, '#,###%' will result in output values '1,000%', '750%', and '50%' for values 10, 7.5, and 0.5. Note: This option won't work if the axes 'Remove Extra Zeros' option is enabled.","chart-builder") ); ?>">
8114 + <i class="ays_fa ays_fa_info_circle"></i>
8115 + </a>
8116 + </label>
8117 + </div>
8118 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
8119 + <input type="text"
8120 + id="ays-chart-option-series-format-<?php echo $key; ?>"
8121 + class="ays-chart-option-series-format ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
8122 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_format][<?php echo $key; ?>]"
8123 + value="<?php echo isset($series_format[$key]) && '' !== $series_format[$key] ? esc_attr($series_format[$key]) : ''; ?>"
8124 + data-series-id="<?php echo $key; ?>">
8125 + </div>
8126 + </div> <!-- Format -->
6990 8127 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-line_chart-opt display_none">
6991 8128 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6992 8129 <label for="ays-chart-option-series-line-width">
6993 8130 <?php echo esc_html(__( "Line width", "chart-builder" )); ?>
@@ -6997,13 +8134,13 @@
6997 8134 </label>
6998 8135 </div>
6999 8136 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7000 8137 <input type="number"
7001 - id="ays-chart-option-series-line-width-<?php echo $key; ?>"
8138 + id="ays-chart-option-series-line-width-<?php echo esc_attr($key); ?>"
7002 8139 class="ays-chart-option-series-line-width ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7003 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo $key; ?>]"
7004 - value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : $line_width; ?>"
7005 - data-series-id="<?php echo $key; ?>">
8140 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo esc_attr($key); ?>]"
8141 + value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : esc_attr($line_width); ?>"
8142 + data-series-id="<?php echo esc_attr($key); ?>">
7006 8143 </div>
7007 8144 </div> <!-- Line width -->
7008 8145 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-line_chart-opt display_none">
7009 8146 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7015,13 +8152,13 @@
7015 8152 </label>
7016 8153 </div>
7017 8154 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7018 8155 <input type="number"
7019 - id="ays-chart-option-series-point-size-<?php echo $key; ?>"
8156 + id="ays-chart-option-series-point-size-<?php echo esc_attr($key); ?>"
7020 8157 class="ays-chart-option-series-point-size ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7021 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo $key; ?>]"
7022 - value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : $point_size; ?>"
7023 - data-series-id="<?php echo $key; ?>">
8158 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo esc_attr($key); ?>]"
8159 + value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : esc_attr($point_size); ?>"
8160 + data-series-id="<?php echo esc_attr($key); ?>">
7024 8161 </div>
7025 8162 </div> <!-- Point size -->
7026 8163 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-line_chart-opt display_none">
7027 8164 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7033,12 +8170,12 @@
7033 8170 </label>
7034 8171 </div>
7035 8172 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7036 8173 <select
7037 - id="ays-chart-option-series-point-shape-<?php echo $key; ?>"
8174 + id="ays-chart-option-series-point-shape-<?php echo esc_attr($key); ?>"
7038 8175 class="ays-chart-option-series-point-shape <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select"
7039 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo $key; ?>]"
7040 - data-series-id="<?php echo $key; ?>">
8176 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo esc_attr($key); ?>]"
8177 + data-series-id="<?php echo esc_attr($key); ?>">
7041 8178 >
7042 8179 <?php
7043 8180 $value = isset($series_point_shape[$key]) ? esc_attr($series_point_shape[$key]) : $point_shape;
7044 8181 foreach ( $point_shape_options as $option_slug => $option ):
@@ -7061,11 +8198,16 @@
7061 8198 </div>
7062 8199 </div>
7063 8200 <br>
7064 8201 <blockquote>
7065 - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?>
8202 + <?php echo esc_html(__( "Save the chart to update the data.", 'chart-builder' )); ?>
7066 8203 <br>
7067 - <?php echo sprintf(__( "%sNote:%s If you are not able to set the options, disable the row settings feature.", $this->plugin_name ), '<strong>', '</strong>'); ?>
8204 + <?php echo sprintf(
8205 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
8206 + esc_html(__( '%1$sNote:%2$s If you are not able to set the options, disable the row settings feature.', 'chart-builder' )),
8207 + '<strong>',
8208 + '</strong>'
8209 + ); ?>
7068 8210 </blockquote>
7069 8211 </div>
7070 8212 <?php
7071 8213
@@ -7099,15 +8241,15 @@
7099 8241 if ( !isset( $source[0] ) ) {
7100 8242 if (count($source[1]) > 2) {
7101 8243 $titles = array();
7102 8244 for ($i = 0; $i < count($source[1]); $i++) {
7103 - array_push($titles, __("Title", $this->plugin_name).$i);
8245 + array_push($titles, __("Title", 'chart-builder').$i);
7104 8246 }
7105 8247 $source[0] = $titles;
7106 8248 } else {
7107 8249 $source[0] = array(
7108 - __("Country", $this->plugin_name),
7109 - __("Population", $this->plugin_name),
8250 + __("Country", 'chart-builder'),
8251 + __("Population", 'chart-builder'),
7110 8252 );
7111 8253 }
7112 8254
7113 8255 ksort($source);
@@ -7153,9 +8295,9 @@
7153 8295 <g>
7154 8296 <path xmlns:default="http://www.w3.org/2000/svg" d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z" style="fill: #c4c4c4;" vector-effect="non-scaling-stroke" />
7155 8297 </g>
7156 8298 </svg>
7157 - <span><?php echo $val; ?></span>
8299 + <span><?php echo esc_html($val); ?></span>
7158 8300 </legend>
7159 8301 <div class="ays-rows-accordion-options-content ays-rows-accordion-options-content">
7160 8302 <div class="ays-rows-accordion-data-main-wrap">
7161 8303 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7166,13 +8308,13 @@
7166 8308 </label>
7167 8309 </div>
7168 8310 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7169 8311 <input type="color"
7170 - id="ays-chart-option-rows-color-<?php echo $key; ?>"
8312 + id="ays-chart-option-rows-color-<?php echo esc_attr($key); ?>"
7171 8313 class="ays-chart-option-rows-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7172 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo $key; ?>]"
7173 - value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : $series_color; ?>"
7174 - data-rows-id="<?php echo $key; ?>">
8314 + name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo esc_attr($key); ?>]"
8315 + value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : esc_attr($series_color); ?>"
8316 + data-rows-id="<?php echo esc_attr($key); ?>">
7175 8317 </div>
7176 8318 </div> <!-- color -->
7177 8319 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7178 8320 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7181,13 +8323,13 @@
7181 8323 </label>
7182 8324 </div>
7183 8325 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7184 8326 <input type="number"
7185 - id="ays-chart-option-rows-opacity-<?php echo $key; ?>"
8327 + id="ays-chart-option-rows-opacity-<?php echo esc_attr($key); ?>"
7186 8328 class="ays-chart-option-rows-opacity ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7187 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo $key; ?>]"
8329 + name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo esc_attr($key); ?>]"
7188 8330 value="<?php echo isset($rows_opacity[$key]) && '' !== $rows_opacity[$key] ? esc_attr($rows_opacity[$key]) : 1.0; ?>"
7189 - data-rows-id="<?php echo $key; ?>"
8331 + data-rows-id="<?php echo esc_attr($key); ?>"
7190 8332 step=".1" min="0" max="1">
7191 8333 </div>
7192 8334 </div> <!-- opacity -->
7193 8335 </div>
@@ -7198,17 +8340,27 @@
7198 8340 endforeach;
7199 8341 ?>
7200 8342 <br>
7201 8343 <blockquote>
7202 - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?>
8344 + <?php echo esc_html(__( "Save the chart to update the data.", 'chart-builder' )); ?>
7203 8345 <br>
7204 - <?php echo sprintf(__( "%sNote:%s The applied styles will work only if the chart has one column.", $this->plugin_name ), '<strong>', '</strong>'); ?>
8346 + <?php echo sprintf(
8347 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
8348 + esc_html(__( '%1$sNote:%2$s The applied styles will work only if the chart has one column.', 'chart-builder' )),
8349 + '<strong>',
8350 + '</strong>'
8351 + ); ?>
7205 8352 </blockquote>
7206 8353 </div>
7207 8354 <div class="<?php echo esc_attr($html_class_prefix) ?>not-hidden-options-section <?php echo $enable_row_settings === 'checked' ? 'display_none' : ''; ?>">
7208 8355 <br>
7209 8356 <blockquote>
7210 - <?php echo sprintf(__( "%sNote:%s If this option is disabled, the general options will be set from the series settings.", $this->plugin_name ), '<strong>', '</strong>'); ?>
8357 + <?php echo sprintf(
8358 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
8359 + esc_html(__( '%1$sNote:%2$s If this option is disabled, the general options will be set from the series settings.', 'chart-builder' )),
8360 + '<strong>',
8361 + '</strong>'
8362 + ); ?>
7211 8363 </blockquote>
7212 8364 </div>
7213 8365 </div>
7214 8366 </div>