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 +1502 -484 3.1.03.5.4 View file →
@@ -173,9 +173,9 @@
173 173 wp_enqueue_script( $this->plugin_name . '-chart-js', plugin_dir_url(__FILE__) . 'js/chart-js.js', array('jquery'), $this->version, true);
174 174
175 175 wp_enqueue_script( $this->plugin_name . '-functions', plugin_dir_url( __FILE__ ) . 'js/functions.js', array( 'jquery' ), $this->version, true );
176 176
177 - wp_register_script( $this->plugin_name . '-localized', '' );
177 + wp_register_script( $this->plugin_name . '-localized', '' , array('jquery'), $this->version, true);
178 178
179 179 wp_localize_script( $this->plugin_name . '-localized', 'aysChartBuilderAdmin', array(
180 180 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
181 181 'selectUser' => __( 'Select author', "chart-builder" ),
@@ -204,9 +204,9 @@
204 204 'activated' => __( "Activated", "chart-builder" ),
205 205 'errorMsg' => __( "Error", "chart-builder" ),
206 206 'loadResource' => __( "Can't load resource.", "chart-builder" ),
207 207 'somethingWentWrong' => __( "Maybe something went wrong.", "chart-builder" ),
208 - ) );
208 + ) );
209 209
210 210 wp_localize_script( $this->plugin_name . '-localized', 'aysChartBuilderChartSettings', array(
211 211 'types' => CBFunctions()->getAllowedTypes(),
212 212 'max_selected_options' => 2,
@@ -224,8 +224,9 @@
224 224 'filter_get_data' => wp_create_nonce( 'cbuilder-fetch-post-type-data' ),
225 225 'quiz_maker_get_data' => wp_create_nonce( 'cbuilder-fetch-quiz-maker-data' ),
226 226 'quiz_maker_save_data' => wp_create_nonce( 'cbuilder-save-quiz-maker-data' ),
227 227 'author_user_search' => wp_create_nonce( 'cbuilder-author-user-search' ),
228 +
228 229 ),
229 230 'actions' => array(
230 231 'filter_get_props' => 'fetch_post_type_props',
231 232 'filter_get_data' => 'fetch_post_type_data',
@@ -241,9 +242,9 @@
241 242
242 243 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
243 244 wp_enqueue_script( $this->plugin_name . '-google', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-google.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
244 245 wp_enqueue_script( $this->plugin_name . '-chartjs', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-chartjs.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
245 - wp_enqueue_script( $this->plugin_name . '-general-js', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-general.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version, true );
246 + wp_enqueue_script( $this->plugin_name . '-general-js', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-general.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
246 247
247 248 if ( false !== strpos( $hook_suffix, 'settings' ) ) {
248 249 wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true );
249 250
@@ -248,20 +249,20 @@
248 249 wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true );
249 250
250 251 wp_localize_script( $this->plugin_name . '-settings', 'aysChartBuilderAdminSettings', array(
251 252 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
252 - 'selectUserRoles' => __( 'Select user roles', $this->plugin_name ),
253 - 'delete' => __( 'Delete', $this->plugin_name ),
254 - 'selectQuestionDefaultType' => __( 'Select question default type', $this->plugin_name ),
255 - 'yes' => __( 'Yes', $this->plugin_name ),
256 - 'cancel' => __( 'Cancel', $this->plugin_name ),
257 - 'somethingWentWrong' => __( "Maybe something went wrong.", $this->plugin_name ),
258 - 'failed' => __( 'Failed', $this->plugin_name ),
259 - 'selectPage' => __( 'Select page', $this->plugin_name ),
260 - 'selectPostType' => __( 'Select post type', $this->plugin_name ),
261 - 'copied' => __( 'Copied!', $this->plugin_name),
262 - 'clickForCopy' => __( 'Click to copy', $this->plugin_name),
263 - 'selectForm' => __( 'Select form', $this->plugin_name),
253 + 'selectUserRoles' => __( 'Select user roles', 'chart-builder' ),
254 + 'delete' => __( 'Delete', 'chart-builder' ),
255 + 'selectQuestionDefaultType' => __( 'Select question default type', 'chart-builder' ),
256 + 'yes' => __( 'Yes', 'chart-builder' ),
257 + 'cancel' => __( 'Cancel', 'chart-builder' ),
258 + 'somethingWentWrong' => __( "Maybe something went wrong.", 'chart-builder' ),
259 + 'failed' => __( 'Failed', 'chart-builder' ),
260 + 'selectPage' => __( 'Select page', 'chart-builder' ),
261 + 'selectPostType' => __( 'Select post type', 'chart-builder' ),
262 + 'copied' => __( 'Copied!', 'chart-builder'),
263 + 'clickForCopy' => __( 'Click to copy', 'chart-builder'),
264 + 'selectForm' => __( 'Select form', 'chart-builder'),
264 265 ) );
265 266 }
266 267 }
267 268
@@ -277,8 +278,38 @@
277 278 wp_deregister_script('mwai-vendor');
278 279 wp_dequeue_script('mwai');
279 280 wp_dequeue_script('mwai-vendor');
280 281 }
282 +
283 + if (is_plugin_active('html5-video-player/html5-video-player.php')) {
284 + wp_dequeue_style('h5vp-admin');
285 + wp_dequeue_style('fs_common');
286 + }
287 +
288 + if (is_plugin_active('panorama/panorama.php')) {
289 + wp_dequeue_style('bppiv_admin_custom_css');
290 + wp_dequeue_style('bppiv-custom-style');
291 + }
292 +
293 + if (is_plugin_active('wp-social/wp-social.php')) {
294 + wp_dequeue_style('wp_social_select2_css');
295 + wp_deregister_script('wp_social_select2_js');
296 + wp_dequeue_script('wp_social_select2_js');
297 + }
298 +
299 + if (is_plugin_active('real-media-library-lite/index.php')) {
300 + wp_dequeue_style('real-media-library-lite-rml');
301 + }
302 +
303 + // Theme | Phlox 2.17.6
304 + wp_dequeue_style('auxin-admin-style');
305 +
306 + // Theme | Pixel Ebook Store
307 + wp_dequeue_style('pixel-ebook-store-free-demo-content-style');
308 +
309 + // Theme | Interactive Education
310 + wp_dequeue_style('interactive-education-free-demo-content-style');
311 +
281 312 }
282 313 }
283 314
284 315 /**
@@ -314,10 +345,10 @@
314 345
315 346 public function add_plugin_charts_submenu(){
316 347 $hook_page_view = add_submenu_page(
317 348 $this->plugin_name,
318 - __('All Charts', $this->plugin_name),
319 - __('All Charts', $this->plugin_name),
349 + __('All Charts', 'chart-builder'),
350 + __('All Charts', 'chart-builder'),
320 351 'manage_options',
321 352 $this->plugin_name,
322 353 array($this, 'display_plugin_charts_page')
323 354 );
@@ -327,10 +358,10 @@
327 358
328 359 public function add_plugin_add_new_submenu(){
329 360 $hook_charts = add_submenu_page(
330 361 $this->plugin_name,
331 - __('Add New', $this->plugin_name),
332 - __('Add New', $this->plugin_name),
362 + __('Add New', 'chart-builder'),
363 + __('Add New', 'chart-builder'),
333 364 'manage_options',
334 365 $this->plugin_name."&action=add",
335 366 array($this, 'display_plugin_addnew_page')
336 367 );
@@ -339,10 +370,10 @@
339 370
340 371 public function add_plugin_dashboard_submenu(){
341 372 $hook_charts = add_submenu_page(
342 373 $this->plugin_name,
343 - __('How to use', $this->plugin_name),
344 - __('How to use', $this->plugin_name),
374 + __('How to use', 'chart-builder'),
375 + __('How to use', 'chart-builder'),
345 376 'manage_options',
346 377 $this->plugin_name . '-dashboard',
347 378 array($this, 'display_plugin_setup_page')
348 379 );
@@ -350,10 +381,10 @@
350 381 }
351 382
352 383 public function add_plugin_general_settings_submenu(){
353 384 $hook_settings = add_submenu_page( $this->plugin_name,
354 - __('General Settings', $this->plugin_name),
355 - __('General Settings', $this->plugin_name),
385 + __('General Settings', 'chart-builder'),
386 + __('General Settings', 'chart-builder'),
356 387 'manage_options',
357 388 $this->plugin_name . '-settings',
358 389 array($this, 'display_plugin_settings_page')
359 390 );
@@ -361,10 +392,10 @@
361 392 }
362 393
363 394 public function add_plugin_featured_plugins_submenu(){
364 395 $hook_our_products = add_submenu_page( $this->plugin_name,
365 - __('Our products', $this->plugin_name),
366 - __('Our products', $this->plugin_name),
396 + __('Our products', 'chart-builder'),
397 + __('Our products', 'chart-builder'),
367 398 'manage_options',
368 399 $this->plugin_name . '-featured-plugins',
369 400 array($this, 'display_plugin_featured_plugins_page')
370 401 );
@@ -374,10 +405,10 @@
374 405
375 406 public function add_plugin_chart_features_submenu(){
376 407 $hook_pro_features = add_submenu_page(
377 408 $this->plugin_name,
378 - __('PRO Features', $this->plugin_name),
379 - __('PRO Features', $this->plugin_name),
409 + __('PRO Features', 'chart-builder'),
410 + __('PRO Features', 'chart-builder'),
380 411 'manage_options',
381 412 $this->plugin_name . '-chart-features',
382 413 array($this, 'display_plugin_chart_features_page')
383 414 );
@@ -392,8 +423,9 @@
392 423 'default' => 5,
393 424 'option' => 'cb_charts_per_page'
394 425 );
395 426
427 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
396 428 if( ! ( isset( $_GET['action'] ) && ( $_GET['action'] == 'add' || $_GET['action'] == 'edit' ) ) ){
397 429 add_screen_option( $option, $args );
398 430 }
399 431
@@ -411,17 +443,28 @@
411 443 return;
412 444 }
413 445 }
414 446
447 + private function check_permissions_and_nonce($nonce_action) {
448 + if (!is_user_logged_in() || !current_user_can('manage_options')) {
449 + wp_die(__('Access denied.', 'chart-builder'));
450 + }
451 +
452 + if (!isset($_GET['_wpnonce']) || !wp_verify_nonce($_GET['_wpnonce'], $this->plugin_name . '-' . $nonce_action)) {
453 + wp_die(__('Security check failed. Invalid or missing nonce.', 'chart-builder'));
454 + }
455 + }
415 456 public function display_plugin_charts_page(){
416 457 global $ays_chart_db_actions;
417 458
418 - $action = (isset($_GET['action'])) ? sanitize_text_field( $_GET['action'] ) : '';
419 - $id = (isset($_GET['id'])) ? absint( esc_attr($_GET['id']) ) : 0;
420 -
421 - if (isset($_POST['bulk_delete_confirm'])) {
459 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
460 + $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : '';
461 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
462 + $id = (isset($_GET['id'])) ? absint( wp_unslash( $_GET['id'] ) ) : 0;
463 + if (isset($_POST['bulk_delete_confirm'])) {
422 464 if (isset($_POST['bulk-delete']) && !empty($_POST['bulk-delete'])) {
423 - $ids = $_POST['bulk-delete'];
465 + $ids = wp_unslash( $_POST['bulk-delete'] );
466 + $ids = array_map( 'absint', (array) $ids );
424 467 foreach ($ids as $id) {
425 468 if ($id > 0) {
426 469 $this->db_obj->delete_item( $id );
427 470 }
@@ -436,9 +479,10 @@
436 479 }
437 480
438 481 switch ($action) {
439 482 case 'trash':
440 - if( $id > 0 ){
483 + $this->check_permissions_and_nonce('trash-item');
484 + if ($id > 0){
441 485 $this->db_obj->trash_item( $id );
442 486 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
443 487 $url = esc_url_raw( add_query_arg( array(
444 488 "status" => 'trashed'
@@ -447,9 +491,10 @@
447 491 exit;
448 492 }
449 493 break;
450 494 case 'restore':
451 - if( $id > 0 ){
495 + $this->check_permissions_and_nonce('delete-item');
496 + if ($id > 0 ) {
452 497 $this->db_obj->restore_item( $id );
453 498 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
454 499 $url = esc_url_raw( add_query_arg( array(
455 500 "status" => 'restored'
@@ -458,9 +503,10 @@
458 503 exit;
459 504 }
460 505 break;
461 506 case 'delete':
462 - if( $id > 0 ){
507 + $this->check_permissions_and_nonce('delete-item');
508 + if ($id > 0) {
463 509 $this->db_obj->delete_item( $id );
464 510 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
465 511 $url = esc_url_raw( add_query_arg( array(
466 512 "status" => 'deleted'
@@ -469,9 +515,10 @@
469 515 exit;
470 516 }
471 517 break;
472 518 case 'publish':
473 - if( $id > 0 ){
519 + $this->check_permissions_and_nonce('publish-item');
520 + if ($id > 0) {
474 521 $this->db_obj->publish_item( $id );
475 522 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
476 523 $url = esc_url_raw( add_query_arg( array(
477 524 "status" => 'published'
@@ -480,9 +527,10 @@
480 527 exit;
481 528 }
482 529 break;
483 530 case 'unpublish':
484 - if( $id > 0 ){
531 + $this->check_permissions_and_nonce('unpublish-item');
532 + if ($id > 0) {
485 533 $this->db_obj->restore_item( $id );
486 534 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
487 535 $url = esc_url_raw( add_query_arg( array(
488 536 "status" => 'unpublished'
@@ -491,9 +539,10 @@
491 539 exit;
492 540 }
493 541 break;
494 542 case 'duplicate':
495 - if( $id > 0 ){
543 + $this->check_permissions_and_nonce('duplicate-item');
544 + if ($id > 0) {
496 545 $this->db_obj->duplicate_item( $id );
497 546 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
498 547 $url = esc_url_raw( add_query_arg( array(
499 548 "status" => 'duplicated'
@@ -511,9 +560,66 @@
511 560 default:
512 561 include_once('partials/charts/chart-builder-charts-display.php');
513 562 }
514 563 }
564 + public static function chart_builder_svg_sanitize_allowed_properties(){
515 565
566 + $allowed_properties = array(
567 + 'div' => array(
568 + 'id' => true,
569 + 'class' => true,
570 + 'style' => true,
571 + ),
572 + 'svg' => array(
573 + 'class' => true,
574 + 'version' => true,
575 + 'overflow' => true,
576 + 'preserveAspectRatio' => true,
577 + 'preserveaspectratio' => true,
578 + 'fill' => true,
579 + 'viewBox' => true,
580 + 'viewbox' => true,
581 + 'height' => true,
582 + 'width' => true,
583 + 'xmlns' => true,
584 + 'xmlns:xlink' => true,
585 + 'id' => true,
586 + 'title' => true,
587 + ),
588 + 'g' => array(
589 + 'id' => true,
590 + 'class' => true,
591 + 'stroke-width' => true,
592 + 'stroke-linecap' => true,
593 + 'stroke-linejoin' => true,
594 + ),
595 + 'path' => array(
596 + 'id' => true,
597 + 'class' => true,
598 + 'd' => true,
599 + 'fill' => true,
600 + 'vector-effect' => true,
601 + 'xmlns:default' => true,
602 + ),
603 + 'span' => array(
604 + 'class' => true,
605 + ),
606 + 'img' => array(
607 + 'src' => true,
608 + 'alt' => true,
609 + ),
610 + );
611 +
612 + return $allowed_properties;
613 + }
614 +
615 + public static function get_allowed_tags_for_loader() {
616 + return array(
617 + 'span' => array('class' => array()),
618 + 'img' => array('src' => array(), 'alt' => array()),
619 + );
620 + }
621 +
516 622 public function display_plugin_setup_page(){
517 623 include_once('partials/chart-builder-admin-display.php');
518 624 }
519 625
@@ -571,11 +677,11 @@
571 677
572 678 $response = array(
573 679 "status" => false
574 680 );
681 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
682 + $function = isset( $_REQUEST['function'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['function'] ) ) : null;
575 683
576 - $function = isset($_REQUEST['function']) ? sanitize_text_field( $_REQUEST['function'] ) : null;
577 -
578 684 if($function !== null){
579 685 $response = array();
580 686 if( is_callable( array( $this, $function ) ) ){
581 687 $response = $this->$function();
@@ -595,10 +701,14 @@
595 701 }
596 702
597 703 public function deactivate_plugin_option(){
598 704 // Run a security check.
599 - check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
600 -
705 + if ( isset( $_REQUEST['_ajax_nonce'] ) ) {
706 + check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
707 + } else {
708 + wp_die();
709 + }
710 +
601 711 // Check for permissions.
602 712 if ( ! current_user_can( 'manage_options' ) ) {
603 713 ob_end_clean();
604 714 $ob_get_clean = ob_get_clean();
@@ -608,9 +718,9 @@
608 718 wp_die();
609 719 }
610 720
611 721 if( is_user_logged_in() ) {
612 - $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( $_REQUEST['upgrade_plugin'] ) : '';
722 + $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['upgrade_plugin'] ) ) : '';
613 723 $upgrade_option = get_option( 'ays_chart_builder_upgrade_plugin', '' );
614 724
615 725 if ( $upgrade_option === '' ) {
616 726 add_option( 'ays_chart_builder_upgrade_plugin', $request_value );
@@ -633,17 +743,17 @@
633 743 }
634 744 }
635 745
636 746 public function chart_builder_admin_footer($a){
637 - if(isset($_REQUEST['page'])){
638 - if(false !== strpos( sanitize_text_field( $_REQUEST['page'] ), $this->plugin_name)){
747 + if(isset($_REQUEST['page'])){// phpcs:ignore WordPress.Security.NonceVerification.Recommended
748 + if(false !== strpos( sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ), $this->plugin_name)){// phpcs:ignore WordPress.Security.NonceVerification.Recommended
639 749 ?>
640 750 <div class="ays-chart-footer-support-box">
641 - <span class="ays-chart-footer-link-row"><a href="https://wordpress.org/support/plugin/chart-builder" target="_blank"><?php echo __( "Support", "chart-builder"); ?></a></span>
751 + <span class="ays-chart-footer-link-row"><a href="https://wordpress.org/support/plugin/chart-builder" target="_blank"><?php echo esc_html__( "Support", "chart-builder"); ?></a></span>
642 752 <span class="ays-chart-footer-slash-row">/</span>
643 - <span class="ays-chart-footer-link-row"><a href="https://ays-pro.com/wordpress-chart-builder-plugin-user-manual" target="_blank"><?php echo __( "Docs", "chart-builder"); ?></a></span>
753 + <span class="ays-chart-footer-link-row"><a href="https://ays-pro.com/wordpress-chart-builder-plugin-user-manual" target="_blank"><?php echo esc_html__( "Docs", "chart-builder"); ?></a></span>
644 754 <span class="ays-chart-footer-slash-row">/</span>
645 - <span class="ays-chart-footer-link-row"><a href="https://ays-demo.com/chart-builder-plugin-suggestion-box" target="_blank"><?php echo __( "Suggest a Feature", "chart-builder"); ?></a></span>
755 + <span class="ays-chart-footer-link-row"><a href="https://ays-demo.com/chart-builder-plugin-suggestion-box" target="_blank"><?php echo esc_html__( "Suggest a Feature", "chart-builder"); ?></a></span>
646 756 </div>
647 757 <p style="font-size:13px;text-align:center;font-style:italic;">
648 758 <span style="margin-left:0px;margin-right:10px;" class="ays_heart_beat"><i class="ays_fa ays_fa_heart_o animated"></i></span>
649 759 <span><?php echo esc_html(__( "If you love our plugin, please do big favor and rate us on", "chart-builder")); ?></span>
@@ -683,11 +793,12 @@
683 793 }
684 794 }
685 795
686 796 public function fetch_post_type_props(){
687 - $nonce = isset( $_POST['nonce'] ) ? wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'cbuilder-fetch-post-type-props' ) : '';
688 - if ( $nonce ) {
689 - $results = CBFunctions()->get_post_type_properties( sanitize_text_field( $_POST['post_type'] ) );
797 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
798 + $nonce = isset( $_POST['nonce'] ) ? wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'cbuilder-fetch-post-type-props' ) : '';
799 + if ( $nonce ) {// phpcs:ignore WordPress.Security.NonceVerification.Recommended
800 + $results = isset($_POST['post_type']) ? CBFunctions()->get_post_type_properties( sanitize_text_field( wp_unslash($_POST['post_type']) ) ) : '';
690 801
691 802 return array(
692 803 'success' => true,
693 804 'fields' => $results,
@@ -753,17 +864,18 @@
753 864 }
754 865
755 866 $ays_chart_builder_flag = intval(get_option('ays_chart_sale_btn'));
756 867 if( $ays_chart_builder_flag == 0 ){
757 - if (isset($_GET['page']) && strpos($_GET['page'], CHART_BUILDER_NAME) !== false) {
868 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
869 + if ( isset( $_GET['page'] ) && strpos( sanitize_text_field( wp_unslash( $_GET['page'] ) ), CHART_BUILDER_NAME ) !== false ) {
758 870 if( !(Chart_Builder_Admin::get_max_id('charts') <= 1) ){
759 871 // $this->ays_chart_sale_message_30_emma($ays_chart_builder_flag);
760 - // $this->ays_chart_sale_message20($ays_chart_builder_flag);
872 + $this->ays_chart_new_silver_bundle_message_2025($ays_chart_builder_flag);
761 873 // $this->ays_chart_helloween_message($ays_chart_builder_flag);
762 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);
765 - $this->ays_chart_christmas_message_2024($ays_chart_builder_flag);
877 + // $this->ays_chart_christmas_message_2024($ays_chart_builder_flag);
766 878 }
767 879 }
768 880 }
769 881 }
@@ -774,9 +886,9 @@
774 886 'status' => false,
775 887 );
776 888
777 889 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'ays_chart_dismiss_button') {
778 - if( (isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( $_REQUEST['_ajax_nonce'], $this->plugin_name . '-sale-banner' )) && current_user_can( 'manage_options' )){
890 + if ( isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_ajax_nonce'] ) ), $this->plugin_name . '-sale-banner' ) && current_user_can( 'manage_options' ) ) {
779 891 update_option('ays_chart_sale_btn', 1);
780 892 update_option('ays_chart_sale_date', current_time( 'mysql' ));
781 893 $data['status'] = true;
782 894 }
@@ -806,9 +918,9 @@
806 918 </div>';
807 919 $content[] = '</div>';
808 920
809 921 $content[] = '<div style="font-size: 17px;">';
810 - $content[] = '<img style="width: 24px;height: 24px;" src="' . esc_attr(CHART_BUILDER_ADMIN_URL) . '/images/icons/guarantee-new.png">';
922 + $content[] = '<img style="width: 24px; height: 24px;" src="' . esc_url(plugins_url('admin/images/icons/guarantee-new.png', dirname(__FILE__))) . '">';// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
811 923 $content[] = '<span style="padding-left: 4px; font-size: 14px; font-weight: 600;"> 30 Day Money Back Guarantee</span>';
812 924
813 925 $content[] = '</div>';
814 926
@@ -868,9 +980,10 @@
868 980 $content[] = '</div>';
869 981 $content[] = '</div>';
870 982
871 983 $content = implode( '', $content );
872 - echo html_entity_decode(esc_html( $content ));
984 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
985 +
873 986 }
874 987 }
875 988
876 989 // Self 20% sale
@@ -885,18 +998,26 @@
885 998 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
886 999
887 1000 $content[] = '<div class="ays-chart-dicount-sale-name-discount-box">';
888 1001 $content[] = '<span class="ays-chart-new-chart-pro-title">';
889 - $content[] = __( "<span><a href='https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-plugin-name' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>", CHART_BUILDER_NAME );
1002 + // Translators: %s is the URL to the Chart Builder plugin page.
1003 + $content[] = sprintf(
1004 + /* translators: %s is the Chart Builder plugin URL. */
1005 + __(
1006 + "<span><a href='%s' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>",
1007 + 'chart-builder'
1008 + ),
1009 + "https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-plugin-name" . CHART_BUILDER_VERSION
1010 + );
890 1011 $content[] = '</span>';
891 1012 $content[] = '<div>';
892 - $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-sale-30.svg" style="width: 70px;">';
1013 + $content[] = '<img src="' . esc_url(plugins_url('admin/images/ays-chart-banner-sale-30.svg', dirname(__FILE__))) . '" style="width: 70px;">';// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
893 1014 $content[] = '</div>';
894 1015 $content[] = '</div>';
895 1016
896 1017 $content[] = '<span class="ays-chart-new-chart-pro-desc">';
897 - $content[] = '<img class="ays-chart-new-chart-pro-guaranteeicon" src="' . CHART_BUILDER_ADMIN_URL . '/images/chart-builder-guaranteeicon.webp" style="width: 30px;">';
898 - $content[] = __( "30 Days Money Back Guarantee", CHART_BUILDER_NAME );
1018 + $content[] = '<img class="ays-chart-new-chart-pro-guaranteeicon" src="' . esc_url(plugins_url('admin/images/chart-builder-guaranteeicon.webp', dirname(__FILE__))) . '" style="width: 30px;">'; // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
1019 + $content[] = esc_html__( "30 Days Money Back Guarantee", 'chart-builder' );
899 1020 $content[] = '</span>';
900 1021
901 1022 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-chart">';
902 1023 $content[] = '<form method="POST">';
@@ -915,15 +1036,15 @@
915 1036
916 1037 $content[] = '<div id="ays-chart-countdown-main-container">';
917 1038 $content[] = '<div class="ays-chart-countdown-container">';
918 1039 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
919 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1040 + $content[] = esc_html__( "Offer ends in:", 'chart-builder' );
920 1041
921 1042 $content[] = '<ul style="padding: 0">';
922 - $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
923 - $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
924 - $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
925 - $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . __( 'Seconds', CHART_BUILDER_NAME ) . '</li>';
1043 + $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . esc_html__( 'Days', 'chart-builder' ) . '</li>';
1044 + $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . esc_html__( 'Hours', 'chart-builder' ) . '</li>';
1045 + $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . esc_html__( 'Minutes', 'chart-builder' ) . '</li>';
1046 + $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . esc_html__( 'Seconds', 'chart-builder' ) . '</li>';
926 1047 $content[] = '</ul>';
927 1048 $content[] = '</div>';
928 1049
929 1050 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
@@ -937,11 +1058,11 @@
937 1058
938 1059 $content[] = '</div>';
939 1060
940 1061 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
941 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-button" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . __( 'Buy Now', CHART_BUILDER_NAME ) . '</a>';
1062 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-button'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . esc_html__( 'Buy Now', 'chart-builder' ) . '</a>';
942 1063 $content[] = '<span class="ays-chart-dicount-one-time-text">';
943 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1064 + $content[] = esc_html__( "One-time payment", 'chart-builder' );
944 1065 $content[] = '</span>';
945 1066 $content[] = '</div>';
946 1067
947 1068 $content[] = '</div>';
@@ -948,9 +1069,9 @@
948 1069
949 1070 $content[] = '</div>';
950 1071
951 1072 $content = implode( '', $content );
952 - echo $content;
1073 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
953 1074 }
954 1075 }
955 1076
956 1077 // Helloween banner
@@ -972,15 +1093,15 @@
972 1093 <span style='' class='ays-chart-helloween-bundle'>
973 1094 <a href='https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner' target='_blank' class='ays-chart-dicount-wrap-color-helloween ays-chart-dicount-wrap-text-decoration-helloween' style='display:block; color:#b2ff00;margin-right:6px;'>
974 1095 Chart Builder
975 1096 </a>
976 - </span>", CHART_BUILDER_NAME );
1097 + </span>", 'chart-builder' );
977 1098 $content[] = '</p>';
978 1099 $content[] = '<p>';
979 1100 $content[] = __( "Hurry up!
980 1101 <a href='https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner' target='_blank' style='color:#ffc700;'>
981 1102 Check it out!
982 - </a>", CHART_BUILDER_NAME );
1103 + </a>", 'chart-builder' );
983 1104 $content[] = '</p>';
984 1105
985 1106 $content[] = '</div>';
986 1107
@@ -1010,9 +1131,9 @@
1010 1131 $content[] = '</div>';
1011 1132
1012 1133 $content[] = '</div>';
1013 1134 $content[] = '<div class="ays-chart-dicount-wrap-box ays-buy-now-button-box-helloween">';
1014 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner" class="button button-primary ays-buy-now-button-helloween" id="ays-button-top-buy-now-helloween" target="_blank" style="" >' . __( 'Buy Now !', CHART_BUILDER_NAME ) . '</a>';
1135 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner" class="button button-primary ays-buy-now-button-helloween" id="ays-button-top-buy-now-helloween" target="_blank" style="" >' . __( 'Buy Now !', 'chart-builder' ) . '</a>';
1015 1136 $content[] = '</div>';
1016 1137 $content[] = '</div>';
1017 1138
1018 1139 $content[] = '</div>';
@@ -1033,9 +1154,9 @@
1033 1154 $content[] = '</div>';
1034 1155
1035 1156 $content = implode( '', $content );
1036 1157
1037 - echo $content;
1158 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1038 1159 }
1039 1160 }
1040 1161
1041 1162 // Black Friday banner
@@ -1095,9 +1216,9 @@
1095 1216 $content[] = '</div>';
1096 1217
1097 1218 $content = implode( '', $content );
1098 1219
1099 - echo $content;
1220 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1100 1221 }
1101 1222 }
1102 1223
1103 1224 // Christmas banner
@@ -1108,10 +1229,10 @@
1108 1229 $content[] = '<div id="ays-chart-dicount-christmas-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1109 1230 $content[] = '<div id="ays-chart-dicount-christmas-month" class="ays_chart_dicount_month">';
1110 1231 $content[] = '<div class="ays-chart-dicount-christmas-box">';
1111 1232 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box ays-chart-dicount-christmas-wrap-box-80">';
1112 - $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Limited Time', CHART_BUILDER_NAME ) .' '. '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-sale" target="_blank">' . __( '40%', CHART_BUILDER_NAME ) . '</a>' . ' SALE</div>';
1113 - $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', CHART_BUILDER_NAME ) . '</div>';
1233 + $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Limited Time', 'chart-builder' ) .' '. '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-sale" target="_blank">' . __( '40%', 'chart-builder' ) . '</a>' . ' SALE</div>';
1234 + $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', 'chart-builder' ) . '</div>';
1114 1235 $content[] = '</div>';
1115 1236
1116 1237 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1117 1238 $content[] = '<div id="ays-chart-countdown-main-container">';
@@ -1117,12 +1238,12 @@
1117 1238 $content[] = '<div id="ays-chart-countdown-main-container">';
1118 1239 $content[] = '<div class="ays-chart-countdown-container">';
1119 1240 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1120 1241 $content[] = '<ul>';
1121 - $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
1122 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
1123 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
1124 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', CHART_BUILDER_NAME ) . '</li>';
1242 + $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', 'chart-builder' ) . '</li>';
1243 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', 'chart-builder' ) . '</li>';
1244 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', 'chart-builder' ) . '</li>';
1245 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', 'chart-builder' ) . '</li>';
1125 1246 $content[] = '</ul>';
1126 1247 $content[] = '</div>';
1127 1248 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1128 1249 $content[] = '<span>🚀</span>';
@@ -1134,9 +1255,9 @@
1134 1255 $content[] = '</div>';
1135 1256 $content[] = '</div>';
1136 1257
1137 1258 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1138 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-buy-now" target="_blank">' . __( 'BUY NOW!', CHART_BUILDER_NAME ) . '</a>';
1259 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-buy-now" target="_blank">' . __( 'BUY NOW!', 'chart-builder' ) . '</a>';
1139 1260 $content[] = '</div>';
1140 1261 $content[] = '</div>';
1141 1262 $content[] = '</div>';
1142 1263
@@ -1142,9 +1263,9 @@
1142 1263
1143 1264 $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-christmas">';
1144 1265 $content[] = '<form method="POST">';
1145 1266 $content[] = '<div id="ays-chart-dismiss-buttons-content-christmas">';
1146 - $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', CHART_BUILDER_NAME ) . '</button>';
1267 + $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', 'chart-builder' ) . '</button>';
1147 1268 $content[] = '</div>';
1148 1269 $content[] = '</form>';
1149 1270 $content[] = '</div>';
1150 1271 $content[] = '</div>';
@@ -1150,9 +1271,9 @@
1150 1271 $content[] = '</div>';
1151 1272
1152 1273 $content = implode( '', $content );
1153 1274
1154 - echo $content;
1275 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1155 1276 }
1156 1277 }
1157 1278
1158 1279 // Silver Bundle
@@ -1161,20 +1282,20 @@
1161 1282 $content = array();
1162 1283
1163 1284 $content[] = '<div id="ays-chart-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1164 1285 $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1165 - $content[] = '<a href="https://ays-pro.com/silver-bundle" target="_blank" class="ays-chart-sale-banner-link"><img src="' . CHART_BUILDER_ADMIN_URL . '/images/silver_bundle_logo_box.png"></a>';
1286 + $content[] = '<a href="https://ays-pro.com/silver-bundle" target="_blank" class="ays-chart-sale-banner-link"><img src="' . esc_url(plugins_url('/images/silver_bundle_logo_box.png', dirname(__FILE__))) . '"></a>';// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
1166 1287
1167 1288 $content[] = '<div class="ays-chart-dicount-wrap-box">';
1168 1289
1169 1290 $content[] = '<strong style="font-weight: bold;">';
1170 - $content[] = __( "Limited Time <span style='color:#E85011;'>50%</span> SALE on <br><span><a href='https://ays-pro.com/silver-bundle' target='_blank' style='color:#E85011; text-decoration: underline;'>Silver Bundle</a></span> (Quiz + Chart + Form)!", CHART_BUILDER_NAME );
1291 + $content[] = __( "Limited Time <span style='color:#E85011;'>50%</span> SALE on <br><span><a href='https://ays-pro.com/silver-bundle' target='_blank' style='color:#E85011; text-decoration: underline;'>Silver Bundle</a></span> (Quiz + Chart + Form)!", 'chart-builder' );
1171 1292 $content[] = '</strong>';
1172 1293
1173 1294 $content[] = '<br>';
1174 1295
1175 1296 $content[] = '<strong>';
1176 - $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", CHART_BUILDER_NAME );
1297 + $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", 'chart-builder' );
1177 1298 $content[] = '</strong>';
1178 1299
1179 1300 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1180 1301
@@ -1213,14 +1334,14 @@
1213 1334 $content[] = '</div>';
1214 1335
1215 1336 $content[] = '</div>';
1216 1337
1217 - $content[] = '<a href="https://ays-pro.com/silver-bundle" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="height: 32px; display: flex; align-items: center; font-weight: 500; " >' . __( 'Buy Now !', CHART_BUILDER_NAME ) . '</a>';
1338 + $content[] = '<a href="https://ays-pro.com/silver-bundle" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="height: 32px; display: flex; align-items: center; font-weight: 500; " >' . __( 'Buy Now !', 'chart-builder' ) . '</a>';
1218 1339 $content[] = '</div>';
1219 1340 $content[] = '</div>';
1220 1341
1221 1342 $content = implode( '', $content );
1222 - echo $content;
1343 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1223 1344 }
1224 1345 }
1225 1346
1226 1347 // Black Friday 2024
@@ -1238,16 +1359,16 @@
1238 1359
1239 1360 $content[] = '<div id="ays-chart-countdown">';
1240 1361
1241 1362 $content[] = '<div>';
1242 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1363 + $content[] = __( "Offer ends in:", 'chart-builder' );
1243 1364 $content[] = '</div>';
1244 1365
1245 1366 $content[] = '<ul>';
1246 - $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", CHART_BUILDER_NAME ) .'</li>';
1247 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", CHART_BUILDER_NAME ) .'</li>';
1248 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", CHART_BUILDER_NAME ) .'</li>';
1249 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", CHART_BUILDER_NAME ) .'</li>';
1367 + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>';
1368 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>';
1369 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>';
1370 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>';
1250 1371 $content[] = '</ul>';
1251 1372 $content[] = '</div>';
1252 1373
1253 1374 $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
@@ -1265,9 +1386,9 @@
1265 1386 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1266 1387 $content[] = '<div>';
1267 1388
1268 1389 $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1269 - $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' );
1270 1391 $content[] = '</span>';
1271 1392
1272 1393 $content[] = '</br>';
1273 1394
@@ -1272,9 +1393,9 @@
1272 1393 $content[] = '</br>';
1273 1394
1274 1395 $content[] = '<span class="ays-chart-black-friday-bundle-desc">';
1275 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">';
1276 - $content[] = __( "50% OFF", CHART_BUILDER_NAME );
1397 + $content[] = __( "50% OFF", 'chart-builder' );
1277 1398 $content[] = '</a>';
1278 1399 $content[] = '</span>';
1279 1400 $content[] = '</div>';
1280 1401
@@ -1282,9 +1403,9 @@
1282 1403
1283 1404 $content[] = '<form action="" method="POST">';
1284 1405 $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1285 1406 if( current_user_can( 'manage_options' ) ){
1286 - $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", CHART_BUILDER_NAME ) .'</button>';
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>';
1287 1408 $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1288 1409 }
1289 1410 $content[] = '</div>';
1290 1411 $content[] = '</form>';
@@ -1295,17 +1416,17 @@
1295 1416
1296 1417 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1297 1418 $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1298 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">';
1299 - $content[] = __( 'Silver Bundle', "ays-popup-box" );
1420 + $content[] = __( 'Silver Bundle', 'chart-builder' );
1300 1421 $content[] = '</a>';
1301 1422 $content[] = '</span>';
1302 1423 $content[] = '</div>';
1303 1424
1304 1425 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1305 - $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>';
1306 1427 $content[] = '<span class="ays-chart-dicount-one-time-text">';
1307 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1428 + $content[] = __( "One-time payment", 'chart-builder' );
1308 1429 $content[] = '</span>';
1309 1430 $content[] = '</div>';
1310 1431 $content[] = '</div>';
1311 1432 $content[] = '</div>';
@@ -1310,12 +1431,98 @@
1310 1431 $content[] = '</div>';
1311 1432 $content[] = '</div>';
1312 1433
1313 1434 $content = implode( '', $content );
1314 - echo $content;
1435 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1315 1436 }
1316 1437 }
1317 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 +
1318 1525 // Christmas Top Banner 2024
1319 1526 public function ays_chart_christmas_message_2024($ishmar){
1320 1527 if($ishmar == 0 ){
1321 1528 $content = array();
@@ -1330,16 +1537,16 @@
1330 1537
1331 1538 $content[] = '<div id="ays-chart-countdown">';
1332 1539
1333 1540 $content[] = '<div>';
1334 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1541 + $content[] = __( "Offer ends in:", 'chart-builder' );
1335 1542 $content[] = '</div>';
1336 1543
1337 1544 $content[] = '<ul style="padding-left: 0;">';
1338 - $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", CHART_BUILDER_NAME ) .'</li>';
1339 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", CHART_BUILDER_NAME ) .'</li>';
1340 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", CHART_BUILDER_NAME ) .'</li>';
1341 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", CHART_BUILDER_NAME ) .'</li>';
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>';
1342 1549 $content[] = '</ul>';
1343 1550 $content[] = '</div>';
1344 1551
1345 1552 $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
@@ -1357,16 +1564,23 @@
1357 1564 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1358 1565 $content[] = '<div>';
1359 1566
1360 1567 $content[] = '<span class="ays-chart-christmas-top-bundle-title">';
1361 - $content[] = __( "<span><a href='https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner' class='ays-chart-christmas-top-bundle-title-link' target='_blank'>Christmas Sale</a></span>", CHART_BUILDER_NAME );
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 + );
1362 1576 $content[] = '</span>';
1363 1577
1364 1578 $content[] = '</br>';
1365 1579
1366 1580 $content[] = '<span class="ays-chart-christmas-top-bundle-desc">';
1367 - $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" class="ays-chart-christmas-top-bundle-title-link" target="_blank">';
1368 - $content[] = __( "20% Extra OFF", CHART_BUILDER_NAME );
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' );
1369 1583 $content[] = '</a>';
1370 1584 $content[] = '</span>';
1371 1585 $content[] = '</div>';
1372 1586
@@ -1374,9 +1588,9 @@
1374 1588
1375 1589 $content[] = '<form action="" method="POST">';
1376 1590 $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1377 1591 if( current_user_can( 'manage_options' ) ){
1378 - $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", CHART_BUILDER_NAME ) .'</button>';
1592 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
1379 1593 $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1380 1594 }
1381 1595 $content[] = '</div>';
1382 1596 $content[] = '</form>';
@@ -1388,18 +1602,17 @@
1388 1602 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-christmas-top-bundle-coupon-text-box">';
1389 1603 $content[] = '<div class="ays-chart-christmas-top-bundle-coupon-row">';
1390 1604 $content[] = 'xmas20off';
1391 1605 $content[] = '</div>';
1392 -
1393 1606 $content[] = '<div class="ays-chart-christmas-top-bundle-text-row">';
1394 - $content[] = __( '20% Extra Discount Coupon', CHART_BUILDER_NAME );
1607 + $content[] = __( '20% Extra Discount Coupon', 'chart-builder' );
1395 1608 $content[] = '</div>';
1396 1609 $content[] = '</div>';
1397 1610
1398 1611 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1399 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', CHART_BUILDER_NAME ) . '</a>';
1612 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', 'chart-builder' ) . '</a>';
1400 1613 $content[] = '<span class="ays-chart-dicount-one-time-text">';
1401 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1614 + $content[] = __( "One-time payment", 'chart-builder' );
1402 1615 $content[] = '</span>';
1403 1616 $content[] = '</div>';
1404 1617 $content[] = '</div>';
1405 1618 $content[] = '</div>';
@@ -1404,9 +1617,9 @@
1404 1617 $content[] = '</div>';
1405 1618 $content[] = '</div>';
1406 1619
1407 1620 $content = implode( '', $content );
1408 - echo $content;
1621 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1409 1622 }
1410 1623 }
1411 1624
1412 1625 public function ays_chart_update_banner_time(){
@@ -1412,9 +1625,9 @@
1412 1625 public function ays_chart_update_banner_time(){
1413 1626
1414 1627 $date = time() + ( 3 * 24 * 60 * 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1415 1628 // $date = time() + ( 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS); // for testing | 1 min
1416 - $next_3_days = date('M d, Y H:i:s', $date);
1629 + $next_3_days = gmdate('M d, Y H:i:s', $date);
1417 1630
1418 1631 $ays_chart_banner_time = get_option('ays_chart_20_bundle_banner_time');
1419 1632
1420 1633 if ( !$ays_chart_banner_time || is_null( $ays_chart_banner_time ) ) {
@@ -1439,9 +1652,9 @@
1439 1652 }
1440 1653
1441 1654 public function author_user_search() {
1442 1655 check_ajax_referer( 'cbuilder-author-user-search', 'security' );
1443 - $params = $_REQUEST['params'];
1656 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1444 1657 $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null;
1445 1658 $checked = isset($params['val']) && $params['val'] !='' ? sanitize_text_field( $params['val'] ) : null;
1446 1659 $args = 'search=';
1447 1660 if ($search !== null) {
@@ -1558,9 +1771,11 @@
1558 1771 */
1559 1772 public function ays_chart_activate_plugin() {
1560 1773
1561 1774 // Run a security check.
1562 - 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 + }
1563 1778
1564 1779 // Check for permissions.
1565 1780 if ( ! current_user_can( 'activate_plugins' ) ) {
1566 1781 wp_send_json_error( esc_html__( 'Plugin activation is disabled for you on this site.', 'chart-builder' ) );
@@ -1601,9 +1816,11 @@
1601 1816 */
1602 1817 public function ays_chart_install_plugin() {
1603 1818
1604 1819 // Run a security check.
1605 - 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 + }
1606 1823
1607 1824 $generic_error = esc_html__( 'There was an error while performing your request.', 'chart-builder' );
1608 1825 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : '';
1609 1826
@@ -1720,8 +1937,9 @@
1720 1937
1721 1938 $images_url = CHART_BUILDER_ADMIN_URL . '/images/icons/';
1722 1939
1723 1940 $plugin_slug = array(
1941 + 'fox-lms',
1724 1942 'quiz-maker',
1725 1943 'survey-maker',
1726 1944 'poll-maker',
1727 1945 'ays-popup-box',
@@ -1734,9 +1952,9 @@
1734 1952 $plugin_url_arr = array();
1735 1953 foreach ($plugin_slug as $key => $slug) {
1736 1954 if ( isset( $_SESSION['ays_chart_our_product_links'] ) && !empty( $_SESSION['ays_chart_our_product_links'] )
1737 1955 && isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && !empty( $_SESSION['ays_chart_our_product_links'][$slug] ) ) {
1738 - $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])) : "";
1739 1957 } else {
1740 1958 $latest_version = $this->ays_chart_get_latest_plugin_version($slug);
1741 1959 $plugin_url = 'https://downloads.wordpress.org/plugin/'. $slug .'.zip';
1742 1960 if ( $latest_version != '' ) {
@@ -1748,13 +1966,22 @@
1748 1966 $plugin_url_arr[$slug] = $plugin_url;
1749 1967 }
1750 1968
1751 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 + ),
1752 1979 'quiz-maker/quiz-maker.php' => array(
1753 1980 'icon' => $images_url . 'icon-quiz-128x128.png',
1754 - 'name' => __( 'Quiz Maker', "easy-form" ),
1755 - 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', "easy-form" ),
1756 - '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' ),
1757 1984 'wporg' => 'https://wordpress.org/plugins/quiz-maker/',
1758 1985 'buy_now' => 'https://ays-pro.com/wordpress/quiz-maker/',
1759 1986 'url' => $plugin_url_arr['quiz-maker'],
1760 1987 ),
@@ -1794,9 +2021,9 @@
1794 2021 'buy_now' => 'https://ays-pro.com/wordpress/secure-copy-content-protection/',
1795 2022 'url' => $plugin_url_arr['secure-copy-content-protection'],
1796 2023 ),
1797 2024 'gallery-photo-gallery/gallery-photo-gallery.php' => array(
1798 - 'icon' => $images_url . 'icon-gallery-128x128.jpg',
2025 + 'icon' => $images_url . 'icon-gallery-128x128.png',
1799 2026 'name' => __( 'Gallery Photo Gallery', 'chart-builder' ),
1800 2027 'desc' => __( 'Create unlimited galleries and include unlimited images in those galleries.', 'chart-builder' ),
1801 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' ),
1802 2029 'wporg' => 'https://wordpress.org/plugins/gallery-photo-gallery/',
@@ -1996,9 +2223,9 @@
1996 2223 <span aria-hidden="true" class="dashicons dashicons-external"></span>
1997 2224 </a>';
1998 2225 }
1999 2226 $content .='
2000 - <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>
2001 2228 </div>
2002 2229 </div>';
2003 2230 }
2004 2231 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
@@ -2004,9 +2231,9 @@
2004 2231 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
2005 2232 $content.= '<input type="hidden" id="ays_chart_ajax_install_plugin_nonce" name="ays_chart_ajax_install_plugin_nonce" value="'. $install_plugin_nonce .'">';
2006 2233 $content.= '</div>';
2007 2234
2008 - echo $content;
2235 + echo html_entity_decode($content);
2009 2236 }
2010 2237
2011 2238 /**
2012 2239 * Returns the data from Quiz maker.
@@ -2015,9 +2242,9 @@
2015 2242 */
2016 2243 public function fetch_quiz_maker_data(){
2017 2244 check_ajax_referer( 'cbuilder-fetch-quiz-maker-data', 'security' );
2018 2245
2019 - $params = $_POST['params'];
2246 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
2020 2247 if ( !isset($params) || empty($params) ) {
2021 2248 return array(
2022 2249 'success' => false,
2023 2250 'data' => array(
@@ -2139,9 +2366,9 @@
2139 2366 */
2140 2367 public function save_quiz_maker_data() {
2141 2368 check_ajax_referer( 'cbuilder-save-quiz-maker-data', 'security' );
2142 2369
2143 - $params = $_POST['params'];
2370 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
2144 2371 if ( !isset($params) || empty($params) ) {
2145 2372 return array(
2146 2373 'success' => false,
2147 2374 'data' => array(
@@ -2255,9 +2482,9 @@
2255 2482 'data' => array(
2256 2483 'msg' => __( 'Data was successfully saved.', "chart-builder" )
2257 2484 )
2258 2485 );
2259 - }
2486 + }
2260 2487
2261 2488 /**
2262 2489 * Chart page action hooks
2263 2490 */
@@ -2301,9 +2528,9 @@
2301 2528
2302 2529 $sources[] = $content;
2303 2530 }
2304 2531 $content_for_escape = implode('' , $sources );
2305 - echo html_entity_decode(esc_html( $content_for_escape ));
2532 + echo html_entity_decode( esc_html($content_for_escape) );
2306 2533 }
2307 2534
2308 2535 public function source_contents_import_from_csv_settings( $sources, $args ){
2309 2536 $html_class_prefix = $args['html_class_prefix'];
@@ -2315,25 +2542,25 @@
2315 2542 <div class="ays-pro-features-v2-big-buttons-box">
2316 2543 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2317 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>
2318 2545 <div class="ays-pro-features-v2-video-text">
2319 - <?php echo __("Watch Video" , "chart-builder"); ?>
2546 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2320 2547 </div>
2321 2548 </a>
2322 2549 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2323 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>
2324 2551 <div class="ays-pro-features-v2-upgrade-text">
2325 - <?php echo __("Upgrade" , "chart-builder"); ?>
2552 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2326 2553 </div>
2327 2554 </a>
2328 2555 </div>
2329 - <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">
2330 2557 <div class="<?php echo esc_attr($html_class_prefix) ?>file-import-form">
2331 - <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>
2332 2559 <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>import-files-file-type">
2333 2560 <option value="csv">CSV File</option>
2334 2561 </select>
2335 - <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>
2336 2563 <p class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example" style="font-size: 15px; font-style: italic;">Example:
2337 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>
2338 2565 </p>
2339 2566 <div>
@@ -2342,16 +2569,16 @@
2342 2569 <div class='ays-chart-file-import-success'></div>
2343 2570 <div class='ays-chart-file-import-error'></div>
2344 2571 <div class="ays-chart-buttons-group">
2345 2572 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-fetch">
2346 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2573 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2347 2574 </button>
2348 2575 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-show-on-chart">
2349 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>
2350 - <?php echo __( 'Preview', "chart-builder" ); ?>
2577 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2351 2578 </button>
2352 2579 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-save">
2353 - <?php echo __( 'Save data', "chart-builder" ); ?>
2580 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2354 2581 </button>
2355 2582 </div>
2356 2583 </div>
2357 2584 </div>
@@ -2381,38 +2608,38 @@
2381 2608 <div class="ays-pro-features-v2-big-buttons-box">
2382 2609 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2383 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>
2384 2611 <div class="ays-pro-features-v2-video-text">
2385 - <?php echo __("Watch Video" , "chart-builder"); ?>
2612 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2386 2613 </div>
2387 2614 </a>
2388 2615 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2389 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>
2390 2617 <div class="ays-pro-features-v2-upgrade-text">
2391 - <?php echo __("Upgrade" , "chart-builder"); ?>
2618 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2392 2619 </div>
2393 2620 </a>
2394 2621 </div>
2395 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2396 - <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">
2397 2624 <div id="ays-chart-db-query">
2398 - <div class="<?= $html_class_prefix ?>-db-query-form">
2625 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2399 2626 <div id="db-query-form">
2400 2627 <input type="hidden" name="chart_id" value="1">
2401 - <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>
2402 2629 <div class='db-wizard-success'></div>
2403 2630 <div class='db-wizard-error'></div>
2404 2631 </div>
2405 2632 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2406 2633 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-fetch">
2407 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2634 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2408 2635 </button>
2409 2636 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-show-on-chart">
2410 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>
2411 - <?php echo __( 'Preview', "chart-builder" ); ?>
2638 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2412 2639 </button>
2413 2640 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-save">
2414 - <?php echo __( 'Save data', "chart-builder" ); ?>
2641 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2415 2642 </button>
2416 2643 </div>
2417 2644 </div>
2418 2645 <div class="db-wizard-hints">
@@ -2417,9 +2644,18 @@
2417 2644 </div>
2418 2645 <div class="db-wizard-hints">
2419 2646 <ul>
2420 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> -->
2421 - <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>
2422 2658 </ul>
2423 2659 </div>
2424 2660 </div>
2425 2661 </div>
@@ -2427,9 +2663,9 @@
2427 2663 </div>
2428 2664 <?php
2429 2665 $content = ob_get_clean();
2430 2666
2431 - $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') . '">
2432 2668 <i class="ays_fa ays_fa_info_circle"></i>
2433 2669 </a>';
2434 2670
2435 2671 $sources['import_from_db'] = array(
@@ -2450,16 +2686,16 @@
2450 2686 <div class="ays-pro-features-v2-big-buttons-box">
2451 2687 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2452 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>
2453 2689 <div class="ays-pro-features-v2-upgrade-text">
2454 - <?php echo __("Upgrade" , "chart-builder"); ?>
2690 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2455 2691 </div>
2456 2692 </a>
2457 2693 </div>
2458 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2459 - <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">
2460 2696 <div class="form-group row mb-2">
2461 - <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">
2462 2698 <label class="form-label">
2463 2699 <?php echo esc_html(__('Use custom database settings for this chart', "chart-builder")); ?>
2464 2700 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __(".","chart-builder") ); ?>">
2465 2701 <i class="ays_fa ays_fa_info_circle"></i>
@@ -2465,9 +2701,9 @@
2465 2701 <i class="ays_fa ays_fa_info_circle"></i>
2466 2702 </a>
2467 2703 </label>
2468 2704 </div>
2469 - <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">
2470 2706 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
2471 2707 <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" type="checkbox" />
2472 2708 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
2473 2709 </label>
@@ -2473,25 +2709,25 @@
2473 2709 </label>
2474 2710 </div>
2475 2711 </div>
2476 2712 <div id="ays-chart-external-db-query">
2477 - <div class="<?= $html_class_prefix ?>-db-query-form">
2713 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2478 2714 <div id="external-db-query-form">
2479 2715 <input type="hidden" name="chart_id" value="1">
2480 - <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>
2481 2717 <div class='db-wizard-success'></div>
2482 2718 <div class='db-wizard-error'></div>
2483 2719 </div>
2484 2720 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2485 2721 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-fetch">
2486 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2722 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2487 2723 </button>
2488 2724 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-show-on-chart">
2489 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>
2490 - <?php echo __( 'Preview', "chart-builder" ); ?>
2726 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2491 2727 </button>
2492 2728 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-save">
2493 - <?php echo __( 'Save data', "chart-builder" ); ?>
2729 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2494 2730 </button>
2495 2731 </div>
2496 2732 </div>
2497 2733 <div class="db-wizard-hints">
@@ -2496,9 +2732,18 @@
2496 2732 </div>
2497 2733 <div class="db-wizard-hints">
2498 2734 <ul>
2499 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> -->
2500 - <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>
2501 2746 </ul>
2502 2747 </div>
2503 2748 </div>
2504 2749 </div>
@@ -2506,9 +2751,9 @@
2506 2751 </div>
2507 2752 <?php
2508 2753 $content = ob_get_clean();
2509 2754
2510 - $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') . '">
2511 2756 <i class="ays_fa ays_fa_info_circle"></i>
2512 2757 </a>';
2513 2758
2514 2759 $sources['import_from_external_db'] = array(
@@ -2542,35 +2787,42 @@
2542 2787 // );
2543 2788
2544 2789 return $sources;
2545 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 +
2546 2801
2547 - $sql = "SELECT `title`, `id` FROM " . $wpdb->prefix . "aysquiz_quizes WHERE `published` = 1 AND `question_ids` <> ''";
2548 - $quizes = $wpdb->get_results($sql, "ARRAY_A");
2549 -
2550 2802 ob_start();
2551 2803 ?>
2552 2804 <div class="ays-accordion-data-main-wrap">
2553 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">
2554 2806 <div id="<?php echo esc_attr($html_class_prefix) ?>quiz-maker-form">
2555 - <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?= $chart_id ?>">
2556 - <div class="<?= $html_class_prefix ?>select-quiz-maker-data-query-container" id="<?= $html_class_prefix ?>quiz-queries">
2557 - <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' ) ?>">
2558 2810 <i class="ays_fa ays_fa_info_circle"></i>
2559 2811 </a>
2560 - <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">
2561 - <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>
2562 2814 <?php foreach ( $quiz_queries as $id => $q):
2563 2815 $disabled = preg_replace('/[^0-9]/', '', $id) <= 6 ? "false" : "true" ; ?>
2564 - <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>
2565 2817 <?php endforeach; ?>
2566 2818 </select>
2567 2819 </div>
2568 2820 <div class="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz-container">
2569 - <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">
2570 - <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>
2571 2823 <?php foreach ( $quizes as $quiz): ?>
2572 - <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>
2573 2825 <?php endforeach; ?>
2574 2826 </select>
2575 2827 </div>
2576 2828 <div id="ays-chart-quiz-maker-success"></div>
@@ -2576,21 +2828,21 @@
2576 2828 <div id="ays-chart-quiz-maker-success"></div>
2577 2829 <div id="ays-chart-quiz-maker-error"></div>
2578 2830 <div class="ays-chart-buttons-group">
2579 2831 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-fetch">
2580 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2832 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2581 2833 </button>
2582 2834 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-show-on-chart">
2583 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>
2584 - <?php echo __( 'Preview', "chart-builder" ); ?>
2836 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2585 2837 </button>
2586 2838 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-save">
2587 - <?php echo __( 'Save data', "chart-builder" ); ?>
2839 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2588 2840 </button>
2589 2841 </div>
2590 2842 </div>
2591 2843 <div>
2592 - <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>
2593 2845 </div>
2594 2846 </div>
2595 2847 </div>
2596 2848 <?php
@@ -2595,11 +2847,18 @@
2595 2847 </div>
2596 2848 <?php
2597 2849 $content = ob_get_clean();
2598 2850
2599 - $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) . '">
2600 - <i class="ays_fa ays_fa_info_circle"></i>
2601 - </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 + );
2602 2861 $sources['quiz_maker'] = array(
2603 2862 'content' => $content,
2604 2863 'title' => $title
2605 2864 );
@@ -2622,23 +2881,23 @@
2622 2881 <div class="ays-pro-features-v2-video-button"></div>
2623 2882 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2624 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>
2625 2884 <div class="ays-pro-features-v2-upgrade-text">
2626 - <?php echo __("Upgrade" , "chart-builder"); ?>
2885 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2627 2886 </div>
2628 2887 </a>
2629 2888 </div>
2630 - <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 ">
2631 2890 <div id="ays-chart-woocommerce-datas">
2632 - <div class="<?= $html_class_prefix ?>woocommerce-datas-form">
2891 + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-form">
2633 2892 <div id="woocommerce-datas-form">
2634 - <input type="hidden" name="chart_id" value="<?= $chart_id ?>">
2635 - <div class="<?= $html_class_prefix ?>woocommerce-datas-query-container" id="<?= $html_class_prefix ?>woocommerce-datas-container-id" >
2636 - <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' ) ?>">
2637 2896 <i class="ays_fa ays_fa_info_circle"></i>
2638 2897 </a>
2639 - <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]">
2640 - <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>
2641 2900 </select>
2642 2901 </div>
2643 2902 <div class='ays-chart-woocommerce-datas-success'></div>
2644 2903 <div class='ays-chart-woocommerce-datas-error'></div>
@@ -2644,16 +2903,16 @@
2644 2903 <div class='ays-chart-woocommerce-datas-error'></div>
2645 2904 </div>
2646 2905 <div class="ays-chart-buttons-group">
2647 2906 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-fetch">
2648 - <?php echo __( 'Show Results', "chart-builder" ); ?>
2907 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2649 2908 </button>
2650 2909 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-show-on-chart">
2651 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>
2652 - <?php echo __( 'Preview', "chart-builder" ); ?>
2911 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2653 2912 </button>
2654 2913 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-save">
2655 - <?php echo __( 'Save data', "chart-builder" ); ?>
2914 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2656 2915 </button>
2657 2916 </div>
2658 2917 </div>
2659 2918 </div>
@@ -2660,12 +2919,19 @@
2660 2919 </div>
2661 2920 </div>
2662 2921 <?php
2663 2922 $content = ob_get_clean();
2664 -
2665 - $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) . '">
2666 - <i class="ays_fa ays_fa_info_circle"></i>
2667 - </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 + );
2668 2934 $sources['woocommerce'] = array(
2669 2935 'content' => $content,
2670 2936 'title' => $title
2671 2937 );
@@ -2679,9 +2945,10 @@
2679 2945 $source = $args['source'];
2680 2946 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2681 2947 $settings = $args['settings'];
2682 2948 $source_chart_type = $args['source_chart_type'];
2683 - $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';
2684 2951
2685 2952 if (isset($source) && !empty($source)) {
2686 2953 if ( !isset( $source[0] ) ) {
2687 2954 if (count($source[1]) > 2) {
@@ -2686,15 +2953,15 @@
2686 2953 if ( !isset( $source[0] ) ) {
2687 2954 if (count($source[1]) > 2) {
2688 2955 $titles = array();
2689 2956 for ($i = 0; $i < count($source[1]); $i++) {
2690 - array_push($titles, __("Title", $this->plugin_name).$i);
2957 + array_push($titles, __("Title", 'chart-builder').$i);
2691 2958 }
2692 2959 $source[0] = $titles;
2693 2960 } else {
2694 2961 $source[0] = array(
2695 - __("Country", $this->plugin_name),
2696 - __("Population", $this->plugin_name),
2962 + __("Country", 'chart-builder'),
2963 + __("Population", 'chart-builder'),
2697 2964 );
2698 2965 }
2699 2966
2700 2967 ksort($source);
@@ -2716,9 +2983,9 @@
2716 2983 ?>
2717 2984 <div class="ays-accordion-data-main-wrap">
2718 2985 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2719 2986 <?php if($source_chart_type != 'org_chart'): ?>
2720 - <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">
2721 2988 <!-- <div class="<//?= $html_class_prefix ?>icons-box">
2722 2989 <img class="<//?= $html_class_prefix ?>add-new-row" src="<//?php echo CHART_BUILDER_ADMIN_URL; ?>/images/icons/add-circle-outline.svg">
2723 2990 </div> -->
2724 2991 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
@@ -2729,14 +2996,14 @@
2729 2996 if ($source_id == 0): ?>
2730 2997 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2731 2998 <div class="ays-chart-empty-data-table-cell"></div>
2732 2999 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2733 - <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); ?>">
2734 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">
2735 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;" />
2736 3003 </svg>
2737 3004 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2738 - <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'" : "" ?>>
2739 3006 <?php if ($each_source_id !== 0): ?>
2740 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">
2741 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;" />
2742 3009 </svg>
@@ -2758,14 +3025,14 @@
2758 3025 </svg>
2759 3026 </div>
2760 3027 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2761 3028 <?php if ($each_source_id == 0): ?>
2762 - <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); ?>">
2763 - <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)); ?>">
2764 3031 </div>
2765 3032 <?php else: ?>
2766 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); ?>">
2767 - <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">
2768 3035 </div>
2769 3036 <?php endif; ?>
2770 3037 <?php endforeach; ?>
2771 3038 </div>
@@ -2772,16 +3039,16 @@
2772 3039 <?php endif; ?>
2773 3040 <?php endif; ?>
2774 3041 <?php endforeach; ?>
2775 3042 <?php else:?>
2776 - <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">
2777 3044 <div style="height: 63.11px; padding: 0 15px;"></div>
2778 - <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">
2779 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">
2780 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;" />
2781 3048 </svg>
2782 3049 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2783 - <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'>
2784 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">
2785 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;" />
2786 3053 </svg>
2787 3054 </div>
@@ -2808,30 +3075,30 @@
2808 3075 <?php endif; ?>
2809 3076 </div>
2810 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">
2811 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">
2812 - <?php echo __( 'Add column', "chart-builder" ); ?>
3079 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2813 3080 </div>
2814 3081 </div>
2815 3082 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2816 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">
2817 - <?php echo __( 'Add row', "chart-builder" ); ?>
3084 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2818 3085 </div>
2819 3086 <br>
2820 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">
2821 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>
2822 - <?php echo __( 'Preview', "chart-builder" ); ?>
3089 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2823 3090 </button>
2824 3091 </div>
2825 3092 <?php endif; ?>
2826 - <div class="<?= $html_class_prefix ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
2827 - <div class="<?= $html_class_prefix ?>chart-source-data-content-org-type">
2828 - <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">
2829 3096 </ul>
2830 3097 </div>
2831 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">
2832 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>
2833 - <?php echo __( 'Preview', "chart-builder" ); ?>
3100 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2834 3101 </button>
2835 3102 </div>
2836 3103 </div>
2837 3104 </div>
@@ -2856,15 +3123,16 @@
2856 3123 $source = $args['source'];
2857 3124 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2858 3125 $settings = $args['settings'];
2859 3126 $source_chart_type = $args['source_chart_type'];
2860 - $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';
2861 3129
2862 3130 ob_start();
2863 3131 ?>
2864 3132 <div class="ays-accordion-data-main-wrap">
2865 3133 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2866 - <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">
2867 3135 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
2868 3136 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content">
2869 3137 <?php if(!empty($source)):
2870 3138 foreach($source as $source_id => $source_value):
@@ -2872,14 +3140,14 @@
2872 3140 if ($source_id == 0): ?>
2873 3141 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2874 3142 <div class="ays-chart-empty-data-table-cell"></div>
2875 3143 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2876 - <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); ?>">
2877 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">
2878 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;" />
2879 3147 </svg>
2880 3148 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2881 - <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'" : "" ?>>
2882 3150 <?php if ($each_source_id !== 0): ?>
2883 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">
2884 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;" />
2885 3153 </svg>
@@ -2901,14 +3169,14 @@
2901 3169 </svg>
2902 3170 </div>
2903 3171 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2904 3172 <?php if ($each_source_id == 0): ?>
2905 - <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); ?>">
2906 - <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)); ?>">
2907 3175 </div>
2908 3176 <?php else: ?>
2909 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); ?>">
2910 - <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">
2911 3179 </div>
2912 3180 <?php endif; ?>
2913 3181 <?php endforeach; ?>
2914 3182 </div>
@@ -2915,16 +3183,16 @@
2915 3183 <?php endif; ?>
2916 3184 <?php endif; ?>
2917 3185 <?php endforeach; ?>
2918 3186 <?php else:?>
2919 - <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">
2920 3188 <div style="height: 63.11px; padding: 0 15px;"></div>
2921 - <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">
2922 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">
2923 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;" />
2924 3192 </svg>
2925 3193 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2926 - <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'>
2927 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">
2928 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;" />
2929 3197 </svg>
2930 3198 </div>
@@ -2951,19 +3219,19 @@
2951 3219 <?php endif; ?>
2952 3220 </div>
2953 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">
2954 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">
2955 - <?php echo __( 'Add column', "chart-builder" ); ?>
3223 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2956 3224 </div>
2957 3225 </div>
2958 3226 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2959 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">
2960 - <?php echo __( 'Add row', "chart-builder" ); ?>
3228 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2961 3229 </div>
2962 3230 <br>
2963 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">
2964 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>
2965 - <?php echo __( 'Preview', "chart-builder" ); ?>
3233 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2966 3234 </button>
2967 3235 </div>
2968 3236 </div>
2969 3237 </div>
@@ -3019,9 +3287,9 @@
3019 3287
3020 3288 $sources[] = $content;
3021 3289 }
3022 3290 $content_for_escape = implode('' , $sources );
3023 - echo html_entity_decode(esc_html( $content_for_escape ));
3291 + echo html_entity_decode( $content_for_escape );
3024 3292 }
3025 3293
3026 3294 public function settings_contents_general_settings( $sources, $args ){
3027 3295 $html_class_prefix = $args['html_class_prefix'];
@@ -3296,9 +3564,9 @@
3296 3564 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3297 3565 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3298 3566 <label for="ays-chart-option-tooltip-trigger">
3299 3567 <?php echo esc_html(__( "Trigger", "chart-builder" )); ?>
3300 - <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") )); ?>">
3301 3569 <i class="ays_fa ays_fa_info_circle"></i>
3302 3570 </a>
3303 3571 </label>
3304 3572 </div>
@@ -3347,9 +3615,9 @@
3347 3615 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3348 3616 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3349 3617 <label for="ays-chart-option-tooltip-font-size" class="form-label">
3350 3618 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3351 - <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") )); ?>">
3352 3620 <i class="ays_fa ays_fa_info_circle"></i>
3353 3621 </a>
3354 3622 </label>
3355 3623 </div>
@@ -3377,9 +3645,9 @@
3377 3645 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3378 3646 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3379 3647 <label for="ays-chart-option-tooltip-bold">
3380 3648 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
3381 - <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") )); ?>">
3382 3650 <i class="ays_fa ays_fa_info_circle"></i>
3383 3651 </a>
3384 3652 </label>
3385 3653 </div>
@@ -3410,8 +3678,47 @@
3410 3678
3411 3679 return $sources;
3412 3680 }
3413 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 +
3414 3721 public function settings_contents_legend_settings( $sources, $args ){
3415 3722 $html_class_prefix = $args['html_class_prefix'];
3416 3723 $html_name_prefix = $args['html_name_prefix'];
3417 3724 $settings = $args['settings'];
@@ -3431,9 +3738,9 @@
3431 3738 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3432 3739 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3433 3740 <label for="ays-chart-option-legend-position">
3434 3741 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3435 - <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") )); ?>">
3436 3743 <i class="ays_fa ays_fa_info_circle"></i>
3437 3744 </a>
3438 3745 </label>
3439 3746 </div>
@@ -3464,9 +3771,9 @@
3464 3771 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3465 3772 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3466 3773 <label for="ays-chart-option-legend-alignment">
3467 3774 <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
3468 - <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") )); ?>">
3469 3776 <i class="ays_fa ays_fa_info_circle"></i>
3470 3777 </a>
3471 3778 </label>
3472 3779 </div>
@@ -3486,9 +3793,9 @@
3486 3793 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3487 3794 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3488 3795 <label for="ays-chart-option-legend-font-color">
3489 3796 <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
3490 - <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") )); ?>">
3491 3798 <i class="ays_fa ays_fa_info_circle"></i>
3492 3799 </a>
3493 3800 </label>
3494 3801 </div>
@@ -3499,9 +3806,9 @@
3499 3806 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3500 3807 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3501 3808 <label for="ays-chart-option-legend-font-size" class="form-label">
3502 3809 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3503 - <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") )); ?>">
3504 3811 <i class="ays_fa ays_fa_info_circle"></i>
3505 3812 </a>
3506 3813 </label>
3507 3814 </div>
@@ -3556,8 +3863,159 @@
3556 3863
3557 3864 return $sources;
3558 3865 }
3559 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 +
3560 4018 public function settings_contents_horizontal_axis_settings( $sources, $args ){
3561 4019 $html_class_prefix = $args['html_class_prefix'];
3562 4020 $html_name_prefix = $args['html_name_prefix'];
3563 4021 $settings = $args['settings'];
@@ -3573,8 +4031,9 @@
3573 4031 $haxis_slanted_text_angle = $settings['haxis_slanted_text_angle'];
3574 4032 $haxis_show_text_every = $settings['haxis_show_text_every'];
3575 4033 $haxis_format_options = $settings['axes_format_options'];
3576 4034 $haxis_format = $settings['haxis_format'];
4035 + $haxis_enable_divide_percent = $settings['haxis_enable_divide_percent'];
3577 4036 $haxis_label_font_size = $settings['haxis_label_font_size'];
3578 4037 $haxis_max_value = $settings['haxis_max_value'];
3579 4038 $haxis_min_value = $settings['haxis_min_value'];
3580 4039 $haxis_text_font_size = $settings['haxis_text_font_size'];
@@ -3588,9 +4047,9 @@
3588 4047 $haxis_minor_gridlines_color = $settings['haxis_minor_gridlines_color'];
3589 4048
3590 4049 ob_start();
3591 4050 ?>
3592 - <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">
3593 4052 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3594 4053 <h6>Label</h6>
3595 4054 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3596 4055 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3595,9 +4054,9 @@
3595 4054 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3596 4055 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3597 4056 <label for="ays-chart-option-haxis-title" class="form-label">
3598 4057 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3599 - <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") ); ?>">
3600 4059 <i class="ays_fa ays_fa_info_circle"></i>
3601 4060 </a>
3602 4061 </label>
3603 4062 </div>
@@ -3682,9 +4141,9 @@
3682 4141 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3683 4142 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3684 4143 <label for="ays-chart-option-haxis-text-position" class="form-label">
3685 4144 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3686 - <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") ); ?>">
3687 4146 <i class="ays_fa ays_fa_info_circle"></i>
3688 4147 </a>
3689 4148 </label>
3690 4149 </div>
@@ -3865,32 +4324,40 @@
3865 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) ?>">
3866 4325 </div>
3867 4326 </div> <!-- Horizontal axis baseline color -->
3868 4327
3869 - <br>
3870 - <h6>Format</h6>
3871 - <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 " >
3872 4331 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3873 4332 <label for="ays-chart-option-haxis-format" class="form-label">
3874 4333 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
3875 4334 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
3876 - echo htmlspecialchars( sprintf (
3877 - "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
3878 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
3879 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
3880 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
3881 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
3882 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
3883 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
3884 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
3885 - '<em>', '</em>',
3886 - '<em>', '</em>',
3887 - '<em>', '</em>',
3888 - '<em>', '</em>',
3889 - '<em>', '</em>',
3890 - '<em>', '</em>',
3891 - '<em>', '</em>'
3892 - ) );
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 + ));
3893 4360 ?>">
3894 4361 <i class="ays_fa ays_fa_info_circle"></i>
3895 4362 </a>
3896 4363 </label>
@@ -3907,10 +4374,26 @@
3907 4374 ?>
3908 4375 </select>
3909 4376 </div>
3910 4377 </div> <!-- Horizontal axis format -->
3911 - <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;'; ?>">
3912 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">
3913 4396 <label for="ays-chart-option-haxis-max-value" class="form-label">
3914 4397 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
3915 4398 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
3916 4399 <i class="ays_fa ays_fa_info_circle"></i>
@@ -3920,9 +4403,9 @@
3920 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">
3921 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) ?>">
3922 4405 </div>
3923 4406 </div> <!-- Horizontal axis max value -->
3924 - <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" >
3925 4408 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3926 4409 <label for="ays-chart-option-haxis-min-value" class="form-label">
3927 4410 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
3928 4411 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -3961,8 +4444,9 @@
3961 4444 $vaxis_text_color = $settings['vaxis_text_color'];
3962 4445 $vaxis_baseline_color = $settings['vaxis_baseline_color'];
3963 4446 $vaxis_format_options = $settings['axes_format_options'];
3964 4447 $vaxis_format = $settings['vaxis_format'];
4448 + $vaxis_enable_divide_percent = $settings['vaxis_enable_divide_percent'];
3965 4449 $vaxis_label_font_size = $settings['vaxis_label_font_size'];
3966 4450 $vaxis_max_value = $settings['vaxis_max_value'];
3967 4451 $vaxis_min_value = $settings['vaxis_min_value'];
3968 4452 $vaxis_text_font_size = $settings['vaxis_text_font_size'];
@@ -3976,9 +4460,9 @@
3976 4460 $vaxis_minor_gridlines_color = $settings['vaxis_minor_gridlines_color'];
3977 4461
3978 4462 ob_start();
3979 4463 ?>
3980 - <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">
3981 4465 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3982 4466 <h6>Label</h6>
3983 4467 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3984 4468 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3983,9 +4467,9 @@
3983 4467 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3984 4468 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3985 4469 <label for="ays-chart-option-vaxis-title" class="form-label">
3986 4470 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3987 - <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") ); ?>">
3988 4472 <i class="ays_fa ays_fa_info_circle"></i>
3989 4473 </a>
3990 4474 </label>
3991 4475 </div>
@@ -4057,9 +4541,9 @@
4057 4541 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4058 4542 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4059 4543 <label for="ays-chart-option-vaxis-text-position" class="form-label">
4060 4544 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4061 - <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") ); ?>">
4062 4546 <i class="ays_fa ays_fa_info_circle"></i>
4063 4547 </a>
4064 4548 </label>
4065 4549 </div>
@@ -4205,24 +4689,32 @@
4205 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) ?>">
4206 4690 </div>
4207 4691 </div> <!-- Vertical axis baseline color -->
4208 4692
4209 - <br>
4210 - <h6>Format</h6>
4211 - <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">
4212 4696 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4213 4697 <label for="ays-chart-option-vaxis-format" class="form-label">
4214 4698 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
4215 4699 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4216 - echo htmlspecialchars( sprintf (
4700 + echo esc_attr( sprintf(
4701 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4217 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>" .
4218 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
4219 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
4220 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
4221 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
4222 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
4223 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
4224 - __('%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>",
4225 4717 '<em>', '</em>',
4226 4718 '<em>', '</em>',
4227 4719 '<em>', '</em>',
4228 4720 '<em>', '</em>',
@@ -4228,9 +4720,9 @@
4228 4720 '<em>', '</em>',
4229 4721 '<em>', '</em>',
4230 4722 '<em>', '</em>',
4231 4723 '<em>', '</em>'
4232 - ) );
4724 + ));
4233 4725 ?>">
4234 4726 <i class="ays_fa ays_fa_info_circle"></i>
4235 4727 </a>
4236 4728 </label>
@@ -4247,10 +4739,26 @@
4247 4739 ?>
4248 4740 </select>
4249 4741 </div>
4250 4742 </div> <!-- Vertical axis format -->
4251 - <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;'; ?>">
4252 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">
4253 4761 <label for="ays-chart-option-vaxis-max-value" class="form-label">
4254 4762 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
4255 4763 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
4256 4764 <i class="ays_fa ays_fa_info_circle"></i>
@@ -4260,9 +4768,9 @@
4260 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">
4261 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) ?>">
4262 4770 </div>
4263 4771 </div> <!-- Vertical axis max value -->
4264 - <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">
4265 4773 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4266 4774 <label for="ays-chart-option-vaxis-min-value" class="form-label">
4267 4775 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
4268 4776 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -4301,9 +4809,9 @@
4301 4809 $animation_easing = $settings['animation_easing'];
4302 4810
4303 4811 ob_start();
4304 4812 ?>
4305 - <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">
4306 4814 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4307 4815 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4308 4816 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4309 4817 <label for="ays-chart-option-enable-animation">
@@ -4354,23 +4862,24 @@
4354 4862 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4355 4863 <label for="ays-chart-option-animation-easing" class="form-label">
4356 4864 <?php echo esc_html(__( "Easing", "chart-builder" )); ?>
4357 4865 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4358 - echo htmlspecialchars( sprintf(
4866 + echo esc_attr( sprintf(
4867 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4359 4868 "<p>" . __('The easing function applied to the chart animation. The following options are available:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4360 - __('%sLinear:%s Constant speed.', "chart-builder") . "</li><li>" .
4361 - __('%sEase in:%s Start slow and speed up.', "chart-builder") . "</li><li>" .
4362 - __('%sEase out:%s Start fast and slow down.', "chart-builder") . "</li><li>" .
4363 - __('%sEase in and out:%s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
4364 - '<em>',
4365 - '</em>',
4366 - '<em>',
4367 - '</em>',
4368 - '<em>',
4369 - '</em>',
4370 - '<em>',
4371 - '</em>'
4372 - ) );
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 + ));
4373 4882 ?>">
4374 4883 <i class="ays_fa ays_fa_info_circle"></i>
4375 4884 </a>
4376 4885 </label>
@@ -4409,9 +4918,9 @@
4409 4918 $html_name_prefix = $args['html_name_prefix'];
4410 4919
4411 4920 ob_start();
4412 4921 ?>
4413 - <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">
4414 4923 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4415 4924 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4416 4925 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4417 4926 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4416,15 +4925,15 @@
4416 4925 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4417 4926 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4418 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>
4419 4928 <div class="ays-pro-features-v2-video-text">
4420 - <?php echo __("Watch Video" , "chart-builder"); ?>
4929 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4421 4930 </div>
4422 4931 </a>
4423 4932 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4424 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>
4425 4934 <div class="ays-pro-features-v2-upgrade-text">
4426 - <?php echo __("Upgrade" , "chart-builder"); ?>
4935 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4427 4936 </div>
4428 4937 </a>
4429 4938 </div>
4430 4939 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4446,15 +4955,15 @@
4446 4955 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4447 4956 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4448 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>
4449 4958 <div class="ays-pro-features-v2-video-text">
4450 - <?php echo __("Watch Video" , "chart-builder"); ?>
4959 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4451 4960 </div>
4452 4961 </a>
4453 4962 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4454 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>
4455 4964 <div class="ays-pro-features-v2-upgrade-text">
4456 - <?php echo __("Upgrade" , "chart-builder"); ?>
4965 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4457 4966 </div>
4458 4967 </a>
4459 4968 </div>
4460 4969 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4494,9 +5003,9 @@
4494 5003 $enable_img = $settings['enable_img'];
4495 5004
4496 5005 ob_start();
4497 5006 ?>
4498 - <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">
4499 5008 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4500 5009 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4501 5010 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4502 5011 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4501,15 +5010,15 @@
4501 5010 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4502 5011 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4503 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>
4504 5013 <div class="ays-pro-features-v2-video-text">
4505 - <?php echo __("Watch Video" , "chart-builder"); ?>
5014 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4506 5015 </div>
4507 5016 </a>
4508 5017 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4509 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>
4510 5019 <div class="ays-pro-features-v2-upgrade-text">
4511 - <?php echo __("Upgrade" , "chart-builder"); ?>
5020 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4512 5021 </div>
4513 5022 </a>
4514 5023 </div>
4515 5024 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4531,15 +5040,15 @@
4531 5040 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4532 5041 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4533 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>
4534 5043 <div class="ays-pro-features-v2-video-text">
4535 - <?php echo __("Watch Video" , "chart-builder"); ?>
5044 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4536 5045 </div>
4537 5046 </a>
4538 5047 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4539 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>
4540 5049 <div class="ays-pro-features-v2-upgrade-text">
4541 - <?php echo __("Upgrade" , "chart-builder"); ?>
5050 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4542 5051 </div>
4543 5052 </a>
4544 5053 </div>
4545 5054 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4561,15 +5070,15 @@
4561 5070 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4562 5071 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4563 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>
4564 5073 <div class="ays-pro-features-v2-video-text">
4565 - <?php echo __("Watch Video" , "chart-builder"); ?>
5074 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4566 5075 </div>
4567 5076 </a>
4568 5077 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4569 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>
4570 5079 <div class="ays-pro-features-v2-upgrade-text">
4571 - <?php echo __("Upgrade" , "chart-builder"); ?>
5080 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4572 5081 </div>
4573 5082 </a>
4574 5083 </div>
4575 5084 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4591,15 +5100,15 @@
4591 5100 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4592 5101 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4593 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>
4594 5103 <div class="ays-pro-features-v2-video-text">
4595 - <?php echo __("Watch Video" , "chart-builder"); ?>
5104 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4596 5105 </div>
4597 5106 </a>
4598 5107 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4599 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>
4600 5109 <div class="ays-pro-features-v2-upgrade-text">
4601 - <?php echo __("Upgrade" , "chart-builder"); ?>
5110 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4602 5111 </div>
4603 5112 </a>
4604 5113 </div>
4605 5114 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4627,9 +5136,9 @@
4627 5136 </label>
4628 5137 </div>
4629 5138 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4630 5139 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
4631 - <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)?> >
4632 5141 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4633 5142 </label>
4634 5143 </div>
4635 5144 </div> <!-- IMG option end -->
@@ -4686,9 +5195,9 @@
4686 5195
4687 5196 $sources[] = $content;
4688 5197 }
4689 5198 $content_for_escape = implode('' , $sources );
4690 - echo html_entity_decode(esc_html( $content_for_escape ));
5199 + echo html_entity_decode( esc_html($content_for_escape) );
4691 5200 }
4692 5201
4693 5202 public function settings_contents_chart_styles_settings( $sources, $args ){
4694 5203 $html_class_prefix = $args['html_class_prefix'];
@@ -4711,12 +5220,16 @@
4711 5220 $border_width = $settings['border_width'];
4712 5221 $border_width_with_title = $settings['border_width_with_title'];
4713 5222 $border_radius_with_title = $settings['border_radius_with_title'];
4714 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'];
4715 5227 $border_radius = $settings['border_radius'];
4716 5228 $border_color = $settings['border_color'];
4717 5229 $box_shadow = $settings['box_shadow'];
4718 5230 $box_shadow_color = $settings['box_shadow_color'];
5231 + $padding_outer = $settings['padding_outer'];
4719 5232 ob_start();
4720 5233 ?>
4721 5234 <div class="ays-accordion-data-main-wrap">
4722 5235 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -4723,9 +5236,9 @@
4723 5236 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4724 5237 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4725 5238 <label for="ays-chart-option-width" class="form-label">
4726 5239 <?php echo esc_html(__( "Width", "chart-builder" )); ?>
4727 - <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") ); ?>">
4728 5241 <i class="ays_fa ays_fa_info_circle"></i>
4729 5242 </a>
4730 5243 </label>
4731 5244 </div>
@@ -4746,9 +5259,9 @@
4746 5259 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4747 5260 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4748 5261 <label for="ays-chart-option-responsive-width" class="form-label">
4749 5262 <?php echo esc_html(__( "Responsive Width", "chart-builder" )); ?>
4750 - <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") ); ?>">
4751 5264 <i class="ays_fa ays_fa_info_circle"></i>
4752 5265 </a>
4753 5266 </label>
4754 5267 </div>
@@ -4762,9 +5275,9 @@
4762 5275 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4763 5276 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4764 5277 <label for="ays-chart-option-position">
4765 5278 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4766 - <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") ); ?>">
4767 5280 <i class="ays_fa ays_fa_info_circle"></i>
4768 5281 </a>
4769 5282 </label>
4770 5283 </div>
@@ -4779,14 +5292,14 @@
4779 5292 endforeach;
4780 5293 ?>
4781 5294 </select>
4782 5295 </div>
4783 - </div> <!-- Title position -->
5296 + </div> <!-- Position -->
4784 5297 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4785 5298 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4786 5299 <label for="ays-chart-option-height" class="form-label">
4787 5300 <?php echo esc_html(__( "Height", "chart-builder" )); ?>
4788 - <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") ); ?>">
4789 5302 <i class="ays_fa ays_fa_info_circle"></i>
4790 5303 </a>
4791 5304 </label>
4792 5305 </div>
@@ -4807,9 +5320,9 @@
4807 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">
4808 5321 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4809 5322 <label for="ays-chart-option-font-size" class="form-label">
4810 5323 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
4811 - <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") ); ?>">
4812 5325 <i class="ays_fa ays_fa_info_circle"></i>
4813 5326 </a>
4814 5327 </label>
4815 5328 </div>
@@ -4817,24 +5330,24 @@
4817 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) ?>">
4818 5331 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
4819 5332 </div>
4820 5333 </div> <!-- Font size -->
4821 - <div class="form-group row mb-2 <?= $html_class_prefix ?>options-section cb-changable-opt cb-org_chart-opt display_none">
4822 - <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">
4823 5336 <label for="ays-chart-option-org-chart-font-size" class="form-label">
4824 - <?php echo __( "Element size", $this->plugin_name ); ?>
4825 - <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") ); ?>">
4826 5339 <i class="ays_fa ays_fa_info_circle"></i>
4827 5340 </a>
4828 5341 </label>
4829 5342 </div>
4830 5343 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
4831 - <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]">
4832 5345 <?php
4833 5346 foreach ( $org_chart_font_size_options as $option_slug => $option ):
4834 5347 $selected = ( $org_chart_font_size == $option_slug ) ? 'selected' : '';
4835 5348 ?>
4836 - <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>
4837 5350 <?php
4838 5351 endforeach;
4839 5352 ?>
4840 5353 </select>
@@ -4843,9 +5356,9 @@
4843 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">
4844 5357 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4845 5358 <label for="ays-chart-option-background-color">
4846 5359 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4847 - <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") ); ?>">
4848 5361 <i class="ays_fa ays_fa_info_circle"></i>
4849 5362 </a>
4850 5363 </label>
4851 5364 </div>
@@ -4856,9 +5369,9 @@
4856 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">
4857 5370 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4858 5371 <label for="ays-chart-option-transparent-background" class="form-label">
4859 5372 <?php echo esc_html(__( "Transparent background", "chart-builder" )); ?>
4860 - <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") ); ?>">
4861 5374 <i class="ays_fa ays_fa_info_circle"></i>
4862 5375 </a>
4863 5376 </label>
4864 5377 </div>
@@ -4872,9 +5385,9 @@
4872 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">
4873 5386 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4874 5387 <label for="ays-chart-option-border-width">
4875 5388 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4876 - <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") ); ?>">
4877 5390 <i class="ays_fa ays_fa_info_circle"></i>
4878 5391 </a>
4879 5392 </label>
4880 5393 </div>
@@ -4885,9 +5398,9 @@
4885 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">
4886 5399 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4887 5400 <label for="ays-chart-option-border-color">
4888 5401 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4889 - <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") ); ?>">
4890 5403 <i class="ays_fa ays_fa_info_circle"></i>
4891 5404 </a>
4892 5405 </label>
4893 5406 </div>
@@ -4898,9 +5411,9 @@
4898 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">
4899 5412 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4900 5413 <label for="ays-chart-option-border-radius">
4901 5414 <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
4902 - <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") ); ?>">
4903 5416 <i class="ays_fa ays_fa_info_circle"></i>
4904 5417 </a>
4905 5418 </label>
4906 5419 </div>
@@ -4909,11 +5422,33 @@
4909 5422 </div>
4910 5423 </div> <!-- Border radius -->
4911 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">
4912 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">
4913 5448 <label for="ays-chart-option-box-shadow" class="form-label">
4914 5449 <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
4915 - <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") ); ?>">
4916 5451 <i class="ays_fa ays_fa_info_circle"></i>
4917 5452 </a>
4918 5453 </label>
4919 5454 </div>
@@ -4927,9 +5462,9 @@
4927 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">
4928 5463 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4929 5464 <label for="ays-chart-option-box-shadow-color" class="form-label">
4930 5465 <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
4931 - <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") ); ?>">
4932 5467 <i class="ays_fa ays_fa_info_circle"></i>
4933 5468 </a>
4934 5469 </label>
4935 5470 </div>
@@ -4940,9 +5475,9 @@
4940 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">
4941 5476 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4942 5477 <label for="ays-chart-option-border-width-with-title">
4943 5478 <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?>
4944 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container border including chart title and description.","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") ); ?>">
4945 5480 <i class="ays_fa ays_fa_info_circle"></i>
4946 5481 </a>
4947 5482 </label>
4948 5483 </div>
@@ -4953,9 +5488,9 @@
4953 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">
4954 5489 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4955 5490 <label for="ays-chart-option-border-radius-with-title">
4956 5491 <?php echo esc_html(__( "Border radius (including title)", "chart-builder" )); ?>
4957 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The radius of the chart container border including chart title and description.","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") ); ?>">
4958 5493 <i class="ays_fa ays_fa_info_circle"></i>
4959 5494 </a>
4960 5495 </label>
4961 5496 </div>
@@ -4966,9 +5501,9 @@
4966 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">
4967 5502 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4968 5503 <label for="ays-chart-option-border-color-with-title">
4969 5504 <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?>
4970 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart container border including chart title and description.","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") ); ?>">
4971 5506 <i class="ays_fa ays_fa_info_circle"></i>
4972 5507 </a>
4973 5508 </label>
4974 5509 </div>
@@ -4975,8 +5510,43 @@
4975 5510 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
4976 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) ?>">
4977 5512 </div>
4978 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 -->
4979 5549 </div>
4980 5550 </div>
4981 5551 <?php
4982 5552 $content = ob_get_clean();
@@ -4990,8 +5560,273 @@
4990 5560
4991 5561 return $sources;
4992 5562 }
4993 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 +
4994 5829 public function settings_contents_chart_area_styles_settings( $sources, $args ){
4995 5830 $html_class_prefix = $args['html_class_prefix'];
4996 5831 $html_name_prefix = $args['html_name_prefix'];
4997 5832 $settings = $args['settings'];
@@ -5010,9 +5845,9 @@
5010 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">
5011 5846 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5012 5847 <label for="ays-chart-option-chart-background-color">
5013 5848 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
5014 - <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") ); ?>">
5015 5850 <i class="ays_fa ays_fa_info_circle"></i>
5016 5851 </a>
5017 5852 </label>
5018 5853 </div>
@@ -5023,9 +5858,9 @@
5023 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">
5024 5859 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5025 5860 <label for="ays-chart-option-chart-border-width">
5026 5861 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
5027 - <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") ); ?>">
5028 5863 <i class="ays_fa ays_fa_info_circle"></i>
5029 5864 </a>
5030 5865 </label>
5031 5866 </div>
@@ -5036,9 +5871,9 @@
5036 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">
5037 5872 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5038 5873 <label for="ays-chart-option-chart-border-color">
5039 5874 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
5040 - <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") ); ?>">
5041 5876 <i class="ays_fa ays_fa_info_circle"></i>
5042 5877 </a>
5043 5878 </label>
5044 5879 </div>
@@ -5049,9 +5884,9 @@
5049 5884 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5050 5885 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5051 5886 <label for="ays-chart-option-chart-left-margin">
5052 5887 <?php echo esc_html(__( "Left Margin", "chart-builder" )); ?>
5053 - <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") ); ?>">
5054 5889 <i class="ays_fa ays_fa_info_circle"></i>
5055 5890 </a>
5056 5891 </label>
5057 5892 </div>
@@ -5062,9 +5897,9 @@
5062 5897 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5063 5898 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5064 5899 <label for="ays-chart-option-chart-right-margin">
5065 5900 <?php echo esc_html(__( "Right Margin", "chart-builder" )); ?>
5066 - <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") ); ?>">
5067 5902 <i class="ays_fa ays_fa_info_circle"></i>
5068 5903 </a>
5069 5904 </label>
5070 5905 </div>
@@ -5075,9 +5910,9 @@
5075 5910 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5076 5911 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5077 5912 <label for="ays-chart-option-chart-top-margin">
5078 5913 <?php echo esc_html(__( "Top Margin", "chart-builder" )); ?>
5079 - <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") ); ?>">
5080 5915 <i class="ays_fa ays_fa_info_circle"></i>
5081 5916 </a>
5082 5917 </label>
5083 5918 </div>
@@ -5088,9 +5923,9 @@
5088 5923 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5089 5924 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5090 5925 <label for="ays-chart-option-chart-bottom-margin">
5091 5926 <?php echo esc_html(__( "Bottom Margin", "chart-builder" )); ?>
5092 - <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") ); ?>">
5093 5928 <i class="ays_fa ays_fa_info_circle"></i>
5094 5929 </a>
5095 5930 </label>
5096 5931 </div>
@@ -5140,9 +5975,9 @@
5140 5975 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5141 5976 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5142 5977 <label for="ays-chart-option-title-color">
5143 5978 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5144 - <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") ); ?>">
5145 5980 <i class="ays_fa ays_fa_info_circle"></i>
5146 5981 </a>
5147 5982 </label>
5148 5983 </div>
@@ -5153,9 +5988,9 @@
5153 5988 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5154 5989 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5155 5990 <label for="ays-chart-option-title-font-size" class="form-label">
5156 5991 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5157 - <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") ); ?>">
5158 5993 <i class="ays_fa ays_fa_info_circle"></i>
5159 5994 </a>
5160 5995 </label>
5161 5996 </div>
@@ -5167,9 +6002,9 @@
5167 6002 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5168 6003 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5169 6004 <label for="ays-chart-option-title-bold" class="form-label">
5170 6005 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5171 - <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") ); ?>">
5172 6007 <i class="ays_fa ays_fa_info_circle"></i>
5173 6008 </a>
5174 6009 </label>
5175 6010 </div>
@@ -5183,9 +6018,9 @@
5183 6018 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5184 6019 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5185 6020 <label for="ays-chart-option-title-italic" class="form-label">
5186 6021 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5187 - <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") ); ?>">
5188 6023 <i class="ays_fa ays_fa_info_circle"></i>
5189 6024 </a>
5190 6025 </label>
5191 6026 </div>
@@ -5199,9 +6034,9 @@
5199 6034 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5200 6035 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5201 6036 <label for="ays-chart-option-title-position">
5202 6037 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5203 - <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") ); ?>">
5204 6039 <i class="ays_fa ays_fa_info_circle"></i>
5205 6040 </a>
5206 6041 </label>
5207 6042 </div>
@@ -5221,9 +6056,9 @@
5221 6056 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5222 6057 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5223 6058 <label for="ays-chart-option-title-gap" class="form-label">
5224 6059 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5225 - <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") ); ?>">
5226 6061 <i class="ays_fa ays_fa_info_circle"></i>
5227 6062 </a>
5228 6063 </label>
5229 6064 </div>
@@ -5235,9 +6070,9 @@
5235 6070 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5236 6071 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5237 6072 <label for="ays-chart-option-title-gap-description" class="form-label">
5238 6073 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5239 - <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") ); ?>">
5240 6075 <i class="ays_fa ays_fa_info_circle"></i>
5241 6076 </a>
5242 6077 </label>
5243 6078 </div>
@@ -5249,9 +6084,9 @@
5249 6084 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5250 6085 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5251 6086 <label for="ays-chart-option-title-text-transform">
5252 6087 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5253 - <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") ); ?>">
5254 6089 <i class="ays_fa ays_fa_info_circle"></i>
5255 6090 </a>
5256 6091 </label>
5257 6092 </div>
@@ -5271,9 +6106,9 @@
5271 6106 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5272 6107 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5273 6108 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5274 6109 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5275 - <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") ); ?>">
5276 6111 <i class="ays_fa ays_fa_info_circle"></i>
5277 6112 </a>
5278 6113 </label>
5279 6114 </div>
@@ -5285,9 +6120,9 @@
5285 6120 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5286 6121 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5287 6122 <label for="ays-chart-option-title-text-decoration">
5288 6123 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5289 - <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") ); ?>">
5290 6125 <i class="ays_fa ays_fa_info_circle"></i>
5291 6126 </a>
5292 6127 </label>
5293 6128 </div>
@@ -5307,9 +6142,9 @@
5307 6142 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5308 6143 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5309 6144 <label for="ays-chart-option-title-text-shadow" class="form-label">
5310 6145 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5311 - <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") ); ?>">
5312 6147 <i class="ays_fa ays_fa_info_circle"></i>
5313 6148 </a>
5314 6149 </label>
5315 6150 </div>
@@ -5323,9 +6158,9 @@
5323 6158 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5324 6159 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5325 6160 <label for="ays-chart-option-title-shadow-color">
5326 6161 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5327 - <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") ); ?>">
5328 6163 <i class="ays_fa ays_fa_info_circle"></i>
5329 6164 </a>
5330 6165 </label>
5331 6166 </div>
@@ -5375,9 +6210,9 @@
5375 6210 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5376 6211 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5377 6212 <label for="ays-chart-option-title-color">
5378 6213 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5379 - <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") ); ?>">
5380 6215 <i class="ays_fa ays_fa_info_circle"></i>
5381 6216 </a>
5382 6217 </label>
5383 6218 </div>
@@ -5388,9 +6223,9 @@
5388 6223 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5389 6224 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5390 6225 <label for="ays-chart-option-title-font-size" class="form-label">
5391 6226 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5392 - <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") ); ?>">
5393 6228 <i class="ays_fa ays_fa_info_circle"></i>
5394 6229 </a>
5395 6230 </label>
5396 6231 </div>
@@ -5402,9 +6237,9 @@
5402 6237 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5403 6238 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5404 6239 <label for="ays-chart-option-title-bold" class="form-label">
5405 6240 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5406 - <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") ); ?>">
5407 6242 <i class="ays_fa ays_fa_info_circle"></i>
5408 6243 </a>
5409 6244 </label>
5410 6245 </div>
@@ -5418,9 +6253,9 @@
5418 6253 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5419 6254 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5420 6255 <label for="ays-chart-option-title-italic" class="form-label">
5421 6256 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5422 - <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") ); ?>">
5423 6258 <i class="ays_fa ays_fa_info_circle"></i>
5424 6259 </a>
5425 6260 </label>
5426 6261 </div>
@@ -5434,9 +6269,9 @@
5434 6269 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5435 6270 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5436 6271 <label for="ays-chart-option-title-position">
5437 6272 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5438 - <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") ); ?>">
5439 6274 <i class="ays_fa ays_fa_info_circle"></i>
5440 6275 </a>
5441 6276 </label>
5442 6277 </div>
@@ -5456,9 +6291,9 @@
5456 6291 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5457 6292 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5458 6293 <label for="ays-chart-option-title-gap" class="form-label">
5459 6294 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5460 - <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") ); ?>">
5461 6296 <i class="ays_fa ays_fa_info_circle"></i>
5462 6297 </a>
5463 6298 </label>
5464 6299 </div>
@@ -5470,9 +6305,9 @@
5470 6305 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5471 6306 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5472 6307 <label for="ays-chart-option-title-gap-description" class="form-label">
5473 6308 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5474 - <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") ); ?>">
5475 6310 <i class="ays_fa ays_fa_info_circle"></i>
5476 6311 </a>
5477 6312 </label>
5478 6313 </div>
@@ -5484,9 +6319,9 @@
5484 6319 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5485 6320 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5486 6321 <label for="ays-chart-option-title-text-transform">
5487 6322 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5488 - <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") ); ?>">
5489 6324 <i class="ays_fa ays_fa_info_circle"></i>
5490 6325 </a>
5491 6326 </label>
5492 6327 </div>
@@ -5506,9 +6341,9 @@
5506 6341 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5507 6342 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5508 6343 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5509 6344 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5510 - <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") ); ?>">
5511 6346 <i class="ays_fa ays_fa_info_circle"></i>
5512 6347 </a>
5513 6348 </label>
5514 6349 </div>
@@ -5520,9 +6355,9 @@
5520 6355 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5521 6356 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5522 6357 <label for="ays-chart-option-title-text-decoration">
5523 6358 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5524 - <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") ); ?>">
5525 6360 <i class="ays_fa ays_fa_info_circle"></i>
5526 6361 </a>
5527 6362 </label>
5528 6363 </div>
@@ -5542,9 +6377,9 @@
5542 6377 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5543 6378 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5544 6379 <label for="ays-chart-option-title-text-shadow" class="form-label">
5545 6380 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5546 - <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") ); ?>">
5547 6382 <i class="ays_fa ays_fa_info_circle"></i>
5548 6383 </a>
5549 6384 </label>
5550 6385 </div>
@@ -5558,9 +6393,9 @@
5558 6393 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5559 6394 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5560 6395 <label for="ays-chart-option-title-shadow-color">
5561 6396 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5562 - <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") ); ?>">
5563 6398 <i class="ays_fa ays_fa_info_circle"></i>
5564 6399 </a>
5565 6400 </label>
5566 6401 </div>
@@ -5609,9 +6444,9 @@
5609 6444 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5610 6445 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5611 6446 <label for="ays-chart-option-description-color">
5612 6447 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5613 - <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") ); ?>">
5614 6449 <i class="ays_fa ays_fa_info_circle"></i>
5615 6450 </a>
5616 6451 </label>
5617 6452 </div>
@@ -5622,9 +6457,9 @@
5622 6457 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5623 6458 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5624 6459 <label for="ays-chart-option-description-font-size" class="form-label">
5625 6460 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5626 - <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") ); ?>">
5627 6462 <i class="ays_fa ays_fa_info_circle"></i>
5628 6463 </a>
5629 6464 </label>
5630 6465 </div>
@@ -5636,9 +6471,9 @@
5636 6471 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5637 6472 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5638 6473 <label for="ays-chart-option-description-bold" class="form-label">
5639 6474 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5640 - <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") ); ?>">
5641 6476 <i class="ays_fa ays_fa_info_circle"></i>
5642 6477 </a>
5643 6478 </label>
5644 6479 </div>
@@ -5652,9 +6487,9 @@
5652 6487 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5653 6488 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5654 6489 <label for="ays-chart-option-description-italic" class="form-label">
5655 6490 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5656 - <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") ); ?>">
5657 6492 <i class="ays_fa ays_fa_info_circle"></i>
5658 6493 </a>
5659 6494 </label>
5660 6495 </div>
@@ -5668,9 +6503,9 @@
5668 6503 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5669 6504 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5670 6505 <label for="ays-chart-option-description-position">
5671 6506 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5672 - <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") ); ?>">
5673 6508 <i class="ays_fa ays_fa_info_circle"></i>
5674 6509 </a>
5675 6510 </label>
5676 6511 </div>
@@ -5690,9 +6525,9 @@
5690 6525 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5691 6526 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5692 6527 <label for="ays-chart-option-description-text-transform">
5693 6528 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5694 - <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") ); ?>">
5695 6530 <i class="ays_fa ays_fa_info_circle"></i>
5696 6531 </a>
5697 6532 </label>
5698 6533 </div>
@@ -5712,9 +6547,9 @@
5712 6547 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5713 6548 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5714 6549 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5715 6550 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5716 - <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") ); ?>">
5717 6552 <i class="ays_fa ays_fa_info_circle"></i>
5718 6553 </a>
5719 6554 </label>
5720 6555 </div>
@@ -5726,9 +6561,9 @@
5726 6561 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5727 6562 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5728 6563 <label for="ays-chart-option-description-text-decoration">
5729 6564 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5730 - <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") ); ?>">
5731 6566 <i class="ays_fa ays_fa_info_circle"></i>
5732 6567 </a>
5733 6568 </label>
5734 6569 </div>
@@ -5748,9 +6583,9 @@
5748 6583 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5749 6584 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5750 6585 <label for="ays-chart-option-description-text-shadow" class="form-label">
5751 6586 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5752 - <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") ); ?>">
5753 6588 <i class="ays_fa ays_fa_info_circle"></i>
5754 6589 </a>
5755 6590 </label>
5756 6591 </div>
@@ -5764,9 +6599,9 @@
5764 6599 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5765 6600 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5766 6601 <label for="ays-chart-option-description-shadow-color">
5767 6602 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5768 - <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") ); ?>">
5769 6604 <i class="ays_fa ays_fa_info_circle"></i>
5770 6605 </a>
5771 6606 </label>
5772 6607 </div>
@@ -5815,9 +6650,9 @@
5815 6650 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5816 6651 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5817 6652 <label for="ays-chart-option-description-color">
5818 6653 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5819 - <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") ); ?>">
5820 6655 <i class="ays_fa ays_fa_info_circle"></i>
5821 6656 </a>
5822 6657 </label>
5823 6658 </div>
@@ -5828,9 +6663,9 @@
5828 6663 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5829 6664 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5830 6665 <label for="ays-chart-option-description-font-size" class="form-label">
5831 6666 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5832 - <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") ); ?>">
5833 6668 <i class="ays_fa ays_fa_info_circle"></i>
5834 6669 </a>
5835 6670 </label>
5836 6671 </div>
@@ -5842,9 +6677,9 @@
5842 6677 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5843 6678 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5844 6679 <label for="ays-chart-option-description-bold" class="form-label">
5845 6680 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5846 - <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") ); ?>">
5847 6682 <i class="ays_fa ays_fa_info_circle"></i>
5848 6683 </a>
5849 6684 </label>
5850 6685 </div>
@@ -5858,9 +6693,9 @@
5858 6693 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5859 6694 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5860 6695 <label for="ays-chart-option-description-italic" class="form-label">
5861 6696 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5862 - <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") ); ?>">
5863 6698 <i class="ays_fa ays_fa_info_circle"></i>
5864 6699 </a>
5865 6700 </label>
5866 6701 </div>
@@ -5874,9 +6709,9 @@
5874 6709 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5875 6710 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5876 6711 <label for="ays-chart-option-description-position">
5877 6712 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5878 - <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") ); ?>">
5879 6714 <i class="ays_fa ays_fa_info_circle"></i>
5880 6715 </a>
5881 6716 </label>
5882 6717 </div>
@@ -5896,9 +6731,9 @@
5896 6731 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5897 6732 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5898 6733 <label for="ays-chart-option-description-text-transform">
5899 6734 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5900 - <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") ); ?>">
5901 6736 <i class="ays_fa ays_fa_info_circle"></i>
5902 6737 </a>
5903 6738 </label>
5904 6739 </div>
@@ -5918,9 +6753,9 @@
5918 6753 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5919 6754 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5920 6755 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5921 6756 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5922 - <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") ); ?>">
5923 6758 <i class="ays_fa ays_fa_info_circle"></i>
5924 6759 </a>
5925 6760 </label>
5926 6761 </div>
@@ -5932,9 +6767,9 @@
5932 6767 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5933 6768 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5934 6769 <label for="ays-chart-option-description-text-decoration">
5935 6770 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5936 - <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") ); ?>">
5937 6772 <i class="ays_fa ays_fa_info_circle"></i>
5938 6773 </a>
5939 6774 </label>
5940 6775 </div>
@@ -5954,9 +6789,9 @@
5954 6789 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5955 6790 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5956 6791 <label for="ays-chart-option-description-text-shadow" class="form-label">
5957 6792 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5958 - <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") ); ?>">
5959 6794 <i class="ays_fa ays_fa_info_circle"></i>
5960 6795 </a>
5961 6796 </label>
5962 6797 </div>
@@ -5970,9 +6805,9 @@
5970 6805 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5971 6806 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5972 6807 <label for="ays-chart-option-description-shadow-color">
5973 6808 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5974 - <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") ); ?>">
5975 6810 <i class="ays_fa ays_fa_info_circle"></i>
5976 6811 </a>
5977 6812 </label>
5978 6813 </div>
@@ -6033,9 +6868,9 @@
6033 6868
6034 6869 $sources[] = $content;
6035 6870 }
6036 6871 $content_for_escape = implode('' , $sources );
6037 - echo html_entity_decode(esc_html( $content_for_escape ));
6872 + echo html_entity_decode( esc_html($content_for_escape) );
6038 6873 }
6039 6874
6040 6875 public function settings_contents_advanced_settings( $sources, $args ){
6041 6876 $html_class_prefix = $args['html_class_prefix'];
@@ -6140,9 +6975,9 @@
6140 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">
6141 6976 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6142 6977 <label for="ays-chart-option-slice-text">
6143 6978 <?php echo esc_html(__( "Slice text", "chart-builder" )); ?>
6144 - <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") ); ?>">
6145 6980 <i class="ays_fa ays_fa_info_circle"></i>
6146 6981 </a>
6147 6982 </label>
6148 6983 </div>
@@ -6162,9 +6997,9 @@
6162 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">
6163 6998 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6164 6999 <label for="ays-chart-option-tooltip-text">
6165 7000 <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?>
6166 - <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") ); ?>">
6167 7002 <i class="ays_fa ays_fa_info_circle"></i>
6168 7003 </a>
6169 7004 </label>
6170 7005 </div>
@@ -6197,9 +7032,9 @@
6197 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">
6198 7033 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6199 7034 <label for="ays-chart-option-data-grouping-label" class="form-label">
6200 7035 <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?>
6201 - <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") ); ?>">
6202 7037 <i class="ays_fa ays_fa_info_circle"></i>
6203 7038 </a>
6204 7039 </label>
6205 7040 </div>
@@ -6240,17 +7075,18 @@
6240 7075 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6241 7076 <label for="ays-chart-option-focus-target">
6242 7077 <?php echo esc_html(__( "Focus target", "chart-builder" )); ?>
6243 7078 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6244 - echo htmlspecialchars( sprintf(
7079 + echo esc_html( sprintf(
7080 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6245 7081 "<p>" . __('There are two ways to focus the data table elements.', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6246 - __('%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>" .
6247 - __('%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>",
6248 - '<em>',
6249 - '</em>',
6250 - '<em>',
6251 - '</em>'
6252 - ) );
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 + ));
6253 7089 ?>">
6254 7090 <i class="ays_fa ays_fa_info_circle"></i>
6255 7091 </a>
6256 7092 </label>
@@ -6285,17 +7121,18 @@
6285 7121 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6286 7122 <label for="ays-chart-option-group-width">
6287 7123 <?php echo esc_html(__( "Bar width", "chart-builder" )); ?>
6288 7124 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6289 - echo htmlspecialchars( sprintf(
7125 + echo esc_html( sprintf(
7126 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6290 7127 "<p>" . __('The width of the bars, specified in either of these formats:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6291 - __('%sPixels:%s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
6292 - __('%sPercentage:%s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
6293 - '<em>',
6294 - '</em>',
6295 - '<em>',
6296 - '</em>'
6297 - ) );
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 + ));
6298 7135 ?>">
6299 7136 <i class="ays_fa ays_fa_info_circle"></i>
6300 7137 </a>
6301 7138 </label>
@@ -6347,23 +7184,24 @@
6347 7184 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6348 7185 <label for="ays-chart-option-multiple-data-format">
6349 7186 <?php echo esc_html(__( "Multiple data format", "chart-builder" )); ?>
6350 7187 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6351 - echo htmlspecialchars( sprintf(
7188 + echo esc_html( sprintf(
7189 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6352 7190 "<p>" . __('How multiple data selections are rolled up into tooltips:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6353 - __('%sCategory:%s Group selected data by row titles.', "chart-builder") . "</li><li>" .
6354 - __('%sSeries:%s Group selected data by column titles.', "chart-builder") . "</li><li>" .
6355 - __('%sAuto:%s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
6356 - __('%sNone:%s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
6357 - '<em>',
6358 - '</em>',
6359 - '<em>',
6360 - '</em>',
6361 - '<em>',
6362 - '</em>',
6363 - '<em>',
6364 - '</em>'
6365 - ) );
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 + ));
6366 7204 ?>">
6367 7205 <i class="ays_fa ays_fa_info_circle"></i>
6368 7206 </a>
6369 7207 </label>
@@ -6518,15 +7356,15 @@
6518 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) ?>">
6519 7357 </div>
6520 7358 </div> <!-- Line dash pattern -->
6521 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">
6522 - <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">
6523 7361 <label for="ays-chart-option-donut-hole-size">
6524 - <?php echo __( "Hole size", $this->plugin_name ); ?>
7362 + <?php echo esc_html(__( "Hole size", 'chart-builder' )); ?>
6525 7363 </label>
6526 7364 </div>
6527 - <div class="col-sm-7 <?= $html_class_prefix ?>input-align-right <?= $html_class_prefix ?>option-input">
6528 - <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) ?>">
6529 7367 </div>
6530 7368 </div> <!-- Donut hole size -->
6531 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">
6532 7370 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
@@ -6533,20 +7371,20 @@
6533 7371 <div class="ays-pro-features-v2-video-button"></div>
6534 7372 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
6535 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>
6536 7374 <div class="ays-pro-features-v2-upgrade-text">
6537 - <?php echo __("Upgrade" , "chart-builder"); ?>
7375 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
6538 7376 </div>
6539 7377 </a>
6540 7378 </div>
6541 - <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">
6542 7380 <label for="ays-chart-option-curve-type">
6543 - <?php echo __( "Line curve type", "chart-builder" ); ?>
7381 + <?php echo esc_html(__( "Line curve type", "chart-builder" )); ?>
6544 7382 </label>
6545 7383 </div>
6546 7384 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
6547 - <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]">
6548 - <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>
6549 7387 </select>
6550 7388 </div>
6551 7389 </div> <!-- Line curve type -->
6552 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">
@@ -6594,9 +7432,9 @@
6594 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">
6595 7433 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6596 7434 <label for="ays-chart-option-org-classname" class="form-label">
6597 7435 <?php echo esc_html(__( "Custom CSS class", "chart-builder" )); ?>
6598 - <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") ); ?>">
6599 7437 <i class="ays_fa ays_fa_info_circle"></i>
6600 7438 </a>
6601 7439 </label>
6602 7440 </div>
@@ -6607,9 +7445,11 @@
6607 7445 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6608 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">
6609 7447 <br>
6610 7448 <blockquote>
6611 - <?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>'); ?>
6612 7452 </blockquote>
6613 7453 <br>
6614 7454 </div>
6615 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">
@@ -6707,9 +7547,9 @@
6707 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">
6708 7548 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6709 7549 <label for="ays-chart-option-org-selected-classname" class="form-label">
6710 7550 <?php echo esc_html(__( "Selected node custom CSS class", "chart-builder" )); ?>
6711 - <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") ); ?>">
6712 7552 <i class="ays_fa ays_fa_info_circle"></i>
6713 7553 </a>
6714 7554 </label>
6715 7555 </div>
@@ -6720,9 +7560,14 @@
6720 7560 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6721 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">
6722 7562 <br>
6723 7563 <blockquote>
6724 - <?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 + ); ?>
6725 7570 </blockquote>
6726 7571 <br>
6727 7572 </div>
6728 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">
@@ -6774,8 +7619,10 @@
6774 7619 $outer_radius = $settings['outer_radius'];
6775 7620 $slice_spacing = $settings['slice_spacing'];
6776 7621 $circumference = $settings['circumference'];
6777 7622 $start_angle = $settings['start_angle'];
7623 + $slice_border_color = $settings['slice_border_color'];
7624 + $slice_border_width = $settings['slice_border_width'];
6778 7625 // $index_axis = $settings['index_axis'];
6779 7626
6780 7627 ob_start();
6781 7628 ?>
@@ -6836,8 +7683,34 @@
6836 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) ?>">
6837 7684 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">°</div>
6838 7685 </div>
6839 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 -->
6840 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">
6841 7714 <div class="col-sm-5 d-flex align-items-center <?php // echo esc_attr($html_class_prefix) ?>option-title">
6842 7715 <label for="ays-chart-option-index-axis">
6843 7716 <?php // echo esc_html(__( "Horizontal ", "chart-builder" )); ?>
@@ -6880,15 +7753,15 @@
6880 7753 if ( !isset( $source[0] ) ) {
6881 7754 if (count($source[1]) > 2) {
6882 7755 $titles = array();
6883 7756 for ($i = 0; $i < count($source[1]); $i++) {
6884 - array_push($titles, __("Title", $this->plugin_name).$i);
7757 + array_push($titles, __("Title", 'chart-builder').$i);
6885 7758 }
6886 7759 $source[0] = $titles;
6887 7760 } else {
6888 7761 $source[0] = array(
6889 - __("Country", $this->plugin_name),
6890 - __("Population", $this->plugin_name),
7762 + __("Country", 'chart-builder'),
7763 + __("Population", 'chart-builder'),
6891 7764 );
6892 7765 }
6893 7766
6894 7767 ksort($source);
@@ -6921,9 +7794,9 @@
6921 7794 <g>
6922 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" />
6923 7796 </g>
6924 7797 </svg>
6925 - <span><?php echo $val[0]; ?></span>
7798 + <span><?php echo esc_html($val[0]); ?></span>
6926 7799 </legend>
6927 7800 <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
6928 7801 <div class="ays-slices-accordion-data-main-wrap">
6929 7802 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6930,9 +7803,9 @@
6930 7803 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6931 7804 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6932 7805 <label for="ays-chart-option-slice-color">
6933 7806 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
6934 - <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") ); ?>">
6935 7808 <i class="ays_fa ays_fa_info_circle"></i>
6936 7809 </a>
6937 7810 </label>
6938 7811 </div>
@@ -6937,13 +7810,13 @@
6937 7810 </label>
6938 7811 </div>
6939 7812 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6940 7813 <input type="color"
6941 - id="ays-chart-option-slice-color-<?php echo $key; ?>"
7814 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
6942 7815 class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6943 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo $key; ?>]"
6944 - value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : $slice_colors_default[$key]; ?>"
6945 - 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); ?>">
6946 7819 </div>
6947 7820 </div> <!-- Slice color -->
6948 7821 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6949 7822 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6955,13 +7828,13 @@
6955 7828 </label>
6956 7829 </div>
6957 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">
6958 7831 <input type="number"
6959 - id="ays-chart-option-slice-offset-<?php echo $key; ?>"
7832 + id="ays-chart-option-slice-offset-<?php echo esc_attr($key); ?>"
6960 7833 class="ays-chart-option-slice-offset ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
6961 - 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); ?>]"
6962 7835 value="<?php echo isset($slice_offset[$key]) ? esc_attr($slice_offset[$key]) : 0 ; ?>"
6963 - data-slice-id="<?php echo $key; ?>"
7836 + data-slice-id="<?php echo esc_attr($key); ?>"
6964 7837 step=".01" min="0.0" max="1.0">
6965 7838 </div>
6966 7839 </div> <!-- Slice offset -->
6967 7840 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
@@ -6967,9 +7840,9 @@
6967 7840 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6968 7841 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6969 7842 <label for="ays-chart-option-slice-text-color">
6970 7843 <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
6971 - <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") ); ?>">
6972 7845 <i class="ays_fa ays_fa_info_circle"></i>
6973 7846 </a>
6974 7847 </label>
6975 7848 </div>
@@ -6974,13 +7847,13 @@
6974 7847 </label>
6975 7848 </div>
6976 7849 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6977 7850 <input type="color"
6978 - id="ays-chart-option-slice-text-color-<?php echo $key; ?>"
7851 + id="ays-chart-option-slice-text-color-<?php echo esc_attr($key); ?>"
6979 7852 class="ays-chart-option-slice-text-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6980 - 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); ?>]"
6981 7854 value="<?php echo isset($slice_text_color[$key]) ? esc_attr($slice_text_color[$key]) : '#ffffff'; ?>"
6982 - data-slice-id="<?php echo $key; ?>">
7855 + data-slice-id="<?php echo esc_attr($key); ?>">
6983 7856 </div>
6984 7857 </div> <!-- Slice color -->
6985 7858 </div>
6986 7859 </div>
@@ -6992,9 +7865,9 @@
6992 7865 </div>
6993 7866 </div>
6994 7867 <br>
6995 7868 <blockquote>
6996 - <?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" )); ?>
6997 7870 </blockquote>
6998 7871 </div>
6999 7872 <?php
7000 7873
@@ -7005,9 +7878,9 @@
7005 7878 }
7006 7879
7007 7880 $content = ob_get_clean();
7008 7881
7009 - $title = __( 'Slices settings', "chart-builder" );
7882 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
7010 7883
7011 7884 $sources['slices_settings'] = array(
7012 7885 'content' => $content,
7013 7886 'title' => $title
@@ -7014,9 +7887,120 @@
7014 7887 );
7015 7888
7016 7889 return $sources;
7017 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);
7018 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 +
7019 8003 public function settings_contents_series_settings( $sources, $args ){
7020 8004 $html_class_prefix = $args['html_class_prefix'];
7021 8005 $html_name_prefix = $args['html_name_prefix'];
7022 8006 $settings = $args['settings'];
@@ -7033,15 +8017,15 @@
7033 8017 if ( !isset( $source[0] ) ) {
7034 8018 if (count($source[1]) > 2) {
7035 8019 $titles = array();
7036 8020 for ($i = 0; $i < count($source[1]); $i++) {
7037 - array_push($titles, __("Title", $this->plugin_name).$i);
8021 + array_push($titles, __("Title", "chart-builder").$i);
7038 8022 }
7039 8023 $source[0] = $titles;
7040 8024 } else {
7041 8025 $source[0] = array(
7042 - __("Country", $this->plugin_name),
7043 - __("Population", $this->plugin_name),
8026 + __("Country", "chart-builder"),
8027 + __("Population", "chart-builder"),
7044 8028 );
7045 8029 }
7046 8030
7047 8031 ksort($source);
@@ -7059,8 +8043,9 @@
7059 8043 $series_row = array_shift($source);
7060 8044 $title = array_shift($series_row);
7061 8045 $series_color = $settings['series_color'];
7062 8046 $series_colors_default = $settings['series_colors_default'];
8047 + $series_format = $settings['series_format'];
7063 8048 $series_visible_in_legend = $settings['series_visible_in_legend'];
7064 8049 $series_line_width = $settings['series_line_width'];
7065 8050 $series_point_size = $settings['series_point_size'];
7066 8051 $series_point_shape = $settings['series_point_shape'];
@@ -7078,9 +8063,9 @@
7078 8063 <g>
7079 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" />
7080 8065 </g>
7081 8066 </svg>
7082 - <span><?php echo $val; ?></span>
8067 + <span><?php echo esc_attr($val); ?></span>
7083 8068 </legend>
7084 8069 <div class="ays-series-accordion-options-content ays-series-accordion-options-content">
7085 8070 <div class="ays-series-accordion-data-main-wrap">
7086 8071 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7091,13 +8076,13 @@
7091 8076 </label>
7092 8077 </div>
7093 8078 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7094 8079 <input type="color"
7095 - id="ays-chart-option-series-color-<?php echo $key; ?>"
8080 + id="ays-chart-option-series-color-<?php echo esc_attr($key); ?>"
7096 8081 class="ays-chart-option-series-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7097 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo $key; ?>]"
7098 - value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : $series_colors_default[$key]; ?>"
7099 - 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); ?>">
7100 8085 </div>
7101 8086 </div> <!-- series color -->
7102 8087 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7103 8088 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7110,18 +8095,36 @@
7110 8095 </div>
7111 8096 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7112 8097 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
7113 8098 <input type="checkbox"
7114 - 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); ?>"
7115 8100 class="ays-chart-option-series-visible-in-legend <?php echo esc_attr($html_class_prefix) ?>toggle-switch"
7116 - 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); ?>]"
7117 8102 value="on"
7118 - data-series-id="<?php echo $key; ?>"
8103 + data-series-id="<?php echo esc_attr($key); ?>"
7119 8104 <?php echo isset($series_visible_in_legend[$key]) && $series_visible_in_legend[$key] == 'on' ? 'checked' : (!isset($series_color[$key]) ? 'checked' : ''); ?> >
7120 8105 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
7121 8106 </label>
7122 8107 </div>
7123 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 -->
7124 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">
7125 8128 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7126 8129 <label for="ays-chart-option-series-line-width">
7127 8130 <?php echo esc_html(__( "Line width", "chart-builder" )); ?>
@@ -7131,13 +8134,13 @@
7131 8134 </label>
7132 8135 </div>
7133 8136 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7134 8137 <input type="number"
7135 - id="ays-chart-option-series-line-width-<?php echo $key; ?>"
8138 + id="ays-chart-option-series-line-width-<?php echo esc_attr($key); ?>"
7136 8139 class="ays-chart-option-series-line-width ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7137 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo $key; ?>]"
7138 - value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : $line_width; ?>"
7139 - 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); ?>">
7140 8143 </div>
7141 8144 </div> <!-- Line width -->
7142 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">
7143 8146 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7149,13 +8152,13 @@
7149 8152 </label>
7150 8153 </div>
7151 8154 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7152 8155 <input type="number"
7153 - id="ays-chart-option-series-point-size-<?php echo $key; ?>"
8156 + id="ays-chart-option-series-point-size-<?php echo esc_attr($key); ?>"
7154 8157 class="ays-chart-option-series-point-size ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7155 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo $key; ?>]"
7156 - value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : $point_size; ?>"
7157 - 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); ?>">
7158 8161 </div>
7159 8162 </div> <!-- Point size -->
7160 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">
7161 8164 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7167,12 +8170,12 @@
7167 8170 </label>
7168 8171 </div>
7169 8172 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7170 8173 <select
7171 - id="ays-chart-option-series-point-shape-<?php echo $key; ?>"
8174 + id="ays-chart-option-series-point-shape-<?php echo esc_attr($key); ?>"
7172 8175 class="ays-chart-option-series-point-shape <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select"
7173 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo $key; ?>]"
7174 - 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); ?>">
7175 8178 >
7176 8179 <?php
7177 8180 $value = isset($series_point_shape[$key]) ? esc_attr($series_point_shape[$key]) : $point_shape;
7178 8181 foreach ( $point_shape_options as $option_slug => $option ):
@@ -7195,11 +8198,16 @@
7195 8198 </div>
7196 8199 </div>
7197 8200 <br>
7198 8201 <blockquote>
7199 - <?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' )); ?>
7200 8203 <br>
7201 - <?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 + ); ?>
7202 8210 </blockquote>
7203 8211 </div>
7204 8212 <?php
7205 8213
@@ -7233,15 +8241,15 @@
7233 8241 if ( !isset( $source[0] ) ) {
7234 8242 if (count($source[1]) > 2) {
7235 8243 $titles = array();
7236 8244 for ($i = 0; $i < count($source[1]); $i++) {
7237 - array_push($titles, __("Title", $this->plugin_name).$i);
8245 + array_push($titles, __("Title", 'chart-builder').$i);
7238 8246 }
7239 8247 $source[0] = $titles;
7240 8248 } else {
7241 8249 $source[0] = array(
7242 - __("Country", $this->plugin_name),
7243 - __("Population", $this->plugin_name),
8250 + __("Country", 'chart-builder'),
8251 + __("Population", 'chart-builder'),
7244 8252 );
7245 8253 }
7246 8254
7247 8255 ksort($source);
@@ -7287,9 +8295,9 @@
7287 8295 <g>
7288 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" />
7289 8297 </g>
7290 8298 </svg>
7291 - <span><?php echo $val; ?></span>
8299 + <span><?php echo esc_html($val); ?></span>
7292 8300 </legend>
7293 8301 <div class="ays-rows-accordion-options-content ays-rows-accordion-options-content">
7294 8302 <div class="ays-rows-accordion-data-main-wrap">
7295 8303 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7300,13 +8308,13 @@
7300 8308 </label>
7301 8309 </div>
7302 8310 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7303 8311 <input type="color"
7304 - id="ays-chart-option-rows-color-<?php echo $key; ?>"
8312 + id="ays-chart-option-rows-color-<?php echo esc_attr($key); ?>"
7305 8313 class="ays-chart-option-rows-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7306 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo $key; ?>]"
7307 - value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : $series_color; ?>"
7308 - 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); ?>">
7309 8317 </div>
7310 8318 </div> <!-- color -->
7311 8319 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7312 8320 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7315,13 +8323,13 @@
7315 8323 </label>
7316 8324 </div>
7317 8325 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7318 8326 <input type="number"
7319 - id="ays-chart-option-rows-opacity-<?php echo $key; ?>"
8327 + id="ays-chart-option-rows-opacity-<?php echo esc_attr($key); ?>"
7320 8328 class="ays-chart-option-rows-opacity ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7321 - 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); ?>]"
7322 8330 value="<?php echo isset($rows_opacity[$key]) && '' !== $rows_opacity[$key] ? esc_attr($rows_opacity[$key]) : 1.0; ?>"
7323 - data-rows-id="<?php echo $key; ?>"
8331 + data-rows-id="<?php echo esc_attr($key); ?>"
7324 8332 step=".1" min="0" max="1">
7325 8333 </div>
7326 8334 </div> <!-- opacity -->
7327 8335 </div>
@@ -7332,17 +8340,27 @@
7332 8340 endforeach;
7333 8341 ?>
7334 8342 <br>
7335 8343 <blockquote>
7336 - <?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' )); ?>
7337 8345 <br>
7338 - <?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 + ); ?>
7339 8352 </blockquote>
7340 8353 </div>
7341 8354 <div class="<?php echo esc_attr($html_class_prefix) ?>not-hidden-options-section <?php echo $enable_row_settings === 'checked' ? 'display_none' : ''; ?>">
7342 8355 <br>
7343 8356 <blockquote>
7344 - <?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 + ); ?>
7345 8363 </blockquote>
7346 8364 </div>
7347 8365 </div>
7348 8366 </div>