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 +1621 -466 3.0.63.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,16 +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 874 // $this->ays_chart_christmas_message($ays_chart_builder_flag);
763 875 // $this->ays_chart_silver_bundle_message($ays_chart_builder_flag);
764 876 // $this->ays_chart_black_friday_message_2024($ays_chart_builder_flag);
877 + // $this->ays_chart_christmas_message_2024($ays_chart_builder_flag);
765 878 }
766 879 }
767 880 }
768 881 }
@@ -773,9 +886,9 @@
773 886 'status' => false,
774 887 );
775 888
776 889 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'ays_chart_dismiss_button') {
777 - 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' ) ) {
778 891 update_option('ays_chart_sale_btn', 1);
779 892 update_option('ays_chart_sale_date', current_time( 'mysql' ));
780 893 $data['status'] = true;
781 894 }
@@ -805,9 +918,9 @@
805 918 </div>';
806 919 $content[] = '</div>';
807 920
808 921 $content[] = '<div style="font-size: 17px;">';
809 - $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
810 923 $content[] = '<span style="padding-left: 4px; font-size: 14px; font-weight: 600;"> 30 Day Money Back Guarantee</span>';
811 924
812 925 $content[] = '</div>';
813 926
@@ -867,9 +980,10 @@
867 980 $content[] = '</div>';
868 981 $content[] = '</div>';
869 982
870 983 $content = implode( '', $content );
871 - echo html_entity_decode(esc_html( $content ));
984 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
985 +
872 986 }
873 987 }
874 988
875 989 // Self 20% sale
@@ -884,18 +998,26 @@
884 998 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
885 999
886 1000 $content[] = '<div class="ays-chart-dicount-sale-name-discount-box">';
887 1001 $content[] = '<span class="ays-chart-new-chart-pro-title">';
888 - $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 + );
889 1011 $content[] = '</span>';
890 1012 $content[] = '<div>';
891 - $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
892 1014 $content[] = '</div>';
893 1015 $content[] = '</div>';
894 1016
895 1017 $content[] = '<span class="ays-chart-new-chart-pro-desc">';
896 - $content[] = '<img class="ays-chart-new-chart-pro-guaranteeicon" src="' . CHART_BUILDER_ADMIN_URL . '/images/chart-builder-guaranteeicon.webp" style="width: 30px;">';
897 - $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' );
898 1020 $content[] = '</span>';
899 1021
900 1022 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-chart">';
901 1023 $content[] = '<form method="POST">';
@@ -914,15 +1036,15 @@
914 1036
915 1037 $content[] = '<div id="ays-chart-countdown-main-container">';
916 1038 $content[] = '<div class="ays-chart-countdown-container">';
917 1039 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
918 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1040 + $content[] = esc_html__( "Offer ends in:", 'chart-builder' );
919 1041
920 1042 $content[] = '<ul style="padding: 0">';
921 - $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
922 - $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
923 - $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
924 - $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>';
925 1047 $content[] = '</ul>';
926 1048 $content[] = '</div>';
927 1049
928 1050 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
@@ -936,11 +1058,11 @@
936 1058
937 1059 $content[] = '</div>';
938 1060
939 1061 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
940 - $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>';
941 1063 $content[] = '<span class="ays-chart-dicount-one-time-text">';
942 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1064 + $content[] = esc_html__( "One-time payment", 'chart-builder' );
943 1065 $content[] = '</span>';
944 1066 $content[] = '</div>';
945 1067
946 1068 $content[] = '</div>';
@@ -947,9 +1069,9 @@
947 1069
948 1070 $content[] = '</div>';
949 1071
950 1072 $content = implode( '', $content );
951 - echo $content;
1073 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
952 1074 }
953 1075 }
954 1076
955 1077 // Helloween banner
@@ -971,15 +1093,15 @@
971 1093 <span style='' class='ays-chart-helloween-bundle'>
972 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;'>
973 1095 Chart Builder
974 1096 </a>
975 - </span>", CHART_BUILDER_NAME );
1097 + </span>", 'chart-builder' );
976 1098 $content[] = '</p>';
977 1099 $content[] = '<p>';
978 1100 $content[] = __( "Hurry up!
979 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;'>
980 1102 Check it out!
981 - </a>", CHART_BUILDER_NAME );
1103 + </a>", 'chart-builder' );
982 1104 $content[] = '</p>';
983 1105
984 1106 $content[] = '</div>';
985 1107
@@ -1009,9 +1131,9 @@
1009 1131 $content[] = '</div>';
1010 1132
1011 1133 $content[] = '</div>';
1012 1134 $content[] = '<div class="ays-chart-dicount-wrap-box ays-buy-now-button-box-helloween">';
1013 - $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>';
1014 1136 $content[] = '</div>';
1015 1137 $content[] = '</div>';
1016 1138
1017 1139 $content[] = '</div>';
@@ -1032,9 +1154,9 @@
1032 1154 $content[] = '</div>';
1033 1155
1034 1156 $content = implode( '', $content );
1035 1157
1036 - echo $content;
1158 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1037 1159 }
1038 1160 }
1039 1161
1040 1162 // Black Friday banner
@@ -1094,9 +1216,9 @@
1094 1216 $content[] = '</div>';
1095 1217
1096 1218 $content = implode( '', $content );
1097 1219
1098 - echo $content;
1220 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1099 1221 }
1100 1222 }
1101 1223
1102 1224 // Christmas banner
@@ -1107,10 +1229,10 @@
1107 1229 $content[] = '<div id="ays-chart-dicount-christmas-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1108 1230 $content[] = '<div id="ays-chart-dicount-christmas-month" class="ays_chart_dicount_month">';
1109 1231 $content[] = '<div class="ays-chart-dicount-christmas-box">';
1110 1232 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box ays-chart-dicount-christmas-wrap-box-80">';
1111 - $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>';
1112 - $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>';
1113 1235 $content[] = '</div>';
1114 1236
1115 1237 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1116 1238 $content[] = '<div id="ays-chart-countdown-main-container">';
@@ -1116,12 +1238,12 @@
1116 1238 $content[] = '<div id="ays-chart-countdown-main-container">';
1117 1239 $content[] = '<div class="ays-chart-countdown-container">';
1118 1240 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1119 1241 $content[] = '<ul>';
1120 - $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
1121 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
1122 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
1123 - $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>';
1124 1246 $content[] = '</ul>';
1125 1247 $content[] = '</div>';
1126 1248 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1127 1249 $content[] = '<span>🚀</span>';
@@ -1133,9 +1255,9 @@
1133 1255 $content[] = '</div>';
1134 1256 $content[] = '</div>';
1135 1257
1136 1258 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1137 - $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>';
1138 1260 $content[] = '</div>';
1139 1261 $content[] = '</div>';
1140 1262 $content[] = '</div>';
1141 1263
@@ -1141,9 +1263,9 @@
1141 1263
1142 1264 $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-christmas">';
1143 1265 $content[] = '<form method="POST">';
1144 1266 $content[] = '<div id="ays-chart-dismiss-buttons-content-christmas">';
1145 - $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>';
1146 1268 $content[] = '</div>';
1147 1269 $content[] = '</form>';
1148 1270 $content[] = '</div>';
1149 1271 $content[] = '</div>';
@@ -1149,9 +1271,9 @@
1149 1271 $content[] = '</div>';
1150 1272
1151 1273 $content = implode( '', $content );
1152 1274
1153 - echo $content;
1275 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1154 1276 }
1155 1277 }
1156 1278
1157 1279 // Silver Bundle
@@ -1160,20 +1282,20 @@
1160 1282 $content = array();
1161 1283
1162 1284 $content[] = '<div id="ays-chart-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1163 1285 $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1164 - $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
1165 1287
1166 1288 $content[] = '<div class="ays-chart-dicount-wrap-box">';
1167 1289
1168 1290 $content[] = '<strong style="font-weight: bold;">';
1169 - $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' );
1170 1292 $content[] = '</strong>';
1171 1293
1172 1294 $content[] = '<br>';
1173 1295
1174 1296 $content[] = '<strong>';
1175 - $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' );
1176 1298 $content[] = '</strong>';
1177 1299
1178 1300 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1179 1301
@@ -1212,14 +1334,14 @@
1212 1334 $content[] = '</div>';
1213 1335
1214 1336 $content[] = '</div>';
1215 1337
1216 - $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>';
1217 1339 $content[] = '</div>';
1218 1340 $content[] = '</div>';
1219 1341
1220 1342 $content = implode( '', $content );
1221 - echo $content;
1343 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1222 1344 }
1223 1345 }
1224 1346
1225 1347 // Black Friday 2024
@@ -1237,16 +1359,16 @@
1237 1359
1238 1360 $content[] = '<div id="ays-chart-countdown">';
1239 1361
1240 1362 $content[] = '<div>';
1241 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1363 + $content[] = __( "Offer ends in:", 'chart-builder' );
1242 1364 $content[] = '</div>';
1243 1365
1244 1366 $content[] = '<ul>';
1245 - $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", CHART_BUILDER_NAME ) .'</li>';
1246 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", CHART_BUILDER_NAME ) .'</li>';
1247 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", CHART_BUILDER_NAME ) .'</li>';
1248 - $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>';
1249 1371 $content[] = '</ul>';
1250 1372 $content[] = '</div>';
1251 1373
1252 1374 $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
@@ -1264,9 +1386,9 @@
1264 1386 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1265 1387 $content[] = '<div>';
1266 1388
1267 1389 $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1268 - $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_NAME );
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' );
1269 1391 $content[] = '</span>';
1270 1392
1271 1393 $content[] = '</br>';
1272 1394
@@ -1271,9 +1393,9 @@
1271 1393 $content[] = '</br>';
1272 1394
1273 1395 $content[] = '<span class="ays-chart-black-friday-bundle-desc">';
1274 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">';
1275 - $content[] = __( "50% OFF", CHART_BUILDER_NAME );
1397 + $content[] = __( "50% OFF", 'chart-builder' );
1276 1398 $content[] = '</a>';
1277 1399 $content[] = '</span>';
1278 1400 $content[] = '</div>';
1279 1401
@@ -1281,9 +1403,9 @@
1281 1403
1282 1404 $content[] = '<form action="" method="POST">';
1283 1405 $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1284 1406 if( current_user_can( 'manage_options' ) ){
1285 - $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>';
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>';
1286 1408 $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1287 1409 }
1288 1410 $content[] = '</div>';
1289 1411 $content[] = '</form>';
@@ -1294,17 +1416,17 @@
1294 1416
1295 1417 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1296 1418 $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1297 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">';
1298 - $content[] = __( 'Silver Bundle', "ays-popup-box" );
1420 + $content[] = __( 'Silver Bundle', 'chart-builder' );
1299 1421 $content[] = '</a>';
1300 1422 $content[] = '</span>';
1301 1423 $content[] = '</div>';
1302 1424
1303 1425 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1304 - $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_NAME ) . '</a>';
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>';
1305 1427 $content[] = '<span class="ays-chart-dicount-one-time-text">';
1306 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1428 + $content[] = __( "One-time payment", 'chart-builder' );
1307 1429 $content[] = '</span>';
1308 1430 $content[] = '</div>';
1309 1431 $content[] = '</div>';
1310 1432 $content[] = '</div>';
@@ -1309,17 +1431,203 @@
1309 1431 $content[] = '</div>';
1310 1432 $content[] = '</div>';
1311 1433
1312 1434 $content = implode( '', $content );
1313 - echo $content;
1435 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1314 1436 }
1315 1437 }
1316 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">';
1499 + $content[] = '<span></span>';
1500 + $content[] = '<span></span>';
1501 + $content[] = '<span></span>';
1502 + $content[] = '<span></span>';
1503 + $content[] = '</div>';
1504 +
1505 + $content[] = '</div>';
1506 + $content[] = '</div>';
1507 +
1508 + $content[] = '</div>';
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 +
1564 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1565 + $content[] = '<div>';
1566 +
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 + );
1576 + $content[] = '</span>';
1577 +
1578 + $content[] = '</br>';
1579 +
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' );
1583 + $content[] = '</a>';
1584 + $content[] = '</span>';
1585 + $content[] = '</div>';
1586 +
1587 + $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1588 +
1589 + $content[] = '<form action="" method="POST">';
1590 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1591 + if( current_user_can( 'manage_options' ) ){
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>';
1593 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1594 + }
1595 + $content[] = '</div>';
1596 + $content[] = '</form>';
1597 +
1598 + $content[] = '</div>';
1599 +
1600 + $content[] = '</div>';
1601 +
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';
1605 + $content[] = '</div>';
1606 + $content[] = '<div class="ays-chart-christmas-top-bundle-text-row">';
1607 + $content[] = __( '20% Extra Discount Coupon', 'chart-builder' );
1608 + $content[] = '</div>';
1609 + $content[] = '</div>';
1610 +
1611 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
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>';
1613 + $content[] = '<span class="ays-chart-dicount-one-time-text">';
1614 + $content[] = __( "One-time payment", 'chart-builder' );
1615 + $content[] = '</span>';
1616 + $content[] = '</div>';
1617 + $content[] = '</div>';
1618 + $content[] = '</div>';
1619 +
1620 + $content = implode( '', $content );
1621 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1622 + }
1623 + }
1624 +
1317 1625 public function ays_chart_update_banner_time(){
1318 1626
1319 1627 $date = time() + ( 3 * 24 * 60 * 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1320 1628 // $date = time() + ( 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS); // for testing | 1 min
1321 - $next_3_days = date('M d, Y H:i:s', $date);
1629 + $next_3_days = gmdate('M d, Y H:i:s', $date);
1322 1630
1323 1631 $ays_chart_banner_time = get_option('ays_chart_20_bundle_banner_time');
1324 1632
1325 1633 if ( !$ays_chart_banner_time || is_null( $ays_chart_banner_time ) ) {
@@ -1344,9 +1652,9 @@
1344 1652 }
1345 1653
1346 1654 public function author_user_search() {
1347 1655 check_ajax_referer( 'cbuilder-author-user-search', 'security' );
1348 - $params = $_REQUEST['params'];
1656 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1349 1657 $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null;
1350 1658 $checked = isset($params['val']) && $params['val'] !='' ? sanitize_text_field( $params['val'] ) : null;
1351 1659 $args = 'search=';
1352 1660 if ($search !== null) {
@@ -1463,9 +1771,11 @@
1463 1771 */
1464 1772 public function ays_chart_activate_plugin() {
1465 1773
1466 1774 // Run a security check.
1467 - 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 + }
1468 1778
1469 1779 // Check for permissions.
1470 1780 if ( ! current_user_can( 'activate_plugins' ) ) {
1471 1781 wp_send_json_error( esc_html__( 'Plugin activation is disabled for you on this site.', 'chart-builder' ) );
@@ -1506,9 +1816,11 @@
1506 1816 */
1507 1817 public function ays_chart_install_plugin() {
1508 1818
1509 1819 // Run a security check.
1510 - 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 + }
1511 1823
1512 1824 $generic_error = esc_html__( 'There was an error while performing your request.', 'chart-builder' );
1513 1825 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : '';
1514 1826
@@ -1625,8 +1937,9 @@
1625 1937
1626 1938 $images_url = CHART_BUILDER_ADMIN_URL . '/images/icons/';
1627 1939
1628 1940 $plugin_slug = array(
1941 + 'fox-lms',
1629 1942 'quiz-maker',
1630 1943 'survey-maker',
1631 1944 'poll-maker',
1632 1945 'ays-popup-box',
@@ -1639,9 +1952,9 @@
1639 1952 $plugin_url_arr = array();
1640 1953 foreach ($plugin_slug as $key => $slug) {
1641 1954 if ( isset( $_SESSION['ays_chart_our_product_links'] ) && !empty( $_SESSION['ays_chart_our_product_links'] )
1642 1955 && isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && !empty( $_SESSION['ays_chart_our_product_links'][$slug] ) ) {
1643 - $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])) : "";
1644 1957 } else {
1645 1958 $latest_version = $this->ays_chart_get_latest_plugin_version($slug);
1646 1959 $plugin_url = 'https://downloads.wordpress.org/plugin/'. $slug .'.zip';
1647 1960 if ( $latest_version != '' ) {
@@ -1653,13 +1966,22 @@
1653 1966 $plugin_url_arr[$slug] = $plugin_url;
1654 1967 }
1655 1968
1656 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 + ),
1657 1979 'quiz-maker/quiz-maker.php' => array(
1658 1980 'icon' => $images_url . 'icon-quiz-128x128.png',
1659 - 'name' => __( 'Quiz Maker', "easy-form" ),
1660 - 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', "easy-form" ),
1661 - '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' ),
1662 1984 'wporg' => 'https://wordpress.org/plugins/quiz-maker/',
1663 1985 'buy_now' => 'https://ays-pro.com/wordpress/quiz-maker/',
1664 1986 'url' => $plugin_url_arr['quiz-maker'],
1665 1987 ),
@@ -1699,9 +2021,9 @@
1699 2021 'buy_now' => 'https://ays-pro.com/wordpress/secure-copy-content-protection/',
1700 2022 'url' => $plugin_url_arr['secure-copy-content-protection'],
1701 2023 ),
1702 2024 'gallery-photo-gallery/gallery-photo-gallery.php' => array(
1703 - 'icon' => $images_url . 'icon-gallery-128x128.jpg',
2025 + 'icon' => $images_url . 'icon-gallery-128x128.png',
1704 2026 'name' => __( 'Gallery Photo Gallery', 'chart-builder' ),
1705 2027 'desc' => __( 'Create unlimited galleries and include unlimited images in those galleries.', 'chart-builder' ),
1706 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' ),
1707 2029 'wporg' => 'https://wordpress.org/plugins/gallery-photo-gallery/',
@@ -1901,9 +2223,9 @@
1901 2223 <span aria-hidden="true" class="dashicons dashicons-external"></span>
1902 2224 </a>';
1903 2225 }
1904 2226 $content .='
1905 - <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>
1906 2228 </div>
1907 2229 </div>';
1908 2230 }
1909 2231 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
@@ -1909,9 +2231,9 @@
1909 2231 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
1910 2232 $content.= '<input type="hidden" id="ays_chart_ajax_install_plugin_nonce" name="ays_chart_ajax_install_plugin_nonce" value="'. $install_plugin_nonce .'">';
1911 2233 $content.= '</div>';
1912 2234
1913 - echo $content;
2235 + echo html_entity_decode($content);
1914 2236 }
1915 2237
1916 2238 /**
1917 2239 * Returns the data from Quiz maker.
@@ -1920,9 +2242,9 @@
1920 2242 */
1921 2243 public function fetch_quiz_maker_data(){
1922 2244 check_ajax_referer( 'cbuilder-fetch-quiz-maker-data', 'security' );
1923 2245
1924 - $params = $_POST['params'];
2246 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1925 2247 if ( !isset($params) || empty($params) ) {
1926 2248 return array(
1927 2249 'success' => false,
1928 2250 'data' => array(
@@ -2044,9 +2366,9 @@
2044 2366 */
2045 2367 public function save_quiz_maker_data() {
2046 2368 check_ajax_referer( 'cbuilder-save-quiz-maker-data', 'security' );
2047 2369
2048 - $params = $_POST['params'];
2370 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
2049 2371 if ( !isset($params) || empty($params) ) {
2050 2372 return array(
2051 2373 'success' => false,
2052 2374 'data' => array(
@@ -2160,9 +2482,9 @@
2160 2482 'data' => array(
2161 2483 'msg' => __( 'Data was successfully saved.', "chart-builder" )
2162 2484 )
2163 2485 );
2164 - }
2486 + }
2165 2487
2166 2488 /**
2167 2489 * Chart page action hooks
2168 2490 */
@@ -2206,9 +2528,9 @@
2206 2528
2207 2529 $sources[] = $content;
2208 2530 }
2209 2531 $content_for_escape = implode('' , $sources );
2210 - echo html_entity_decode(esc_html( $content_for_escape ));
2532 + echo html_entity_decode( esc_html($content_for_escape) );
2211 2533 }
2212 2534
2213 2535 public function source_contents_import_from_csv_settings( $sources, $args ){
2214 2536 $html_class_prefix = $args['html_class_prefix'];
@@ -2220,25 +2542,25 @@
2220 2542 <div class="ays-pro-features-v2-big-buttons-box">
2221 2543 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2222 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>
2223 2545 <div class="ays-pro-features-v2-video-text">
2224 - <?php echo __("Watch Video" , "chart-builder"); ?>
2546 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2225 2547 </div>
2226 2548 </a>
2227 2549 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2228 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>
2229 2551 <div class="ays-pro-features-v2-upgrade-text">
2230 - <?php echo __("Upgrade" , "chart-builder"); ?>
2552 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2231 2553 </div>
2232 2554 </a>
2233 2555 </div>
2234 - <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">
2235 2557 <div class="<?php echo esc_attr($html_class_prefix) ?>file-import-form">
2236 - <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>
2237 2559 <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>import-files-file-type">
2238 2560 <option value="csv">CSV File</option>
2239 2561 </select>
2240 - <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>
2241 2563 <p class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example" style="font-size: 15px; font-style: italic;">Example:
2242 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>
2243 2565 </p>
2244 2566 <div>
@@ -2247,16 +2569,16 @@
2247 2569 <div class='ays-chart-file-import-success'></div>
2248 2570 <div class='ays-chart-file-import-error'></div>
2249 2571 <div class="ays-chart-buttons-group">
2250 2572 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-fetch">
2251 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2573 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2252 2574 </button>
2253 2575 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-show-on-chart">
2254 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>
2255 - <?php echo __( 'Preview', "chart-builder" ); ?>
2577 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2256 2578 </button>
2257 2579 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-save">
2258 - <?php echo __( 'Save data', "chart-builder" ); ?>
2580 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2259 2581 </button>
2260 2582 </div>
2261 2583 </div>
2262 2584 </div>
@@ -2286,38 +2608,38 @@
2286 2608 <div class="ays-pro-features-v2-big-buttons-box">
2287 2609 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2288 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>
2289 2611 <div class="ays-pro-features-v2-video-text">
2290 - <?php echo __("Watch Video" , "chart-builder"); ?>
2612 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2291 2613 </div>
2292 2614 </a>
2293 2615 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2294 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>
2295 2617 <div class="ays-pro-features-v2-upgrade-text">
2296 - <?php echo __("Upgrade" , "chart-builder"); ?>
2618 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2297 2619 </div>
2298 2620 </a>
2299 2621 </div>
2300 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2301 - <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">
2302 2624 <div id="ays-chart-db-query">
2303 - <div class="<?= $html_class_prefix ?>-db-query-form">
2625 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2304 2626 <div id="db-query-form">
2305 2627 <input type="hidden" name="chart_id" value="1">
2306 - <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>
2307 2629 <div class='db-wizard-success'></div>
2308 2630 <div class='db-wizard-error'></div>
2309 2631 </div>
2310 2632 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2311 2633 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-fetch">
2312 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2634 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2313 2635 </button>
2314 2636 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-show-on-chart">
2315 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>
2316 - <?php echo __( 'Preview', "chart-builder" ); ?>
2638 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2317 2639 </button>
2318 2640 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-save">
2319 - <?php echo __( 'Save data', "chart-builder" ); ?>
2641 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2320 2642 </button>
2321 2643 </div>
2322 2644 </div>
2323 2645 <div class="db-wizard-hints">
@@ -2322,9 +2644,18 @@
2322 2644 </div>
2323 2645 <div class="db-wizard-hints">
2324 2646 <ul>
2325 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> -->
2326 - <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>
2327 2658 </ul>
2328 2659 </div>
2329 2660 </div>
2330 2661 </div>
@@ -2332,9 +2663,9 @@
2332 2663 </div>
2333 2664 <?php
2334 2665 $content = ob_get_clean();
2335 2666
2336 - $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') . '">
2337 2668 <i class="ays_fa ays_fa_info_circle"></i>
2338 2669 </a>';
2339 2670
2340 2671 $sources['import_from_db'] = array(
@@ -2355,16 +2686,16 @@
2355 2686 <div class="ays-pro-features-v2-big-buttons-box">
2356 2687 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2357 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>
2358 2689 <div class="ays-pro-features-v2-upgrade-text">
2359 - <?php echo __("Upgrade" , "chart-builder"); ?>
2690 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2360 2691 </div>
2361 2692 </a>
2362 2693 </div>
2363 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2364 - <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">
2365 2696 <div class="form-group row mb-2">
2366 - <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">
2367 2698 <label class="form-label">
2368 2699 <?php echo esc_html(__('Use custom database settings for this chart', "chart-builder")); ?>
2369 2700 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __(".","chart-builder") ); ?>">
2370 2701 <i class="ays_fa ays_fa_info_circle"></i>
@@ -2370,9 +2701,9 @@
2370 2701 <i class="ays_fa ays_fa_info_circle"></i>
2371 2702 </a>
2372 2703 </label>
2373 2704 </div>
2374 - <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">
2375 2706 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
2376 2707 <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" type="checkbox" />
2377 2708 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
2378 2709 </label>
@@ -2378,25 +2709,25 @@
2378 2709 </label>
2379 2710 </div>
2380 2711 </div>
2381 2712 <div id="ays-chart-external-db-query">
2382 - <div class="<?= $html_class_prefix ?>-db-query-form">
2713 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2383 2714 <div id="external-db-query-form">
2384 2715 <input type="hidden" name="chart_id" value="1">
2385 - <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>
2386 2717 <div class='db-wizard-success'></div>
2387 2718 <div class='db-wizard-error'></div>
2388 2719 </div>
2389 2720 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2390 2721 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-fetch">
2391 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2722 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2392 2723 </button>
2393 2724 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-show-on-chart">
2394 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>
2395 - <?php echo __( 'Preview', "chart-builder" ); ?>
2726 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2396 2727 </button>
2397 2728 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-save">
2398 - <?php echo __( 'Save data', "chart-builder" ); ?>
2729 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2399 2730 </button>
2400 2731 </div>
2401 2732 </div>
2402 2733 <div class="db-wizard-hints">
@@ -2401,9 +2732,18 @@
2401 2732 </div>
2402 2733 <div class="db-wizard-hints">
2403 2734 <ul>
2404 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> -->
2405 - <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>
2406 2746 </ul>
2407 2747 </div>
2408 2748 </div>
2409 2749 </div>
@@ -2411,9 +2751,9 @@
2411 2751 </div>
2412 2752 <?php
2413 2753 $content = ob_get_clean();
2414 2754
2415 - $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') . '">
2416 2756 <i class="ays_fa ays_fa_info_circle"></i>
2417 2757 </a>';
2418 2758
2419 2759 $sources['import_from_external_db'] = array(
@@ -2447,35 +2787,42 @@
2447 2787 // );
2448 2788
2449 2789 return $sources;
2450 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 +
2451 2801
2452 - $sql = "SELECT `title`, `id` FROM " . $wpdb->prefix . "aysquiz_quizes WHERE `published` = 1 AND `question_ids` <> ''";
2453 - $quizes = $wpdb->get_results($sql, "ARRAY_A");
2454 -
2455 2802 ob_start();
2456 2803 ?>
2457 2804 <div class="ays-accordion-data-main-wrap">
2458 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">
2459 2806 <div id="<?php echo esc_attr($html_class_prefix) ?>quiz-maker-form">
2460 - <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?= $chart_id ?>">
2461 - <div class="<?= $html_class_prefix ?>select-quiz-maker-data-query-container" id="<?= $html_class_prefix ?>quiz-queries">
2462 - <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' ) ?>">
2463 2810 <i class="ays_fa ays_fa_info_circle"></i>
2464 2811 </a>
2465 - <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">
2466 - <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>
2467 2814 <?php foreach ( $quiz_queries as $id => $q):
2468 2815 $disabled = preg_replace('/[^0-9]/', '', $id) <= 6 ? "false" : "true" ; ?>
2469 - <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>
2470 2817 <?php endforeach; ?>
2471 2818 </select>
2472 2819 </div>
2473 2820 <div class="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz-container">
2474 - <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">
2475 - <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>
2476 2823 <?php foreach ( $quizes as $quiz): ?>
2477 - <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>
2478 2825 <?php endforeach; ?>
2479 2826 </select>
2480 2827 </div>
2481 2828 <div id="ays-chart-quiz-maker-success"></div>
@@ -2481,21 +2828,21 @@
2481 2828 <div id="ays-chart-quiz-maker-success"></div>
2482 2829 <div id="ays-chart-quiz-maker-error"></div>
2483 2830 <div class="ays-chart-buttons-group">
2484 2831 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-fetch">
2485 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2832 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2486 2833 </button>
2487 2834 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-show-on-chart">
2488 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>
2489 - <?php echo __( 'Preview', "chart-builder" ); ?>
2836 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2490 2837 </button>
2491 2838 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-save">
2492 - <?php echo __( 'Save data', "chart-builder" ); ?>
2839 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2493 2840 </button>
2494 2841 </div>
2495 2842 </div>
2496 2843 <div>
2497 - <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>
2498 2845 </div>
2499 2846 </div>
2500 2847 </div>
2501 2848 <?php
@@ -2500,11 +2847,18 @@
2500 2847 </div>
2501 2848 <?php
2502 2849 $content = ob_get_clean();
2503 2850
2504 - $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) . '">
2505 - <i class="ays_fa ays_fa_info_circle"></i>
2506 - </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 + );
2507 2861 $sources['quiz_maker'] = array(
2508 2862 'content' => $content,
2509 2863 'title' => $title
2510 2864 );
@@ -2527,23 +2881,23 @@
2527 2881 <div class="ays-pro-features-v2-video-button"></div>
2528 2882 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2529 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>
2530 2884 <div class="ays-pro-features-v2-upgrade-text">
2531 - <?php echo __("Upgrade" , "chart-builder"); ?>
2885 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2532 2886 </div>
2533 2887 </a>
2534 2888 </div>
2535 - <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 ">
2536 2890 <div id="ays-chart-woocommerce-datas">
2537 - <div class="<?= $html_class_prefix ?>woocommerce-datas-form">
2891 + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-form">
2538 2892 <div id="woocommerce-datas-form">
2539 - <input type="hidden" name="chart_id" value="<?= $chart_id ?>">
2540 - <div class="<?= $html_class_prefix ?>woocommerce-datas-query-container" id="<?= $html_class_prefix ?>woocommerce-datas-container-id" >
2541 - <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' ) ?>">
2542 2896 <i class="ays_fa ays_fa_info_circle"></i>
2543 2897 </a>
2544 - <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]">
2545 - <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>
2546 2900 </select>
2547 2901 </div>
2548 2902 <div class='ays-chart-woocommerce-datas-success'></div>
2549 2903 <div class='ays-chart-woocommerce-datas-error'></div>
@@ -2549,16 +2903,16 @@
2549 2903 <div class='ays-chart-woocommerce-datas-error'></div>
2550 2904 </div>
2551 2905 <div class="ays-chart-buttons-group">
2552 2906 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-fetch">
2553 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2907 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2554 2908 </button>
2555 2909 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-show-on-chart">
2556 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>
2557 - <?php echo __( 'Preview', "chart-builder" ); ?>
2911 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2558 2912 </button>
2559 2913 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-save">
2560 - <?php echo __( 'Save data', "chart-builder" ); ?>
2914 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2561 2915 </button>
2562 2916 </div>
2563 2917 </div>
2564 2918 </div>
@@ -2565,12 +2919,19 @@
2565 2919 </div>
2566 2920 </div>
2567 2921 <?php
2568 2922 $content = ob_get_clean();
2569 -
2570 - $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) . '">
2571 - <i class="ays_fa ays_fa_info_circle"></i>
2572 - </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 + );
2573 2934 $sources['woocommerce'] = array(
2574 2935 'content' => $content,
2575 2936 'title' => $title
2576 2937 );
@@ -2584,9 +2945,10 @@
2584 2945 $source = $args['source'];
2585 2946 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2586 2947 $settings = $args['settings'];
2587 2948 $source_chart_type = $args['source_chart_type'];
2588 - $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';
2589 2951
2590 2952 if (isset($source) && !empty($source)) {
2591 2953 if ( !isset( $source[0] ) ) {
2592 2954 if (count($source[1]) > 2) {
@@ -2591,15 +2953,15 @@
2591 2953 if ( !isset( $source[0] ) ) {
2592 2954 if (count($source[1]) > 2) {
2593 2955 $titles = array();
2594 2956 for ($i = 0; $i < count($source[1]); $i++) {
2595 - array_push($titles, __("Title", $this->plugin_name).$i);
2957 + array_push($titles, __("Title", 'chart-builder').$i);
2596 2958 }
2597 2959 $source[0] = $titles;
2598 2960 } else {
2599 2961 $source[0] = array(
2600 - __("Country", $this->plugin_name),
2601 - __("Population", $this->plugin_name),
2962 + __("Country", 'chart-builder'),
2963 + __("Population", 'chart-builder'),
2602 2964 );
2603 2965 }
2604 2966
2605 2967 ksort($source);
@@ -2621,9 +2983,9 @@
2621 2983 ?>
2622 2984 <div class="ays-accordion-data-main-wrap">
2623 2985 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2624 2986 <?php if($source_chart_type != 'org_chart'): ?>
2625 - <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">
2626 2988 <!-- <div class="<//?= $html_class_prefix ?>icons-box">
2627 2989 <img class="<//?= $html_class_prefix ?>add-new-row" src="<//?php echo CHART_BUILDER_ADMIN_URL; ?>/images/icons/add-circle-outline.svg">
2628 2990 </div> -->
2629 2991 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
@@ -2634,14 +2996,14 @@
2634 2996 if ($source_id == 0): ?>
2635 2997 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2636 2998 <div class="ays-chart-empty-data-table-cell"></div>
2637 2999 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2638 - <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); ?>">
2639 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">
2640 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;" />
2641 3003 </svg>
2642 3004 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2643 - <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'" : "" ?>>
2644 3006 <?php if ($each_source_id !== 0): ?>
2645 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">
2646 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;" />
2647 3009 </svg>
@@ -2663,14 +3025,14 @@
2663 3025 </svg>
2664 3026 </div>
2665 3027 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2666 3028 <?php if ($each_source_id == 0): ?>
2667 - <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); ?>">
2668 - <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)); ?>">
2669 3031 </div>
2670 3032 <?php else: ?>
2671 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); ?>">
2672 - <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">
2673 3035 </div>
2674 3036 <?php endif; ?>
2675 3037 <?php endforeach; ?>
2676 3038 </div>
@@ -2677,16 +3039,16 @@
2677 3039 <?php endif; ?>
2678 3040 <?php endif; ?>
2679 3041 <?php endforeach; ?>
2680 3042 <?php else:?>
2681 - <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">
2682 3044 <div style="height: 63.11px; padding: 0 15px;"></div>
2683 - <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">
2684 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">
2685 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;" />
2686 3048 </svg>
2687 3049 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2688 - <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'>
2689 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">
2690 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;" />
2691 3053 </svg>
2692 3054 </div>
@@ -2713,30 +3075,30 @@
2713 3075 <?php endif; ?>
2714 3076 </div>
2715 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">
2716 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">
2717 - <?php echo __( 'Add column', "chart-builder" ); ?>
3079 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2718 3080 </div>
2719 3081 </div>
2720 3082 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2721 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">
2722 - <?php echo __( 'Add row', "chart-builder" ); ?>
3084 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2723 3085 </div>
2724 3086 <br>
2725 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">
2726 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>
2727 - <?php echo __( 'Preview', "chart-builder" ); ?>
3089 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2728 3090 </button>
2729 3091 </div>
2730 3092 <?php endif; ?>
2731 - <div class="<?= $html_class_prefix ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
2732 - <div class="<?= $html_class_prefix ?>chart-source-data-content-org-type">
2733 - <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">
2734 3096 </ul>
2735 3097 </div>
2736 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">
2737 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>
2738 - <?php echo __( 'Preview', "chart-builder" ); ?>
3100 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2739 3101 </button>
2740 3102 </div>
2741 3103 </div>
2742 3104 </div>
@@ -2761,15 +3123,16 @@
2761 3123 $source = $args['source'];
2762 3124 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2763 3125 $settings = $args['settings'];
2764 3126 $source_chart_type = $args['source_chart_type'];
2765 - $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';
2766 3129
2767 3130 ob_start();
2768 3131 ?>
2769 3132 <div class="ays-accordion-data-main-wrap">
2770 3133 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2771 - <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">
2772 3135 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
2773 3136 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content">
2774 3137 <?php if(!empty($source)):
2775 3138 foreach($source as $source_id => $source_value):
@@ -2777,14 +3140,14 @@
2777 3140 if ($source_id == 0): ?>
2778 3141 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2779 3142 <div class="ays-chart-empty-data-table-cell"></div>
2780 3143 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2781 - <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); ?>">
2782 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">
2783 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;" />
2784 3147 </svg>
2785 3148 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2786 - <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'" : "" ?>>
2787 3150 <?php if ($each_source_id !== 0): ?>
2788 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">
2789 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;" />
2790 3153 </svg>
@@ -2806,14 +3169,14 @@
2806 3169 </svg>
2807 3170 </div>
2808 3171 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2809 3172 <?php if ($each_source_id == 0): ?>
2810 - <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); ?>">
2811 - <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)); ?>">
2812 3175 </div>
2813 3176 <?php else: ?>
2814 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); ?>">
2815 - <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">
2816 3179 </div>
2817 3180 <?php endif; ?>
2818 3181 <?php endforeach; ?>
2819 3182 </div>
@@ -2820,16 +3183,16 @@
2820 3183 <?php endif; ?>
2821 3184 <?php endif; ?>
2822 3185 <?php endforeach; ?>
2823 3186 <?php else:?>
2824 - <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">
2825 3188 <div style="height: 63.11px; padding: 0 15px;"></div>
2826 - <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">
2827 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">
2828 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;" />
2829 3192 </svg>
2830 3193 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2831 - <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'>
2832 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">
2833 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;" />
2834 3197 </svg>
2835 3198 </div>
@@ -2856,19 +3219,19 @@
2856 3219 <?php endif; ?>
2857 3220 </div>
2858 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">
2859 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">
2860 - <?php echo __( 'Add column', "chart-builder" ); ?>
3223 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2861 3224 </div>
2862 3225 </div>
2863 3226 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2864 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">
2865 - <?php echo __( 'Add row', "chart-builder" ); ?>
3228 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2866 3229 </div>
2867 3230 <br>
2868 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">
2869 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>
2870 - <?php echo __( 'Preview', "chart-builder" ); ?>
3233 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2871 3234 </button>
2872 3235 </div>
2873 3236 </div>
2874 3237 </div>
@@ -2924,9 +3287,9 @@
2924 3287
2925 3288 $sources[] = $content;
2926 3289 }
2927 3290 $content_for_escape = implode('' , $sources );
2928 - echo html_entity_decode(esc_html( $content_for_escape ));
3291 + echo html_entity_decode( $content_for_escape );
2929 3292 }
2930 3293
2931 3294 public function settings_contents_general_settings( $sources, $args ){
2932 3295 $html_class_prefix = $args['html_class_prefix'];
@@ -3201,9 +3564,9 @@
3201 3564 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3202 3565 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3203 3566 <label for="ays-chart-option-tooltip-trigger">
3204 3567 <?php echo esc_html(__( "Trigger", "chart-builder" )); ?>
3205 - <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") )); ?>">
3206 3569 <i class="ays_fa ays_fa_info_circle"></i>
3207 3570 </a>
3208 3571 </label>
3209 3572 </div>
@@ -3252,9 +3615,9 @@
3252 3615 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3253 3616 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3254 3617 <label for="ays-chart-option-tooltip-font-size" class="form-label">
3255 3618 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3256 - <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") )); ?>">
3257 3620 <i class="ays_fa ays_fa_info_circle"></i>
3258 3621 </a>
3259 3622 </label>
3260 3623 </div>
@@ -3282,9 +3645,9 @@
3282 3645 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3283 3646 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3284 3647 <label for="ays-chart-option-tooltip-bold">
3285 3648 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
3286 - <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") )); ?>">
3287 3650 <i class="ays_fa ays_fa_info_circle"></i>
3288 3651 </a>
3289 3652 </label>
3290 3653 </div>
@@ -3315,8 +3678,47 @@
3315 3678
3316 3679 return $sources;
3317 3680 }
3318 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 +
3319 3721 public function settings_contents_legend_settings( $sources, $args ){
3320 3722 $html_class_prefix = $args['html_class_prefix'];
3321 3723 $html_name_prefix = $args['html_name_prefix'];
3322 3724 $settings = $args['settings'];
@@ -3336,9 +3738,9 @@
3336 3738 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3337 3739 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3338 3740 <label for="ays-chart-option-legend-position">
3339 3741 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3340 - <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") )); ?>">
3341 3743 <i class="ays_fa ays_fa_info_circle"></i>
3342 3744 </a>
3343 3745 </label>
3344 3746 </div>
@@ -3369,9 +3771,9 @@
3369 3771 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3370 3772 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3371 3773 <label for="ays-chart-option-legend-alignment">
3372 3774 <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
3373 - <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") )); ?>">
3374 3776 <i class="ays_fa ays_fa_info_circle"></i>
3375 3777 </a>
3376 3778 </label>
3377 3779 </div>
@@ -3391,9 +3793,9 @@
3391 3793 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3392 3794 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3393 3795 <label for="ays-chart-option-legend-font-color">
3394 3796 <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
3395 - <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") )); ?>">
3396 3798 <i class="ays_fa ays_fa_info_circle"></i>
3397 3799 </a>
3398 3800 </label>
3399 3801 </div>
@@ -3404,9 +3806,9 @@
3404 3806 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3405 3807 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3406 3808 <label for="ays-chart-option-legend-font-size" class="form-label">
3407 3809 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3408 - <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") )); ?>">
3409 3811 <i class="ays_fa ays_fa_info_circle"></i>
3410 3812 </a>
3411 3813 </label>
3412 3814 </div>
@@ -3461,8 +3863,159 @@
3461 3863
3462 3864 return $sources;
3463 3865 }
3464 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 +
3465 4018 public function settings_contents_horizontal_axis_settings( $sources, $args ){
3466 4019 $html_class_prefix = $args['html_class_prefix'];
3467 4020 $html_name_prefix = $args['html_name_prefix'];
3468 4021 $settings = $args['settings'];
@@ -3478,8 +4031,9 @@
3478 4031 $haxis_slanted_text_angle = $settings['haxis_slanted_text_angle'];
3479 4032 $haxis_show_text_every = $settings['haxis_show_text_every'];
3480 4033 $haxis_format_options = $settings['axes_format_options'];
3481 4034 $haxis_format = $settings['haxis_format'];
4035 + $haxis_enable_divide_percent = $settings['haxis_enable_divide_percent'];
3482 4036 $haxis_label_font_size = $settings['haxis_label_font_size'];
3483 4037 $haxis_max_value = $settings['haxis_max_value'];
3484 4038 $haxis_min_value = $settings['haxis_min_value'];
3485 4039 $haxis_text_font_size = $settings['haxis_text_font_size'];
@@ -3493,9 +4047,9 @@
3493 4047 $haxis_minor_gridlines_color = $settings['haxis_minor_gridlines_color'];
3494 4048
3495 4049 ob_start();
3496 4050 ?>
3497 - <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">
3498 4052 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3499 4053 <h6>Label</h6>
3500 4054 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3501 4055 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3500,9 +4054,9 @@
3500 4054 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3501 4055 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3502 4056 <label for="ays-chart-option-haxis-title" class="form-label">
3503 4057 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3504 - <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") ); ?>">
3505 4059 <i class="ays_fa ays_fa_info_circle"></i>
3506 4060 </a>
3507 4061 </label>
3508 4062 </div>
@@ -3587,9 +4141,9 @@
3587 4141 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3588 4142 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3589 4143 <label for="ays-chart-option-haxis-text-position" class="form-label">
3590 4144 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3591 - <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") ); ?>">
3592 4146 <i class="ays_fa ays_fa_info_circle"></i>
3593 4147 </a>
3594 4148 </label>
3595 4149 </div>
@@ -3770,32 +4324,40 @@
3770 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) ?>">
3771 4325 </div>
3772 4326 </div> <!-- Horizontal axis baseline color -->
3773 4327
3774 - <br>
3775 - <h6>Format</h6>
3776 - <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 " >
3777 4331 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3778 4332 <label for="ays-chart-option-haxis-format" class="form-label">
3779 4333 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
3780 4334 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
3781 - echo htmlspecialchars( sprintf (
3782 - "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
3783 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
3784 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
3785 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
3786 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
3787 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
3788 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
3789 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
3790 - '<em>', '</em>',
3791 - '<em>', '</em>',
3792 - '<em>', '</em>',
3793 - '<em>', '</em>',
3794 - '<em>', '</em>',
3795 - '<em>', '</em>',
3796 - '<em>', '</em>'
3797 - ) );
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 + ));
3798 4360 ?>">
3799 4361 <i class="ays_fa ays_fa_info_circle"></i>
3800 4362 </a>
3801 4363 </label>
@@ -3812,10 +4374,26 @@
3812 4374 ?>
3813 4375 </select>
3814 4376 </div>
3815 4377 </div> <!-- Horizontal axis format -->
3816 - <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;'; ?>">
3817 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">
3818 4396 <label for="ays-chart-option-haxis-max-value" class="form-label">
3819 4397 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
3820 4398 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
3821 4399 <i class="ays_fa ays_fa_info_circle"></i>
@@ -3825,9 +4403,9 @@
3825 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">
3826 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) ?>">
3827 4405 </div>
3828 4406 </div> <!-- Horizontal axis max value -->
3829 - <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" >
3830 4408 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3831 4409 <label for="ays-chart-option-haxis-min-value" class="form-label">
3832 4410 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
3833 4411 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -3866,8 +4444,9 @@
3866 4444 $vaxis_text_color = $settings['vaxis_text_color'];
3867 4445 $vaxis_baseline_color = $settings['vaxis_baseline_color'];
3868 4446 $vaxis_format_options = $settings['axes_format_options'];
3869 4447 $vaxis_format = $settings['vaxis_format'];
4448 + $vaxis_enable_divide_percent = $settings['vaxis_enable_divide_percent'];
3870 4449 $vaxis_label_font_size = $settings['vaxis_label_font_size'];
3871 4450 $vaxis_max_value = $settings['vaxis_max_value'];
3872 4451 $vaxis_min_value = $settings['vaxis_min_value'];
3873 4452 $vaxis_text_font_size = $settings['vaxis_text_font_size'];
@@ -3881,9 +4460,9 @@
3881 4460 $vaxis_minor_gridlines_color = $settings['vaxis_minor_gridlines_color'];
3882 4461
3883 4462 ob_start();
3884 4463 ?>
3885 - <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">
3886 4465 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3887 4466 <h6>Label</h6>
3888 4467 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3889 4468 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3888,9 +4467,9 @@
3888 4467 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3889 4468 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3890 4469 <label for="ays-chart-option-vaxis-title" class="form-label">
3891 4470 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3892 - <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") ); ?>">
3893 4472 <i class="ays_fa ays_fa_info_circle"></i>
3894 4473 </a>
3895 4474 </label>
3896 4475 </div>
@@ -3962,9 +4541,9 @@
3962 4541 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3963 4542 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3964 4543 <label for="ays-chart-option-vaxis-text-position" class="form-label">
3965 4544 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3966 - <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") ); ?>">
3967 4546 <i class="ays_fa ays_fa_info_circle"></i>
3968 4547 </a>
3969 4548 </label>
3970 4549 </div>
@@ -4110,24 +4689,32 @@
4110 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) ?>">
4111 4690 </div>
4112 4691 </div> <!-- Vertical axis baseline color -->
4113 4692
4114 - <br>
4115 - <h6>Format</h6>
4116 - <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">
4117 4696 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4118 4697 <label for="ays-chart-option-vaxis-format" class="form-label">
4119 4698 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
4120 4699 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4121 - echo htmlspecialchars( sprintf (
4700 + echo esc_attr( sprintf(
4701 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4122 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>" .
4123 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
4124 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
4125 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
4126 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
4127 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
4128 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
4129 - __('%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>",
4130 4717 '<em>', '</em>',
4131 4718 '<em>', '</em>',
4132 4719 '<em>', '</em>',
4133 4720 '<em>', '</em>',
@@ -4133,9 +4720,9 @@
4133 4720 '<em>', '</em>',
4134 4721 '<em>', '</em>',
4135 4722 '<em>', '</em>',
4136 4723 '<em>', '</em>'
4137 - ) );
4724 + ));
4138 4725 ?>">
4139 4726 <i class="ays_fa ays_fa_info_circle"></i>
4140 4727 </a>
4141 4728 </label>
@@ -4152,10 +4739,26 @@
4152 4739 ?>
4153 4740 </select>
4154 4741 </div>
4155 4742 </div> <!-- Vertical axis format -->
4156 - <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;'; ?>">
4157 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">
4158 4761 <label for="ays-chart-option-vaxis-max-value" class="form-label">
4159 4762 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
4160 4763 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
4161 4764 <i class="ays_fa ays_fa_info_circle"></i>
@@ -4165,9 +4768,9 @@
4165 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">
4166 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) ?>">
4167 4770 </div>
4168 4771 </div> <!-- Vertical axis max value -->
4169 - <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">
4170 4773 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4171 4774 <label for="ays-chart-option-vaxis-min-value" class="form-label">
4172 4775 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
4173 4776 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -4206,9 +4809,9 @@
4206 4809 $animation_easing = $settings['animation_easing'];
4207 4810
4208 4811 ob_start();
4209 4812 ?>
4210 - <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">
4211 4814 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4212 4815 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4213 4816 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4214 4817 <label for="ays-chart-option-enable-animation">
@@ -4259,23 +4862,24 @@
4259 4862 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4260 4863 <label for="ays-chart-option-animation-easing" class="form-label">
4261 4864 <?php echo esc_html(__( "Easing", "chart-builder" )); ?>
4262 4865 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4263 - echo htmlspecialchars( sprintf(
4866 + echo esc_attr( sprintf(
4867 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4264 4868 "<p>" . __('The easing function applied to the chart animation. The following options are available:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4265 - __('%sLinear:%s Constant speed.', "chart-builder") . "</li><li>" .
4266 - __('%sEase in:%s Start slow and speed up.', "chart-builder") . "</li><li>" .
4267 - __('%sEase out:%s Start fast and slow down.', "chart-builder") . "</li><li>" .
4268 - __('%sEase in and out:%s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
4269 - '<em>',
4270 - '</em>',
4271 - '<em>',
4272 - '</em>',
4273 - '<em>',
4274 - '</em>',
4275 - '<em>',
4276 - '</em>'
4277 - ) );
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 + ));
4278 4882 ?>">
4279 4883 <i class="ays_fa ays_fa_info_circle"></i>
4280 4884 </a>
4281 4885 </label>
@@ -4314,9 +4918,9 @@
4314 4918 $html_name_prefix = $args['html_name_prefix'];
4315 4919
4316 4920 ob_start();
4317 4921 ?>
4318 - <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">
4319 4923 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4320 4924 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4321 4925 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4322 4926 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4321,15 +4925,15 @@
4321 4925 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4322 4926 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4323 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>
4324 4928 <div class="ays-pro-features-v2-video-text">
4325 - <?php echo __("Watch Video" , "chart-builder"); ?>
4929 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4326 4930 </div>
4327 4931 </a>
4328 4932 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4329 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>
4330 4934 <div class="ays-pro-features-v2-upgrade-text">
4331 - <?php echo __("Upgrade" , "chart-builder"); ?>
4935 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4332 4936 </div>
4333 4937 </a>
4334 4938 </div>
4335 4939 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4351,15 +4955,15 @@
4351 4955 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4352 4956 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4353 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>
4354 4958 <div class="ays-pro-features-v2-video-text">
4355 - <?php echo __("Watch Video" , "chart-builder"); ?>
4959 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4356 4960 </div>
4357 4961 </a>
4358 4962 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4359 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>
4360 4964 <div class="ays-pro-features-v2-upgrade-text">
4361 - <?php echo __("Upgrade" , "chart-builder"); ?>
4965 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4362 4966 </div>
4363 4967 </a>
4364 4968 </div>
4365 4969 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4399,9 +5003,9 @@
4399 5003 $enable_img = $settings['enable_img'];
4400 5004
4401 5005 ob_start();
4402 5006 ?>
4403 - <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">
4404 5008 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4405 5009 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4406 5010 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4407 5011 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4406,15 +5010,15 @@
4406 5010 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4407 5011 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4408 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>
4409 5013 <div class="ays-pro-features-v2-video-text">
4410 - <?php echo __("Watch Video" , "chart-builder"); ?>
5014 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4411 5015 </div>
4412 5016 </a>
4413 5017 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4414 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>
4415 5019 <div class="ays-pro-features-v2-upgrade-text">
4416 - <?php echo __("Upgrade" , "chart-builder"); ?>
5020 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4417 5021 </div>
4418 5022 </a>
4419 5023 </div>
4420 5024 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4436,15 +5040,15 @@
4436 5040 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4437 5041 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4438 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>
4439 5043 <div class="ays-pro-features-v2-video-text">
4440 - <?php echo __("Watch Video" , "chart-builder"); ?>
5044 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4441 5045 </div>
4442 5046 </a>
4443 5047 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4444 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>
4445 5049 <div class="ays-pro-features-v2-upgrade-text">
4446 - <?php echo __("Upgrade" , "chart-builder"); ?>
5050 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4447 5051 </div>
4448 5052 </a>
4449 5053 </div>
4450 5054 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4466,15 +5070,15 @@
4466 5070 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4467 5071 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4468 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>
4469 5073 <div class="ays-pro-features-v2-video-text">
4470 - <?php echo __("Watch Video" , "chart-builder"); ?>
5074 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4471 5075 </div>
4472 5076 </a>
4473 5077 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4474 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>
4475 5079 <div class="ays-pro-features-v2-upgrade-text">
4476 - <?php echo __("Upgrade" , "chart-builder"); ?>
5080 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4477 5081 </div>
4478 5082 </a>
4479 5083 </div>
4480 5084 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4496,15 +5100,15 @@
4496 5100 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4497 5101 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4498 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>
4499 5103 <div class="ays-pro-features-v2-video-text">
4500 - <?php echo __("Watch Video" , "chart-builder"); ?>
5104 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4501 5105 </div>
4502 5106 </a>
4503 5107 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4504 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>
4505 5109 <div class="ays-pro-features-v2-upgrade-text">
4506 - <?php echo __("Upgrade" , "chart-builder"); ?>
5110 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4507 5111 </div>
4508 5112 </a>
4509 5113 </div>
4510 5114 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4532,9 +5136,9 @@
4532 5136 </label>
4533 5137 </div>
4534 5138 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4535 5139 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
4536 - <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)?> >
4537 5141 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4538 5142 </label>
4539 5143 </div>
4540 5144 </div> <!-- IMG option end -->
@@ -4591,9 +5195,9 @@
4591 5195
4592 5196 $sources[] = $content;
4593 5197 }
4594 5198 $content_for_escape = implode('' , $sources );
4595 - echo html_entity_decode(esc_html( $content_for_escape ));
5199 + echo html_entity_decode( esc_html($content_for_escape) );
4596 5200 }
4597 5201
4598 5202 public function settings_contents_chart_styles_settings( $sources, $args ){
4599 5203 $html_class_prefix = $args['html_class_prefix'];
@@ -4613,12 +5217,19 @@
4613 5217 $org_chart_font_size = $settings['org_chart_font_size'];
4614 5218 $background_color = $settings['background_color'];
4615 5219 $transparent_background = $settings['transparent_background'];
4616 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'];
4617 5227 $border_radius = $settings['border_radius'];
4618 5228 $border_color = $settings['border_color'];
4619 5229 $box_shadow = $settings['box_shadow'];
4620 5230 $box_shadow_color = $settings['box_shadow_color'];
5231 + $padding_outer = $settings['padding_outer'];
4621 5232 ob_start();
4622 5233 ?>
4623 5234 <div class="ays-accordion-data-main-wrap">
4624 5235 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -4625,9 +5236,9 @@
4625 5236 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4626 5237 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4627 5238 <label for="ays-chart-option-width" class="form-label">
4628 5239 <?php echo esc_html(__( "Width", "chart-builder" )); ?>
4629 - <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") ); ?>">
4630 5241 <i class="ays_fa ays_fa_info_circle"></i>
4631 5242 </a>
4632 5243 </label>
4633 5244 </div>
@@ -4648,9 +5259,9 @@
4648 5259 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4649 5260 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4650 5261 <label for="ays-chart-option-responsive-width" class="form-label">
4651 5262 <?php echo esc_html(__( "Responsive Width", "chart-builder" )); ?>
4652 - <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") ); ?>">
4653 5264 <i class="ays_fa ays_fa_info_circle"></i>
4654 5265 </a>
4655 5266 </label>
4656 5267 </div>
@@ -4664,9 +5275,9 @@
4664 5275 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4665 5276 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4666 5277 <label for="ays-chart-option-position">
4667 5278 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4668 - <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") ); ?>">
4669 5280 <i class="ays_fa ays_fa_info_circle"></i>
4670 5281 </a>
4671 5282 </label>
4672 5283 </div>
@@ -4681,14 +5292,14 @@
4681 5292 endforeach;
4682 5293 ?>
4683 5294 </select>
4684 5295 </div>
4685 - </div> <!-- Title position -->
5296 + </div> <!-- Position -->
4686 5297 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4687 5298 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4688 5299 <label for="ays-chart-option-height" class="form-label">
4689 5300 <?php echo esc_html(__( "Height", "chart-builder" )); ?>
4690 - <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") ); ?>">
4691 5302 <i class="ays_fa ays_fa_info_circle"></i>
4692 5303 </a>
4693 5304 </label>
4694 5305 </div>
@@ -4709,9 +5320,9 @@
4709 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">
4710 5321 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4711 5322 <label for="ays-chart-option-font-size" class="form-label">
4712 5323 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
4713 - <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") ); ?>">
4714 5325 <i class="ays_fa ays_fa_info_circle"></i>
4715 5326 </a>
4716 5327 </label>
4717 5328 </div>
@@ -4719,24 +5330,24 @@
4719 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) ?>">
4720 5331 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
4721 5332 </div>
4722 5333 </div> <!-- Font size -->
4723 - <div class="form-group row mb-2 <?= $html_class_prefix ?>options-section cb-changable-opt cb-org_chart-opt display_none">
4724 - <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">
4725 5336 <label for="ays-chart-option-org-chart-font-size" class="form-label">
4726 - <?php echo __( "Element size", $this->plugin_name ); ?>
4727 - <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") ); ?>">
4728 5339 <i class="ays_fa ays_fa_info_circle"></i>
4729 5340 </a>
4730 5341 </label>
4731 5342 </div>
4732 5343 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
4733 - <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]">
4734 5345 <?php
4735 5346 foreach ( $org_chart_font_size_options as $option_slug => $option ):
4736 5347 $selected = ( $org_chart_font_size == $option_slug ) ? 'selected' : '';
4737 5348 ?>
4738 - <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>
4739 5350 <?php
4740 5351 endforeach;
4741 5352 ?>
4742 5353 </select>
@@ -4745,9 +5356,9 @@
4745 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">
4746 5357 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4747 5358 <label for="ays-chart-option-background-color">
4748 5359 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4749 - <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") ); ?>">
4750 5361 <i class="ays_fa ays_fa_info_circle"></i>
4751 5362 </a>
4752 5363 </label>
4753 5364 </div>
@@ -4758,9 +5369,9 @@
4758 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">
4759 5370 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4760 5371 <label for="ays-chart-option-transparent-background" class="form-label">
4761 5372 <?php echo esc_html(__( "Transparent background", "chart-builder" )); ?>
4762 - <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") ); ?>">
4763 5374 <i class="ays_fa ays_fa_info_circle"></i>
4764 5375 </a>
4765 5376 </label>
4766 5377 </div>
@@ -4774,9 +5385,9 @@
4774 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">
4775 5386 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4776 5387 <label for="ays-chart-option-border-width">
4777 5388 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4778 - <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") ); ?>">
4779 5390 <i class="ays_fa ays_fa_info_circle"></i>
4780 5391 </a>
4781 5392 </label>
4782 5393 </div>
@@ -4787,9 +5398,9 @@
4787 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">
4788 5399 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4789 5400 <label for="ays-chart-option-border-color">
4790 5401 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4791 - <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") ); ?>">
4792 5403 <i class="ays_fa ays_fa_info_circle"></i>
4793 5404 </a>
4794 5405 </label>
4795 5406 </div>
@@ -4800,9 +5411,9 @@
4800 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">
4801 5412 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4802 5413 <label for="ays-chart-option-border-radius">
4803 5414 <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
4804 - <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") ); ?>">
4805 5416 <i class="ays_fa ays_fa_info_circle"></i>
4806 5417 </a>
4807 5418 </label>
4808 5419 </div>
@@ -4811,11 +5422,33 @@
4811 5422 </div>
4812 5423 </div> <!-- Border radius -->
4813 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">
4814 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">
4815 5448 <label for="ays-chart-option-box-shadow" class="form-label">
4816 5449 <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
4817 - <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") ); ?>">
4818 5451 <i class="ays_fa ays_fa_info_circle"></i>
4819 5452 </a>
4820 5453 </label>
4821 5454 </div>
@@ -4829,9 +5462,9 @@
4829 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">
4830 5463 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4831 5464 <label for="ays-chart-option-box-shadow-color" class="form-label">
4832 5465 <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
4833 - <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") ); ?>">
4834 5467 <i class="ays_fa ays_fa_info_circle"></i>
4835 5468 </a>
4836 5469 </label>
4837 5470 </div>
@@ -4838,8 +5471,82 @@
4838 5471 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4839 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) ?>">
4840 5473 </div>
4841 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 -->
4842 5549 </div>
4843 5550 </div>
4844 5551 <?php
4845 5552 $content = ob_get_clean();
@@ -4853,8 +5560,273 @@
4853 5560
4854 5561 return $sources;
4855 5562 }
4856 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 +
4857 5829 public function settings_contents_chart_area_styles_settings( $sources, $args ){
4858 5830 $html_class_prefix = $args['html_class_prefix'];
4859 5831 $html_name_prefix = $args['html_name_prefix'];
4860 5832 $settings = $args['settings'];
@@ -4873,9 +5845,9 @@
4873 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">
4874 5846 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4875 5847 <label for="ays-chart-option-chart-background-color">
4876 5848 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4877 - <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") ); ?>">
4878 5850 <i class="ays_fa ays_fa_info_circle"></i>
4879 5851 </a>
4880 5852 </label>
4881 5853 </div>
@@ -4886,9 +5858,9 @@
4886 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">
4887 5859 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4888 5860 <label for="ays-chart-option-chart-border-width">
4889 5861 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4890 - <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") ); ?>">
4891 5863 <i class="ays_fa ays_fa_info_circle"></i>
4892 5864 </a>
4893 5865 </label>
4894 5866 </div>
@@ -4899,9 +5871,9 @@
4899 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">
4900 5872 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4901 5873 <label for="ays-chart-option-chart-border-color">
4902 5874 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4903 - <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") ); ?>">
4904 5876 <i class="ays_fa ays_fa_info_circle"></i>
4905 5877 </a>
4906 5878 </label>
4907 5879 </div>
@@ -4912,9 +5884,9 @@
4912 5884 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4913 5885 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4914 5886 <label for="ays-chart-option-chart-left-margin">
4915 5887 <?php echo esc_html(__( "Left Margin", "chart-builder" )); ?>
4916 - <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") ); ?>">
4917 5889 <i class="ays_fa ays_fa_info_circle"></i>
4918 5890 </a>
4919 5891 </label>
4920 5892 </div>
@@ -4925,9 +5897,9 @@
4925 5897 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4926 5898 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4927 5899 <label for="ays-chart-option-chart-right-margin">
4928 5900 <?php echo esc_html(__( "Right Margin", "chart-builder" )); ?>
4929 - <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") ); ?>">
4930 5902 <i class="ays_fa ays_fa_info_circle"></i>
4931 5903 </a>
4932 5904 </label>
4933 5905 </div>
@@ -4938,9 +5910,9 @@
4938 5910 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4939 5911 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4940 5912 <label for="ays-chart-option-chart-top-margin">
4941 5913 <?php echo esc_html(__( "Top Margin", "chart-builder" )); ?>
4942 - <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") ); ?>">
4943 5915 <i class="ays_fa ays_fa_info_circle"></i>
4944 5916 </a>
4945 5917 </label>
4946 5918 </div>
@@ -4951,9 +5923,9 @@
4951 5923 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4952 5924 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4953 5925 <label for="ays-chart-option-chart-bottom-margin">
4954 5926 <?php echo esc_html(__( "Bottom Margin", "chart-builder" )); ?>
4955 - <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") ); ?>">
4956 5928 <i class="ays_fa ays_fa_info_circle"></i>
4957 5929 </a>
4958 5930 </label>
4959 5931 </div>
@@ -5003,9 +5975,9 @@
5003 5975 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5004 5976 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5005 5977 <label for="ays-chart-option-title-color">
5006 5978 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5007 - <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") ); ?>">
5008 5980 <i class="ays_fa ays_fa_info_circle"></i>
5009 5981 </a>
5010 5982 </label>
5011 5983 </div>
@@ -5016,9 +5988,9 @@
5016 5988 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5017 5989 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5018 5990 <label for="ays-chart-option-title-font-size" class="form-label">
5019 5991 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5020 - <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") ); ?>">
5021 5993 <i class="ays_fa ays_fa_info_circle"></i>
5022 5994 </a>
5023 5995 </label>
5024 5996 </div>
@@ -5030,9 +6002,9 @@
5030 6002 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5031 6003 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5032 6004 <label for="ays-chart-option-title-bold" class="form-label">
5033 6005 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5034 - <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") ); ?>">
5035 6007 <i class="ays_fa ays_fa_info_circle"></i>
5036 6008 </a>
5037 6009 </label>
5038 6010 </div>
@@ -5046,9 +6018,9 @@
5046 6018 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5047 6019 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5048 6020 <label for="ays-chart-option-title-italic" class="form-label">
5049 6021 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5050 - <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") ); ?>">
5051 6023 <i class="ays_fa ays_fa_info_circle"></i>
5052 6024 </a>
5053 6025 </label>
5054 6026 </div>
@@ -5062,9 +6034,9 @@
5062 6034 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5063 6035 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5064 6036 <label for="ays-chart-option-title-position">
5065 6037 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5066 - <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") ); ?>">
5067 6039 <i class="ays_fa ays_fa_info_circle"></i>
5068 6040 </a>
5069 6041 </label>
5070 6042 </div>
@@ -5084,9 +6056,9 @@
5084 6056 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5085 6057 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5086 6058 <label for="ays-chart-option-title-gap" class="form-label">
5087 6059 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5088 - <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") ); ?>">
5089 6061 <i class="ays_fa ays_fa_info_circle"></i>
5090 6062 </a>
5091 6063 </label>
5092 6064 </div>
@@ -5098,9 +6070,9 @@
5098 6070 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5099 6071 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5100 6072 <label for="ays-chart-option-title-gap-description" class="form-label">
5101 6073 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5102 - <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") ); ?>">
5103 6075 <i class="ays_fa ays_fa_info_circle"></i>
5104 6076 </a>
5105 6077 </label>
5106 6078 </div>
@@ -5112,9 +6084,9 @@
5112 6084 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5113 6085 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5114 6086 <label for="ays-chart-option-title-text-transform">
5115 6087 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5116 - <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") ); ?>">
5117 6089 <i class="ays_fa ays_fa_info_circle"></i>
5118 6090 </a>
5119 6091 </label>
5120 6092 </div>
@@ -5134,9 +6106,9 @@
5134 6106 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5135 6107 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5136 6108 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5137 6109 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5138 - <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") ); ?>">
5139 6111 <i class="ays_fa ays_fa_info_circle"></i>
5140 6112 </a>
5141 6113 </label>
5142 6114 </div>
@@ -5148,9 +6120,9 @@
5148 6120 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5149 6121 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5150 6122 <label for="ays-chart-option-title-text-decoration">
5151 6123 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5152 - <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") ); ?>">
5153 6125 <i class="ays_fa ays_fa_info_circle"></i>
5154 6126 </a>
5155 6127 </label>
5156 6128 </div>
@@ -5170,9 +6142,9 @@
5170 6142 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5171 6143 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5172 6144 <label for="ays-chart-option-title-text-shadow" class="form-label">
5173 6145 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5174 - <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") ); ?>">
5175 6147 <i class="ays_fa ays_fa_info_circle"></i>
5176 6148 </a>
5177 6149 </label>
5178 6150 </div>
@@ -5186,9 +6158,9 @@
5186 6158 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5187 6159 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5188 6160 <label for="ays-chart-option-title-shadow-color">
5189 6161 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5190 - <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") ); ?>">
5191 6163 <i class="ays_fa ays_fa_info_circle"></i>
5192 6164 </a>
5193 6165 </label>
5194 6166 </div>
@@ -5238,9 +6210,9 @@
5238 6210 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5239 6211 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5240 6212 <label for="ays-chart-option-title-color">
5241 6213 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5242 - <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") ); ?>">
5243 6215 <i class="ays_fa ays_fa_info_circle"></i>
5244 6216 </a>
5245 6217 </label>
5246 6218 </div>
@@ -5251,9 +6223,9 @@
5251 6223 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5252 6224 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5253 6225 <label for="ays-chart-option-title-font-size" class="form-label">
5254 6226 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5255 - <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") ); ?>">
5256 6228 <i class="ays_fa ays_fa_info_circle"></i>
5257 6229 </a>
5258 6230 </label>
5259 6231 </div>
@@ -5265,9 +6237,9 @@
5265 6237 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5266 6238 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5267 6239 <label for="ays-chart-option-title-bold" class="form-label">
5268 6240 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5269 - <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") ); ?>">
5270 6242 <i class="ays_fa ays_fa_info_circle"></i>
5271 6243 </a>
5272 6244 </label>
5273 6245 </div>
@@ -5281,9 +6253,9 @@
5281 6253 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5282 6254 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5283 6255 <label for="ays-chart-option-title-italic" class="form-label">
5284 6256 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5285 - <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") ); ?>">
5286 6258 <i class="ays_fa ays_fa_info_circle"></i>
5287 6259 </a>
5288 6260 </label>
5289 6261 </div>
@@ -5297,9 +6269,9 @@
5297 6269 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5298 6270 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5299 6271 <label for="ays-chart-option-title-position">
5300 6272 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5301 - <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") ); ?>">
5302 6274 <i class="ays_fa ays_fa_info_circle"></i>
5303 6275 </a>
5304 6276 </label>
5305 6277 </div>
@@ -5319,9 +6291,9 @@
5319 6291 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5320 6292 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5321 6293 <label for="ays-chart-option-title-gap" class="form-label">
5322 6294 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5323 - <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") ); ?>">
5324 6296 <i class="ays_fa ays_fa_info_circle"></i>
5325 6297 </a>
5326 6298 </label>
5327 6299 </div>
@@ -5333,9 +6305,9 @@
5333 6305 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5334 6306 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5335 6307 <label for="ays-chart-option-title-gap-description" class="form-label">
5336 6308 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5337 - <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") ); ?>">
5338 6310 <i class="ays_fa ays_fa_info_circle"></i>
5339 6311 </a>
5340 6312 </label>
5341 6313 </div>
@@ -5347,9 +6319,9 @@
5347 6319 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5348 6320 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5349 6321 <label for="ays-chart-option-title-text-transform">
5350 6322 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5351 - <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") ); ?>">
5352 6324 <i class="ays_fa ays_fa_info_circle"></i>
5353 6325 </a>
5354 6326 </label>
5355 6327 </div>
@@ -5369,9 +6341,9 @@
5369 6341 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5370 6342 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5371 6343 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5372 6344 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5373 - <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") ); ?>">
5374 6346 <i class="ays_fa ays_fa_info_circle"></i>
5375 6347 </a>
5376 6348 </label>
5377 6349 </div>
@@ -5383,9 +6355,9 @@
5383 6355 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5384 6356 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5385 6357 <label for="ays-chart-option-title-text-decoration">
5386 6358 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5387 - <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") ); ?>">
5388 6360 <i class="ays_fa ays_fa_info_circle"></i>
5389 6361 </a>
5390 6362 </label>
5391 6363 </div>
@@ -5405,9 +6377,9 @@
5405 6377 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5406 6378 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5407 6379 <label for="ays-chart-option-title-text-shadow" class="form-label">
5408 6380 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5409 - <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") ); ?>">
5410 6382 <i class="ays_fa ays_fa_info_circle"></i>
5411 6383 </a>
5412 6384 </label>
5413 6385 </div>
@@ -5421,9 +6393,9 @@
5421 6393 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5422 6394 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5423 6395 <label for="ays-chart-option-title-shadow-color">
5424 6396 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5425 - <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") ); ?>">
5426 6398 <i class="ays_fa ays_fa_info_circle"></i>
5427 6399 </a>
5428 6400 </label>
5429 6401 </div>
@@ -5472,9 +6444,9 @@
5472 6444 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5473 6445 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5474 6446 <label for="ays-chart-option-description-color">
5475 6447 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5476 - <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") ); ?>">
5477 6449 <i class="ays_fa ays_fa_info_circle"></i>
5478 6450 </a>
5479 6451 </label>
5480 6452 </div>
@@ -5485,9 +6457,9 @@
5485 6457 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5486 6458 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5487 6459 <label for="ays-chart-option-description-font-size" class="form-label">
5488 6460 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5489 - <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") ); ?>">
5490 6462 <i class="ays_fa ays_fa_info_circle"></i>
5491 6463 </a>
5492 6464 </label>
5493 6465 </div>
@@ -5499,9 +6471,9 @@
5499 6471 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5500 6472 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5501 6473 <label for="ays-chart-option-description-bold" class="form-label">
5502 6474 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5503 - <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") ); ?>">
5504 6476 <i class="ays_fa ays_fa_info_circle"></i>
5505 6477 </a>
5506 6478 </label>
5507 6479 </div>
@@ -5515,9 +6487,9 @@
5515 6487 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5516 6488 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5517 6489 <label for="ays-chart-option-description-italic" class="form-label">
5518 6490 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5519 - <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") ); ?>">
5520 6492 <i class="ays_fa ays_fa_info_circle"></i>
5521 6493 </a>
5522 6494 </label>
5523 6495 </div>
@@ -5531,9 +6503,9 @@
5531 6503 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5532 6504 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5533 6505 <label for="ays-chart-option-description-position">
5534 6506 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5535 - <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") ); ?>">
5536 6508 <i class="ays_fa ays_fa_info_circle"></i>
5537 6509 </a>
5538 6510 </label>
5539 6511 </div>
@@ -5553,9 +6525,9 @@
5553 6525 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5554 6526 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5555 6527 <label for="ays-chart-option-description-text-transform">
5556 6528 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5557 - <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") ); ?>">
5558 6530 <i class="ays_fa ays_fa_info_circle"></i>
5559 6531 </a>
5560 6532 </label>
5561 6533 </div>
@@ -5575,9 +6547,9 @@
5575 6547 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5576 6548 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5577 6549 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5578 6550 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5579 - <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") ); ?>">
5580 6552 <i class="ays_fa ays_fa_info_circle"></i>
5581 6553 </a>
5582 6554 </label>
5583 6555 </div>
@@ -5589,9 +6561,9 @@
5589 6561 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5590 6562 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5591 6563 <label for="ays-chart-option-description-text-decoration">
5592 6564 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5593 - <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") ); ?>">
5594 6566 <i class="ays_fa ays_fa_info_circle"></i>
5595 6567 </a>
5596 6568 </label>
5597 6569 </div>
@@ -5611,9 +6583,9 @@
5611 6583 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5612 6584 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5613 6585 <label for="ays-chart-option-description-text-shadow" class="form-label">
5614 6586 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5615 - <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") ); ?>">
5616 6588 <i class="ays_fa ays_fa_info_circle"></i>
5617 6589 </a>
5618 6590 </label>
5619 6591 </div>
@@ -5627,9 +6599,9 @@
5627 6599 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5628 6600 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5629 6601 <label for="ays-chart-option-description-shadow-color">
5630 6602 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5631 - <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") ); ?>">
5632 6604 <i class="ays_fa ays_fa_info_circle"></i>
5633 6605 </a>
5634 6606 </label>
5635 6607 </div>
@@ -5678,9 +6650,9 @@
5678 6650 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5679 6651 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5680 6652 <label for="ays-chart-option-description-color">
5681 6653 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5682 - <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") ); ?>">
5683 6655 <i class="ays_fa ays_fa_info_circle"></i>
5684 6656 </a>
5685 6657 </label>
5686 6658 </div>
@@ -5691,9 +6663,9 @@
5691 6663 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5692 6664 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5693 6665 <label for="ays-chart-option-description-font-size" class="form-label">
5694 6666 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5695 - <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") ); ?>">
5696 6668 <i class="ays_fa ays_fa_info_circle"></i>
5697 6669 </a>
5698 6670 </label>
5699 6671 </div>
@@ -5705,9 +6677,9 @@
5705 6677 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5706 6678 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5707 6679 <label for="ays-chart-option-description-bold" class="form-label">
5708 6680 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5709 - <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") ); ?>">
5710 6682 <i class="ays_fa ays_fa_info_circle"></i>
5711 6683 </a>
5712 6684 </label>
5713 6685 </div>
@@ -5721,9 +6693,9 @@
5721 6693 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5722 6694 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5723 6695 <label for="ays-chart-option-description-italic" class="form-label">
5724 6696 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5725 - <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") ); ?>">
5726 6698 <i class="ays_fa ays_fa_info_circle"></i>
5727 6699 </a>
5728 6700 </label>
5729 6701 </div>
@@ -5737,9 +6709,9 @@
5737 6709 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5738 6710 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5739 6711 <label for="ays-chart-option-description-position">
5740 6712 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5741 - <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") ); ?>">
5742 6714 <i class="ays_fa ays_fa_info_circle"></i>
5743 6715 </a>
5744 6716 </label>
5745 6717 </div>
@@ -5759,9 +6731,9 @@
5759 6731 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5760 6732 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5761 6733 <label for="ays-chart-option-description-text-transform">
5762 6734 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5763 - <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") ); ?>">
5764 6736 <i class="ays_fa ays_fa_info_circle"></i>
5765 6737 </a>
5766 6738 </label>
5767 6739 </div>
@@ -5781,9 +6753,9 @@
5781 6753 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5782 6754 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5783 6755 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5784 6756 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5785 - <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") ); ?>">
5786 6758 <i class="ays_fa ays_fa_info_circle"></i>
5787 6759 </a>
5788 6760 </label>
5789 6761 </div>
@@ -5795,9 +6767,9 @@
5795 6767 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5796 6768 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5797 6769 <label for="ays-chart-option-description-text-decoration">
5798 6770 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5799 - <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") ); ?>">
5800 6772 <i class="ays_fa ays_fa_info_circle"></i>
5801 6773 </a>
5802 6774 </label>
5803 6775 </div>
@@ -5817,9 +6789,9 @@
5817 6789 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5818 6790 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5819 6791 <label for="ays-chart-option-description-text-shadow" class="form-label">
5820 6792 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5821 - <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") ); ?>">
5822 6794 <i class="ays_fa ays_fa_info_circle"></i>
5823 6795 </a>
5824 6796 </label>
5825 6797 </div>
@@ -5833,9 +6805,9 @@
5833 6805 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5834 6806 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5835 6807 <label for="ays-chart-option-description-shadow-color">
5836 6808 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5837 - <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") ); ?>">
5838 6810 <i class="ays_fa ays_fa_info_circle"></i>
5839 6811 </a>
5840 6812 </label>
5841 6813 </div>
@@ -5896,9 +6868,9 @@
5896 6868
5897 6869 $sources[] = $content;
5898 6870 }
5899 6871 $content_for_escape = implode('' , $sources );
5900 - echo html_entity_decode(esc_html( $content_for_escape ));
6872 + echo html_entity_decode( esc_html($content_for_escape) );
5901 6873 }
5902 6874
5903 6875 public function settings_contents_advanced_settings( $sources, $args ){
5904 6876 $html_class_prefix = $args['html_class_prefix'];
@@ -6003,9 +6975,9 @@
6003 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">
6004 6976 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6005 6977 <label for="ays-chart-option-slice-text">
6006 6978 <?php echo esc_html(__( "Slice text", "chart-builder" )); ?>
6007 - <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") ); ?>">
6008 6980 <i class="ays_fa ays_fa_info_circle"></i>
6009 6981 </a>
6010 6982 </label>
6011 6983 </div>
@@ -6025,9 +6997,9 @@
6025 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">
6026 6998 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6027 6999 <label for="ays-chart-option-tooltip-text">
6028 7000 <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?>
6029 - <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") ); ?>">
6030 7002 <i class="ays_fa ays_fa_info_circle"></i>
6031 7003 </a>
6032 7004 </label>
6033 7005 </div>
@@ -6060,9 +7032,9 @@
6060 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">
6061 7033 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6062 7034 <label for="ays-chart-option-data-grouping-label" class="form-label">
6063 7035 <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?>
6064 - <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") ); ?>">
6065 7037 <i class="ays_fa ays_fa_info_circle"></i>
6066 7038 </a>
6067 7039 </label>
6068 7040 </div>
@@ -6103,17 +7075,18 @@
6103 7075 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6104 7076 <label for="ays-chart-option-focus-target">
6105 7077 <?php echo esc_html(__( "Focus target", "chart-builder" )); ?>
6106 7078 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6107 - echo htmlspecialchars( sprintf(
7079 + echo esc_html( sprintf(
7080 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6108 7081 "<p>" . __('There are two ways to focus the data table elements.', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6109 - __('%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>" .
6110 - __('%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>",
6111 - '<em>',
6112 - '</em>',
6113 - '<em>',
6114 - '</em>'
6115 - ) );
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 + ));
6116 7089 ?>">
6117 7090 <i class="ays_fa ays_fa_info_circle"></i>
6118 7091 </a>
6119 7092 </label>
@@ -6148,17 +7121,18 @@
6148 7121 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6149 7122 <label for="ays-chart-option-group-width">
6150 7123 <?php echo esc_html(__( "Bar width", "chart-builder" )); ?>
6151 7124 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6152 - echo htmlspecialchars( sprintf(
7125 + echo esc_html( sprintf(
7126 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6153 7127 "<p>" . __('The width of the bars, specified in either of these formats:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6154 - __('%sPixels:%s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
6155 - __('%sPercentage:%s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
6156 - '<em>',
6157 - '</em>',
6158 - '<em>',
6159 - '</em>'
6160 - ) );
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 + ));
6161 7135 ?>">
6162 7136 <i class="ays_fa ays_fa_info_circle"></i>
6163 7137 </a>
6164 7138 </label>
@@ -6210,23 +7184,24 @@
6210 7184 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6211 7185 <label for="ays-chart-option-multiple-data-format">
6212 7186 <?php echo esc_html(__( "Multiple data format", "chart-builder" )); ?>
6213 7187 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6214 - echo htmlspecialchars( sprintf(
7188 + echo esc_html( sprintf(
7189 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6215 7190 "<p>" . __('How multiple data selections are rolled up into tooltips:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6216 - __('%sCategory:%s Group selected data by row titles.', "chart-builder") . "</li><li>" .
6217 - __('%sSeries:%s Group selected data by column titles.', "chart-builder") . "</li><li>" .
6218 - __('%sAuto:%s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
6219 - __('%sNone:%s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
6220 - '<em>',
6221 - '</em>',
6222 - '<em>',
6223 - '</em>',
6224 - '<em>',
6225 - '</em>',
6226 - '<em>',
6227 - '</em>'
6228 - ) );
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 + ));
6229 7204 ?>">
6230 7205 <i class="ays_fa ays_fa_info_circle"></i>
6231 7206 </a>
6232 7207 </label>
@@ -6381,15 +7356,15 @@
6381 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) ?>">
6382 7357 </div>
6383 7358 </div> <!-- Line dash pattern -->
6384 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">
6385 - <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">
6386 7361 <label for="ays-chart-option-donut-hole-size">
6387 - <?php echo __( "Hole size", $this->plugin_name ); ?>
7362 + <?php echo esc_html(__( "Hole size", 'chart-builder' )); ?>
6388 7363 </label>
6389 7364 </div>
6390 - <div class="col-sm-7 <?= $html_class_prefix ?>input-align-right <?= $html_class_prefix ?>option-input">
6391 - <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) ?>">
6392 7367 </div>
6393 7368 </div> <!-- Donut hole size -->
6394 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">
6395 7370 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
@@ -6396,20 +7371,20 @@
6396 7371 <div class="ays-pro-features-v2-video-button"></div>
6397 7372 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
6398 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>
6399 7374 <div class="ays-pro-features-v2-upgrade-text">
6400 - <?php echo __("Upgrade" , "chart-builder"); ?>
7375 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
6401 7376 </div>
6402 7377 </a>
6403 7378 </div>
6404 - <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">
6405 7380 <label for="ays-chart-option-curve-type">
6406 - <?php echo __( "Line curve type", "chart-builder" ); ?>
7381 + <?php echo esc_html(__( "Line curve type", "chart-builder" )); ?>
6407 7382 </label>
6408 7383 </div>
6409 7384 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
6410 - <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]">
6411 - <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>
6412 7387 </select>
6413 7388 </div>
6414 7389 </div> <!-- Line curve type -->
6415 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">
@@ -6457,9 +7432,9 @@
6457 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">
6458 7433 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6459 7434 <label for="ays-chart-option-org-classname" class="form-label">
6460 7435 <?php echo esc_html(__( "Custom CSS class", "chart-builder" )); ?>
6461 - <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") ); ?>">
6462 7437 <i class="ays_fa ays_fa_info_circle"></i>
6463 7438 </a>
6464 7439 </label>
6465 7440 </div>
@@ -6470,9 +7445,11 @@
6470 7445 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6471 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">
6472 7447 <br>
6473 7448 <blockquote>
6474 - <?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>'); ?>
6475 7452 </blockquote>
6476 7453 <br>
6477 7454 </div>
6478 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">
@@ -6570,9 +7547,9 @@
6570 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">
6571 7548 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6572 7549 <label for="ays-chart-option-org-selected-classname" class="form-label">
6573 7550 <?php echo esc_html(__( "Selected node custom CSS class", "chart-builder" )); ?>
6574 - <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") ); ?>">
6575 7552 <i class="ays_fa ays_fa_info_circle"></i>
6576 7553 </a>
6577 7554 </label>
6578 7555 </div>
@@ -6583,9 +7560,14 @@
6583 7560 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6584 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">
6585 7562 <br>
6586 7563 <blockquote>
6587 - <?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 + ); ?>
6588 7570 </blockquote>
6589 7571 <br>
6590 7572 </div>
6591 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">
@@ -6637,8 +7619,10 @@
6637 7619 $outer_radius = $settings['outer_radius'];
6638 7620 $slice_spacing = $settings['slice_spacing'];
6639 7621 $circumference = $settings['circumference'];
6640 7622 $start_angle = $settings['start_angle'];
7623 + $slice_border_color = $settings['slice_border_color'];
7624 + $slice_border_width = $settings['slice_border_width'];
6641 7625 // $index_axis = $settings['index_axis'];
6642 7626
6643 7627 ob_start();
6644 7628 ?>
@@ -6699,8 +7683,34 @@
6699 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) ?>">
6700 7684 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">°</div>
6701 7685 </div>
6702 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 -->
6703 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">
6704 7714 <div class="col-sm-5 d-flex align-items-center <?php // echo esc_attr($html_class_prefix) ?>option-title">
6705 7715 <label for="ays-chart-option-index-axis">
6706 7716 <?php // echo esc_html(__( "Horizontal ", "chart-builder" )); ?>
@@ -6743,15 +7753,15 @@
6743 7753 if ( !isset( $source[0] ) ) {
6744 7754 if (count($source[1]) > 2) {
6745 7755 $titles = array();
6746 7756 for ($i = 0; $i < count($source[1]); $i++) {
6747 - array_push($titles, __("Title", $this->plugin_name).$i);
7757 + array_push($titles, __("Title", 'chart-builder').$i);
6748 7758 }
6749 7759 $source[0] = $titles;
6750 7760 } else {
6751 7761 $source[0] = array(
6752 - __("Country", $this->plugin_name),
6753 - __("Population", $this->plugin_name),
7762 + __("Country", 'chart-builder'),
7763 + __("Population", 'chart-builder'),
6754 7764 );
6755 7765 }
6756 7766
6757 7767 ksort($source);
@@ -6784,9 +7794,9 @@
6784 7794 <g>
6785 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" />
6786 7796 </g>
6787 7797 </svg>
6788 - <span><?php echo $val[0]; ?></span>
7798 + <span><?php echo esc_html($val[0]); ?></span>
6789 7799 </legend>
6790 7800 <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
6791 7801 <div class="ays-slices-accordion-data-main-wrap">
6792 7802 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6793,9 +7803,9 @@
6793 7803 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6794 7804 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6795 7805 <label for="ays-chart-option-slice-color">
6796 7806 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
6797 - <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") ); ?>">
6798 7808 <i class="ays_fa ays_fa_info_circle"></i>
6799 7809 </a>
6800 7810 </label>
6801 7811 </div>
@@ -6800,13 +7810,13 @@
6800 7810 </label>
6801 7811 </div>
6802 7812 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6803 7813 <input type="color"
6804 - id="ays-chart-option-slice-color-<?php echo $key; ?>"
7814 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
6805 7815 class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6806 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo $key; ?>]"
6807 - value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : $slice_colors_default[$key]; ?>"
6808 - 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); ?>">
6809 7819 </div>
6810 7820 </div> <!-- Slice color -->
6811 7821 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6812 7822 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6818,13 +7828,13 @@
6818 7828 </label>
6819 7829 </div>
6820 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">
6821 7831 <input type="number"
6822 - id="ays-chart-option-slice-offset-<?php echo $key; ?>"
7832 + id="ays-chart-option-slice-offset-<?php echo esc_attr($key); ?>"
6823 7833 class="ays-chart-option-slice-offset ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
6824 - 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); ?>]"
6825 7835 value="<?php echo isset($slice_offset[$key]) ? esc_attr($slice_offset[$key]) : 0 ; ?>"
6826 - data-slice-id="<?php echo $key; ?>"
7836 + data-slice-id="<?php echo esc_attr($key); ?>"
6827 7837 step=".01" min="0.0" max="1.0">
6828 7838 </div>
6829 7839 </div> <!-- Slice offset -->
6830 7840 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
@@ -6830,9 +7840,9 @@
6830 7840 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6831 7841 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6832 7842 <label for="ays-chart-option-slice-text-color">
6833 7843 <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
6834 - <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") ); ?>">
6835 7845 <i class="ays_fa ays_fa_info_circle"></i>
6836 7846 </a>
6837 7847 </label>
6838 7848 </div>
@@ -6837,13 +7847,13 @@
6837 7847 </label>
6838 7848 </div>
6839 7849 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6840 7850 <input type="color"
6841 - id="ays-chart-option-slice-text-color-<?php echo $key; ?>"
7851 + id="ays-chart-option-slice-text-color-<?php echo esc_attr($key); ?>"
6842 7852 class="ays-chart-option-slice-text-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6843 - 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); ?>]"
6844 7854 value="<?php echo isset($slice_text_color[$key]) ? esc_attr($slice_text_color[$key]) : '#ffffff'; ?>"
6845 - data-slice-id="<?php echo $key; ?>">
7855 + data-slice-id="<?php echo esc_attr($key); ?>">
6846 7856 </div>
6847 7857 </div> <!-- Slice color -->
6848 7858 </div>
6849 7859 </div>
@@ -6855,9 +7865,9 @@
6855 7865 </div>
6856 7866 </div>
6857 7867 <br>
6858 7868 <blockquote>
6859 - <?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" )); ?>
6860 7870 </blockquote>
6861 7871 </div>
6862 7872 <?php
6863 7873
@@ -6868,9 +7878,9 @@
6868 7878 }
6869 7879
6870 7880 $content = ob_get_clean();
6871 7881
6872 - $title = __( 'Slices settings', "chart-builder" );
7882 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
6873 7883
6874 7884 $sources['slices_settings'] = array(
6875 7885 'content' => $content,
6876 7886 'title' => $title
@@ -6877,9 +7887,120 @@
6877 7887 );
6878 7888
6879 7889 return $sources;
6880 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);
6881 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 +
6882 8003 public function settings_contents_series_settings( $sources, $args ){
6883 8004 $html_class_prefix = $args['html_class_prefix'];
6884 8005 $html_name_prefix = $args['html_name_prefix'];
6885 8006 $settings = $args['settings'];
@@ -6896,15 +8017,15 @@
6896 8017 if ( !isset( $source[0] ) ) {
6897 8018 if (count($source[1]) > 2) {
6898 8019 $titles = array();
6899 8020 for ($i = 0; $i < count($source[1]); $i++) {
6900 - array_push($titles, __("Title", $this->plugin_name).$i);
8021 + array_push($titles, __("Title", "chart-builder").$i);
6901 8022 }
6902 8023 $source[0] = $titles;
6903 8024 } else {
6904 8025 $source[0] = array(
6905 - __("Country", $this->plugin_name),
6906 - __("Population", $this->plugin_name),
8026 + __("Country", "chart-builder"),
8027 + __("Population", "chart-builder"),
6907 8028 );
6908 8029 }
6909 8030
6910 8031 ksort($source);
@@ -6922,8 +8043,9 @@
6922 8043 $series_row = array_shift($source);
6923 8044 $title = array_shift($series_row);
6924 8045 $series_color = $settings['series_color'];
6925 8046 $series_colors_default = $settings['series_colors_default'];
8047 + $series_format = $settings['series_format'];
6926 8048 $series_visible_in_legend = $settings['series_visible_in_legend'];
6927 8049 $series_line_width = $settings['series_line_width'];
6928 8050 $series_point_size = $settings['series_point_size'];
6929 8051 $series_point_shape = $settings['series_point_shape'];
@@ -6941,9 +8063,9 @@
6941 8063 <g>
6942 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" />
6943 8065 </g>
6944 8066 </svg>
6945 - <span><?php echo $val; ?></span>
8067 + <span><?php echo esc_attr($val); ?></span>
6946 8068 </legend>
6947 8069 <div class="ays-series-accordion-options-content ays-series-accordion-options-content">
6948 8070 <div class="ays-series-accordion-data-main-wrap">
6949 8071 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6954,13 +8076,13 @@
6954 8076 </label>
6955 8077 </div>
6956 8078 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6957 8079 <input type="color"
6958 - id="ays-chart-option-series-color-<?php echo $key; ?>"
8080 + id="ays-chart-option-series-color-<?php echo esc_attr($key); ?>"
6959 8081 class="ays-chart-option-series-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6960 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo $key; ?>]"
6961 - value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : $series_colors_default[$key]; ?>"
6962 - 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); ?>">
6963 8085 </div>
6964 8086 </div> <!-- series color -->
6965 8087 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6966 8088 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6973,18 +8095,36 @@
6973 8095 </div>
6974 8096 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6975 8097 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
6976 8098 <input type="checkbox"
6977 - 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); ?>"
6978 8100 class="ays-chart-option-series-visible-in-legend <?php echo esc_attr($html_class_prefix) ?>toggle-switch"
6979 - 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); ?>]"
6980 8102 value="on"
6981 - data-series-id="<?php echo $key; ?>"
8103 + data-series-id="<?php echo esc_attr($key); ?>"
6982 8104 <?php echo isset($series_visible_in_legend[$key]) && $series_visible_in_legend[$key] == 'on' ? 'checked' : (!isset($series_color[$key]) ? 'checked' : ''); ?> >
6983 8105 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
6984 8106 </label>
6985 8107 </div>
6986 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 -->
6987 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">
6988 8128 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6989 8129 <label for="ays-chart-option-series-line-width">
6990 8130 <?php echo esc_html(__( "Line width", "chart-builder" )); ?>
@@ -6994,13 +8134,13 @@
6994 8134 </label>
6995 8135 </div>
6996 8136 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6997 8137 <input type="number"
6998 - id="ays-chart-option-series-line-width-<?php echo $key; ?>"
8138 + id="ays-chart-option-series-line-width-<?php echo esc_attr($key); ?>"
6999 8139 class="ays-chart-option-series-line-width ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7000 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo $key; ?>]"
7001 - value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : $line_width; ?>"
7002 - 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); ?>">
7003 8143 </div>
7004 8144 </div> <!-- Line width -->
7005 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">
7006 8146 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7012,13 +8152,13 @@
7012 8152 </label>
7013 8153 </div>
7014 8154 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7015 8155 <input type="number"
7016 - id="ays-chart-option-series-point-size-<?php echo $key; ?>"
8156 + id="ays-chart-option-series-point-size-<?php echo esc_attr($key); ?>"
7017 8157 class="ays-chart-option-series-point-size ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7018 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo $key; ?>]"
7019 - value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : $point_size; ?>"
7020 - 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); ?>">
7021 8161 </div>
7022 8162 </div> <!-- Point size -->
7023 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">
7024 8164 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7030,12 +8170,12 @@
7030 8170 </label>
7031 8171 </div>
7032 8172 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7033 8173 <select
7034 - id="ays-chart-option-series-point-shape-<?php echo $key; ?>"
8174 + id="ays-chart-option-series-point-shape-<?php echo esc_attr($key); ?>"
7035 8175 class="ays-chart-option-series-point-shape <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select"
7036 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo $key; ?>]"
7037 - 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); ?>">
7038 8178 >
7039 8179 <?php
7040 8180 $value = isset($series_point_shape[$key]) ? esc_attr($series_point_shape[$key]) : $point_shape;
7041 8181 foreach ( $point_shape_options as $option_slug => $option ):
@@ -7058,11 +8198,16 @@
7058 8198 </div>
7059 8199 </div>
7060 8200 <br>
7061 8201 <blockquote>
7062 - <?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' )); ?>
7063 8203 <br>
7064 - <?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 + ); ?>
7065 8210 </blockquote>
7066 8211 </div>
7067 8212 <?php
7068 8213
@@ -7096,15 +8241,15 @@
7096 8241 if ( !isset( $source[0] ) ) {
7097 8242 if (count($source[1]) > 2) {
7098 8243 $titles = array();
7099 8244 for ($i = 0; $i < count($source[1]); $i++) {
7100 - array_push($titles, __("Title", $this->plugin_name).$i);
8245 + array_push($titles, __("Title", 'chart-builder').$i);
7101 8246 }
7102 8247 $source[0] = $titles;
7103 8248 } else {
7104 8249 $source[0] = array(
7105 - __("Country", $this->plugin_name),
7106 - __("Population", $this->plugin_name),
8250 + __("Country", 'chart-builder'),
8251 + __("Population", 'chart-builder'),
7107 8252 );
7108 8253 }
7109 8254
7110 8255 ksort($source);
@@ -7150,9 +8295,9 @@
7150 8295 <g>
7151 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" />
7152 8297 </g>
7153 8298 </svg>
7154 - <span><?php echo $val; ?></span>
8299 + <span><?php echo esc_html($val); ?></span>
7155 8300 </legend>
7156 8301 <div class="ays-rows-accordion-options-content ays-rows-accordion-options-content">
7157 8302 <div class="ays-rows-accordion-data-main-wrap">
7158 8303 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7163,13 +8308,13 @@
7163 8308 </label>
7164 8309 </div>
7165 8310 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7166 8311 <input type="color"
7167 - id="ays-chart-option-rows-color-<?php echo $key; ?>"
8312 + id="ays-chart-option-rows-color-<?php echo esc_attr($key); ?>"
7168 8313 class="ays-chart-option-rows-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7169 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo $key; ?>]"
7170 - value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : $series_color; ?>"
7171 - 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); ?>">
7172 8317 </div>
7173 8318 </div> <!-- color -->
7174 8319 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7175 8320 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7178,13 +8323,13 @@
7178 8323 </label>
7179 8324 </div>
7180 8325 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7181 8326 <input type="number"
7182 - id="ays-chart-option-rows-opacity-<?php echo $key; ?>"
8327 + id="ays-chart-option-rows-opacity-<?php echo esc_attr($key); ?>"
7183 8328 class="ays-chart-option-rows-opacity ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7184 - 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); ?>]"
7185 8330 value="<?php echo isset($rows_opacity[$key]) && '' !== $rows_opacity[$key] ? esc_attr($rows_opacity[$key]) : 1.0; ?>"
7186 - data-rows-id="<?php echo $key; ?>"
8331 + data-rows-id="<?php echo esc_attr($key); ?>"
7187 8332 step=".1" min="0" max="1">
7188 8333 </div>
7189 8334 </div> <!-- opacity -->
7190 8335 </div>
@@ -7195,17 +8340,27 @@
7195 8340 endforeach;
7196 8341 ?>
7197 8342 <br>
7198 8343 <blockquote>
7199 - <?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' )); ?>
7200 8345 <br>
7201 - <?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 + ); ?>
7202 8352 </blockquote>
7203 8353 </div>
7204 8354 <div class="<?php echo esc_attr($html_class_prefix) ?>not-hidden-options-section <?php echo $enable_row_settings === 'checked' ? 'display_none' : ''; ?>">
7205 8355 <br>
7206 8356 <blockquote>
7207 - <?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 + ); ?>
7208 8363 </blockquote>
7209 8364 </div>
7210 8365 </div>
7211 8366 </div>