PluginProbe
Chartify – WordPress Chart Plugin / 3.7.1
Chartify – WordPress Chart Plugin v3.7.1
3.8.1 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 All 84 releases
← All changes | admin/class-chart-builder-admin.php +3098 -603 3.1.6 → 3.7.1 View file →
@@ -88,9 +88,9 @@
88 88 //
89 89 wp_enqueue_style( $this->plugin_name . '-normalize', plugin_dir_url( __FILE__ ) . 'css/normalize.css', array(), $this->version . time(), 'all' );
90 90 wp_enqueue_style( $this->plugin_name . '-admin-general', plugin_dir_url( __FILE__ ) . 'css/admin-general.css', array(), $this->version, 'all' );
91 91 wp_enqueue_style( $this->plugin_name . '-banner', plugin_dir_url( __FILE__ ) . 'css/banner.css', array(), $this->version, 'all' );
92 - wp_enqueue_style( $this->plugin_name . '-chart-builder-banner.css', plugin_dir_url(__FILE__) . 'css/chart-builder-banner.css', array(), $this->version, 'all');
92 + // wp_enqueue_style( $this->plugin_name . '-chart-builder-banner.css', plugin_dir_url(__FILE__) . 'css/chart-builder-banner.css', array(), $this->version, 'all');
93 93 wp_enqueue_style( $this->plugin_name . '-animate', plugin_dir_url(__FILE__) . 'css/animate.css', array(), $this->version, 'all');
94 94 wp_enqueue_style( $this->plugin_name . '-font-awesome', plugin_dir_url(__FILE__) . 'css/ays-font-awesome.min.css', array(), $this->version, 'all');
95 95 wp_enqueue_style( $this->plugin_name . '-font-awesome-icons', plugin_dir_url(__FILE__) . 'css/ays-font-awesome-icons.css', array(), $this->version, 'all');
96 96 wp_enqueue_style( $this->plugin_name . '-select2', plugin_dir_url(__FILE__) . 'css/ays-select2.min.css', array(), $this->version, 'all');
@@ -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" ),
@@ -203,10 +203,13 @@
203 203 'minColNotice' => __( 'Sorry, minimum count of columns should be 1', "chart-builder"),
204 204 'activated' => __( "Activated", "chart-builder" ),
205 205 'errorMsg' => __( "Error", "chart-builder" ),
206 206 'loadResource' => __( "Can't load resource.", "chart-builder" ),
207 - 'somethingWentWrong' => __( "Maybe something went wrong.", "chart-builder" ),
208 - ) );
207 + 'somethingWentWrong' => __( "Maybe something went wrong.", "chart-builder" ),
208 + 'successCopyCoupon' => esc_html__( "Coupon code copied!", 'chart-builder' ),
209 + 'failedCopyCoupon' => esc_html__( "Failed to copy coupon code", 'chart-builder' ),
210 +
211 + ) );
209 212
210 213 wp_localize_script( $this->plugin_name . '-localized', 'aysChartBuilderChartSettings', array(
211 214 'types' => CBFunctions()->getAllowedTypes(),
212 215 'max_selected_options' => 2,
@@ -224,8 +227,9 @@
224 227 'filter_get_data' => wp_create_nonce( 'cbuilder-fetch-post-type-data' ),
225 228 'quiz_maker_get_data' => wp_create_nonce( 'cbuilder-fetch-quiz-maker-data' ),
226 229 'quiz_maker_save_data' => wp_create_nonce( 'cbuilder-save-quiz-maker-data' ),
227 230 'author_user_search' => wp_create_nonce( 'cbuilder-author-user-search' ),
231 +
228 232 ),
229 233 'actions' => array(
230 234 'filter_get_props' => 'fetch_post_type_props',
231 235 'filter_get_data' => 'fetch_post_type_data',
@@ -241,9 +245,9 @@
241 245
242 246 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 247 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 248 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 );
249 + 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 250
247 251 if ( false !== strpos( $hook_suffix, 'settings' ) ) {
248 252 wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true );
249 253
@@ -248,20 +252,20 @@
248 252 wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true );
249 253
250 254 wp_localize_script( $this->plugin_name . '-settings', 'aysChartBuilderAdminSettings', array(
251 255 '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),
256 + 'selectUserRoles' => __( 'Select user roles', 'chart-builder' ),
257 + 'delete' => __( 'Delete', 'chart-builder' ),
258 + 'selectQuestionDefaultType' => __( 'Select question default type', 'chart-builder' ),
259 + 'yes' => __( 'Yes', 'chart-builder' ),
260 + 'cancel' => __( 'Cancel', 'chart-builder' ),
261 + 'somethingWentWrong' => __( "Maybe something went wrong.", 'chart-builder' ),
262 + 'failed' => __( 'Failed', 'chart-builder' ),
263 + 'selectPage' => __( 'Select page', 'chart-builder' ),
264 + 'selectPostType' => __( 'Select post type', 'chart-builder' ),
265 + 'copied' => __( 'Copied!', 'chart-builder'),
266 + 'clickForCopy' => __( 'Click to copy', 'chart-builder'),
267 + 'selectForm' => __( 'Select form', 'chart-builder'),
264 268 ) );
265 269 }
266 270 }
267 271
@@ -277,8 +281,38 @@
277 281 wp_deregister_script('mwai-vendor');
278 282 wp_dequeue_script('mwai');
279 283 wp_dequeue_script('mwai-vendor');
280 284 }
285 +
286 + if (is_plugin_active('html5-video-player/html5-video-player.php')) {
287 + wp_dequeue_style('h5vp-admin');
288 + wp_dequeue_style('fs_common');
289 + }
290 +
291 + if (is_plugin_active('panorama/panorama.php')) {
292 + wp_dequeue_style('bppiv_admin_custom_css');
293 + wp_dequeue_style('bppiv-custom-style');
294 + }
295 +
296 + if (is_plugin_active('wp-social/wp-social.php')) {
297 + wp_dequeue_style('wp_social_select2_css');
298 + wp_deregister_script('wp_social_select2_js');
299 + wp_dequeue_script('wp_social_select2_js');
300 + }
301 +
302 + if (is_plugin_active('real-media-library-lite/index.php')) {
303 + wp_dequeue_style('real-media-library-lite-rml');
304 + }
305 +
306 + // Theme | Phlox 2.17.6
307 + wp_dequeue_style('auxin-admin-style');
308 +
309 + // Theme | Pixel Ebook Store
310 + wp_dequeue_style('pixel-ebook-store-free-demo-content-style');
311 +
312 + // Theme | Interactive Education
313 + wp_dequeue_style('interactive-education-free-demo-content-style');
314 +
281 315 }
282 316 }
283 317
284 318 /**
@@ -314,10 +348,10 @@
314 348
315 349 public function add_plugin_charts_submenu(){
316 350 $hook_page_view = add_submenu_page(
317 351 $this->plugin_name,
318 - __('All Charts', $this->plugin_name),
319 - __('All Charts', $this->plugin_name),
352 + __('All Charts', 'chart-builder'),
353 + __('All Charts', 'chart-builder'),
320 354 'manage_options',
321 355 $this->plugin_name,
322 356 array($this, 'display_plugin_charts_page')
323 357 );
@@ -327,10 +361,10 @@
327 361
328 362 public function add_plugin_add_new_submenu(){
329 363 $hook_charts = add_submenu_page(
330 364 $this->plugin_name,
331 - __('Add New', $this->plugin_name),
332 - __('Add New', $this->plugin_name),
365 + __('Add New', 'chart-builder'),
366 + __('Add New', 'chart-builder'),
333 367 'manage_options',
334 368 $this->plugin_name."&action=add",
335 369 array($this, 'display_plugin_addnew_page')
336 370 );
@@ -339,10 +373,10 @@
339 373
340 374 public function add_plugin_dashboard_submenu(){
341 375 $hook_charts = add_submenu_page(
342 376 $this->plugin_name,
343 - __('How to use', $this->plugin_name),
344 - __('How to use', $this->plugin_name),
377 + __('How to use', 'chart-builder'),
378 + __('How to use', 'chart-builder'),
345 379 'manage_options',
346 380 $this->plugin_name . '-dashboard',
347 381 array($this, 'display_plugin_setup_page')
348 382 );
@@ -350,10 +384,10 @@
350 384 }
351 385
352 386 public function add_plugin_general_settings_submenu(){
353 387 $hook_settings = add_submenu_page( $this->plugin_name,
354 - __('General Settings', $this->plugin_name),
355 - __('General Settings', $this->plugin_name),
388 + __('General Settings', 'chart-builder'),
389 + __('General Settings', 'chart-builder'),
356 390 'manage_options',
357 391 $this->plugin_name . '-settings',
358 392 array($this, 'display_plugin_settings_page')
359 393 );
@@ -361,10 +395,10 @@
361 395 }
362 396
363 397 public function add_plugin_featured_plugins_submenu(){
364 398 $hook_our_products = add_submenu_page( $this->plugin_name,
365 - __('Our products', $this->plugin_name),
366 - __('Our products', $this->plugin_name),
399 + __('Our products', 'chart-builder'),
400 + __('Our products', 'chart-builder'),
367 401 'manage_options',
368 402 $this->plugin_name . '-featured-plugins',
369 403 array($this, 'display_plugin_featured_plugins_page')
370 404 );
@@ -374,10 +408,10 @@
374 408
375 409 public function add_plugin_chart_features_submenu(){
376 410 $hook_pro_features = add_submenu_page(
377 411 $this->plugin_name,
378 - __('PRO Features', $this->plugin_name),
379 - __('PRO Features', $this->plugin_name),
412 + __('PRO Features', 'chart-builder'),
413 + __('PRO Features', 'chart-builder'),
380 414 'manage_options',
381 415 $this->plugin_name . '-chart-features',
382 416 array($this, 'display_plugin_chart_features_page')
383 417 );
@@ -392,8 +426,9 @@
392 426 'default' => 5,
393 427 'option' => 'cb_charts_per_page'
394 428 );
395 429
430 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
396 431 if( ! ( isset( $_GET['action'] ) && ( $_GET['action'] == 'add' || $_GET['action'] == 'edit' ) ) ){
397 432 add_screen_option( $option, $args );
398 433 }
399 434
@@ -411,17 +446,29 @@
411 446 return;
412 447 }
413 448 }
414 449
450 + private function check_permissions_and_nonce($nonce_action) {
451 + if (!is_user_logged_in() || !current_user_can('manage_options')) {
452 + wp_die(__('Access denied.', 'chart-builder'));
453 + }
454 +
455 + if (!isset($_REQUEST['_wpnonce']) || !wp_verify_nonce($_REQUEST['_wpnonce'], $this->plugin_name . '-' . $nonce_action)) {
456 + wp_die(__('Security check failed. Invalid or missing nonce.', 'chart-builder'));
457 + }
458 + }
415 459 public function display_plugin_charts_page(){
416 460 global $ays_chart_db_actions;
417 461
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'])) {
462 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
463 + $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : '';
464 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
465 + $id = (isset($_GET['id'])) ? absint( wp_unslash( $_GET['id'] ) ) : 0;
466 + if (isset($_POST['bulk_delete_confirm'])) {
467 + $this->check_permissions_and_nonce('bulk-delete');
422 468 if (isset($_POST['bulk-delete']) && !empty($_POST['bulk-delete'])) {
423 - $ids = $_POST['bulk-delete'];
469 + $ids = wp_unslash( $_POST['bulk-delete'] );
470 + $ids = array_map( 'absint', (array) $ids );
424 471 foreach ($ids as $id) {
425 472 if ($id > 0) {
426 473 $this->db_obj->delete_item( $id );
427 474 }
@@ -436,9 +483,10 @@
436 483 }
437 484
438 485 switch ($action) {
439 486 case 'trash':
440 - if( $id > 0 ){
487 + $this->check_permissions_and_nonce('trash-item');
488 + if ($id > 0){
441 489 $this->db_obj->trash_item( $id );
442 490 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
443 491 $url = esc_url_raw( add_query_arg( array(
444 492 "status" => 'trashed'
@@ -447,9 +495,10 @@
447 495 exit;
448 496 }
449 497 break;
450 498 case 'restore':
451 - if( $id > 0 ){
499 + $this->check_permissions_and_nonce('delete-item');
500 + if ($id > 0 ) {
452 501 $this->db_obj->restore_item( $id );
453 502 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
454 503 $url = esc_url_raw( add_query_arg( array(
455 504 "status" => 'restored'
@@ -458,9 +507,10 @@
458 507 exit;
459 508 }
460 509 break;
461 510 case 'delete':
462 - if( $id > 0 ){
511 + $this->check_permissions_and_nonce('delete-item');
512 + if ($id > 0) {
463 513 $this->db_obj->delete_item( $id );
464 514 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
465 515 $url = esc_url_raw( add_query_arg( array(
466 516 "status" => 'deleted'
@@ -469,9 +519,10 @@
469 519 exit;
470 520 }
471 521 break;
472 522 case 'publish':
473 - if( $id > 0 ){
523 + $this->check_permissions_and_nonce('publish-item');
524 + if ($id > 0) {
474 525 $this->db_obj->publish_item( $id );
475 526 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
476 527 $url = esc_url_raw( add_query_arg( array(
477 528 "status" => 'published'
@@ -480,9 +531,10 @@
480 531 exit;
481 532 }
482 533 break;
483 534 case 'unpublish':
484 - if( $id > 0 ){
535 + $this->check_permissions_and_nonce('unpublish-item');
536 + if ($id > 0) {
485 537 $this->db_obj->restore_item( $id );
486 538 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
487 539 $url = esc_url_raw( add_query_arg( array(
488 540 "status" => 'unpublished'
@@ -491,9 +543,10 @@
491 543 exit;
492 544 }
493 545 break;
494 546 case 'duplicate':
495 - if( $id > 0 ){
547 + $this->check_permissions_and_nonce('duplicate-item');
548 + if ($id > 0) {
496 549 $this->db_obj->duplicate_item( $id );
497 550 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
498 551 $url = esc_url_raw( add_query_arg( array(
499 552 "status" => 'duplicated'
@@ -511,9 +564,66 @@
511 564 default:
512 565 include_once('partials/charts/chart-builder-charts-display.php');
513 566 }
514 567 }
568 + public static function chart_builder_svg_sanitize_allowed_properties(){
515 569
570 + $allowed_properties = array(
571 + 'div' => array(
572 + 'id' => true,
573 + 'class' => true,
574 + 'style' => true,
575 + ),
576 + 'svg' => array(
577 + 'class' => true,
578 + 'version' => true,
579 + 'overflow' => true,
580 + 'preserveAspectRatio' => true,
581 + 'preserveaspectratio' => true,
582 + 'fill' => true,
583 + 'viewBox' => true,
584 + 'viewbox' => true,
585 + 'height' => true,
586 + 'width' => true,
587 + 'xmlns' => true,
588 + 'xmlns:xlink' => true,
589 + 'id' => true,
590 + 'title' => true,
591 + ),
592 + 'g' => array(
593 + 'id' => true,
594 + 'class' => true,
595 + 'stroke-width' => true,
596 + 'stroke-linecap' => true,
597 + 'stroke-linejoin' => true,
598 + ),
599 + 'path' => array(
600 + 'id' => true,
601 + 'class' => true,
602 + 'd' => true,
603 + 'fill' => true,
604 + 'vector-effect' => true,
605 + 'xmlns:default' => true,
606 + ),
607 + 'span' => array(
608 + 'class' => true,
609 + ),
610 + 'img' => array(
611 + 'src' => true,
612 + 'alt' => true,
613 + ),
614 + );
615 +
616 + return $allowed_properties;
617 + }
618 +
619 + public static function get_allowed_tags_for_loader() {
620 + return array(
621 + 'span' => array('class' => array()),
622 + 'img' => array('src' => array(), 'alt' => array()),
623 + );
624 + }
625 +
516 626 public function display_plugin_setup_page(){
517 627 include_once('partials/chart-builder-admin-display.php');
518 628 }
519 629
@@ -571,15 +681,28 @@
571 681
572 682 $response = array(
573 683 "status" => false
574 684 );
685 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
686 + $function = isset( $_REQUEST['function'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['function'] ) ) : null;
575 687
576 - $function = isset($_REQUEST['function']) ? sanitize_text_field( $_REQUEST['function'] ) : null;
577 -
578 688 if($function !== null){
579 689 $response = array();
580 690 if( is_callable( array( $this, $function ) ) ){
581 - $response = $this->$function();
691 + $allowed_functions = array(
692 + "deactivate_plugin_option",
693 + "ays_chart_dismiss_button",
694 + "author_user_search",
695 + "ays_chart_activate_plugin",
696 + "ays_chart_install_plugin",
697 + "fetch_quiz_maker_data",
698 + "save_quiz_maker_data",
699 + "fetch_post_type_props",
700 + "fetch_post_type_data",
701 + );
702 + if (in_array($function, $allowed_functions, true)) {
703 + $response = $this->$function();
704 + }
582 705
583 706 ob_end_clean();
584 707 $ob_get_clean = ob_get_clean();
585 708 echo json_encode( $response );
@@ -595,10 +718,14 @@
595 718 }
596 719
597 720 public function deactivate_plugin_option(){
598 721 // Run a security check.
599 - check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
600 -
722 + if ( isset( $_REQUEST['_ajax_nonce'] ) ) {
723 + check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
724 + } else {
725 + wp_die();
726 + }
727 +
601 728 // Check for permissions.
602 729 if ( ! current_user_can( 'manage_options' ) ) {
603 730 ob_end_clean();
604 731 $ob_get_clean = ob_get_clean();
@@ -608,9 +735,9 @@
608 735 wp_die();
609 736 }
610 737
611 738 if( is_user_logged_in() ) {
612 - $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( $_REQUEST['upgrade_plugin'] ) : '';
739 + $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['upgrade_plugin'] ) ) : '';
613 740 $upgrade_option = get_option( 'ays_chart_builder_upgrade_plugin', '' );
614 741
615 742 if ( $upgrade_option === '' ) {
616 743 add_option( 'ays_chart_builder_upgrade_plugin', $request_value );
@@ -633,17 +760,17 @@
633 760 }
634 761 }
635 762
636 763 public function chart_builder_admin_footer($a){
637 - if(isset($_REQUEST['page'])){
638 - if(false !== strpos( sanitize_text_field( $_REQUEST['page'] ), $this->plugin_name)){
764 + if(isset($_REQUEST['page'])){// phpcs:ignore WordPress.Security.NonceVerification.Recommended
765 + if(false !== strpos( sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ), $this->plugin_name)){// phpcs:ignore WordPress.Security.NonceVerification.Recommended
639 766 ?>
640 767 <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>
768 + <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 769 <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>
770 + <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 771 <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>
772 + <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 773 </div>
647 774 <p style="font-size:13px;text-align:center;font-style:italic;">
648 775 <span style="margin-left:0px;margin-right:10px;" class="ays_heart_beat"><i class="ays_fa ays_fa_heart_o animated"></i></span>
649 776 <span><?php echo esc_html(__( "If you love our plugin, please do big favor and rate us on", "chart-builder")); ?></span>
@@ -683,11 +810,12 @@
683 810 }
684 811 }
685 812
686 813 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'] ) );
814 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
815 + $nonce = isset( $_POST['nonce'] ) ? wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'cbuilder-fetch-post-type-props' ) : '';
816 + if ( $nonce ) {// phpcs:ignore WordPress.Security.NonceVerification.Recommended
817 + $results = isset($_POST['post_type']) ? CBFunctions()->get_post_type_properties( sanitize_text_field( wp_unslash($_POST['post_type']) ) ) : '';
690 818
691 819 return array(
692 820 'success' => true,
693 821 'fields' => $results,
@@ -753,17 +881,22 @@
753 881 }
754 882
755 883 $ays_chart_builder_flag = intval(get_option('ays_chart_sale_btn'));
756 884 if( $ays_chart_builder_flag == 0 ){
757 - if (isset($_GET['page']) && strpos($_GET['page'], CHART_BUILDER_NAME) !== false) {
758 - if( !(Chart_Builder_Admin::get_max_id('charts') <= 1) ){
759 - // $this->ays_chart_sale_message_30_emma($ays_chart_builder_flag);
760 - $this->ays_chart_sale_message20($ays_chart_builder_flag);
885 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
886 + if ( isset( $_GET['page'] ) && strpos( sanitize_text_field( wp_unslash( $_GET['page'] ) ), CHART_BUILDER_NAME ) !== false ) {
887 + if( !(Chart_Builder_Admin::get_max_id('charts') <= 2) ){
888 + // $this->ays_chart_sale_message20($ays_chart_builder_flag);
889 + // $this->ays_chart_discounted_licenses_banner_message();
890 + $this->ays_chart_new_silver_bundle_message_2025($ays_chart_builder_flag);
761 891 // $this->ays_chart_helloween_message($ays_chart_builder_flag);
762 892 // $this->ays_chart_christmas_message($ays_chart_builder_flag);
763 893 // $this->ays_chart_silver_bundle_message($ays_chart_builder_flag);
764 894 // $this->ays_chart_black_friday_message_2024($ays_chart_builder_flag);
765 895 // $this->ays_chart_christmas_message_2024($ays_chart_builder_flag);
896 + // $this->ays_chart_new_halloween_bundle_message_2025($ays_chart_builder_flag);
897 + // $this->ays_chart_black_friday_message($ays_chart_builder_flag);
898 + // $this->ays_chart_christmas_banner_message_2025($ays_chart_builder_flag);
766 899 }
767 900 }
768 901 }
769 902 }
@@ -774,9 +907,9 @@
774 907 'status' => false,
775 908 );
776 909
777 910 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' )){
911 + 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 912 update_option('ays_chart_sale_btn', 1);
780 913 update_option('ays_chart_sale_date', current_time( 'mysql' ));
781 914 $data['status'] = true;
782 915 }
@@ -788,8 +921,357 @@
788 921 wp_die();
789 922
790 923 }
791 924
925 + public function ays_chart_discounted_licenses_banner_message(){
926 +
927 + $content = array();
928 +
929 + $date = time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
930 + $now_date = date('M d, Y H:i:s', $date);
931 +
932 + $start_date = strtotime('2025-09-24');
933 + $end_date = strtotime('2025-10-25');
934 + $diff_end = $end_date - $date;
935 +
936 + $style_attr = '';
937 + if( $diff_end < 0 ){
938 + $style_attr = 'style="display:none;"';
939 + }
940 +
941 + $total_licenses = 50;
942 + $progression_pattern = array(3, 2, 1, 4, 2, 3, 1, 2, 4, 3, 2, 1, 3, 2, 4, 1, 3, 2, 2, 3, 1, 2);
943 + $days_passed = floor(($date - $start_date) / (24 * 60 * 60));
944 + $used_licenses = 0;
945 +
946 + for ($i = 0; $i < min($days_passed, count($progression_pattern)); $i++) {
947 + $used_licenses += $progression_pattern[$i];
948 + }
949 + $used_licenses = min($used_licenses, $total_licenses);
950 + $remaining_licenses = $total_licenses - $used_licenses;
951 + $progress_percentage = ($used_licenses / $total_licenses) * 100;
952 +
953 + $ays_chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=chart-maker-license-banner-' . CHART_BUILDER_VERSION);
954 +
955 + $content[] = '<div id="ays-chart-progress-banner-main" class="ays-chart-progress-banner-main ays-chart-admin-notice notice notice-success is-dismissible" ' . $style_attr . '>';
956 + $content[] = '<div class="ays-chart-progress-banner-content">';
957 + $content[] = '<div class="ays-chart-progress-banner-left">';
958 + $content[] = '<div class="ays-chart-progress-banner-icon">';
959 + $content[] = '<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
960 + <path d="M1.33325 22.6668L11.9999 13.3335L33.3333 14.6668L34.6666 36.0002L25.3333 46.6668C25.3333 46.6668 25.3346 38.6682 17.3333 30.6668C9.33192 22.6655 1.33325 22.6668 1.33325 22.6668Z" fill="#A0041E"/>
961 + <path d="M1.29739 46.6665C1.29739 46.6665 1.24939 36.0278 5.27739 31.9998C9.30539 27.9718 20.0001 28.2492 20.0001 28.2492C20.0001 28.2492 19.9987 38.6665 15.9987 42.6665C11.9987 46.6665 1.29739 46.6665 1.29739 46.6665Z" fill="#FFAC33"/>
962 + <path d="M11.9986 41.3332C14.9441 41.3332 17.3319 38.9454 17.3319 35.9998C17.3319 33.0543 14.9441 30.6665 11.9986 30.6665C9.0531 30.6665 6.66528 33.0543 6.66528 35.9998C6.66528 38.9454 9.0531 41.3332 11.9986 41.3332Z" fill="#FFCC4D"/>
963 + <path d="M47.9986 0C47.9986 0 34.6653 0 18.6653 13.3333C10.6653 20 10.6653 32 13.3319 34.6667C15.9986 37.3333 27.9986 37.3333 34.6653 29.3333C47.9986 13.3333 47.9986 0 47.9986 0Z" fill="#55ACEE"/>
964 + <path d="M35.9987 6.6665C33.8347 6.6665 31.9814 7.96117 31.144 9.81317C31.8134 9.5105 32.5507 9.33317 33.332 9.33317C36.2774 9.33317 38.6654 11.7212 38.6654 14.6665C38.6654 15.4478 38.488 16.1852 38.1867 16.8532C40.0387 16.0172 41.332 14.1638 41.332 11.9998C41.332 9.0545 38.944 6.6665 35.9987 6.6665Z" fill="black"/>
965 + <path d="M10.6667 37.3332C10.6667 37.3332 10.6667 31.9998 12.0001 30.6665C13.3334 29.3332 29.3347 16.0012 30.6667 17.3332C31.9987 18.6652 18.6654 34.6665 17.3321 35.9998C15.9987 37.3332 10.6667 37.3332 10.6667 37.3332Z" fill="#A0041E"/>
966 + </svg>';
967 + $content[] = '</div>';
968 + $content[] = '<div class="ays-chart-progress-banner-text">';
969 + $content[] = '<h2 class="ays-chart-progress-banner-title">' . sprintf( __('Get the Pro Version of %s Chart Builder%s – 20%% OFF', 'chart-builder'), '<a href="'. $ays_chart_cta_button_link .'" target="_blank">', '</a>' ) . '</h2>';
970 + $content[] = '<p class="ays-chart-progress-banner-subtitle">' . __('Unlock advanced features + 30 day Money Back Guarantee', 'chart-builder') . '</p>';
971 + $content[] = '</div>';
972 + $content[] = '</div>';
973 +
974 + $content[] = '<div class="ays-chart-progress-banner-center">';
975 + $content[] = '<div class="ays-chart-progress-banner-coupon">';
976 + $content[] = '<div class="ays-chart-progress-banner-coupon-box" onclick="chartCopyToClipboard(\'FREE2PRO20\')" title="' . __('Click to copy', 'chart-builder') . '">';
977 + $content[] = '<span class="ays-chart-progress-banner-coupon-text">FREE2PRO20</span>';
978 + $content[] = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="ays-chart-progress-banner-copy-icon">';
979 + $content[] = '<path d="M13.5 2.5H6.5C5.67 2.5 5 3.17 5 4V10C5 10.83 5.67 11.5 6.5 11.5H13.5C14.33 11.5 15 10.83 15 10V4C15 3.17 14.33 2.5 13.5 2.5ZM13.5 10H6.5V4H13.5V10ZM2.5 6.5V12.5C2.5 13.33 3.17 14 4 14H10V12.5H4V6.5H2.5Z" fill="white"/>';
980 + $content[] = '</svg>';
981 + $content[] = '</div>';
982 + $content[] = '</div>';
983 +
984 + $content[] = '<div class="ays-chart-progress-banner-progress">';
985 + $content[] = '<p class="ays-chart-progress-banner-progress-text">' . __('Only', 'chart-builder') . ' <span id="remaining-licenses">' . $remaining_licenses . '</span> ' . __('of 50 discounted licenses left', 'chart-builder') . '</p>';
986 + $content[] = '<div class="ays-chart-progress-banner-progress-bar">';
987 + $content[] = '<div class="ays-chart-progress-banner-progress-fill" id="progress-fill" style="width: ' . $progress_percentage . '%;"></div>';
988 + $content[] = '</div>';
989 + $content[] = '</div>';
990 + $content[] = '</div>';
991 +
992 + $content[] = '<div class="ays-chart-progress-banner-right">';
993 + $content[] = '<a href="'. $ays_chart_cta_button_link .'" class="ays-chart-progress-banner-upgrade" target="_blank">';
994 + $content[] = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">';
995 + $content[] = '<path d="M14.6392 6.956C14.5743 6.78222 14.4081 6.66667 14.2223 6.66667H8.85565L11.9512 0.648C12.0485 0.458667 11.9983 0.227111 11.8308 0.0955556C11.7499 0.0315556 11.6525 0 11.5556 0C11.4521 0 11.3485 0.0364444 11.2654 0.108L8.00009 2.928L1.48765 8.55244C1.3472 8.67378 1.29653 8.86978 1.36142 9.04356C1.42631 9.21733 1.59209 9.33333 1.77787 9.33333H7.14454L4.04898 15.352C3.95165 15.5413 4.00187 15.7729 4.16942 15.9044C4.25031 15.9684 4.34765 16 4.44453 16C4.54809 16 4.65165 15.9636 4.73476 15.892L8.00009 13.072L14.5125 7.44756C14.6534 7.32622 14.7036 7.13022 14.6392 6.956Z" fill="white"/>';
996 + $content[] = '</svg>';
997 + $content[] = ' ' . __('Upgrade Now', 'chart-builder');
998 + $content[] = '</a>';
999 + $content[] = '</div>';
1000 + $content[] = '</div>';
1001 +
1002 + if( current_user_can( 'manage_options' ) ){
1003 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1004 + $content[] = '<form action="" method="POST" style="position: absolute; bottom: 0; right: 0; color: #fff;">';
1005 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="color: darkgrey; font-size: 11px;">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
1006 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1007 + $content[] = '</form>';
1008 + $content[] = '</div>';
1009 + }
1010 + $content[] = '</div>';
1011 +
1012 + // Fox LMS Pro Banner Styles
1013 + $content[] = '<style id="ays-chart-progress-banner-styles-inline-css">';
1014 + $content[] = '
1015 + .ays-chart-progress-banner-main {
1016 + background: linear-gradient(135deg, #6344ED 0%, #8C2ABE 100%);
1017 + padding: 20px 30px;
1018 + border-radius: 16px;
1019 + color: white;
1020 + position: relative;
1021 + margin: 20px 0;
1022 + box-shadow: 0 8px 32px rgba(99, 68, 237, 0.3);
1023 + border: 0;
1024 + }
1025 +
1026 + .ays-chart-progress-banner-main .ays-chart-progress-banner-content {
1027 + display: flex;
1028 + align-items: center;
1029 + justify-content: space-between;
1030 + gap: 30px;
1031 + }
1032 +
1033 + .ays-chart-progress-banner-main .ays-chart-progress-banner-left {
1034 + display: flex;
1035 + align-items: center;
1036 + gap: 20px;
1037 + flex: 1;
1038 + }
1039 +
1040 + .ays-chart-progress-banner-main .ays-chart-progress-banner-center {
1041 + display: flex;
1042 + align-items: center;
1043 + gap: 15px;
1044 + flex: 1;
1045 + }
1046 +
1047 + .ays-chart-progress-banner-main .ays-chart-progress-banner-right {
1048 + display: flex;
1049 + align-items: center;
1050 + gap: 20px;
1051 + flex-shrink: 0;
1052 + }
1053 +
1054 + .ays-chart-progress-banner-main .ays-chart-progress-banner-icon {
1055 + font-size: 32px;
1056 + filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
1057 + }
1058 +
1059 + .ays-chart-progress-banner-main .ays-chart-progress-banner-title {
1060 + font-size: 21px;
1061 + font-weight: 700;
1062 + margin: 0 0 8px 0;
1063 + line-height: 1.2;
1064 + color: #fff;
1065 + }
1066 +
1067 + .ays-chart-progress-banner-main .ays-chart-progress-banner-title a {
1068 + text-decoration: underline;
1069 + color: #fff;
1070 + }
1071 +
1072 + .ays-chart-progress-banner-main .ays-chart-progress-banner-subtitle {
1073 + font-size: 16px;
1074 + margin: 0;
1075 + opacity: 0.9;
1076 + font-weight: 400;
1077 + }
1078 +
1079 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon {
1080 + margin-bottom: 5px;
1081 + }
1082 +
1083 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-box {
1084 + border: 2px dotted rgba(255, 255, 255, 0.6);
1085 + padding: 8px 16px;
1086 + border-radius: 8px;
1087 + background: rgba(255, 255, 255, 0.1);
1088 + cursor: pointer;
1089 + transition: all 0.3s ease;
1090 + display: flex;
1091 + align-items: center;
1092 + gap: 8px;
1093 + backdrop-filter: blur(10px);
1094 + }
1095 +
1096 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-box:hover {
1097 + background: rgba(255, 255, 255, 0.2);
1098 + border-color: rgba(255, 255, 255, 0.8);
1099 + transform: translateY(-1px);
1100 + }
1101 +
1102 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-text {
1103 + font-size: 16px;
1104 + font-weight: 700;
1105 + letter-spacing: 1px;
1106 + color: #fff;
1107 + font-family: monospace;
1108 + }
1109 +
1110 + .ays-chart-progress-banner-main .ays-chart-progress-banner-copy-icon {
1111 + opacity: 0.8;
1112 + transition: opacity 0.3s ease;
1113 + }
1114 +
1115 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-box:hover .ays-chart-progress-banner-copy-icon {
1116 + opacity: 1;
1117 + }
1118 +
1119 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress {
1120 + text-align: center;
1121 + width: 100%;
1122 + }
1123 +
1124 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-text {
1125 + font-size: 14px;
1126 + margin: 0 0 10px 0;
1127 + opacity: 0.9;
1128 + }
1129 +
1130 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-bar {
1131 + width: 300px;
1132 + height: 10px;
1133 + background: rgba(255, 255, 255, 0.2);
1134 + border-radius: 4px;
1135 + overflow: hidden;
1136 + margin: 0 auto;
1137 + }
1138 +
1139 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-fill {
1140 + height: 100%;
1141 + background: linear-gradient(90deg, #4ADE80 0%, #22C55E 100%);
1142 + border-radius: 4px;
1143 + transition: width 0.8s ease;
1144 + width: 70%;
1145 + }
1146 +
1147 + .ays-chart-progress-banner-main .ays-chart-progress-banner-upgrade {
1148 + background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
1149 + color: white;
1150 + border: none;
1151 + padding: 12px 24px;
1152 + border-radius: 8px;
1153 + font-size: 16px;
1154 + font-weight: 600;
1155 + cursor: pointer;
1156 + transition: all 0.3s ease;
1157 + box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
1158 + text-decoration: none;
1159 + display: inline-flex;
1160 + align-items: center;
1161 + gap: 8px;
1162 + }
1163 +
1164 + .ays-chart-progress-banner-main .ays-chart-progress-banner-upgrade:hover {
1165 + transform: translateY(-2px);
1166 + box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
1167 + text-decoration: none;
1168 + color: white;
1169 + }
1170 +
1171 + .ays-chart-progress-banner-main .notice-dismiss:before {
1172 + color: #fff;
1173 + }
1174 +
1175 + /* Copy notification */
1176 + .ays-chart-copy-notification {
1177 + position: fixed;
1178 + top: 50%;
1179 + left: 50%;
1180 + transform: translate(-50%, -50%);
1181 + background: rgba(0, 0, 0, 0.8);
1182 + color: white;
1183 + padding: 12px 24px;
1184 + border-radius: 8px;
1185 + font-size: 14px;
1186 + z-index: 10000;
1187 + opacity: 0;
1188 + transition: opacity 0.3s ease;
1189 + }
1190 +
1191 + .ays-chart-copy-notification.show {
1192 + opacity: 1;
1193 + }
1194 +
1195 + @media (max-width: 1400px) {
1196 + .ays-chart-progress-banner-main .ays-chart-progress-banner-center {
1197 + flex-direction: column;
1198 + }
1199 + }
1200 +
1201 + @media (max-width: 1200px) {
1202 + .ays-chart-progress-banner-main .ays-chart-progress-banner-content {
1203 + flex-direction: column;
1204 + gap: 20px;
1205 + }
1206 +
1207 + .ays-chart-progress-banner-main .ays-chart-progress-banner-left {
1208 + width: 100%;
1209 + justify-content: center;
1210 + text-align: center;
1211 + flex-direction: column;
1212 + }
1213 +
1214 + .ays-chart-progress-banner-main .ays-chart-progress-banner-center {
1215 + width: 100%;
1216 + }
1217 +
1218 + .ays-chart-progress-banner-main .ays-chart-progress-banner-right {
1219 + width: 100%;
1220 + justify-content: center;
1221 + }
1222 + }
1223 +
1224 + @media (max-width: 768px) {
1225 + #ays-chart-progress-banner-main {
1226 + display: none !important;
1227 + }
1228 +
1229 + .ays-chart-progress-banner-main {
1230 + padding: 15px 20px;
1231 + margin: 15px 0;
1232 + }
1233 +
1234 + .ays-chart-progress-banner-main .ays-chart-progress-banner-title {
1235 + font-size: 18px;
1236 + }
1237 +
1238 + .ays-chart-progress-banner-main .ays-chart-progress-banner-subtitle {
1239 + font-size: 14px;
1240 + }
1241 +
1242 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-bar {
1243 + width: 100%;
1244 + max-width: 280px;
1245 + }
1246 +
1247 + .ays-chart-progress-banner-main .ays-chart-progress-banner-upgrade {
1248 + padding: 10px 20px;
1249 + font-size: 14px;
1250 + }
1251 + }
1252 +
1253 + @media (max-width: 480px) {
1254 + .ays-chart-progress-banner-main {
1255 + padding: 12px 15px;
1256 + }
1257 +
1258 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-text {
1259 + font-size: 14px;
1260 + }
1261 +
1262 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-bar {
1263 + max-width: 250px;
1264 + }
1265 + }
1266 + ';
1267 +
1268 + $content[] = '</style>';
1269 +
1270 + $content = implode( '', $content );
1271 + echo ($content);
1272 + }
1273 +
792 1274 // 30% Sale Emma
793 1275 public function ays_chart_sale_message_30_emma($ishmar){
794 1276 if($ishmar == 0 ){
795 1277 $content = array();
@@ -806,9 +1288,9 @@
806 1288 </div>';
807 1289 $content[] = '</div>';
808 1290
809 1291 $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">';
1292 + $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 1293 $content[] = '<span style="padding-left: 4px; font-size: 14px; font-weight: 600;"> 30 Day Money Back Guarantee</span>';
812 1294
813 1295 $content[] = '</div>';
814 1296
@@ -868,9 +1350,10 @@
868 1350 $content[] = '</div>';
869 1351 $content[] = '</div>';
870 1352
871 1353 $content = implode( '', $content );
872 - echo html_entity_decode(esc_html( $content ));
1354 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1355 +
873 1356 }
874 1357 }
875 1358
876 1359 // Self 20% sale
@@ -885,18 +1368,26 @@
885 1368 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
886 1369
887 1370 $content[] = '<div class="ays-chart-dicount-sale-name-discount-box">';
888 1371 $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".CHART_BUILDER_VERSION."' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>", CHART_BUILDER_NAME );
1372 + // Translators: %s is the URL to the Chart Builder plugin page.
1373 + $content[] = sprintf(
1374 + /* translators: %s is the Chart Builder plugin URL. */
1375 + __(
1376 + "<span><a href='%s' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>",
1377 + 'chart-builder'
1378 + ),
1379 + "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
1380 + );
890 1381 $content[] = '</span>';
891 1382 $content[] = '<div>';
892 - $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-sale-30.svg" style="width: 70px;">';
1383 + $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 1384 $content[] = '</div>';
894 1385 $content[] = '</div>';
895 1386
896 1387 $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 );
1388 + $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
1389 + $content[] = esc_html__( "30 Days Money Back Guarantee", 'chart-builder' );
899 1390 $content[] = '</span>';
900 1391
901 1392 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-chart">';
902 1393 $content[] = '<form method="POST">';
@@ -915,15 +1406,15 @@
915 1406
916 1407 $content[] = '<div id="ays-chart-countdown-main-container">';
917 1408 $content[] = '<div class="ays-chart-countdown-container">';
918 1409 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
919 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1410 + $content[] = esc_html__( "Offer ends in:", 'chart-builder' );
920 1411
921 1412 $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>';
1413 + $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . esc_html__( 'Days', 'chart-builder' ) . '</li>';
1414 + $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . esc_html__( 'Hours', 'chart-builder' ) . '</li>';
1415 + $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . esc_html__( 'Minutes', 'chart-builder' ) . '</li>';
1416 + $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . esc_html__( 'Seconds', 'chart-builder' ) . '</li>';
926 1417 $content[] = '</ul>';
927 1418 $content[] = '</div>';
928 1419
929 1420 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
@@ -937,11 +1428,11 @@
937 1428
938 1429 $content[] = '</div>';
939 1430
940 1431 $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'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . __( 'Buy Now', CHART_BUILDER_NAME ) . '</a>';
1432 + $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 1433 $content[] = '<span class="ays-chart-dicount-one-time-text">';
943 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1434 + $content[] = esc_html__( "One-time payment", 'chart-builder' );
944 1435 $content[] = '</span>';
945 1436 $content[] = '</div>';
946 1437
947 1438 $content[] = '</div>';
@@ -948,9 +1439,9 @@
948 1439
949 1440 $content[] = '</div>';
950 1441
951 1442 $content = implode( '', $content );
952 - echo $content;
1443 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
953 1444 }
954 1445 }
955 1446
956 1447 // Helloween banner
@@ -972,15 +1463,15 @@
972 1463 <span style='' class='ays-chart-helloween-bundle'>
973 1464 <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 1465 Chart Builder
975 1466 </a>
976 - </span>", CHART_BUILDER_NAME );
1467 + </span>", 'chart-builder' );
977 1468 $content[] = '</p>';
978 1469 $content[] = '<p>';
979 1470 $content[] = __( "Hurry up!
980 1471 <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 1472 Check it out!
982 - </a>", CHART_BUILDER_NAME );
1473 + </a>", 'chart-builder' );
983 1474 $content[] = '</p>';
984 1475
985 1476 $content[] = '</div>';
986 1477
@@ -1010,9 +1501,9 @@
1010 1501 $content[] = '</div>';
1011 1502
1012 1503 $content[] = '</div>';
1013 1504 $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>';
1505 + $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 1506 $content[] = '</div>';
1016 1507 $content[] = '</div>';
1017 1508
1018 1509 $content[] = '</div>';
@@ -1033,74 +1524,12 @@
1033 1524 $content[] = '</div>';
1034 1525
1035 1526 $content = implode( '', $content );
1036 1527
1037 - echo $content;
1528 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1038 1529 }
1039 1530 }
1040 1531
1041 - // Black Friday banner
1042 - public static function ays_chart_black_friday_message($ishmar){
1043 - if($ishmar == 0 ){
1044 - $content = array();
1045 -
1046 - $content[] = '<div id="ays-chart-dicount-black-friday-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1047 - $content[] = '<div id="ays-chart-dicount-black-friday-month" class="ays_chart_dicount_month">';
1048 - $content[] = '<div class="ays-chart-dicount-black-friday-box">';
1049 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-box-80" style="width: 70%;">';
1050 - $content[] = '<div class="ays-chart-dicount-black-friday-title-row">' . __( 'Limited Time', "chart-builder" ) .' '. '<a href="https://ays-pro.com/wordpress/chart-builder?utm_medium=chart-free&utm_campaign=black-friday-sale-banner" class="ays-chart-dicount-black-friday-button-sale" target="_blank">' . __( 'Sale', "chart-builder" ) . '</a>' . '</div>';
1051 - $content[] = '<div class="ays-chart-dicount-black-friday-title-row">' . __( 'Chart Builder plugin', "chart-builder" ) . '</div>';
1052 - $content[] = '</div>';
1053 -
1054 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-text-box">';
1055 - $content[] = '<div class="ays-chart-dicount-black-friday-text-row">' . __( '20% off', "chart-builder" ) . '</div>';
1056 - $content[] = '</div>';
1057 -
1058 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
1059 - $content[] = '<div id="ays-chart-countdown-main-container">';
1060 - $content[] = '<div class="ays-chart-countdown-container">';
1061 - $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1062 - $content[] = '<ul>';
1063 - $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . __( 'Days', "chart-builder" ) . '</li>';
1064 - $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . __( 'Hours', "chart-builder" ) . '</li>';
1065 - $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . __( 'Minutes', "chart-builder" ) . '</li>';
1066 - $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . __( 'Seconds', "chart-builder" ) . '</li>';
1067 - $content[] = '</ul>';
1068 - $content[] = '</div>';
1069 - $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1070 - $content[] = '<span>🚀</span>';
1071 - $content[] = '<span>⌛</span>';
1072 - $content[] = '<span>🔥</span>';
1073 - $content[] = '<span>💣</span>';
1074 - $content[] = '</div>';
1075 - $content[] = '</div>';
1076 - $content[] = '</div>';
1077 - $content[] = '</div>';
1078 -
1079 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
1080 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_medium=chart-free&utm_campaign=black-friday-sale-banner" class="ays-chart-dicount-black-friday-button-buy-now" target="_blank">' . __( 'Get Your Deal', "chart-builder" ) . '</a>';
1081 - $content[] = '</div>';
1082 - $content[] = '</div>';
1083 - $content[] = '</div>';
1084 -
1085 - $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-black-friday">';
1086 - $content[] = '<form method="POST">';
1087 - $content[] = '<div id="ays-chart-dismiss-buttons-content-black-friday">';
1088 - if( current_user_can( 'manage_options' ) ){
1089 - $content[] = '<button class="btn btn-link ays-button-black-friday" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', "chart-builder" ) . '</button>';
1090 - $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1091 - }
1092 - $content[] = '</div>';
1093 - $content[] = '</form>';
1094 - $content[] = '</div>';
1095 - $content[] = '</div>';
1096 -
1097 - $content = implode( '', $content );
1098 -
1099 - echo $content;
1100 - }
1101 - }
1102 -
1103 1532 // Christmas banner
1104 1533 public static function ays_chart_christmas_message($ishmar){
1105 1534 if($ishmar == 0 ){
1106 1535 $content = array();
@@ -1108,10 +1537,10 @@
1108 1537 $content[] = '<div id="ays-chart-dicount-christmas-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1109 1538 $content[] = '<div id="ays-chart-dicount-christmas-month" class="ays_chart_dicount_month">';
1110 1539 $content[] = '<div class="ays-chart-dicount-christmas-box">';
1111 1540 $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>';
1541 + $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>';
1542 + $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', 'chart-builder' ) . '</div>';
1114 1543 $content[] = '</div>';
1115 1544
1116 1545 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1117 1546 $content[] = '<div id="ays-chart-countdown-main-container">';
@@ -1117,12 +1546,12 @@
1117 1546 $content[] = '<div id="ays-chart-countdown-main-container">';
1118 1547 $content[] = '<div class="ays-chart-countdown-container">';
1119 1548 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1120 1549 $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>';
1550 + $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', 'chart-builder' ) . '</li>';
1551 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', 'chart-builder' ) . '</li>';
1552 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', 'chart-builder' ) . '</li>';
1553 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', 'chart-builder' ) . '</li>';
1125 1554 $content[] = '</ul>';
1126 1555 $content[] = '</div>';
1127 1556 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1128 1557 $content[] = '<span>🚀</span>';
@@ -1134,9 +1563,9 @@
1134 1563 $content[] = '</div>';
1135 1564 $content[] = '</div>';
1136 1565
1137 1566 $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>';
1567 + $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 1568 $content[] = '</div>';
1140 1569 $content[] = '</div>';
1141 1570 $content[] = '</div>';
1142 1571
@@ -1142,9 +1571,9 @@
1142 1571
1143 1572 $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-christmas">';
1144 1573 $content[] = '<form method="POST">';
1145 1574 $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>';
1575 + $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', 'chart-builder' ) . '</button>';
1147 1576 $content[] = '</div>';
1148 1577 $content[] = '</form>';
1149 1578 $content[] = '</div>';
1150 1579 $content[] = '</div>';
@@ -1150,9 +1579,9 @@
1150 1579 $content[] = '</div>';
1151 1580
1152 1581 $content = implode( '', $content );
1153 1582
1154 - echo $content;
1583 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1155 1584 }
1156 1585 }
1157 1586
1158 1587 // Silver Bundle
@@ -1161,20 +1590,20 @@
1161 1590 $content = array();
1162 1591
1163 1592 $content[] = '<div id="ays-chart-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1164 1593 $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>';
1594 + $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 1595
1167 1596 $content[] = '<div class="ays-chart-dicount-wrap-box">';
1168 1597
1169 1598 $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 );
1599 + $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 1600 $content[] = '</strong>';
1172 1601
1173 1602 $content[] = '<br>';
1174 1603
1175 1604 $content[] = '<strong>';
1176 - $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", CHART_BUILDER_NAME );
1605 + $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", 'chart-builder' );
1177 1606 $content[] = '</strong>';
1178 1607
1179 1608 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1180 1609
@@ -1213,23 +1642,134 @@
1213 1642 $content[] = '</div>';
1214 1643
1215 1644 $content[] = '</div>';
1216 1645
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>';
1646 + $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 1647 $content[] = '</div>';
1219 1648 $content[] = '</div>';
1220 1649
1221 1650 $content = implode( '', $content );
1222 - echo $content;
1651 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1223 1652 }
1224 1653 }
1225 1654
1226 - // Black Friday 2024
1227 - public function ays_chart_black_friday_message_2024($ishmar){
1655 + //silver bundle
1656 + public function ays_chart_new_silver_bundle_message_2025($ishmar){
1657 + $content = array();
1658 +
1659 + $date = time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1660 + $now_date = date('M d, Y H:i:s', $date);
1661 +
1662 + $chart_banner_date = strtotime( $this->ays_chart_update_banner_time() );
1663 +
1664 + $diff = $chart_banner_date - $date;
1665 +
1666 + $style_attr = '';
1667 + if( $diff < 0 ){
1668 + $style_attr = 'style="display:none;"';
1669 + }
1670 +
1671 + $chart_cta_button_link = esc_url( 'https://ays-pro.com/silver-bundle?utm_source=dashboard&utm_medium=chart-free&utm_campaign=silver-bundle-sale-banner-' . CHART_BUILDER_VERSION );
1672 +
1673 + $content[] = '<div id="ays-chart-new-silver-bundle-dicount-month-main" class="ays-chart-admin-notice notice notice-success is-dismissible ays_chart_dicount_info">';
1674 + $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1675 +
1676 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1677 + $content[] = '<div>';
1678 + $content[] = '<div class="ays-chart-dicount-logo-box">';
1679 + $content[] = '<a href="' . $chart_cta_button_link . '" target="_blank" class="ays-chart-sale-banner-link"><img src="' . CHART_BUILDER_ADMIN_URL . '/images/mega_bundle_logo_box.webp"></a>';
1680 +
1681 + $content[] = '<div>';
1682 + $content[] = '<span class="ays-chart-new-silver-bundle-title">';
1683 + $content[] = sprintf(
1684 + /* translators: 1: opening link wrapper with <a> tag, 2: closing </a> tag */
1685 + __( '%1$s Silver Bundle %2$s (Quiz + Form + Chart)', 'chart-builder' ),
1686 + '<span style="display:inline-block; margin-right:5px;"><a href="' . esc_url( $chart_cta_button_link ) . '" target="_blank" rel="noopener noreferrer" style="color:#ffffff !important; text-decoration: underline;">',
1687 + '</a></span>'
1688 + );
1689 + $content[] = '</span>';
1690 + $content[] = '</br>';
1691 + $content[] = '<span class="ays-chart-new-silver-bundle-desc">';
1692 + $content[] = __( "30 Day Money Back Guarantee", 'chart-builder' );
1693 + $content[] = '</span>';
1694 + $content[] = '</div>';
1695 +
1696 + $content[] = '<div class="ays-chart-new-silver-bundle-title-icon-row" style="display: inline-block;">';
1697 + $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-50.svg" class="ays-chart-new-silver-bundle-mobile-image-display-none" style="width: 70px;">';
1698 + $content[] = '</div>';
1699 +
1700 + $content[] = '</div>';
1701 +
1702 + $content[] = '<div class="ays-chart-new-silver-bundle-mobile-image-display-block display_none">';
1703 + $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-50.svg" style="width: 70px;">';
1704 + $content[] = '</div>';
1705 + $content[] = '</div>';
1706 +
1707 + $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1708 +
1709 + $content[] = '<form action="" method="POST">';
1710 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1711 + if( current_user_can( 'manage_options' ) ){
1712 + $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>';
1713 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1714 + }
1715 + $content[] = '</div>';
1716 + $content[] = '</form>';
1717 +
1718 + $content[] = '</div>';
1719 +
1720 + $content[] = '</div>';
1721 +
1722 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
1723 +
1724 + $content[] = '<div id="ays-chart-maker-countdown-main-container">';
1725 + $content[] = '<div class="ays-chart-maker-countdown-container">';
1726 +
1727 + $content[] = '<div ' . $style_attr . ' id="ays-chart-countdown">';
1728 +
1729 + $content[] = '<ul>';
1730 +
1731 + $content[] = '<li><span id="ays-chart-countdown-days"></span></li>';
1732 + $content[] = '<li><span id="ays-chart-countdown-hours"></span></li>';
1733 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span></li>';
1734 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span></li>';
1735 + $content[] = '</ul>';
1736 + $content[] = '</div>';
1737 +
1738 + $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
1739 + $content[] = '</div>';
1740 +
1741 + $content[] = '</div>';
1742 + $content[] = '</div>';
1743 +
1744 + $content[] = '</div>';
1745 +
1746 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1747 + $content[] = '<a href="'. $chart_cta_button_link .'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Buy Now', 'chart-builder' ) . '</a>';
1748 + $content[] = '<span class="ays-chart-dicount-one-time-text">';
1749 + $content[] = __( "One-time payment", 'chart-builder' );
1750 + $content[] = '</span>';
1751 + $content[] = '</div>';
1752 + $content[] = '</div>';
1753 + $content[] = '</div>';
1754 +
1755 + // /* New Mega Bundle Banner Quiz | Start */
1756 + $content[] = '<style id="ays-chart-mega-bundle-styles-inline-css">';
1757 + $content[] = '
1758 + div#ays-chart-new-silver-bundle-dicount-month-main{border:0;background:#fff;border-radius:20px;box-shadow:unset;position:relative;z-index:1;min-height:80px}div#ays-chart-new-silver-bundle-dicount-month-main.ays_chart_dicount_info button{display:flex;align-items:center}div#ays-chart-new-silver-bundle-dicount-month-main div#ays-chart-dicount-month a.ays-chart-sale-banner-link:focus{outline:0;box-shadow:0}div#ays-chart-new-silver-bundle-dicount-month-main .btn-link{color:#007bff;background-color:transparent;display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem}div#ays-chart-new-silver-bundle-dicount-month-main.ays_chart_dicount_info{background-image:url("'. CHART_BUILDER_ADMIN_URL .'/images/chart-builder-banner-background-50.svg");background-position:center right;background-repeat:no-repeat;background-size:cover;background-color:#5551ff;padding:1px 38px 1px 12px}#ays-chart-new-silver-bundle-dicount-month-main .ays_chart_dicount_month{display:flex;align-items:center;justify-content:space-between;color:#fff}#ays-chart-new-silver-bundle-dicount-month-main .ays_chart_dicount_month img{width:60px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-sale-banner-link{display:flex;justify-content:center;align-items:center;width:60px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box{font-size:14px;padding:12px;text-align:center}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{text-align:left;width:auto;display:flex;justify-content:space-around;align-items:flex-start}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:30%;display:flex;justify-content:center;align-items:center}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-button-box{width:20%;display:flex;justify-content:center;align-items:center;flex-direction:column}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-chart-dicount-logo-box{display:flex;justify-content:flex-start;align-items:center;gap:20px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-title{color:#fdfdfd;font-size:19px;font-style:normal;font-weight:600;line-height:normal}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-title-icon-row{display:inline-block}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-desc{display:inline-block;color:#fff;font-size:15px;font-style:normal;font-weight:400;line-height:normal;margin-top:10px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box strong{font-size:17px;font-weight:700;letter-spacing:.8px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-color{color:#971821}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-text-decoration{text-decoration:underline}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-buy-now-button-box{display:flex;justify-content:flex-end;align-items:center;width:30%}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-button,#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-buy-now-button{align-items:center;font-weight:500}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-buy-now-button{background:#971821;border-color:#fff;display:flex;justify-content:center;align-items:center;padding:5px 15px;font-size:16px;border-radius:5px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-buy-now-button:hover{background:#7d161d;border-color:#971821}#ays-chart-new-silver-bundle-dicount-month-main #ays-chart-dismiss-buttons-content{display:flex;justify-content:center}#ays-chart-new-silver-bundle-dicount-month-main #ays-chart-dismiss-buttons-content .ays-button{margin:0!important;font-size:13px;color:#fff}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-opacity-box{width:19%}#ays-chart-new-silver-bundle-dicount-month-main .ays-buy-now-opacity-button{padding:40px 15px;display:flex;justify-content:center;align-items:center;opacity:0}#ays-chart-maker-countdown-main-container .ays-chart-maker-countdown-container{margin:0 auto;text-align:center}#ays-chart-maker-countdown-main-container #ays-chart-countdown-headline{letter-spacing:.125rem;text-transform:uppercase;font-size:18px;font-weight:400;margin:0;padding:9px 0 4px;line-height:1.3}#ays-chart-maker-countdown-main-container li,#ays-chart-maker-countdown-main-container ul{margin:0}#ays-chart-maker-countdown-main-container li{display:inline-block;font-size:14px;list-style-type:none;padding:14px;text-transform:lowercase}#ays-chart-maker-countdown-main-container li span{display:flex;justify-content:center;align-items:center;font-size:22px;min-height:40px;min-width:40px;border-radius:4.273px;border:.534px solid #f4f4f4;background:#9896ed;color:#fff}#ays-chart-maker-countdown-main-container .emoji{display:none;padding:1rem}#ays-chart-maker-countdown-main-container .emoji span{font-size:30px;padding:0 .5rem}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box li{position:relative}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box li span:after{content:":";color:#fff;position:absolute;top:0;right:-5px;font-size:40px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box li span#ays-chart-countdown-seconds:after{content:unset}#ays-chart-new-silver-bundle-dicount-month-main #ays-button-top-buy-now{display:flex;align-items:center;border-radius:6.409px;background:#f66123;padding:12px 32px;color:#fff;font-size:15px;font-style:normal;line-height:normal;margin:0!important}div#ays-chart-new-silver-bundle-dicount-month-main button.notice-dismiss:before{color:#fff;content:"\f00d";font-family:fontawesome;font-size:22px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-new-silver-bundle-guaranteeicon{width:30px;margin-right:5px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-one-time-text{color:#fff;font-size:12px;font-style:normal;font-weight:600;line-height:normal}@media all and (max-width:768px){div#ays-chart-new-silver-bundle-dicount-month-main.ays_chart_dicount_info.notice{display:none!important;background-position:bottom right;background-repeat:no-repeat;background-size:cover;border-radius:32px}div#ays-chart-new-silver-bundle-dicount-month-main{padding-right:0}div#ays-chart-new-silver-bundle-dicount-month-main .ays_chart_dicount_month{display:flex;align-items:center;justify-content:space-between;align-content:center;flex-wrap:wrap;flex-direction:column;padding:10px 0}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box{width:100%!important;text-align:center}#ays-chart-maker-countdown-main-container #ays-chart-countdown-headline{font-size:15px;font-weight:600}#ays-chart-maker-countdown-main-container ul{font-weight:500}div#ays-chart-maker-countdown-main-container li{padding:10px}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-new-silver-bundle-mobile-image-display-none{display:none!important}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-new-silver-bundle-mobile-image-display-block{display:block!important;margin-top:5px}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{width:100%!important;text-align:center;flex-direction:column;margin-top:20px;justify-content:center;align-items:center}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box li span:after{top:unset}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:100%;display:flex;justify-content:center;align-items:center}#ays-chart-new-silver-bundle-dicount-month-main .ays-button{margin:0 auto!important}#ays-chart-new-silver-bundle-dicount-month-main #ays-chart-dismiss-buttons-content .ays-button{padding-left:unset!important}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-buy-now-button-box{justify-content:center}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-buy-now-button{font-size:14px;padding:5px 10px}div#ays-chart-new-silver-bundle-dicount-month-main .ays-buy-now-opacity-button{display:none}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dismiss-buttons-container-for-form{position:static!important}.comparison .product img{width:70px}.ays-chart-features-wrap .comparison a.price-buy{padding:8px 5px;font-size:11px}}@media screen and (max-width:1350px) and (min-width:768px){div#ays-chart-new-silver-bundle-dicount-month-main.ays_chart_dicount_info.notice{background-position:bottom right;background-repeat:no-repeat;background-size:cover}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box strong{font-size:15px}#ays-chart-maker-countdown-main-container li{font-size:11px}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-opacity-box{display:none}}@media screen and (max-width:1680px) and (min-width:1551px){div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{width:29%}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:30%}}@media screen and (max-width:1410px){#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-coupon-row{width:150px}}@media screen and (max-width:1550px) and (min-width:1400px){div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:35%}}@media screen and (max-width:1400px) and (min-width:1250px){div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:35%}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{width:40%}}@media screen and (max-width:1274px){#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-title{font-size:15px}}@media screen and (max-width:1200px){#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-button-box{margin-bottom:16px}#ays-chart-maker-countdown-main-container ul{padding-left:0}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-coupon-row{width:120px;font-size:18px}#ays-chart-new-silver-bundle-dicount-month-main #ays-button-top-buy-now{padding:12px 20px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box{font-size:12px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-desc{font-size:13px}}@media screen and (max-width:1076px) and (min-width:769px){#ays-chart-maker-countdown-main-container li{padding:10px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-coupon-row{width:100px;font-size:16px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-button-box{margin-bottom:16px}#ays-chart-new-silver-bundle-dicount-month-main #ays-button-top-buy-now{padding:12px 15px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box{font-size:11px;padding:12px 0}}@media screen and (max-width:1250px) and (min-width:769px){div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:45%}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{width:35%}}';
1759 + $content[] = '</style>';
1760 + // /* New Mega Bundle Banner Quiz | End */
1761 +
1762 + $content = implode( '', $content );
1763 + echo ($content);
1764 + }
1765 +
1766 + // Christmas Top Banner 2024
1767 + public function ays_chart_christmas_message_2024($ishmar){
1228 1768 if($ishmar == 0 ){
1229 1769 $content = array();
1230 1770
1231 - $content[] = '<div id="ays-chart-black-friday-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1771 + $content[] = '<div id="ays-chart-christmas-top-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1232 1772 $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1233 1773
1234 1774 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
1235 1775
@@ -1238,16 +1778,16 @@
1238 1778
1239 1779 $content[] = '<div id="ays-chart-countdown">';
1240 1780
1241 1781 $content[] = '<div>';
1242 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1782 + $content[] = __( "Offer ends in:", 'chart-builder' );
1243 1783 $content[] = '</div>';
1244 1784
1245 - $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>';
1785 + $content[] = '<ul style="padding-left: 0;">';
1786 + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>';
1787 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>';
1788 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>';
1789 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>';
1250 1790 $content[] = '</ul>';
1251 1791 $content[] = '</div>';
1252 1792
1253 1793 $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
@@ -1264,17 +1804,24 @@
1264 1804
1265 1805 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1266 1806 $content[] = '<div>';
1267 1807
1268 - $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 );
1808 + $content[] = '<span class="ays-chart-christmas-top-bundle-title">';
1809 + $content[] = sprintf(
1810 + /* translators: %s is the Chart Builder plugin URL with version parameter. */
1811 + __(
1812 + "<span><a href='%s' class='ays-chart-christmas-top-bundle-title-link' target='_blank'>Christmas Sale</a></span>",
1813 + 'chart-builder'
1814 + ),
1815 + "https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner" . CHART_BUILDER_VERSION
1816 + );
1270 1817 $content[] = '</span>';
1271 1818
1272 1819 $content[] = '</br>';
1273 1820
1274 - $content[] = '<span class="ays-chart-black-friday-bundle-desc">';
1275 - $content[] = '<a class="ays-chart-black-friday-bundle-desc" href="https://ays-pro.com/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 );
1821 + $content[] = '<span class="ays-chart-christmas-top-bundle-desc">';
1822 + $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">';
1823 + $content[] = __( "20% Extra OFF", 'chart-builder' );
1277 1824 $content[] = '</a>';
1278 1825 $content[] = '</span>';
1279 1826 $content[] = '</div>';
1280 1827
@@ -1282,9 +1829,9 @@
1282 1829
1283 1830 $content[] = '<form action="" method="POST">';
1284 1831 $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1285 1832 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>';
1833 + $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 1834 $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1288 1835 }
1289 1836 $content[] = '</div>';
1290 1837 $content[] = '</form>';
@@ -1292,20 +1839,21 @@
1292 1839 $content[] = '</div>';
1293 1840
1294 1841 $content[] = '</div>';
1295 1842
1296 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1297 - $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1298 - $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" );
1300 - $content[] = '</a>';
1301 - $content[] = '</span>';
1843 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-christmas-top-bundle-coupon-text-box">';
1844 + $content[] = '<div class="ays-chart-christmas-top-bundle-coupon-row">';
1845 + $content[] = 'xmas20off';
1846 + $content[] = '</div>';
1847 + $content[] = '<div class="ays-chart-christmas-top-bundle-text-row">';
1848 + $content[] = __( '20% Extra Discount Coupon', 'chart-builder' );
1849 + $content[] = '</div>';
1302 1850 $content[] = '</div>';
1303 1851
1304 1852 $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>';
1853 + $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>';
1306 1854 $content[] = '<span class="ays-chart-dicount-one-time-text">';
1307 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1855 + $content[] = __( "One-time payment", 'chart-builder' );
1308 1856 $content[] = '</span>';
1309 1857 $content[] = '</div>';
1310 1858 $content[] = '</div>';
1311 1859 $content[] = '</div>';
@@ -1310,111 +1858,1242 @@
1310 1858 $content[] = '</div>';
1311 1859 $content[] = '</div>';
1312 1860
1313 1861 $content = implode( '', $content );
1314 - echo $content;
1862 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1315 1863 }
1316 1864 }
1317 1865
1318 - // Christmas Top Banner 2024
1319 - public function ays_chart_christmas_message_2024($ishmar){
1866 + // Halloween Bundle 2025
1867 + public function ays_chart_new_halloween_bundle_message_2025($ishmar){
1320 1868 if($ishmar == 0 ){
1321 1869 $content = array();
1322 1870
1323 - $content[] = '<div id="ays-chart-christmas-top-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1324 - $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1871 + $date = time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1872 + $now_date = date('M d, Y H:i:s', $date);
1325 1873
1326 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
1874 + $start_date = strtotime('2025-09-08');
1875 + $end_date = strtotime('2025-10-31');
1876 + $diff_end = $end_date - $date;
1327 1877
1328 - $content[] = '<div id="ays-chart-countdown-main-container">';
1329 - $content[] = '<div class="ays-chart-countdown-container">';
1878 + $style_attr = '';
1879 + if( $diff_end < 0 ){
1880 + $style_attr = 'style="display:none;"';
1881 + }
1330 1882
1331 - $content[] = '<div id="ays-chart-countdown">';
1883 + $ays_chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=chart-halloween-banner-' . CHART_BUILDER_VERSION);
1332 1884
1333 - $content[] = '<div>';
1334 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1335 - $content[] = '</div>';
1885 + $content[] = '
1886 + <div id="ays-chart-halloween-banner-2025-main" class="ays-chart-halloween-banner-2025-main ays_chart_dicount_info notice notice-success is-dismissible">
1887 + <div class="ays-chart-halloween-banner-2025-content">
1888 + <div class="ays-chart-halloween-banner-2025-left">
1889 + <div class="ays-chart-halloween-banner-2025-text">
1890 + <h2 class="ays-chart-halloween-banner-2025-title">Boo! Grab Your <a href="'. $ays_chart_cta_button_link .'" class="" target="_blank">Halloween Deal</a> <br/> Before It Vanishes!</h2>
1891 + <p class="ays-chart-halloween-banner-2025-subtitle">Don’t get spooked by missing out!<br/> Get 25% discount using the coupon code while the magic lasts!</p>
1892 + </div>
1893 + </div>
1336 1894
1337 - $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>';
1342 - $content[] = '</ul>';
1895 + <div class="ays-chart-halloween-banner-2025-center">';
1896 +
1897 + $content[] = '<div id="ays-chart-halloween-banner-2025-countdown" class="ays-chart-halloween-banner-2025-countdown" ' . $style_attr . '>';
1898 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-timer">';
1899 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-item">';
1900 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-value" id="ays-chart-halloween-banner-2025-days">00</div>';
1901 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-label">' . __('days', 'chart-builder') . '</div>';
1343 1902 $content[] = '</div>';
1903 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-separator">:</div>';
1904 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-item">';
1905 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-value" id="ays-chart-halloween-banner-2025-hours">00</div>';
1906 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-label">' . __('hours', 'chart-builder') . '</div>';
1907 + $content[] = '</div>';
1908 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-separator">:</div>';
1909 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-item">';
1910 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-value" id="ays-chart-halloween-banner-2025-minutes">00</div>';
1911 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-label">' . __('minutes', 'chart-builder') . '</div>';
1912 + $content[] = '</div>';
1913 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-separator">:</div>';
1914 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-item">';
1915 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-value" id="ays-chart-halloween-banner-2025-seconds">00</div>';
1916 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-label">' . __('seconds', 'chart-builder') . '</div>';
1917 + $content[] = '</div>';
1918 + $content[] = '</div>';
1919 + $content[] = '</div>';
1344 1920
1345 - $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
1346 - $content[] = '<span>🚀</span>';
1347 - $content[] = '<span>⌛</span>';
1348 - $content[] = '<span>🔥</span>';
1349 - $content[] = '<span>💣</span>';
1921 + $content[] = '</div>
1922 +
1923 + <div class="ays-chart-halloween-banner-2025-right">
1924 + <div class="ays-chart-halloween-banner-2025-pumpkin">
1925 + <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
1926 + <g clip-path="url(#clip0_177_40)">
1927 + <path d="M32.664 8.519C29.364 5.134 23.42 4.75 18 4.75C12.58 4.75 6.636 5.134 3.336 8.519C0.582 11.344 0 15.751 0 19.791C0 25.054 1.982 31.102 6.357 34.035C9.364 36.051 13.95 35.871 18 35.871C22.05 35.871 26.636 36.051 29.643 34.035C34.018 31.101 36 25.054 36 19.791C36 15.751 35.418 11.344 32.664 8.519Z" fill="#F4900C"/>
1928 + <path d="M20.783 5.44401C20.852 5.86401 20.561 6.20801 20.136 6.20801H15.685C15.259 6.20801 14.968 5.86401 15.038 5.44401L15.783 0.972008C15.853 0.551008 16.259 0.208008 16.685 0.208008H19.136C19.562 0.208008 19.968 0.552008 20.037 0.972008L20.783 5.44401Z" fill="#3F7123"/>
1929 + <path d="M20.6541 21.159L19.0561 18.563C18.7651 18.021 18.3831 17.75 17.9991 17.746C17.6161 17.75 17.2331 18.021 16.9421 18.563L15.3441 21.159C14.7571 22.252 16.2171 22.875 17.9981 22.875C19.7791 22.875 21.2411 22.251 20.6541 21.159ZM30.1621 24.351C30.1171 24.276 30.0361 24.23 29.9481 24.23H29.1071C29.0391 24.23 28.9731 24.258 28.9261 24.307L26.6951 26.641L23.9971 24.472C23.9461 24.431 23.8801 24.414 23.8121 24.419C23.7461 24.426 23.6851 24.46 23.6441 24.513L21.2361 27.575L18.1821 24.309C18.1691 24.295 18.1491 24.292 18.1341 24.281C18.1191 24.271 18.1091 24.254 18.0911 24.247C18.0851 24.245 18.0781 24.247 18.0721 24.245C18.0481 24.238 18.0251 24.24 18.0001 24.24C17.9751 24.24 17.9521 24.238 17.9281 24.246C17.9221 24.248 17.9151 24.245 17.9081 24.248C17.8901 24.255 17.8811 24.272 17.8651 24.282C17.8491 24.292 17.8301 24.295 17.8171 24.309L14.7641 27.575L12.3551 24.513C12.3141 24.46 12.2531 24.426 12.1871 24.419C12.1211 24.413 12.0541 24.431 12.0021 24.472L9.30411 26.641L7.07411 24.307C7.02711 24.258 6.96211 24.23 6.89311 24.23H6.05211C5.96511 24.23 5.88311 24.276 5.83811 24.351C5.79311 24.426 5.79011 24.519 5.83111 24.596L8.58511 29.815C8.61911 29.879 8.6781 29.925 8.7491 29.942C8.8201 29.959 8.8941 29.944 8.9521 29.902L10.9861 28.444L13.9901 32.077C14.0331 32.13 14.0961 32.162 14.1641 32.167L14.1831 32.168C14.2451 32.168 14.3041 32.146 14.3501 32.105L18.0001 28.836L21.6501 32.104C21.6961 32.145 21.7551 32.167 21.8171 32.167L21.8361 32.166C21.9041 32.161 21.9671 32.129 22.0101 32.076L25.0151 28.443L27.0491 29.901C27.1091 29.944 27.1821 29.961 27.2521 29.941C27.3221 29.924 27.3821 29.879 27.4151 29.815L30.1701 24.596C30.2101 24.519 30.2081 24.426 30.1621 24.351ZM27.9761 15.421C28.1051 17.548 27.1921 19.227 24.7711 19.374C22.3511 19.52 21.2421 17.963 21.1131 15.837C20.9841 13.711 22.3451 10.717 24.2401 10.603C26.1361 10.487 27.8481 13.294 27.9761 15.421ZM8.02411 15.421C7.89511 17.548 8.80811 19.227 11.2291 19.374C13.6491 19.52 14.7581 17.963 14.8871 15.837C15.0161 13.711 13.6551 10.717 11.7601 10.603C9.86511 10.489 8.15211 13.294 8.02411 15.421Z" fill="#642116"/>
1930 + </g>
1931 + <defs>
1932 + <clipPath id="clip0_177_40">
1933 + <rect width="36" height="36" fill="white"/>
1934 + </clipPath>
1935 + </defs>
1936 + </svg>
1937 + </div>
1938 +
1939 +
1940 +
1941 + <div class="ays-chart-halloween-banner-2025-discount-section">
1942 + <div class="ays-chart-halloween-banner-2025-discount">25% OFF</div>
1943 + <div class="ays-chart-halloween-banner-2025-coupon-wrapper">
1944 + <div class="ays-chart-halloween-banner-2025-coupon-box" onclick="aysChartHalloweenCopyToClipboard(\'HALLOWEEN25\')" title="Click to copy">
1945 + <span class="ays-chart-halloween-banner-2025-coupon-text">HALLOWEEN25</span>
1946 + <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="ays-chart-halloween-banner-2025-copy-icon">
1947 + <path d="M13.5 2.5H6.5C5.67 2.5 5 3.17 5 4V10C5 10.83 5.67 11.5 6.5 11.5H13.5C14.33 11.5 15 10.83 15 10V4C15 3.17 14.33 2.5 13.5 2.5ZM13.5 10H6.5V4H13.5V10ZM2.5 6.5V12.5C2.5 13.33 3.17 14 4 14H10V12.5H4V6.5H2.5Z" fill="white"/>
1948 + </svg>
1949 + </div>
1950 + </div>
1951 + <a href="'. $ays_chart_cta_button_link .'" class="ays-chart-halloween-banner-2025-upgrade" target="_blank">Upgrade Now</a>
1952 + </div>';
1953 +
1954 + if( current_user_can( 'manage_options' ) ){
1955 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1956 + $content[] = '<form action="" method="POST" style="position: absolute; bottom: -5px; right: 0; color: #fff;">';
1957 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="color: darkgrey; font-size: 11px;">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
1958 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1959 + $content[] = '</form>';
1350 1960 $content[] = '</div>';
1961 + }
1351 1962
1963 + $content[] = '
1964 + </div>
1965 + </div>
1966 + </div>';
1967 +
1968 + $content[] = '<style id="ays-chart-progress-banner-styles-inline-css">';
1969 + $content[] = '
1970 + .ays-chart-halloween-banner-2025-main {
1971 + background: linear-gradient(135deg, #1A0F2E 100%, #2D1B4E 0%);
1972 + background-image: url("' . esc_attr( CHART_BUILDER_ADMIN_URL ) . '/images/halloween-banner-background-image-remove.png"), linear-gradient(135deg, #2D1B4E 0%, #1A0F2E 100%);
1973 + background-position: left center, center;
1974 + background-repeat: no-repeat, no-repeat;
1975 + background-size: auto 100%, cover;
1976 + padding: 20px 30px 20px 130px;
1977 + border-radius: 12px;
1978 + color: white;
1979 + margin: 20px 0;
1980 + border: 0;
1981 + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
1982 + overflow: hidden;
1983 + }
1984 +
1985 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-content {
1986 + display: flex;
1987 + align-items: center;
1988 + justify-content: space-between;
1989 + gap: 30px;
1990 + }
1991 +
1992 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-left {
1993 + display: flex;
1994 + align-items: center;
1995 + gap: 20px;
1996 + }
1997 +
1998 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-center {
1999 + display: flex;
2000 + align-items: center;
2001 + justify-content: center;
2002 + flex: 1;
2003 + max-width: 350px;
2004 + }
2005 +
2006 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-right {
2007 + display: flex;
2008 + align-items: center;
2009 + gap: 15px;
2010 + flex-shrink: 0;
2011 + }
2012 +
2013 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-icon {
2014 + flex-shrink: 0;
2015 + }
2016 +
2017 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-pumpkin svg {
2018 + display: inline !important;
2019 + border: none !important;
2020 + box-shadow: none !important;
2021 + height: 1em !important;
2022 + width: 1em !important;
2023 + margin: 0 0.07em !important;
2024 + vertical-align: -0.1em !important;
2025 + background: none !important;
2026 + padding: 0 !important;
2027 + }
2028 +
2029 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-orb {
2030 + width: 80px;
2031 + height: 80px;
2032 + background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
2033 + border-radius: 50%;
2034 + display: flex;
2035 + align-items: center;
2036 + justify-content: center;
2037 + box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
2038 + border: 3px solid rgba(168, 85, 247, 0.4);
2039 + }
2040 +
2041 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-question {
2042 + font-size: 48px;
2043 + font-weight: 700;
2044 + color: #E9D5FF;
2045 + }
2046 +
2047 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-bat {
2048 + font-size: 20px;
2049 + opacity: 0.8;
2050 + }
2051 +
2052 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-bat-1 {
2053 + margin-left: -100px;
2054 + margin-top: -40px;
2055 + }
2056 +
2057 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-bat-2 {
2058 + margin-left: -110px;
2059 + margin-top: 35px;
2060 + }
2061 +
2062 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-sparkle {
2063 + font-size: 12px;
2064 + opacity: 0.7;
2065 + }
2066 +
2067 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-sparkle-1 {
2068 + margin-left: -95px;
2069 + margin-top: -60px;
2070 + }
2071 +
2072 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-sparkle-2 {
2073 + margin-left: -70px;
2074 + margin-top: -15px;
2075 + }
2076 +
2077 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-sparkle-3 {
2078 + margin-left: -120px;
2079 + margin-top: 10px;
2080 + }
2081 +
2082 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-text {
2083 + flex: 1;
2084 + }
2085 +
2086 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title {
2087 + font-size: 24px;
2088 + font-weight: 700;
2089 + margin: 0 0 8px 0;
2090 + line-height: 1.2;
2091 + color: #fff;
2092 + text-transform: uppercase;
2093 + letter-spacing: 1px;
2094 + }
2095 +
2096 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title a {
2097 + color: #FB923C;
2098 + text-decoration: underline;
2099 + }
2100 +
2101 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-subtitle {
2102 + font-size: 16px;
2103 + margin: 0;
2104 + opacity: 0.9;
2105 + font-weight: 400;
2106 + color: #E9D5FF;
2107 + }
2108 +
2109 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-description {
2110 + font-size: 14px;
2111 + margin: 0;
2112 + opacity: 0.85;
2113 + line-height: 1.5;
2114 + color: #D8B4FE;
2115 + }
2116 +
2117 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-pumpkin {
2118 + font-size: 64px;
2119 + filter: drop-shadow(0 0 20px rgba(251, 146, 60, 0.8));
2120 + flex-shrink: 0;
2121 + }
2122 +
2123 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-discount-section {
2124 + display: flex;
2125 + flex-direction: column;
2126 + align-items: center;
2127 + gap: 10px;
2128 + }
2129 +
2130 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-discount {
2131 + font-size: 36px;
2132 + font-weight: 700;
2133 + color: #FB923C;
2134 + text-shadow: 0 0 20px rgba(251, 146, 60, 0.6);
2135 + margin: 0;
2136 + line-height: 1;
2137 + }
2138 +
2139 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-wrapper {
2140 + margin-bottom: 5px;
2141 + }
2142 +
2143 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-box {
2144 + border: 2px dashed rgba(255, 255, 255, 0.4);
2145 + padding: 6px 12px;
2146 + border-radius: 6px;
2147 + background: rgba(255, 255, 255, 0.1);
2148 + cursor: pointer;
2149 + transition: all 0.3s ease;
2150 + display: flex;
2151 + align-items: center;
2152 + gap: 6px;
2153 + backdrop-filter: blur(10px);
2154 + }
2155 +
2156 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-box:hover {
2157 + background: rgba(255, 255, 255, 0.2);
2158 + border-color: rgba(255, 255, 255, 0.6);
2159 + transform: translateY(-1px);
2160 + }
2161 +
2162 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-text {
2163 + font-size: 14px;
2164 + font-weight: 700;
2165 + letter-spacing: 1px;
2166 + color: #fff;
2167 + font-family: monospace;
2168 + }
2169 +
2170 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-copy-icon {
2171 + opacity: 0.8;
2172 + transition: opacity 0.3s ease;
2173 + }
2174 +
2175 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-box:hover .ays-chart-halloween-banner-2025-copy-icon {
2176 + opacity: 1;
2177 + }
2178 +
2179 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-upgrade {
2180 + background: linear-gradient(135deg, #FB923C 0%, #F97316 100%);
2181 + color: white;
2182 + border: none;
2183 + padding: 12px 28px;
2184 + border-radius: 8px;
2185 + font-size: 16px;
2186 + font-weight: 600;
2187 + cursor: pointer;
2188 + transition: all 0.3s ease;
2189 + box-shadow: 0 4px 16px rgba(251, 146, 60, 0.5);
2190 + text-decoration: none;
2191 + display: inline-flex;
2192 + align-items: center;
2193 + text-align: center;
2194 + }
2195 +
2196 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-upgrade:hover {
2197 + transform: translateY(-2px);
2198 + box-shadow: 0 6px 20px rgba(251, 146, 60, 0.7);
2199 + text-decoration: none;
2200 + color: white;
2201 + }
2202 +
2203 + .ays-chart-halloween-banner-2025-main .notice-dismiss:before {
2204 + color: #fff;
2205 + }
2206 +
2207 + .ays-chart-halloween-banner-2025-copy-notification {
2208 + position: fixed;
2209 + top: 50%;
2210 + left: 50%;
2211 + transform: translate(-50%, -50%);
2212 + background: rgba(0, 0, 0, 0.8);
2213 + color: white;
2214 + padding: 12px 24px;
2215 + border-radius: 8px;
2216 + font-size: 14px;
2217 + z-index: 10000;
2218 + opacity: 0;
2219 + transition: opacity 0.3s ease;
2220 + }
2221 +
2222 + .ays-chart-halloween-banner-2025-copy-notification.show {
2223 + opacity: 1;
2224 + }
2225 +
2226 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-timer {
2227 + display: flex;
2228 + align-items: center;
2229 + justify-content: center;
2230 + gap: 8px;
2231 + }
2232 +
2233 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-item {
2234 + background: rgba(255, 255, 255, 0.15);
2235 + border-radius: 8px;
2236 + padding: 8px 12px;
2237 + min-width: 60px;
2238 + backdrop-filter: blur(10px);
2239 + }
2240 +
2241 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-value {
2242 + font-size: 24px;
2243 + font-weight: 700;
2244 + line-height: 1;
2245 + margin-bottom: 4px;
2246 + color: #fff;
2247 + text-align: center;
2248 + }
2249 +
2250 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-label {
2251 + font-size: 11px;
2252 + opacity: 0.8;
2253 + text-transform: lowercase;
2254 + text-align: center;
2255 + }
2256 +
2257 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-separator {
2258 + font-size: 24px;
2259 + font-weight: 700;
2260 + opacity: 0.6;
2261 + margin: 0 4px;
2262 + }
2263 +
2264 + @media (min-width: 1200px) {
2265 + .ays-chart-halloween-banner-2025-main .wp-core-ui .notice.is-dismissible {
2266 + padding-right: 60px;
2267 + }
2268 + }
2269 +
2270 + @media (max-width: 1200px) {
2271 +
2272 + div.ays-chart-halloween-banner-2025-main {
2273 + padding: 20px 30px;
2274 + }
2275 +
2276 + div.ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-pumpkin {
2277 + display: none;
2278 + }
2279 +
2280 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-subtitle,
2281 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title {
2282 + text-align: center;
2283 + }
2284 +
2285 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-content {
2286 + flex-wrap: wrap;
2287 + gap: 20px;
2288 + }
2289 +
2290 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-left {
2291 + width: 100%;
2292 + }
2293 +
2294 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-center {
2295 + width: 100%;
2296 + max-width: 100%;
2297 + text-align: center;
2298 + }
2299 +
2300 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-right {
2301 + width: 100%;
2302 + justify-content: center;
2303 + }
2304 + }
2305 +
2306 + @media (max-width: 786px) {
2307 + #ays-chart-halloween-banner-2025-main {
2308 + display: none !important;
2309 + }
2310 + }
2311 +
2312 + @media (max-width: 768px) {
2313 + .ays-chart-halloween-banner-2025-main {
2314 + padding: 15px 20px;
2315 + margin: 15px 0;
2316 + }
2317 +
2318 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title {
2319 + font-size: 20px;
2320 + }
2321 +
2322 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-subtitle {
2323 + font-size: 14px;
2324 + }
2325 +
2326 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-description {
2327 + font-size: 13px;
2328 + }
2329 +
2330 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-pumpkin {
2331 + font-size: 48px;
2332 + }
2333 +
2334 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-discount {
2335 + font-size: 28px;
2336 + }
2337 +
2338 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-upgrade {
2339 + padding: 10px 20px;
2340 + font-size: 14px;
2341 + }
2342 + }
2343 +
2344 + @media (max-width: 480px) {
2345 + .ays-chart-halloween-banner-2025-main {
2346 + padding: 12px 15px;
2347 + }
2348 +
2349 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-orb {
2350 + width: 60px;
2351 + height: 60px;
2352 + }
2353 +
2354 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-question {
2355 + font-size: 36px;
2356 + }
2357 +
2358 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title {
2359 + font-size: 18px;
2360 + }
2361 +
2362 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-text {
2363 + font-size: 12px;
2364 + }
2365 + }
2366 + ';
2367 +
2368 + $content[] = '</style>';
2369 +
2370 + $content[] = '<script>';
2371 + $content[] = "
2372 + function aysChartHalloweenCopyToClipboard(text) {
2373 + // Create a temporary textarea element
2374 + var textarea = document.createElement('textarea');
2375 + textarea.value = text;
2376 + textarea.style.position = 'fixed';
2377 + textarea.style.opacity = '0';
2378 + document.body.appendChild(textarea);
2379 +
2380 + // Select and copy the text
2381 + textarea.select();
2382 + textarea.setSelectionRange(0, 99999); // For mobile devices
2383 +
2384 + try {
2385 + document.execCommand('copy');
2386 + aysChartHalloweenShowCopyNotification('Coupon code copied!');
2387 + } catch (err) {
2388 + console.error('Failed to copy text: ', err);
2389 + }
2390 +
2391 + // Remove the temporary textarea
2392 + document.body.removeChild(textarea);
2393 + }
2394 +
2395 + function aysChartHalloweenShowCopyNotification(message) {
2396 + // Check if notification already exists
2397 + var existingNotification = document.querySelector('.ays-chart-halloween-banner-2025-copy-notification');
2398 + if (existingNotification) {
2399 + document.body.removeChild(existingNotification);
2400 + }
2401 +
2402 + // Create notification element
2403 + var notification = document.createElement('div');
2404 + notification.className = 'ays-chart-halloween-banner-2025-copy-notification';
2405 + notification.textContent = message;
2406 + document.body.appendChild(notification);
2407 +
2408 + // Show notification with animation
2409 + setTimeout(function() {
2410 + notification.classList.add('show');
2411 + }, 10);
2412 +
2413 + // Hide and remove notification after 2 seconds
2414 + setTimeout(function() {
2415 + notification.classList.remove('show');
2416 + setTimeout(function() {
2417 + if (notification.parentNode) {
2418 + document.body.removeChild(notification);
2419 + }
2420 + }, 300);
2421 + }, 2000);
2422 + }
2423 +
2424 + (function() {
2425 + var endDate = new Date('". date('Y-m-d H:i:s', $end_date) ."').getTime();
2426 +
2427 + function updateCountdown() {
2428 + var now = new Date().getTime();
2429 + var distance = endDate - now;
2430 +
2431 + if (distance < 0) {
2432 + clearInterval(updateCountdown);
2433 + document.getElementById('ays-chart-halloween-banner-2025-progress-banner-countdown').style.display = 'none';
2434 + return;
2435 + }
2436 +
2437 + var days = Math.floor(distance / (1000 * 60 * 60 * 24));
2438 + var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
2439 + var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
2440 + var seconds = Math.floor((distance % (1000 * 60)) / 1000);
2441 +
2442 + function padZero(num) {
2443 + return num < 10 ? '0' + num : num;
2444 + }
2445 +
2446 + document.getElementById('ays-chart-halloween-banner-2025-days').textContent = padZero(days);
2447 + document.getElementById('ays-chart-halloween-banner-2025-hours').textContent = padZero(hours);
2448 + document.getElementById('ays-chart-halloween-banner-2025-minutes').textContent = padZero(minutes);
2449 + document.getElementById('ays-chart-halloween-banner-2025-seconds').textContent = padZero(seconds);
2450 + }
2451 +
2452 + updateCountdown();
2453 + setInterval(updateCountdown, 1000);
2454 + })()";
2455 + $content[] = '</script>';
2456 +
2457 + $content = implode( '', $content );
2458 + echo ($content);
2459 + }
2460 + }
2461 +
2462 + // Black Friday
2463 + public static function ays_chart_black_friday_message($ishmar){
2464 + if($ishmar == 0 ){
2465 + $content = array();
2466 +
2467 + $ays_chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=black-friday-sale-banner-' . CHART_BUILDER_VERSION);
2468 +
2469 + $content[] = '<div id="ays-chart-dicount-black-friday-month-main" class="ays-chart notice notice-success is-dismissible ays_chart_dicount_info">';
2470 + $content[] = '<div id="ays-chart-dicount-black-friday-month" class="ays_chart_dicount_month">';
2471 + $content[] = '<div class="ays-chart-dicount-black-friday-box">';
2472 + $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-box-80" style="width: 70%;">';
2473 + $content[] = '<div class="">';
2474 + $content[] = '<div class="ays-chart-dicount-black-friday-title-row" >' . __( 'Coupon Code', "ays-popup-box" ) .' ' . '</div>';
2475 + $content[] = '<div class="ays-chart-dicount-black-friday-title-row">';
2476 +
2477 + $content[] = '
2478 + <span class="ays-chart-dicount-black-friday-banner-2025-coupon-wrapper">
2479 + <span class="ays-chart-dicount-black-friday-banner-2025-coupon-box" onclick="aysChartHalloweenCopyToClipboard(\'FREE2PROBF\')" title="Click to copy">
2480 + <span class="ays-chart-dicount-black-friday-banner-2025-coupon-text">FREE2PROBF</span>
2481 + <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="ays-chart-dicount-black-friday-banner-2025-copy-icon">
2482 + <path d="M13.5 2.5H6.5C5.67 2.5 5 3.17 5 4V10C5 10.83 5.67 11.5 6.5 11.5H13.5C14.33 11.5 15 10.83 15 10V4C15 3.17 14.33 2.5 13.5 2.5ZM13.5 10H6.5V4H13.5V10ZM2.5 6.5V12.5C2.5 13.33 3.17 14 4 14H10V12.5H4V6.5H2.5Z" fill="white"/>
2483 + </svg>
2484 + </span>
2485 + </span>';
2486 + $content[] = '</div> ';
1352 2487 $content[] = '</div>';
2488 +
1353 2489 $content[] = '</div>';
1354 -
1355 - $content[] = '</div>';
1356 2490
1357 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1358 - $content[] = '<div>';
2491 + $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-text-box">';
2492 + $content[] = '<div class="ays-chart-dicount-black-friday-text-row">' . '30% off' . '</div>';
2493 + $content[] = '</div>';
1359 2494
1360 - $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".CHART_BUILDER_VERSION."' class='ays-chart-christmas-top-bundle-title-link' target='_blank'>Christmas Sale</a></span>", CHART_BUILDER_NAME );
1362 - $content[] = '</span>';
2495 + $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
2496 + $content[] = '<div id="ays-chart-countdown-main-container">';
2497 + $content[] = '<div class="ays-chart-countdown-container">';
2498 + $content[] = '<div id="ays-chart-countdown" style="display: block;">';
2499 + $content[] = '<ul>';
2500 + $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', "ays-popup-box" ) . '</li>';
2501 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', "ays-popup-box" ) . '</li>';
2502 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', "ays-popup-box" ) . '</li>';
2503 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', "ays-popup-box" ) . '</li>';
2504 + $content[] = '</ul>';
2505 + $content[] = '</div>';
2506 + $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
2507 + $content[] = '<span></span>';
2508 + $content[] = '<span></span>';
2509 + $content[] = '<span></span>';
2510 + $content[] = '<span></span>';
2511 + $content[] = '</div>';
2512 + $content[] = '</div>';
2513 + $content[] = '</div>';
2514 + $content[] = '</div>';
1363 2515
1364 - $content[] = '</br>';
2516 + $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
2517 + $content[] = '<a href="'. $ays_chart_cta_button_link .'" class="ays-chart-dicount-black-friday-button-buy-now" target="_blank">' . __( 'Get Your Deal', "ays-popup-box" ) . '</a>';
2518 + $content[] = '</div>';
2519 + $content[] = '</div>';
2520 + $content[] = '</div>';
1365 2521
1366 - $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'.CHART_BUILDER_VERSION.'" class="ays-chart-christmas-top-bundle-title-link" target="_blank">';
1368 - $content[] = __( "20% Extra OFF", CHART_BUILDER_NAME );
1369 - $content[] = '</a>';
1370 - $content[] = '</span>';
2522 + $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-black-friday">';
2523 + $content[] = '<form action="" method="POST">';
2524 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
2525 + if( current_user_can( 'manage_options' ) ){
2526 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">Dismiss ad</button>';
2527 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
2528 + }
1371 2529 $content[] = '</div>';
2530 + $content[] = '</form>';
2531 + $content[] = '</div>';
2532 + $content[] = '</div>';
1372 2533
1373 - $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
2534 + $content[] = '<script>';
2535 + $content[] = "
2536 + function aysChartHalloweenCopyToClipboard(text) {
2537 + // Create a temporary textarea element
2538 + var textarea = document.createElement('textarea');
2539 + textarea.value = text;
2540 + textarea.style.position = 'fixed';
2541 + textarea.style.opacity = '0';
2542 + document.body.appendChild(textarea);
2543 +
2544 + // Select and copy the text
2545 + textarea.select();
2546 + textarea.setSelectionRange(0, 99999); // For mobile devices
2547 +
2548 + try {
2549 + document.execCommand('copy');
2550 + aysChartHalloweenShowCopyNotification('Coupon code copied!');
2551 + } catch (err) {
2552 + console.error('Failed to copy text: ', err);
2553 + }
2554 +
2555 + // Remove the temporary textarea
2556 + document.body.removeChild(textarea);
2557 + }
1374 2558
1375 - $content[] = '<form action="" method="POST">';
1376 - $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1377 - 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>';
1379 - $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
2559 + function aysChartHalloweenShowCopyNotification(message) {
2560 + // Check if notification already exists
2561 + var existingNotification = document.querySelector('.ays-chart-discount-black-friday-banner-2025-copy-notification');
2562 + if (existingNotification) {
2563 + document.body.removeChild(existingNotification);
2564 + }
2565 +
2566 + // Create notification element
2567 + var notification = document.createElement('div');
2568 + notification.className = 'ays-chart-discount-black-friday-banner-2025-copy-notification';
2569 + notification.textContent = message;
2570 + document.body.appendChild(notification);
2571 +
2572 + // Show notification with animation
2573 + setTimeout(function() {
2574 + notification.classList.add('show');
2575 + }, 10);
2576 +
2577 + // Hide and remove notification after 2 seconds
2578 + setTimeout(function() {
2579 + notification.classList.remove('show');
2580 + setTimeout(function() {
2581 + if (notification.parentNode) {
2582 + document.body.removeChild(notification);
1380 2583 }
2584 + }, 300);
2585 + }, 2000);
2586 + }";
2587 + $content[] = '</script>';
2588 +
2589 + $content[] = '<style>';
2590 + $content[] = '
2591 + /* Black friday banner start */
2592 + div#ays-chart-dicount-black-friday-month-main *{color:#fff}div#ays-chart-dicount-black-friday-month-main div#ays-chart-dicount-black-friday-month a.ays-chart-sale-banner-link:focus{outline:0;box-shadow:0}div#ays-chart-dicount-black-friday-month-main .btn-link{background-color:transparent;display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.375rem .75rem;font-size:12px;line-height:1.5;border-radius:.25rem;color:rgba(255,255,255,.6)}div#ays-chart-dicount-black-friday-month-main.ays_chart_dicount_info{background-image:linear-gradient(45deg,#1e101d,#c60af4);padding:unset;border-left:0}#ays-chart-dicount-black-friday-month-main .ays_chart_dicount_month{position:relative;background-image:url("'. esc_attr(CHART_BUILDER_ADMIN_URL) .'/images/black-friday-plugins-background-image.webp");background-position:center right;background-repeat:no-repeat;background-size:100% 100%}#ays-chart-dicount-black-friday-month-main .ays_chart_dicount_month img{width:80px}#ays-chart-dicount-black-friday-month-main .ays-chart-sale-banner-link{display:flex;justify-content:center;align-items:center;width:200px}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-button-sale{font-style:normal;font-weight:600;font-size:24px;text-align:center;color:#b2ff00;text-transform:uppercase}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box{font-size:14px;padding:12px;text-align:center;width:50%;white-space:nowrap}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box strong{font-size:17px;font-weight:700;letter-spacing:.8px}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-color{color:#971821}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-text-decoration{text-decoration:underline}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box.ays-buy-now-button-box{display:flex;justify-content:flex-end;align-items:center;width:30%}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box .ays-button,#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box .ays-buy-now-button{align-items:center;font-weight:500}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box .ays-buy-now-button{background:#971821;border-color:#fff;display:flex;justify-content:center;align-items:center;padding:5px 15px;font-size:16px;border-radius:5px}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box .ays-buy-now-button:hover{background:#7d161d;border-color:#971821}#ays-chart-dicount-black-friday-month-main #ays-chart-dismiss-buttons-content{display:flex;justify-content:center}#ays-chart-dicount-black-friday-month-main #ays-chart-dismiss-buttons-content .ays-button{margin:0!important;font-size:13px;color:#969393b0}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-opacity-box{width:19%}#ays-chart-dicount-black-friday-month-main .ays-buy-now-opacity-button{padding:40px 15px;display:flex;justify-content:center;align-items:center;opacity:0}#ays-chart-countdown-main-container .ays-chart-countdown-container{margin:0 auto;text-align:center}#ays-chart-countdown-main-container #ays-chart-countdown-headline{letter-spacing:.125rem;text-transform:uppercase;font-size:18px;font-weight:400;margin:0;padding:9px 0 4px;line-height:1.3}#ays-chart-countdown-main-container li,#ays-chart-countdown-main-container ul{margin:0;font-weight:600}#ays-chart-countdown-main-container li{display:inline-block;font-size:10px;list-style-type:none;padding:10px;text-transform:uppercase}#ays-chart-countdown-main-container li span{display:block;font-size:22px;min-height:33px}#ays-chart-countdown-main-container .emoji{display:none;padding:1rem}#ays-chart-countdown-main-container .emoji span{font-size:25px;padding:0 .5rem}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-box{display:flex;justify-content:space-between;align-items:center;width:95%;margin:auto}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-title-row{text-align:center;padding-right:50px;font-style:normal;font-weight:900;font-size:19px;color:#fff;}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-button-buy-now{border:none;outline:0;padding:10px 20px;font-size:22px;text-transform:uppercase;font-weight:700;text-decoration:none;background:linear-gradient(180deg,#dd0bef 0,#82008d 100%);border-radius:16px}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-text-row{text-transform:uppercase;text-shadow:-1.5px 0 #dd0bef,0 1.5px #dd0bef,1.5px 0 #dd0bef,0 -1.5px #dd0bef;font-weight:900;font-style:normal;font-size:40px;line-height:40px;color:#fff}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-text-box{position:absolute;width:25%;top:10px;bottom:0;right:0;left:0;margin:0 auto}#ays-chart-countdown ul{padding:0}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-banner-2025-coupon-box{border:2px dashed rgba(255,255,255,.4);padding:0 12px;border-radius:6px;background:rgba(255,255,255,.1);cursor:pointer;transition:.3s;display:flex;align-items:center;justify-content:center;gap:6px;backdrop-filter:blur(10px);width:fit-content;margin:0 auto}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-banner-2025-coupon-box:hover{background:rgba(255,255,255,.2);border-color:rgba(255,255,255,.6);transform:translateY(-1px)}#ays-chart-dicount-black-friday-month-main .ays-chart-discount-black-friday-banner-2025-coupon-text{font-size:14px;font-weight:700;letter-spacing:1px;color:#fff;font-family:monospace}#ays-chart-dicount-black-friday-month-main .ays-chart-discount-black-friday-banner-2025-copy-icon{opacity:.8;transition:opacity .3s}#ays-chart-dicount-black-friday-month-main .ays-chart-discount-black-friday-banner-banner-2025-coupon-box:hover .ays-chart-discount-black-friday-banner-2025-copy-icon,.ays-chart-discount-black-friday-banner-2025-copy-notification.show{opacity:1}.ays-chart-discount-black-friday-banner-2025-copy-notification{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.8);color:#fff;padding:12px 24px;border-radius:8px;font-size:14px;z-index:10000;opacity:0;transition:opacity .3s}@media screen and (max-width:1400px) and (min-width:1200px){div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-title-row{font-size:15px}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-text-row{font-size:27px}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-box{width:100%}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-button-buy-now{font-size:13px}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box-80{width:80%!important}}@media all and (max-width:1200px){div#ays-chart-dicount-black-friday-month-main .ays_chart_dicount_month{background:unset}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-text-row{font-size:30px}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-box{width:100%}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-button-buy-now{font-size:15px}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box-80{width:80%!important}}@media all and (max-width:1200px) and (min-width:1150px){div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-title-row{font-size:15px}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-button-buy-now{font-size:10px}}@media all and (max-width:1150px){div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box-80{width:80%!important}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-box{flex-direction:column}div#ays-chart-dicount-black-friday-month-main{padding-right:0}div#ays-chart-dicount-black-friday-month-main .ays_chart_dicount_month{display:flex;align-items:center;justify-content:space-between;align-content:center;flex-wrap:wrap;flex-direction:column;padding:10px 0}div#ays-chart-dicount-black-friday-month-main div.ays-chart-dicount-black-friday-wrap-box{width:100%!important;text-align:center}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-title-row,div#ays-chart-dicount-black-friday-month-main #ays-chart-countdown-main-container ul{padding:0;font-size:13px}#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-button-sale,div#ays-chart-countdown-main-container li{font-size:15px}div#ays-chart-countdown-main-container li span{font-size:25px}div#ays-chart-dicount-black-friday-month-main div.ays-chart-dicount-black-friday-wrap-text-box{position:unset}#ays-chart-countdown-main-container #ays-chart-countdown-headline{font-size:15px;font-weight:600}#ays-chart-countdown-main-container ul{font-weight:500}#ays-chart-countdown-main-container li span{font-size:20px}#ays-chart-dicount-black-friday-month-main .ays-button{margin:0 auto!important}div#ays-chart-dicount-black-friday-month-main.ays_chart_dicount_info.notice{background-position:bottom right;background-repeat:no-repeat;background-size:contain;display:flex;justify-content:center;background-image:linear-gradient(45deg,#1e101d,#c60af4)}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box.ays-buy-now-button-box{justify-content:center}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-wrap-box .ays-buy-now-button{font-size:14px;padding:5px 10px}div#ays-chart-dicount-black-friday-month-main .ays-chart-dicount-black-friday-button-buy-now{padding:10px 18px;font-size:15px}}@media all and (max-width:768px){#ays-chart-dicount-black-friday-month-main{display:none!important}}
2593 + ';
2594 + $content[] = '</style>';
2595 +
2596 + $content = implode( '', $content );
2597 +
2598 + echo $content;
2599 + }
2600 + }
2601 +
2602 + // Christmas Banner 2025
2603 + public static function ays_chart_christmas_banner_message_2025($ishmar){
2604 + if($ishmar == 0 ){
2605 + $content = array();
2606 +
2607 + $svg_icon = '<svg width="21" height="22" viewBox="0 0 21 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2608 + <path fill-rule="evenodd" clip-rule="evenodd" d="M10.0445 0C10.4587 0 10.7945 0.33579 10.7945 0.75V2.93934L12.5141 1.21967C12.807 0.92678 13.2819 0.92678 13.5748 1.21967C13.8677 1.51256 13.8677 1.98744 13.5748 2.28033L10.7945 5.06066V9.451L14.5965 7.25588L15.6142 3.45788C15.7214 3.05778 16.1326 2.82034 16.5327 2.92755C16.9328 3.03475 17.1703 3.44601 17.0631 3.84611L16.4336 6.19522L18.3296 5.10055C18.6884 4.89344 19.147 5.01635 19.3542 5.37507C19.5613 5.73379 19.4384 6.19248 19.0796 6.39959L17.1836 7.49426L19.5327 8.1237C19.9328 8.23091 20.1703 8.64216 20.0631 9.0423C19.9558 9.4424 19.5446 9.6798 19.1445 9.5726L15.3465 8.55492L11.5445 10.75L15.3467 12.9452L19.1447 11.9275C19.5448 11.8203 19.956 12.0578 20.0633 12.4579C20.1705 12.858 19.933 13.2692 19.5329 13.3764L17.1838 14.0059L19.0798 15.1005C19.4386 15.3077 19.5615 15.7663 19.3544 16.1251C19.1472 16.4838 18.6886 16.6067 18.3298 16.3996L16.4338 15.3049L17.0633 17.654C17.1705 18.0541 16.933 18.4654 16.5329 18.5726C16.1328 18.6798 15.7216 18.4424 15.6144 18.0423L14.5967 14.2443L10.7945 12.049V16.4393L13.5748 19.2197C13.8677 19.5126 13.8677 19.9874 13.5748 20.2803C13.2819 20.5732 12.807 20.5732 12.5141 20.2803L10.7945 18.5607V20.75C10.7945 21.1642 10.4587 21.5 10.0445 21.5C9.63033 21.5 9.29453 21.1642 9.29453 20.75V18.5607L7.57484 20.2803C7.28195 20.5732 6.80707 20.5732 6.51418 20.2803C6.22129 19.9874 6.22129 19.5126 6.51418 19.2197L9.29453 16.4393V12.049L5.4923 14.2443L4.47463 18.0423C4.36742 18.4424 3.95617 18.6798 3.55607 18.5726C3.15597 18.4654 2.91853 18.0541 3.02574 17.654L3.65518 15.3049L1.75916 16.3996C1.40044 16.6067 0.941743 16.4838 0.734643 16.1251C0.527533 15.7663 0.650443 15.3077 1.00916 15.1005L2.90518 14.0059L0.556073 13.3764C0.155973 13.2692 -0.081467 12.858 0.0257431 12.4579C0.132943 12.0578 0.544203 11.8203 0.944303 11.9275L4.7423 12.9452L8.54453 10.75L4.74249 8.55492L0.944493 9.5726C0.544393 9.6798 0.133143 9.4424 0.0259331 9.0423C-0.0812669 8.64216 0.156163 8.23091 0.556263 8.1237L2.90538 7.49426L1.00935 6.39959C0.650633 6.19248 0.527733 5.73379 0.734833 5.37507C0.941943 5.01635 1.40063 4.89344 1.75935 5.10055L3.65538 6.19522L3.02593 3.84611C2.91873 3.44601 3.15616 3.03475 3.55626 2.92755C3.95636 2.82034 4.36762 3.05778 4.47482 3.45788L5.49249 7.25588L9.29453 9.451V5.06066L6.51418 2.28033C6.22129 1.98744 6.22129 1.51256 6.51418 1.21967C6.80707 0.92678 7.28195 0.92678 7.57484 1.21967L9.29453 2.93934V0.75C9.29453 0.33579 9.63033 0 10.0445 0Z" fill="white" fill-opacity="0.2"/>
2609 + </svg>
2610 + ';
2611 +
2612 + $ays_chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner-' . CHART_BUILDER_VERSION);
2613 +
2614 + $content[] = '<div id="ays-chart-christmas-banner-main" class="notice notice-success is-dismissible ays-chart-christmas-banner-info ays_chart_dicount_info">';
2615 + $content[] = '<div id="ays-chart-christmas-banner-month" class="ays-chart-christmas-banner-month">';
2616 +
2617 + // Background effects
2618 + $content[] = '<div class="ays-chart-christmas-banner-bg-effects">';
2619 + $content[] = '<div class="ays-chart-christmas-banner-bg-gradient-1"></div>';
2620 + $content[] = '<div class="ays-chart-christmas-banner-bg-gradient-2"></div>';
2621 +
2622 + // Snowflakes
2623 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 5%; animation-delay: 0s; animation-duration: 8s;">'. $svg_icon .'</div>';
2624 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 15%; animation-delay: 2s; animation-duration: 10s;">'. $svg_icon .'</div>';
2625 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 25%; animation-delay: 4s; animation-duration: 9s;">'. $svg_icon .'</div>';
2626 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 75%; animation-delay: 1s; animation-duration: 11s;">'. $svg_icon .'</div>';
2627 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 85%; animation-delay: 3s; animation-duration: 8s;">'. $svg_icon .'</div>';
2628 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 92%; animation-delay: 5s; animation-duration: 10s;">'. $svg_icon .'</div>';
2629 +
2630 + // Sparkles
2631 + $content[] = '<svg class="ays-chart-christmas-banner-sparkle" style="top: 20%; left: 8%; animation-delay: 0s; width: 14px; height: 14px;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">';
2632 + $content[] = '<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>';
2633 + $content[] = '</svg>';
2634 + $content[] = '<svg class="ays-chart-christmas-banner-sparkle" style="top: 60%; left: 3%; animation-delay: 0.5s; width: 10px; height: 10px;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">';
2635 + $content[] = '<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>';
2636 + $content[] = '</svg>';
2637 + $content[] = '<svg class="ays-chart-christmas-banner-sparkle" style="top: 30%; right: 12%; animation-delay: 1s; width: 12px; height: 12px;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">';
2638 + $content[] = '<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>';
2639 + $content[] = '</svg>';
2640 + $content[] = '</div>';
2641 +
2642 + // Main content
2643 + $content[] = '<div class="ays-chart-christmas-banner-content">';
2644 + $content[] = '<div class="ays-chart-christmas-banner-left">';
2645 + // Gift icon with hat
2646 + $content[] = '<div class="ays-chart-christmas-banner-gift-wrapper">';
2647 + $content[] = '<svg class="ays-chart-christmas-banner-gift-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">';
2648 + $content[] = '<rect x="3" y="8" width="18" height="4" rx="1"></rect>';
2649 + $content[] = '<path d="M12 8v13"></path>';
2650 + $content[] = '<path d="M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7"></path>';
2651 + $content[] = '<path d="M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5"></path>';
2652 + $content[] = '</svg>';
2653 + $content[] = '<div class="ays-chart-christmas-banner-hat">';
2654 + $content[] = '<svg viewBox="0 0 24 24" fill="none" class="ays-chart-christmas-banner-hat-svg">';
2655 + $content[] = '<path d="M12 2L4 14h16L12 2z" fill="hsl(0 80% 45%)"></path>';
2656 + $content[] = '<path d="M4 14c0 2 3.5 3 8 3s8-1 8-3" fill="hsl(0 0% 100%)"></path>';
2657 + $content[] = '<circle cx="12" cy="3" r="2" fill="hsl(0 0% 100%)"></circle>';
2658 + $content[] = '</svg>';
1381 2659 $content[] = '</div>';
1382 - $content[] = '</form>';
1383 -
2660 + $content[] = '</div>';
2661 +
2662 + $content[] = '<div class="ays-chart-christmas-banner-special-label">';
2663 + $content[] = '<div class="ays-chart-christmas-banner-special-label-name">';
2664 + $content[] = '<a href="'. $ays_chart_cta_button_link .'" class="ays-chart-christmas-banner-special-label-name-link" target="_blank">';
2665 + $content[] = __( 'Chart Builder', "chart-builder" );
2666 + $content[] = '</a>';
2667 + $content[] = '</div>';
2668 +
2669 + $content[] = '<div>✦ ' . __( 'CHRISTMAS SPECIAL', "chart-builder" ) . ' ✦</div>';
2670 + $content[] = '</div>';
1384 2671 $content[] = '</div>';
1385 2672
1386 - $content[] = '</div>';
2673 + $content[] = '<div class="ays-chart-christmas-banner-center">';
2674 + $content[] = '<div class="ays-chart-christmas-banner-discount-text">25% OFF</div>';
2675 + $content[] = '<div class="ays-chart-christmas-banner-limited-offer">' . __( 'Limited time offer', "chart-builder" ) . '</div>';
2676 + $content[] = '</div>';
1387 2677
1388 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-christmas-top-bundle-coupon-text-box">';
1389 - $content[] = '<div class="ays-chart-christmas-top-bundle-coupon-row">';
1390 - $content[] = 'xmas20off';
1391 - $content[] = '</div>';
2678 + $content[] = '<div class="ays-chart-christmas-banner-right">';
2679 + $content[] = '<div class="ays-chart-christmas-banner-coupon-box" onclick="aysChartChristmasCopyToClipboard(\'XMAS25\')" title="' . __( 'Click to copy', "chart-builder" ) . '">';
2680 + $content[] = '<span class="ays-chart-christmas-banner-coupon-text">XMAS25</span>';
2681 + $content[] = '<svg class="ays-chart-christmas-banner-copy-icon" width="16" height="16" viewBox="0 0 16 16" fill="none">';
2682 + $content[] = '<path d="M13.5 2.5H6.5C5.67 2.5 5 3.17 5 4V10C5 10.83 5.67 11.5 6.5 11.5H13.5C14.33 11.5 15 10.83 15 10V4C15 3.17 14.33 2.5 13.5 2.5ZM13.5 10H6.5V4H13.5V10ZM2.5 6.5V12.5C2.5 13.33 3.17 14 4 14H10V12.5H4V6.5H2.5Z" fill="white"/>';
2683 + $content[] = '</svg>';
2684 + $content[] = '</div>';
1392 2685
1393 - $content[] = '<div class="ays-chart-christmas-top-bundle-text-row">';
1394 - $content[] = __( '20% Extra Discount Coupon', CHART_BUILDER_NAME );
2686 + $content[] = '<a href="'. $ays_chart_cta_button_link .'" class="ays-chart-christmas-banner-buy-now-btn" target="_blank">';
2687 + $content[] = __( 'Buy Now', "chart-builder" );
2688 + $content[] = '</a>';
1395 2689 $content[] = '</div>';
1396 2690 $content[] = '</div>';
1397 2691
1398 - $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'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', CHART_BUILDER_NAME ) . '</a>';
1400 - $content[] = '<span class="ays-chart-dicount-one-time-text">';
1401 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1402 - $content[] = '</span>';
1403 - $content[] = '</div>';
1404 2692 $content[] = '</div>';
2693 +
2694 + if( current_user_can( 'manage_options' ) ){
2695 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
2696 + $content[] = '<form action="" method="POST" style="position: absolute; bottom: 0; right: 0; color: #fff;">';
2697 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="color: darkgrey; font-size: 11px; padding: 0 .75rem;">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
2698 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
2699 + $content[] = '</form>';
2700 + $content[] = '</div>';
2701 + }
2702 +
1405 2703 $content[] = '</div>';
1406 2704
2705 + $content[] = '<script>';
2706 + $content[] = "
2707 + function aysChartChristmasCopyToClipboard(text) {
2708 + var textarea = document.createElement('textarea');
2709 + textarea.value = text;
2710 + textarea.style.position = 'fixed';
2711 + textarea.style.opacity = '0';
2712 + document.body.appendChild(textarea);
2713 +
2714 + textarea.select();
2715 + textarea.setSelectionRange(0, 99999);
2716 +
2717 + try {
2718 + document.execCommand('copy');
2719 + aysChartChristmasShowCopyNotification('" . __( 'Coupon code copied!', "chart-builder" ) . "');
2720 + } catch (err) {
2721 + console.error('Failed to copy text: ', err);
2722 + }
2723 +
2724 + document.body.removeChild(textarea);
2725 + }
2726 +
2727 + function aysChartChristmasShowCopyNotification(message) {
2728 + var existingNotification = document.querySelector('.ays-chart-christmas-banner-copy-notification');
2729 + if (existingNotification) {
2730 + document.body.removeChild(existingNotification);
2731 + }
2732 +
2733 + var notification = document.createElement('div');
2734 + notification.className = 'ays-chart-christmas-banner-copy-notification';
2735 + notification.textContent = message;
2736 + document.body.appendChild(notification);
2737 +
2738 + setTimeout(function() {
2739 + notification.classList.add('show');
2740 + }, 10);
2741 +
2742 + setTimeout(function() {
2743 + notification.classList.remove('show');
2744 + setTimeout(function() {
2745 + if (notification.parentNode) {
2746 + document.body.removeChild(notification);
2747 + }
2748 + }, 300);
2749 + }, 2000);
2750 + }";
2751 + $content[] = '</script>';
2752 +
2753 + $content[] = '<style>';
2754 + $content[] = '
2755 + /* Christmas banner start */
2756 +
2757 + div#ays-chart-christmas-banner-main .btn-link {
2758 + background-color: transparent;
2759 + display: inline-block;
2760 + font-weight: 400;
2761 + text-align: center;
2762 + white-space: nowrap;
2763 + vertical-align: middle;
2764 + -webkit-user-select: none;
2765 + -moz-user-select: none;
2766 + -ms-user-select: none;
2767 + user-select: none;
2768 + border: 1px solid transparent;
2769 + padding: .375rem .75rem;
2770 + font-size: 12px;
2771 + line-height: 1.5;
2772 + border-radius: .25rem;
2773 + color: rgba(255, 255, 255, .6);
2774 + }
2775 +
2776 + div#ays-chart-christmas-banner-main.ays-chart-christmas-banner-info {
2777 + background: linear-gradient(to right, hsl(0, 70%, 28%), hsl(0, 65%, 38%), hsl(0, 70%, 28%));
2778 + padding: unset;
2779 + border-left: 0;
2780 + position: relative;
2781 + }
2782 +
2783 + #ays-chart-christmas-banner-main .ays-chart-christmas-banner-month {
2784 + position: relative;
2785 + padding: 15px 40px;
2786 + overflow: hidden;
2787 + }
2788 +
2789 + /* Background effects */
2790 + .ays-chart-christmas-banner-bg-effects {
2791 + position: absolute;
2792 + top: 0;
2793 + left: 0;
2794 + right: 0;
2795 + bottom: 0;
2796 + pointer-events: none;
2797 + z-index: 1;
2798 + }
2799 +
2800 + .ays-chart-christmas-banner-bg-gradient-1 {
2801 + position: absolute;
2802 + top: 0;
2803 + left: 30%;
2804 + width: 40%;
2805 + height: 100%;
2806 + background: radial-gradient(circle, rgba(202, 43, 43, 0.5) 0%, transparent 60%);
2807 + opacity: 0.4;
2808 + }
2809 +
2810 + .ays-chart-christmas-banner-bg-gradient-2 {
2811 + position: absolute;
2812 + top: 0;
2813 + right: 15%;
2814 + width: 35%;
2815 + height: 100%;
2816 + background: radial-gradient(circle, rgba(246, 201, 85, 0.15) 0%, transparent 50%);
2817 + opacity: 0.3;
2818 + }
2819 +
2820 + .ays-chart-christmas-banner-snowflake {
2821 + position: absolute;
2822 + color: rgba(255, 255, 255, 0.2);
2823 + font-size: 20px;
2824 + animation: ays-chart-christmas-snowfall linear infinite;
2825 + top: -10px;
2826 + }
2827 +
2828 + @keyframes ays-chart-christmas-snowfall {
2829 + 0% {
2830 + transform: translateY(-10px) rotate(0deg);
2831 + opacity: 0;
2832 + }
2833 + 10% {
2834 + opacity: 0.8;
2835 + }
2836 + 90% {
2837 + opacity: 0.8;
2838 + }
2839 + 100% {
2840 + transform: translateY(100%) rotate(360deg);
2841 + opacity: 0;
2842 + }
2843 + }
2844 +
2845 + .ays-chart-christmas-banner-sparkle {
2846 + position: absolute;
2847 + color: hsl(43, 90%, 65%);
2848 + animation: ays-chart-christmas-twinkle 2s ease-in-out infinite;
2849 + }
2850 +
2851 + @keyframes ays-chart-christmas-twinkle {
2852 + 0%, 100% {
2853 + opacity: 0.3;
2854 + transform: scale(0.8);
2855 + }
2856 + 50% {
2857 + opacity: 1;
2858 + transform: scale(1.2);
2859 + }
2860 + }
2861 +
2862 + /* Main content */
2863 + .ays-chart-christmas-banner-content {
2864 + position: relative;
2865 + display: flex;
2866 + align-items: center;
2867 + justify-content: space-between;
2868 + z-index: 2;
2869 + }
2870 +
2871 + /* Left section */
2872 + .ays-chart-christmas-banner-left {
2873 + display: flex;
2874 + align-items: center;
2875 + gap: 50px;
2876 + }
2877 +
2878 + .ays-chart-christmas-banner-gift-wrapper {
2879 + position: relative;
2880 + animation: ays-chart-christmas-float 3s ease-in-out infinite;
2881 + }
2882 +
2883 + .ays-chart-christmas-banner-gift-icon {
2884 + width: 48px;
2885 + height: 48px;
2886 + color: rgba(255, 247, 237, 0.9);
2887 + }
2888 +
2889 + @keyframes ays-chart-christmas-float {
2890 + 0%, 100% {
2891 + transform: translateY(0);
2892 + }
2893 + 50% {
2894 + transform: translateY(-5px);
2895 + }
2896 + }
2897 +
2898 + .ays-chart-christmas-banner-hat {
2899 + position: absolute;
2900 + top: -12px;
2901 + right: -4px;
2902 + width: 24px;
2903 + height: 24px;
2904 + }
2905 +
2906 + .ays-chart-christmas-banner-hat-svg {
2907 + width: 100%;
2908 + height: 100%;
2909 + }
2910 +
2911 + .ays-chart-christmas-banner-special-label {
2912 + color: hsl(43, 90%, 65%);
2913 + font-size: 14px;
2914 + font-weight: 500;
2915 + text-transform: uppercase;
2916 + letter-spacing: 1px;
2917 + /* font-family: "Outfit", sans-serif; */
2918 + }
2919 +
2920 + .ays-chart-christmas-banner-special-label-name {
2921 + color: #fffaf0;
2922 + text-align: center;
2923 + }
2924 +
2925 + div#ays-chart-christmas-banner-main .ays-chart-christmas-banner-special-label-name-link {
2926 + color: #fffaf0;
2927 + box-shadow: unset;
2928 + }
2929 +
2930 + /* Center section */
2931 + .ays-chart-christmas-banner-center {
2932 + display: flex;
2933 + flex-direction: row;
2934 + text-align: center;
2935 + justify-content: center;
2936 + align-items: center;
2937 + gap: 30px;
2938 + }
2939 +
2940 + .ays-chart-christmas-banner-discount-text {
2941 + font-family: "Outfit", sans-serif;
2942 + font-weight: 800;
2943 + font-size: 30px;
2944 + color: hsl(40, 100%, 97%);
2945 + letter-spacing: -1px;
2946 + line-height: 1;
2947 + }
2948 +
2949 + .ays-chart-christmas-banner-limited-offer {
2950 + color: rgba(255, 247, 237, 0.7);
2951 + font-size: 13px;
2952 + font-weight: 500;
2953 + }
2954 +
2955 + /* Right section */
2956 + .ays-chart-christmas-banner-right {
2957 + display: flex;
2958 + align-items: center;
2959 + gap: 20px;
2960 + }
2961 +
2962 + .ays-chart-christmas-banner-coupon-box {
2963 + border: 2px dashed rgba(255, 255, 255, 0.4);
2964 + padding: 8px 16px;
2965 + border-radius: 6px;
2966 + background: rgba(255, 255, 255, 0.1);
2967 + cursor: pointer;
2968 + transition: all 0.3s;
2969 + display: flex;
2970 + align-items: center;
2971 + gap: 8px;
2972 + backdrop-filter: blur(10px);
2973 + }
2974 +
2975 + .ays-chart-christmas-banner-coupon-box:hover {
2976 + background: rgba(255, 255, 255, 0.2);
2977 + border-color: rgba(255, 255, 255, 0.6);
2978 + transform: translateY(-1px);
2979 + }
2980 +
2981 + .ays-chart-christmas-banner-coupon-text {
2982 + font-size: 16px;
2983 + font-weight: 700;
2984 + letter-spacing: 1px;
2985 + color: #fff;
2986 + font-family: monospace;
2987 + }
2988 +
2989 + .ays-chart-christmas-banner-copy-icon {
2990 + opacity: 0.8;
2991 + transition: opacity 0.3s;
2992 + }
2993 +
2994 + .ays-chart-christmas-banner-coupon-box:hover .ays-chart-christmas-banner-copy-icon {
2995 + opacity: 1;
2996 + }
2997 +
2998 + #ays-chart-christmas-banner-main .ays-chart-christmas-banner-buy-now-btn {
2999 + background-color: #fbe19f;
3000 + color: hsl(0, 72%, 35%);
3001 + padding: 10px 30px;
3002 + border-radius: 9999px;
3003 + font-size: 16px;
3004 + font-weight: 600;
3005 + font-family: "Outfit", sans-serif;
3006 + border: none;
3007 + cursor: pointer;
3008 + transition: all 0.3s;
3009 + text-decoration: none;
3010 + display: flex;
3011 + align-items: center;
3012 + gap: 6px;
3013 + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 30px rgba(246, 201, 85, 0.2);
3014 + }
3015 +
3016 + #ays-chart-christmas-banner-main .ays-chart-christmas-banner-buy-now-btn:hover {
3017 + background-color: #f2d58c;
3018 + transform: scale(1.05);
3019 + box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), 0 0 40px rgba(246, 201, 85, 0.3);
3020 + }
3021 +
3022 + .ays-chart-christmas-banner-btn-arrow {
3023 + display: inline-block;
3024 + transition: transform 0.3s;
3025 + }
3026 +
3027 + .ays-chart-christmas-banner-buy-now-btn:hover .ays-chart-christmas-banner-btn-arrow {
3028 + transform: translateX(4px);
3029 + }
3030 +
3031 + /* Notification */
3032 + .ays-chart-christmas-banner-copy-notification {
3033 + position: fixed;
3034 + top: 50%;
3035 + left: 50%;
3036 + transform: translate(-50%, -50%);
3037 + background: rgba(0, 0, 0, 0.8);
3038 + color: #fff;
3039 + padding: 12px 24px;
3040 + border-radius: 8px;
3041 + font-size: 14px;
3042 + z-index: 10000;
3043 + opacity: 0;
3044 + transition: opacity 0.3s;
3045 + }
3046 +
3047 + .ays-chart-christmas-banner-copy-notification.show {
3048 + opacity: 1;
3049 + }
3050 +
3051 + /* Dismiss button */
3052 + #ays-chart-christmas-banner-main #ays-chart-christmas-banner-dismiss-content {
3053 + display: flex;
3054 + justify-content: center;
3055 + }
3056 +
3057 + #ays-chart-christmas-banner-main #ays-chart-christmas-banner-dismiss-content .ays-button {
3058 + margin: 0 !important;
3059 + font-size: 13px;
3060 + color: rgba(150, 147, 147, 0.69);
3061 + }
3062 +
3063 + /* Responsive */
3064 + @media (max-width: 1024px) {
3065 + .ays-chart-christmas-banner-discount-text {
3066 + font-size: 40px;
3067 + }
3068 + .ays-chart-christmas-banner-content {
3069 + flex-wrap: wrap;
3070 + }
3071 + }
3072 +
3073 + @media (max-width: 768px) {
3074 + #ays-chart-christmas-banner-main {
3075 + display: none !important;
3076 + }
3077 + }
3078 + /* Christmas banner end */
3079 + ';
3080 + $content[] = '</style>';
3081 +
1407 3082 $content = implode( '', $content );
3083 +
1408 3084 echo $content;
1409 3085 }
1410 3086 }
1411 3087
1412 3088 public function ays_chart_update_banner_time(){
3089 + if (!current_user_can('manage_options')) {
3090 + return array('error' => 'Insufficient permissions');
3091 + }
1413 3092
1414 3093 $date = time() + ( 3 * 24 * 60 * 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1415 3094 // $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);
3095 + $next_3_days = gmdate('M d, Y H:i:s', $date);
1417 3096
1418 3097 $ays_chart_banner_time = get_option('ays_chart_20_bundle_banner_time');
1419 3098
1420 3099 if ( !$ays_chart_banner_time || is_null( $ays_chart_banner_time ) ) {
@@ -1439,9 +3118,9 @@
1439 3118 }
1440 3119
1441 3120 public function author_user_search() {
1442 3121 check_ajax_referer( 'cbuilder-author-user-search', 'security' );
1443 - $params = $_REQUEST['params'];
3122 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1444 3123 $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null;
1445 3124 $checked = isset($params['val']) && $params['val'] !='' ? sanitize_text_field( $params['val'] ) : null;
1446 3125 $args = 'search=';
1447 3126 if ($search !== null) {
@@ -1558,10 +3237,11 @@
1558 3237 */
1559 3238 public function ays_chart_activate_plugin() {
1560 3239
1561 3240 // Run a security check.
1562 - check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
3241 + check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', '_ajax_nonce' );
1563 3242
3243 +
1564 3244 // Check for permissions.
1565 3245 if ( ! current_user_can( 'activate_plugins' ) ) {
1566 3246 wp_send_json_error( esc_html__( 'Plugin activation is disabled for you on this site.', 'chart-builder' ) );
1567 3247 }
@@ -1601,10 +3281,11 @@
1601 3281 */
1602 3282 public function ays_chart_install_plugin() {
1603 3283
1604 3284 // Run a security check.
1605 - check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
3285 + check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', '_ajax_nonce' );
1606 3286
3287 +
1607 3288 $generic_error = esc_html__( 'There was an error while performing your request.', 'chart-builder' );
1608 3289 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : '';
1609 3290
1610 3291 // Check if new installations are allowed.
@@ -1720,11 +3401,12 @@
1720 3401
1721 3402 $images_url = CHART_BUILDER_ADMIN_URL . '/images/icons/';
1722 3403
1723 3404 $plugin_slug = array(
3405 + 'fox-lms',
1724 3406 'quiz-maker',
1725 3407 'survey-maker',
1726 - 'poll-maker',
3408 + 'chart-builder',
1727 3409 'ays-popup-box',
1728 3410 'secure-copy-content-protection',
1729 3411 'gallery-photo-gallery',
1730 3412 'ays-chatgpt-assistant',
@@ -1734,9 +3416,9 @@
1734 3416 $plugin_url_arr = array();
1735 3417 foreach ($plugin_slug as $key => $slug) {
1736 3418 if ( isset( $_SESSION['ays_chart_our_product_links'] ) && !empty( $_SESSION['ays_chart_our_product_links'] )
1737 3419 && 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] ) : "";
3420 + $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 3421 } else {
1740 3422 $latest_version = $this->ays_chart_get_latest_plugin_version($slug);
1741 3423 $plugin_url = 'https://downloads.wordpress.org/plugin/'. $slug .'.zip';
1742 3424 if ( $latest_version != '' ) {
@@ -1748,13 +3430,22 @@
1748 3430 $plugin_url_arr[$slug] = $plugin_url;
1749 3431 }
1750 3432
1751 3433 $plugins_array = array(
3434 + 'fox-lms/fox-lms.php' => array(
3435 + 'icon' => $images_url . 'icon-fox-lms-128x128.png',
3436 + 'name' => __( 'Fox LMS', 'chart-builder' ),
3437 + 'desc' => __( 'Build and manage online courses directly on your WordPress site.', 'chart-builder' ),
3438 + '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' ),
3439 + 'wporg' => 'https://wordpress.org/plugins/fox-lms/',
3440 + 'buy_now' => 'https://foxlms.com/pricing/?utm_source=dashboard&utm_medium=chart-free&utm_campaign=fox-lms-our-products-page',
3441 + 'url' => $plugin_url_arr['fox-lms'],
3442 + ),
1752 3443 'quiz-maker/quiz-maker.php' => array(
1753 3444 '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" ),
3445 + 'name' => __( 'Quiz Maker', 'chart-builder' ),
3446 + 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', 'chart-builder' ),
3447 + 'desc_hidden' => __( 'Build an unlimited number of quizzes and questions.', 'chart-builder' ),
1757 3448 'wporg' => 'https://wordpress.org/plugins/quiz-maker/',
1758 3449 'buy_now' => 'https://ays-pro.com/wordpress/quiz-maker/',
1759 3450 'url' => $plugin_url_arr['quiz-maker'],
1760 3451 ),
@@ -1794,9 +3485,9 @@
1794 3485 'buy_now' => 'https://ays-pro.com/wordpress/secure-copy-content-protection/',
1795 3486 'url' => $plugin_url_arr['secure-copy-content-protection'],
1796 3487 ),
1797 3488 'gallery-photo-gallery/gallery-photo-gallery.php' => array(
1798 - 'icon' => $images_url . 'icon-gallery-128x128.jpg',
3489 + 'icon' => $images_url . 'icon-gallery-128x128.png',
1799 3490 'name' => __( 'Gallery Photo Gallery', 'chart-builder' ),
1800 3491 'desc' => __( 'Create unlimited galleries and include unlimited images in those galleries.', 'chart-builder' ),
1801 3492 '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 3493 'wporg' => 'https://wordpress.org/plugins/gallery-photo-gallery/',
@@ -1996,9 +3687,9 @@
1996 3687 <span aria-hidden="true" class="dashicons dashicons-external"></span>
1997 3688 </a>';
1998 3689 }
1999 3690 $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>
3691 + <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', 'chart-builder') .'</a>
2001 3692 </div>
2002 3693 </div>';
2003 3694 }
2004 3695 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
@@ -2004,9 +3695,9 @@
2004 3695 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
2005 3696 $content.= '<input type="hidden" id="ays_chart_ajax_install_plugin_nonce" name="ays_chart_ajax_install_plugin_nonce" value="'. $install_plugin_nonce .'">';
2006 3697 $content.= '</div>';
2007 3698
2008 - echo $content;
3699 + echo html_entity_decode($content);
2009 3700 }
2010 3701
2011 3702 /**
2012 3703 * Returns the data from Quiz maker.
@@ -2015,9 +3706,9 @@
2015 3706 */
2016 3707 public function fetch_quiz_maker_data(){
2017 3708 check_ajax_referer( 'cbuilder-fetch-quiz-maker-data', 'security' );
2018 3709
2019 - $params = $_POST['params'];
3710 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
2020 3711 if ( !isset($params) || empty($params) ) {
2021 3712 return array(
2022 3713 'success' => false,
2023 3714 'data' => array(
@@ -2139,9 +3830,9 @@
2139 3830 */
2140 3831 public function save_quiz_maker_data() {
2141 3832 check_ajax_referer( 'cbuilder-save-quiz-maker-data', 'security' );
2142 3833
2143 - $params = $_POST['params'];
3834 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
2144 3835 if ( !isset($params) || empty($params) ) {
2145 3836 return array(
2146 3837 'success' => false,
2147 3838 'data' => array(
@@ -2255,9 +3946,9 @@
2255 3946 'data' => array(
2256 3947 'msg' => __( 'Data was successfully saved.', "chart-builder" )
2257 3948 )
2258 3949 );
2259 - }
3950 + }
2260 3951
2261 3952 /**
2262 3953 * Chart page action hooks
2263 3954 */
@@ -2301,9 +3992,9 @@
2301 3992
2302 3993 $sources[] = $content;
2303 3994 }
2304 3995 $content_for_escape = implode('' , $sources );
2305 - echo html_entity_decode(esc_html( $content_for_escape ));
3996 + echo html_entity_decode( esc_html($content_for_escape) );
2306 3997 }
2307 3998
2308 3999 public function source_contents_import_from_csv_settings( $sources, $args ){
2309 4000 $html_class_prefix = $args['html_class_prefix'];
@@ -2315,25 +4006,25 @@
2315 4006 <div class="ays-pro-features-v2-big-buttons-box">
2316 4007 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2317 4008 <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 4009 <div class="ays-pro-features-v2-video-text">
2319 - <?php echo __("Watch Video" , "chart-builder"); ?>
4010 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2320 4011 </div>
2321 4012 </a>
2322 4013 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2323 4014 <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 4015 <div class="ays-pro-features-v2-upgrade-text">
2325 - <?php echo __("Upgrade" , "chart-builder"); ?>
4016 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2326 4017 </div>
2327 4018 </a>
2328 4019 </div>
2329 4020 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main ays-accordion-data-main-wrap">
2330 4021 <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>
4022 + <h6><?php echo esc_html__("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6>
2332 4023 <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>import-files-file-type">
2333 4024 <option value="csv">CSV File</option>
2334 4025 </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>
4026 + <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 4027 <p class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example" style="font-size: 15px; font-style: italic;">Example:
2337 4028 <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 4029 </p>
2339 4030 <div>
@@ -2342,16 +4033,16 @@
2342 4033 <div class='ays-chart-file-import-success'></div>
2343 4034 <div class='ays-chart-file-import-error'></div>
2344 4035 <div class="ays-chart-buttons-group">
2345 4036 <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" ); ?>
4037 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2347 4038 </button>
2348 4039 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-show-on-chart">
2349 4040 <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" ); ?>
4041 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2351 4042 </button>
2352 4043 <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" ); ?>
4044 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2354 4045 </button>
2355 4046 </div>
2356 4047 </div>
2357 4048 </div>
@@ -2381,38 +4072,38 @@
2381 4072 <div class="ays-pro-features-v2-big-buttons-box">
2382 4073 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2383 4074 <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 4075 <div class="ays-pro-features-v2-video-text">
2385 - <?php echo __("Watch Video" , "chart-builder"); ?>
4076 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2386 4077 </div>
2387 4078 </a>
2388 4079 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2389 4080 <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 4081 <div class="ays-pro-features-v2-upgrade-text">
2391 - <?php echo __("Upgrade" , "chart-builder"); ?>
4082 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2392 4083 </div>
2393 4084 </a>
2394 4085 </div>
2395 - <div class="<?= $html_class_prefix ?>source-data-main-wrap ays-accordion-data-main-wrap ">
2396 - <div class="<?= $html_class_prefix ?>chart-source-data-main">
4086 + <div class="<?php echo esc_attr( $html_class_prefix ) ?>source-data-main-wrap ays-accordion-data-main-wrap ">
4087 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main">
2397 4088 <div id="ays-chart-db-query">
2398 - <div class="<?= $html_class_prefix ?>-db-query-form">
4089 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2399 4090 <div id="db-query-form">
2400 4091 <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>
4092 + <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 4093 <div class='db-wizard-success'></div>
2403 4094 <div class='db-wizard-error'></div>
2404 4095 </div>
2405 4096 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2406 4097 <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" ); ?>
4098 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2408 4099 </button>
2409 4100 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-show-on-chart">
2410 4101 <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" ); ?>
4102 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2412 4103 </button>
2413 4104 <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" ); ?>
4105 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2415 4106 </button>
2416 4107 </div>
2417 4108 </div>
2418 4109 <div class="db-wizard-hints">
@@ -2417,9 +4108,18 @@
2417 4108 </div>
2418 4109 <div class="db-wizard-hints">
2419 4110 <ul>
2420 4111 <!-- <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>
4112 + <li>
4113 + <?php
4114 + echo sprintf(
4115 + /* translators: %1$s and %2$s are HTML span tags for styling. */
4116 + esc_html__( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', 'chart-builder' ),
4117 + '<span class="ays-chart-emboss">',
4118 + '</span>'
4119 + );
4120 + ?>
4121 + </li>
2422 4122 </ul>
2423 4123 </div>
2424 4124 </div>
2425 4125 </div>
@@ -2427,9 +4127,9 @@
2427 4127 </div>
2428 4128 <?php
2429 4129 $content = ob_get_clean();
2430 4130
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) . '">
4131 + $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 4132 <i class="ays_fa ays_fa_info_circle"></i>
2433 4133 </a>';
2434 4134
2435 4135 $sources['import_from_db'] = array(
@@ -2450,14 +4150,14 @@
2450 4150 <div class="ays-pro-features-v2-big-buttons-box">
2451 4151 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2452 4152 <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 4153 <div class="ays-pro-features-v2-upgrade-text">
2454 - <?php echo __("Upgrade" , "chart-builder"); ?>
4154 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2455 4155 </div>
2456 4156 </a>
2457 4157 </div>
2458 - <div class="<?= $html_class_prefix ?>source-data-main-wrap ays-accordion-data-main-wrap ">
2459 - <div class="<?= $html_class_prefix ?>chart-source-data-main">
4158 + <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap ays-accordion-data-main-wrap ">
4159 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main">
2460 4160 <div class="form-group row mb-2">
2461 4161 <div class="col-sm-8 <?php echo esc_attr($html_class_prefix) ?>option-title">
2462 4162 <label class="form-label">
2463 4163 <?php echo esc_html(__('Use custom database settings for this chart', "chart-builder")); ?>
@@ -2473,25 +4173,25 @@
2473 4173 </label>
2474 4174 </div>
2475 4175 </div>
2476 4176 <div id="ays-chart-external-db-query">
2477 - <div class="<?= $html_class_prefix ?>-db-query-form">
4177 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2478 4178 <div id="external-db-query-form">
2479 4179 <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>
4180 + <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 4181 <div class='db-wizard-success'></div>
2482 4182 <div class='db-wizard-error'></div>
2483 4183 </div>
2484 4184 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2485 4185 <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" ); ?>
4186 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2487 4187 </button>
2488 4188 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-show-on-chart">
2489 4189 <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" ); ?>
4190 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2491 4191 </button>
2492 4192 <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" ); ?>
4193 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2494 4194 </button>
2495 4195 </div>
2496 4196 </div>
2497 4197 <div class="db-wizard-hints">
@@ -2496,9 +4196,18 @@
2496 4196 </div>
2497 4197 <div class="db-wizard-hints">
2498 4198 <ul>
2499 4199 <!-- <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>
4200 + <li>
4201 + <?php
4202 + echo sprintf(
4203 + /* translators: %1$s and %2$s are HTML span tags for styling. */
4204 + esc_html__( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', 'chart-builder' ),
4205 + '<span class="ays-chart-emboss">',
4206 + '</span>'
4207 + );
4208 + ?>
4209 + </li>
2501 4210 </ul>
2502 4211 </div>
2503 4212 </div>
2504 4213 </div>
@@ -2506,9 +4215,9 @@
2506 4215 </div>
2507 4216 <?php
2508 4217 $content = ob_get_clean();
2509 4218
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) . '">
4219 + $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 4220 <i class="ays_fa ays_fa_info_circle"></i>
2512 4221 </a>';
2513 4222
2514 4223 $sources['import_from_external_db'] = array(
@@ -2542,35 +4251,42 @@
2542 4251 // );
2543 4252
2544 4253 return $sources;
2545 4254 }
4255 + $quizes = $wpdb->get_results( // phpcs:ignore
4256 + $wpdb->prepare(
4257 + "SELECT `title`, `id` FROM {$wpdb->prefix}aysquiz_quizes
4258 + WHERE `published` = %d AND `question_ids` <> %s",
4259 + 1,
4260 + ''
4261 + ),
4262 + ARRAY_A
4263 + );
4264 +
2546 4265
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 4266 ob_start();
2551 4267 ?>
2552 4268 <div class="ays-accordion-data-main-wrap">
2553 4269 <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 4270 <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 ) ?>">
4271 + <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?php echo esc_attr($chart_id) ?>">
4272 + <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">
4273 + <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 4274 <i class="ays_fa ays_fa_info_circle"></i>
2559 4275 </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>
4276 + <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">
4277 + <option value=""><?php echo esc_html__( "Select query", "chart-builder" ) ?></option>
2562 4278 <?php foreach ( $quiz_queries as $id => $q):
2563 4279 $disabled = preg_replace('/[^0-9]/', '', $id) <= 6 ? "false" : "true" ; ?>
2564 - <option value="<?= $id ?>" <?= $quiz_query == $id ? 'selected' : '' ?> <?php echo 'is-pro="'.$disabled.'"'; ?>><?= $q ?></option>
4280 + <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 4281 <?php endforeach; ?>
2566 4282 </select>
2567 4283 </div>
2568 4284 <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>
4285 + <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">
4286 + <option value="0"><?php echo esc_html__( "Select quiz", "chart-builder" ) ?></option>
2571 4287 <?php foreach ( $quizes as $quiz): ?>
2572 - <option value="<?= $quiz['id'] ?>" <?= $quiz_id == $quiz['id'] ? 'selected' : '' ?> ><?= $quiz['title'] ?></option>
4288 + <option value="<?php echo esc_attr($quiz['id']) ?>" <?php echo $quiz_id == $quiz['id'] ? 'selected' : '' ?> ><?php echo esc_html($quiz['title'] )?></option>
2573 4289 <?php endforeach; ?>
2574 4290 </select>
2575 4291 </div>
2576 4292 <div id="ays-chart-quiz-maker-success"></div>
@@ -2576,21 +4292,21 @@
2576 4292 <div id="ays-chart-quiz-maker-success"></div>
2577 4293 <div id="ays-chart-quiz-maker-error"></div>
2578 4294 <div class="ays-chart-buttons-group">
2579 4295 <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" ); ?>
4296 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2581 4297 </button>
2582 4298 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-show-on-chart">
2583 4299 <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" ); ?>
4300 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2585 4301 </button>
2586 4302 <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" ); ?>
4303 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2588 4304 </button>
2589 4305 </div>
2590 4306 </div>
2591 4307 <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>
4308 + <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 4309 </div>
2594 4310 </div>
2595 4311 </div>
2596 4312 <?php
@@ -2595,11 +4311,18 @@
2595 4311 </div>
2596 4312 <?php
2597 4313 $content = ob_get_clean();
2598 4314
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>');
4315 + $title = sprintf(
4316 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
4317 + __( 'Get Quiz Maker data', 'chart-builder' ) .
4318 + ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' .
4319 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
4320 + __( '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' ) . '">
4321 + <i class="ays_fa ays_fa_info_circle"></i>
4322 + </a>',
4323 + '<br>', '<b>', '</b>'
4324 + );
2602 4325 $sources['quiz_maker'] = array(
2603 4326 'content' => $content,
2604 4327 'title' => $title
2605 4328 );
@@ -2622,23 +4345,23 @@
2622 4345 <div class="ays-pro-features-v2-video-button"></div>
2623 4346 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2624 4347 <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 4348 <div class="ays-pro-features-v2-upgrade-text">
2626 - <?php echo __("Upgrade" , "chart-builder"); ?>
4349 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2627 4350 </div>
2628 4351 </a>
2629 4352 </div>
2630 - <div class="<?= $html_class_prefix ?>chart-source-data-main ays-accordion-data-main-wrap ">
4353 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main ays-accordion-data-main-wrap ">
2631 4354 <div id="ays-chart-woocommerce-datas">
2632 - <div class="<?= $html_class_prefix ?>woocommerce-datas-form">
4355 + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-form">
2633 4356 <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 ) ?>">
4357 + <input type="hidden" name="chart_id" value="<?php echo esc_attr( $chart_id )?>">
4358 + <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" >
4359 + <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 4360 <i class="ays_fa ays_fa_info_circle"></i>
2638 4361 </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>
4362 + <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]">
4363 + <option value=""><?php echo esc_html__( 'Select query', 'chart-builder') ?></option>
2641 4364 </select>
2642 4365 </div>
2643 4366 <div class='ays-chart-woocommerce-datas-success'></div>
2644 4367 <div class='ays-chart-woocommerce-datas-error'></div>
@@ -2644,16 +4367,16 @@
2644 4367 <div class='ays-chart-woocommerce-datas-error'></div>
2645 4368 </div>
2646 4369 <div class="ays-chart-buttons-group">
2647 4370 <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" ); ?>
4371 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2649 4372 </button>
2650 4373 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-show-on-chart">
2651 4374 <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" ); ?>
4375 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2653 4376 </button>
2654 4377 <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" ); ?>
4378 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2656 4379 </button>
2657 4380 </div>
2658 4381 </div>
2659 4382 </div>
@@ -2660,12 +4383,19 @@
2660 4383 </div>
2661 4384 </div>
2662 4385 <?php
2663 4386 $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>');
4387 +
4388 + $title = sprintf(
4389 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
4390 + esc_html__( 'Get WooCommerce data', 'chart-builder' ) .
4391 + ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' .
4392 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
4393 + __( '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' ) . '">
4394 + <i class="ays_fa ays_fa_info_circle"></i>
4395 + </a>',
4396 + '<br>', '<b>', '</b>'
4397 + );
2668 4398 $sources['woocommerce'] = array(
2669 4399 'content' => $content,
2670 4400 'title' => $title
2671 4401 );
@@ -2679,9 +4409,10 @@
2679 4409 $source = $args['source'];
2680 4410 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2681 4411 $settings = $args['settings'];
2682 4412 $source_chart_type = $args['source_chart_type'];
2683 - $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : 'add';
4413 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
4414 + $action = isset($_GET['action']) ? sanitize_text_field(wp_unslash($_GET['action'])) : 'add';
2684 4415
2685 4416 if (isset($source) && !empty($source)) {
2686 4417 if ( !isset( $source[0] ) ) {
2687 4418 if (count($source[1]) > 2) {
@@ -2686,15 +4417,15 @@
2686 4417 if ( !isset( $source[0] ) ) {
2687 4418 if (count($source[1]) > 2) {
2688 4419 $titles = array();
2689 4420 for ($i = 0; $i < count($source[1]); $i++) {
2690 - array_push($titles, __("Title", $this->plugin_name).$i);
4421 + array_push($titles, __("Title", 'chart-builder').$i);
2691 4422 }
2692 4423 $source[0] = $titles;
2693 4424 } else {
2694 4425 $source[0] = array(
2695 - __("Country", $this->plugin_name),
2696 - __("Population", $this->plugin_name),
4426 + __("Country", 'chart-builder'),
4427 + __("Population", 'chart-builder'),
2697 4428 );
2698 4429 }
2699 4430
2700 4431 ksort($source);
@@ -2716,9 +4447,9 @@
2716 4447 ?>
2717 4448 <div class="ays-accordion-data-main-wrap">
2718 4449 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2719 4450 <?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">
4451 + <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 4452 <!-- <div class="<//?= $html_class_prefix ?>icons-box">
2722 4453 <img class="<//?= $html_class_prefix ?>add-new-row" src="<//?php echo CHART_BUILDER_ADMIN_URL; ?>/images/icons/add-circle-outline.svg">
2723 4454 </div> -->
2724 4455 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
@@ -2729,14 +4460,14 @@
2729 4460 if ($source_id == 0): ?>
2730 4461 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2731 4462 <div class="ays-chart-empty-data-table-cell"></div>
2732 4463 <?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); ?>">
4464 + <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 4465 <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 4466 <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 4467 </svg>
2737 4468 <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'" : "" ?>>
4469 + <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 4470 <?php if ($each_source_id !== 0): ?>
2740 4471 <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 4472 <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 4473 </svg>
@@ -2758,14 +4489,14 @@
2758 4489 </svg>
2759 4490 </div>
2760 4491 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2761 4492 <?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)); ?>">
4493 + <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); ?>">
4494 + <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 4495 </div>
2765 4496 <?php else: ?>
2766 4497 <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">
4498 + <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 4499 </div>
2769 4500 <?php endif; ?>
2770 4501 <?php endforeach; ?>
2771 4502 </div>
@@ -2772,16 +4503,16 @@
2772 4503 <?php endif; ?>
2773 4504 <?php endif; ?>
2774 4505 <?php endforeach; ?>
2775 4506 <?php else:?>
2776 - <div class="<?= $html_class_prefix ?>chart-source-data-edit-block">
4507 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block">
2777 4508 <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">
4509 + <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 4510 <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 4511 <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 4512 </svg>
2782 4513 <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'>
4514 + <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 4515 <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 4516 <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 4517 </svg>
2787 4518 </div>
@@ -2808,30 +4539,30 @@
2808 4539 <?php endif; ?>
2809 4540 </div>
2810 4541 <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 4542 <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" ); ?>
4543 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2813 4544 </div>
2814 4545 </div>
2815 4546 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2816 4547 <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" ); ?>
4548 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2818 4549 </div>
2819 4550 <br>
2820 4551 <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 4552 <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" ); ?>
4553 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2823 4554 </button>
2824 4555 </div>
2825 4556 <?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">
4557 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
4558 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-org-type">
4559 + <ul id="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-tree-content">
2829 4560 </ul>
2830 4561 </div>
2831 4562 <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 4563 <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" ); ?>
4564 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2834 4565 </button>
2835 4566 </div>
2836 4567 </div>
2837 4568 </div>
@@ -2856,15 +4587,16 @@
2856 4587 $source = $args['source'];
2857 4588 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2858 4589 $settings = $args['settings'];
2859 4590 $source_chart_type = $args['source_chart_type'];
2860 - $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : 'add';
4591 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
4592 + $action = isset($_GET['action']) ? sanitize_text_field((wp_unslash($_GET['action']))) : 'add';
2861 4593
2862 4594 ob_start();
2863 4595 ?>
2864 4596 <div class="ays-accordion-data-main-wrap">
2865 4597 <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">
4598 + <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 4599 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
2868 4600 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content">
2869 4601 <?php if(!empty($source)):
2870 4602 foreach($source as $source_id => $source_value):
@@ -2872,14 +4604,14 @@
2872 4604 if ($source_id == 0): ?>
2873 4605 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2874 4606 <div class="ays-chart-empty-data-table-cell"></div>
2875 4607 <?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); ?>">
4608 + <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 4609 <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 4610 <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 4611 </svg>
2880 4612 <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'" : "" ?>>
4613 + <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 4614 <?php if ($each_source_id !== 0): ?>
2883 4615 <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 4616 <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 4617 </svg>
@@ -2901,14 +4633,14 @@
2901 4633 </svg>
2902 4634 </div>
2903 4635 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2904 4636 <?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)); ?>">
4637 + <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); ?>">
4638 + <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 4639 </div>
2908 4640 <?php else: ?>
2909 4641 <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">
4642 + <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 4643 </div>
2912 4644 <?php endif; ?>
2913 4645 <?php endforeach; ?>
2914 4646 </div>
@@ -2915,16 +4647,16 @@
2915 4647 <?php endif; ?>
2916 4648 <?php endif; ?>
2917 4649 <?php endforeach; ?>
2918 4650 <?php else:?>
2919 - <div class="<?= $html_class_prefix ?>chart-source-data-edit-block">
4651 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block">
2920 4652 <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">
4653 + <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 4654 <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 4655 <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 4656 </svg>
2925 4657 <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'>
4658 + <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 4659 <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 4660 <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 4661 </svg>
2930 4662 </div>
@@ -2951,19 +4683,19 @@
2951 4683 <?php endif; ?>
2952 4684 </div>
2953 4685 <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 4686 <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" ); ?>
4687 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2956 4688 </div>
2957 4689 </div>
2958 4690 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2959 4691 <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" ); ?>
4692 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2961 4693 </div>
2962 4694 <br>
2963 4695 <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 4696 <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" ); ?>
4697 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2966 4698 </button>
2967 4699 </div>
2968 4700 </div>
2969 4701 </div>
@@ -3019,9 +4751,9 @@
3019 4751
3020 4752 $sources[] = $content;
3021 4753 }
3022 4754 $content_for_escape = implode('' , $sources );
3023 - echo html_entity_decode(esc_html( $content_for_escape ));
4755 + echo html_entity_decode( $content_for_escape );
3024 4756 }
3025 4757
3026 4758 public function settings_contents_general_settings( $sources, $args ){
3027 4759 $html_class_prefix = $args['html_class_prefix'];
@@ -3296,9 +5028,9 @@
3296 5028 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3297 5029 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3298 5030 <label for="ays-chart-option-tooltip-trigger">
3299 5031 <?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") ); ?>">
5032 + <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 5033 <i class="ays_fa ays_fa_info_circle"></i>
3302 5034 </a>
3303 5035 </label>
3304 5036 </div>
@@ -3347,9 +5079,9 @@
3347 5079 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3348 5080 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3349 5081 <label for="ays-chart-option-tooltip-font-size" class="form-label">
3350 5082 <?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") ); ?>">
5083 + <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 5084 <i class="ays_fa ays_fa_info_circle"></i>
3353 5085 </a>
3354 5086 </label>
3355 5087 </div>
@@ -3377,9 +5109,9 @@
3377 5109 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3378 5110 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3379 5111 <label for="ays-chart-option-tooltip-bold">
3380 5112 <?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") ); ?>">
5113 + <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 5114 <i class="ays_fa ays_fa_info_circle"></i>
3383 5115 </a>
3384 5116 </label>
3385 5117 </div>
@@ -3410,8 +5142,47 @@
3410 5142
3411 5143 return $sources;
3412 5144 }
3413 5145
5146 + public function settings_contents_tooltip_settings_chartjs( $sources, $args ){
5147 + $html_class_prefix = $args['html_class_prefix'];
5148 + $html_name_prefix = $args['html_name_prefix'];
5149 + $settings = $args['settings'];
5150 +
5151 + $tooltip_text_color = $settings['tooltip_text_color'];
5152 +
5153 + ob_start();
5154 + ?>
5155 + <div class="ays-accordion-data-main-wrap ">
5156 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
5157 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5158 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5159 + <label for="ays-chart-option-tooltip-text-color">
5160 + <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
5161 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the tooltip text.","chart-builder") ); ?>">
5162 + <i class="ays_fa ays_fa_info_circle"></i>
5163 + </a>
5164 + </label>
5165 + </div>
5166 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5167 + <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) ?>">
5168 + </div>
5169 + </div> <!-- Text color -->
5170 + </div>
5171 + </div>
5172 + <?php
5173 + $content = ob_get_clean();
5174 +
5175 + $title = __( 'Tooltip', "chart-builder" );
5176 +
5177 + $sources['tooltip'] = array(
5178 + 'content' => $content,
5179 + 'title' => $title
5180 + );
5181 +
5182 + return $sources;
5183 + }
5184 +
3414 5185 public function settings_contents_legend_settings( $sources, $args ){
3415 5186 $html_class_prefix = $args['html_class_prefix'];
3416 5187 $html_name_prefix = $args['html_name_prefix'];
3417 5188 $settings = $args['settings'];
@@ -3431,9 +5202,9 @@
3431 5202 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3432 5203 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3433 5204 <label for="ays-chart-option-legend-position">
3434 5205 <?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") ); ?>">
5206 + <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 5207 <i class="ays_fa ays_fa_info_circle"></i>
3437 5208 </a>
3438 5209 </label>
3439 5210 </div>
@@ -3464,9 +5235,9 @@
3464 5235 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3465 5236 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3466 5237 <label for="ays-chart-option-legend-alignment">
3467 5238 <?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") ); ?>">
5239 + <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 5240 <i class="ays_fa ays_fa_info_circle"></i>
3470 5241 </a>
3471 5242 </label>
3472 5243 </div>
@@ -3486,9 +5257,9 @@
3486 5257 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3487 5258 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3488 5259 <label for="ays-chart-option-legend-font-color">
3489 5260 <?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") ); ?>">
5261 + <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 5262 <i class="ays_fa ays_fa_info_circle"></i>
3492 5263 </a>
3493 5264 </label>
3494 5265 </div>
@@ -3499,9 +5270,9 @@
3499 5270 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3500 5271 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3501 5272 <label for="ays-chart-option-legend-font-size" class="form-label">
3502 5273 <?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") ); ?>">
5274 + <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 5275 <i class="ays_fa ays_fa_info_circle"></i>
3505 5276 </a>
3506 5277 </label>
3507 5278 </div>
@@ -3556,8 +5327,159 @@
3556 5327
3557 5328 return $sources;
3558 5329 }
3559 5330
5331 + public function settings_contents_legend_settings_chartjs( $sources, $args ){
5332 + $html_class_prefix = $args['html_class_prefix'];
5333 + $html_name_prefix = $args['html_name_prefix'];
5334 + $settings = $args['settings'];
5335 + $legend_positions = $settings['legend_positions'];
5336 + $legend_position = $settings['legend_position'];
5337 + $legend_alignments = $settings['legend_alignments'];
5338 + $legend_alignment = $settings['legend_alignment'];
5339 + $legend_color = $settings['legend_color'];
5340 + $legend_font_size = $settings['legend_font_size'];
5341 + $legend_reverse = $settings['legend_reverse'];
5342 + $legend_bold = $settings['legend_bold'];
5343 + $legend_italic = $settings['legend_italic'];
5344 + ob_start();
5345 + ?>
5346 + <div class="ays-accordion-data-main-wrap">
5347 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
5348 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5349 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5350 + <label for="ays-chart-option-legend-position">
5351 + <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5352 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") )); ?>">
5353 + <i class="ays_fa ays_fa_info_circle"></i>
5354 + </a>
5355 + </label>
5356 + </div>
5357 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5358 + <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]">
5359 + <?php
5360 + foreach ( $legend_positions as $option_slug => $option ):
5361 + $selected = ( $legend_position == $option_slug ) ? 'selected' : '';
5362 + ?>
5363 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?> ><?php echo esc_html($option); ?></option>
5364 + <?php
5365 + endforeach;
5366 + ?>
5367 + </select>
5368 + </div>
5369 + </div> <!-- Legend position -->
5370 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5371 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5372 + <label for="ays-chart-option-legend-alignment">
5373 + <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
5374 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") )); ?>">
5375 + <i class="ays_fa ays_fa_info_circle"></i>
5376 + </a>
5377 + </label>
5378 + </div>
5379 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5380 + <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]">
5381 + <?php
5382 + foreach ( $legend_alignments as $option_slug => $option ):
5383 + $selected = ( $legend_alignment == $option_slug ) ? 'selected' : '';
5384 + ?>
5385 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
5386 + <?php
5387 + endforeach;
5388 + ?>
5389 + </select>
5390 + </div>
5391 + </div> <!-- Legend alignment -->
5392 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5393 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5394 + <label for="ays-chart-option-legend-font-color">
5395 + <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
5396 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") )); ?>">
5397 + <i class="ays_fa ays_fa_info_circle"></i>
5398 + </a>
5399 + </label>
5400 + </div>
5401 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5402 + <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) ?>">
5403 + </div>
5404 + </div> <!-- Legend font color -->
5405 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5406 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5407 + <label for="ays-chart-option-legend-font-size" class="form-label">
5408 + <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5409 + <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") )); ?>">
5410 + <i class="ays_fa ays_fa_info_circle"></i>
5411 + </a>
5412 + </label>
5413 + </div>
5414 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5415 + <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) ?>">
5416 + <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
5417 + </div>
5418 + </div> <!-- Font size -->
5419 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5420 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5421 + <label for="ays-chart-option-legend-italic">
5422 + <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5423 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart legend text italic.","chart-builder") ); ?>">
5424 + <i class="ays_fa ays_fa_info_circle"></i>
5425 + </a>
5426 + </label>
5427 + </div>
5428 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5429 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5430 + <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); ?> >
5431 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5432 + </label>
5433 + </div>
5434 + </div> <!-- Italic text -->
5435 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5436 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5437 + <label for="ays-chart-option-legend-bold">
5438 + <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5439 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart legend text bold.","chart-builder") ); ?>">
5440 + <i class="ays_fa ays_fa_info_circle"></i>
5441 + </a>
5442 + </label>
5443 + </div>
5444 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5445 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5446 + <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); ?> >
5447 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5448 + </label>
5449 + </div>
5450 + </div> <!-- Bold text -->
5451 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt">
5452 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5453 + <label for="ays-chart-option-legend-revers">
5454 + <?php echo esc_html(__( "Show datasets in reverse order", "chart-builder" )); ?>
5455 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this toggle to show datasets in reverse ordering.","chart-builder") ); ?>">
5456 + <i class="ays_fa ays_fa_info_circle"></i>
5457 + </a>
5458 + </label>
5459 + </div>
5460 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5461 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5462 + <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); ?> >
5463 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5464 + </label>
5465 + </div>
5466 + </div> <!-- reverse datasets -->
5467 + </div>
5468 + </div>
5469 + <?php
5470 + $content = ob_get_clean();
5471 +
5472 + $title = __( 'Legend', "chart-builder" );
5473 +
5474 + $sources['legend'] = array(
5475 + 'content' => $content,
5476 + 'title' => $title
5477 + );
5478 +
5479 + return $sources;
5480 + }
5481 +
3560 5482 public function settings_contents_horizontal_axis_settings( $sources, $args ){
3561 5483 $html_class_prefix = $args['html_class_prefix'];
3562 5484 $html_name_prefix = $args['html_name_prefix'];
3563 5485 $settings = $args['settings'];
@@ -3573,8 +5495,9 @@
3573 5495 $haxis_slanted_text_angle = $settings['haxis_slanted_text_angle'];
3574 5496 $haxis_show_text_every = $settings['haxis_show_text_every'];
3575 5497 $haxis_format_options = $settings['axes_format_options'];
3576 5498 $haxis_format = $settings['haxis_format'];
5499 + $haxis_enable_divide_percent = $settings['haxis_enable_divide_percent'];
3577 5500 $haxis_label_font_size = $settings['haxis_label_font_size'];
3578 5501 $haxis_max_value = $settings['haxis_max_value'];
3579 5502 $haxis_min_value = $settings['haxis_min_value'];
3580 5503 $haxis_text_font_size = $settings['haxis_text_font_size'];
@@ -3588,9 +5511,9 @@
3588 5511 $haxis_minor_gridlines_color = $settings['haxis_minor_gridlines_color'];
3589 5512
3590 5513 ob_start();
3591 5514 ?>
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">
5515 + <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 5516 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3594 5517 <h6>Label</h6>
3595 5518 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3596 5519 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3595,9 +5518,9 @@
3595 5518 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3596 5519 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3597 5520 <label for="ays-chart-option-haxis-title" class="form-label">
3598 5521 <?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") ); ?>">
5522 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the horizontal axis","chart-builder") ); ?>">
3600 5523 <i class="ays_fa ays_fa_info_circle"></i>
3601 5524 </a>
3602 5525 </label>
3603 5526 </div>
@@ -3682,9 +5605,9 @@
3682 5605 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3683 5606 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3684 5607 <label for="ays-chart-option-haxis-text-position" class="form-label">
3685 5608 <?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") ); ?>">
5609 + <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 5610 <i class="ays_fa ays_fa_info_circle"></i>
3688 5611 </a>
3689 5612 </label>
3690 5613 </div>
@@ -3865,32 +5788,40 @@
3865 5788 <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 5789 </div>
3867 5790 </div> <!-- Horizontal axis baseline color -->
3868 5791
3869 - <br>
3870 - <h6>Format</h6>
3871 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5792 + <br class="cb-changable-opt cb-bar_chart-opt " >
5793 + <h6 class="cb-changable-opt cb-bar_chart-opt">Format</h6>
5794 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt " >
3872 5795 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3873 5796 <label for="ays-chart-option-haxis-format" class="form-label">
3874 5797 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
3875 5798 <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 - ) );
5799 + echo esc_attr( sprintf(
5800 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
5801 + "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
5802 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
5803 + __('%1$sNone:%2$s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
5804 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
5805 + __('%1$sDecimal:%2$s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
5806 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
5807 + __('%1$sScientific:%2$s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
5808 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
5809 + __('%1$sCurrency:%2$s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
5810 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
5811 + __('%1$sPercent:%2$s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
5812 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
5813 + __('%1$sShort:%2$s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
5814 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
5815 + __('%1$sLong:%2$s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
5816 + '<em>', '</em>',
5817 + '<em>', '</em>',
5818 + '<em>', '</em>',
5819 + '<em>', '</em>',
5820 + '<em>', '</em>',
5821 + '<em>', '</em>',
5822 + '<em>', '</em>'
5823 + ));
3893 5824 ?>">
3894 5825 <i class="ays_fa ays_fa_info_circle"></i>
3895 5826 </a>
3896 5827 </label>
@@ -3907,10 +5838,26 @@
3907 5838 ?>
3908 5839 </select>
3909 5840 </div>
3910 5841 </div> <!-- Horizontal axis format -->
3911 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5842 + <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 5843 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5844 + <label for="ays-chart-option-haxis-enable-divide-percent">
5845 + <?php echo esc_html(__( "Remove Extra Zeros ", "chart-builder" )); ?>
5846 + <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") ); ?>">
5847 + <i class="ays_fa ays_fa_info_circle"></i>
5848 + </a>
5849 + </label>
5850 + </div>
5851 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5852 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5853 + <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); ?> >
5854 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5855 + </label>
5856 + </div>
5857 + </div> <!--Remove Extra Zeros"-->
5858 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt" >
5859 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3913 5860 <label for="ays-chart-option-haxis-max-value" class="form-label">
3914 5861 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
3915 5862 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
3916 5863 <i class="ays_fa ays_fa_info_circle"></i>
@@ -3920,9 +5867,9 @@
3920 5867 <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 5868 <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 5869 </div>
3923 5870 </div> <!-- Horizontal axis max value -->
3924 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5871 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt" >
3925 5872 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3926 5873 <label for="ays-chart-option-haxis-min-value" class="form-label">
3927 5874 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
3928 5875 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -3961,8 +5908,9 @@
3961 5908 $vaxis_text_color = $settings['vaxis_text_color'];
3962 5909 $vaxis_baseline_color = $settings['vaxis_baseline_color'];
3963 5910 $vaxis_format_options = $settings['axes_format_options'];
3964 5911 $vaxis_format = $settings['vaxis_format'];
5912 + $vaxis_enable_divide_percent = $settings['vaxis_enable_divide_percent'];
3965 5913 $vaxis_label_font_size = $settings['vaxis_label_font_size'];
3966 5914 $vaxis_max_value = $settings['vaxis_max_value'];
3967 5915 $vaxis_min_value = $settings['vaxis_min_value'];
3968 5916 $vaxis_text_font_size = $settings['vaxis_text_font_size'];
@@ -3976,9 +5924,9 @@
3976 5924 $vaxis_minor_gridlines_color = $settings['vaxis_minor_gridlines_color'];
3977 5925
3978 5926 ob_start();
3979 5927 ?>
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">
5928 + <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 5929 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3982 5930 <h6>Label</h6>
3983 5931 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3984 5932 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3983,9 +5931,9 @@
3983 5931 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3984 5932 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3985 5933 <label for="ays-chart-option-vaxis-title" class="form-label">
3986 5934 <?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") ); ?>">
5935 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the vertical axis","chart-builder") ); ?>">
3988 5936 <i class="ays_fa ays_fa_info_circle"></i>
3989 5937 </a>
3990 5938 </label>
3991 5939 </div>
@@ -4057,9 +6005,9 @@
4057 6005 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4058 6006 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4059 6007 <label for="ays-chart-option-vaxis-text-position" class="form-label">
4060 6008 <?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") ); ?>">
6009 + <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 6010 <i class="ays_fa ays_fa_info_circle"></i>
4063 6011 </a>
4064 6012 </label>
4065 6013 </div>
@@ -4205,24 +6153,32 @@
4205 6153 <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 6154 </div>
4207 6155 </div> <!-- Vertical axis baseline color -->
4208 6156
4209 - <br>
4210 - <h6>Format</h6>
4211 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6157 + <br class="cb-changable-opt cb-column_chart-opt cb-line_chart-opt">
6158 + <h6 class="cb-changable-opt cb-column_chart-opt cb-line_chart-opt">Format</h6>
6159 + <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 6160 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4213 6161 <label for="ays-chart-option-vaxis-format" class="form-label">
4214 6162 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
4215 6163 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4216 - echo htmlspecialchars( sprintf (
6164 + echo esc_attr( sprintf(
6165 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4217 6166 "<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>",
6167 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6168 + __('%1$sNone:%2$s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
6169 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6170 + __('%1$sDecimal:%2$s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
6171 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6172 + __('%1$sScientific:%2$s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
6173 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6174 + __('%1$sCurrency:%2$s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
6175 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6176 + __('%1$sPercent:%2$s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
6177 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6178 + __('%1$sShort:%2$s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
6179 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6180 + __('%1$sLong:%2$s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
4225 6181 '<em>', '</em>',
4226 6182 '<em>', '</em>',
4227 6183 '<em>', '</em>',
4228 6184 '<em>', '</em>',
@@ -4228,9 +6184,9 @@
4228 6184 '<em>', '</em>',
4229 6185 '<em>', '</em>',
4230 6186 '<em>', '</em>',
4231 6187 '<em>', '</em>'
4232 - ) );
6188 + ));
4233 6189 ?>">
4234 6190 <i class="ays_fa ays_fa_info_circle"></i>
4235 6191 </a>
4236 6192 </label>
@@ -4247,10 +6203,26 @@
4247 6203 ?>
4248 6204 </select>
4249 6205 </div>
4250 6206 </div> <!-- Vertical axis format -->
4251 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6207 + <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 6208 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6209 + <label for="ays-chart-option-vaxis-enable-divide-percent">
6210 + <?php echo esc_html(__( "Remove Extra Zeros", "chart-builder" )); ?>
6211 + <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") ); ?>">
6212 + <i class="ays_fa ays_fa_info_circle"></i>
6213 + </a>
6214 + </label>
6215 + </div>
6216 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6217 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
6218 + <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); ?> >
6219 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
6220 + </label>
6221 + </div>
6222 + </div> <!--Remove Extra Zeros-->
6223 + <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">
6224 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4253 6225 <label for="ays-chart-option-vaxis-max-value" class="form-label">
4254 6226 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
4255 6227 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
4256 6228 <i class="ays_fa ays_fa_info_circle"></i>
@@ -4260,9 +6232,9 @@
4260 6232 <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 6233 <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 6234 </div>
4263 6235 </div> <!-- Vertical axis max value -->
4264 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6236 + <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 6237 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4266 6238 <label for="ays-chart-option-vaxis-min-value" class="form-label">
4267 6239 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
4268 6240 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -4301,9 +6273,9 @@
4301 6273 $animation_easing = $settings['animation_easing'];
4302 6274
4303 6275 ob_start();
4304 6276 ?>
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">
6277 + <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 6278 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4307 6279 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4308 6280 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4309 6281 <label for="ays-chart-option-enable-animation">
@@ -4354,23 +6326,24 @@
4354 6326 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4355 6327 <label for="ays-chart-option-animation-easing" class="form-label">
4356 6328 <?php echo esc_html(__( "Easing", "chart-builder" )); ?>
4357 6329 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4358 - echo htmlspecialchars( sprintf(
6330 + echo esc_attr( sprintf(
6331 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4359 6332 "<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 - ) );
6333 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6334 + __('%1$sLinear:%2$s Constant speed.', "chart-builder") . "</li><li>" .
6335 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6336 + __('%1$sEase in:%2$s Start slow and speed up.', "chart-builder") . "</li><li>" .
6337 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6338 + __('%1$sEase out:%2$s Start fast and slow down.', "chart-builder") . "</li><li>" .
6339 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6340 + __('%1$sEase in and out:%2$s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
6341 + '<em>', '</em>',
6342 + '<em>', '</em>',
6343 + '<em>', '</em>',
6344 + '<em>', '</em>'
6345 + ));
4373 6346 ?>">
4374 6347 <i class="ays_fa ays_fa_info_circle"></i>
4375 6348 </a>
4376 6349 </label>
@@ -4409,9 +6382,9 @@
4409 6382 $html_name_prefix = $args['html_name_prefix'];
4410 6383
4411 6384 ob_start();
4412 6385 ?>
4413 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-live-chart-settings-tab">
6386 + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-live-chart-settings-tab">
4414 6387 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4415 6388 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4416 6389 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4417 6390 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4416,15 +6389,15 @@
4416 6389 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4417 6390 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4418 6391 <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 6392 <div class="ays-pro-features-v2-video-text">
4420 - <?php echo __("Watch Video" , "chart-builder"); ?>
6393 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4421 6394 </div>
4422 6395 </a>
4423 6396 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4424 6397 <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 6398 <div class="ays-pro-features-v2-upgrade-text">
4426 - <?php echo __("Upgrade" , "chart-builder"); ?>
6399 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4427 6400 </div>
4428 6401 </a>
4429 6402 </div>
4430 6403 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4446,15 +6419,15 @@
4446 6419 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4447 6420 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4448 6421 <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 6422 <div class="ays-pro-features-v2-video-text">
4450 - <?php echo __("Watch Video" , "chart-builder"); ?>
6423 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4451 6424 </div>
4452 6425 </a>
4453 6426 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4454 6427 <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 6428 <div class="ays-pro-features-v2-upgrade-text">
4456 - <?php echo __("Upgrade" , "chart-builder"); ?>
6429 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4457 6430 </div>
4458 6431 </a>
4459 6432 </div>
4460 6433 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4494,9 +6467,9 @@
4494 6467 $enable_img = $settings['enable_img'];
4495 6468
4496 6469 ob_start();
4497 6470 ?>
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">
6471 + <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 6472 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4500 6473 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4501 6474 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4502 6475 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4501,15 +6474,15 @@
4501 6474 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4502 6475 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4503 6476 <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 6477 <div class="ays-pro-features-v2-video-text">
4505 - <?php echo __("Watch Video" , "chart-builder"); ?>
6478 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4506 6479 </div>
4507 6480 </a>
4508 6481 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4509 6482 <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 6483 <div class="ays-pro-features-v2-upgrade-text">
4511 - <?php echo __("Upgrade" , "chart-builder"); ?>
6484 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4512 6485 </div>
4513 6486 </a>
4514 6487 </div>
4515 6488 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4531,15 +6504,15 @@
4531 6504 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4532 6505 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4533 6506 <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 6507 <div class="ays-pro-features-v2-video-text">
4535 - <?php echo __("Watch Video" , "chart-builder"); ?>
6508 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4536 6509 </div>
4537 6510 </a>
4538 6511 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4539 6512 <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 6513 <div class="ays-pro-features-v2-upgrade-text">
4541 - <?php echo __("Upgrade" , "chart-builder"); ?>
6514 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4542 6515 </div>
4543 6516 </a>
4544 6517 </div>
4545 6518 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4561,15 +6534,15 @@
4561 6534 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4562 6535 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4563 6536 <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 6537 <div class="ays-pro-features-v2-video-text">
4565 - <?php echo __("Watch Video" , "chart-builder"); ?>
6538 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4566 6539 </div>
4567 6540 </a>
4568 6541 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4569 6542 <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 6543 <div class="ays-pro-features-v2-upgrade-text">
4571 - <?php echo __("Upgrade" , "chart-builder"); ?>
6544 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4572 6545 </div>
4573 6546 </a>
4574 6547 </div>
4575 6548 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4591,15 +6564,15 @@
4591 6564 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4592 6565 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4593 6566 <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 6567 <div class="ays-pro-features-v2-video-text">
4595 - <?php echo __("Watch Video" , "chart-builder"); ?>
6568 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4596 6569 </div>
4597 6570 </a>
4598 6571 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4599 6572 <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 6573 <div class="ays-pro-features-v2-upgrade-text">
4601 - <?php echo __("Upgrade" , "chart-builder"); ?>
6574 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4602 6575 </div>
4603 6576 </a>
4604 6577 </div>
4605 6578 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4627,9 +6600,9 @@
4627 6600 </label>
4628 6601 </div>
4629 6602 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4630 6603 <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?> >
6604 + <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 6605 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4633 6606 </label>
4634 6607 </div>
4635 6608 </div> <!-- IMG option end -->
@@ -4686,9 +6659,9 @@
4686 6659
4687 6660 $sources[] = $content;
4688 6661 }
4689 6662 $content_for_escape = implode('' , $sources );
4690 - echo html_entity_decode(esc_html( $content_for_escape ));
6663 + echo html_entity_decode( esc_html($content_for_escape) );
4691 6664 }
4692 6665
4693 6666 public function settings_contents_chart_styles_settings( $sources, $args ){
4694 6667 $html_class_prefix = $args['html_class_prefix'];
@@ -4727,9 +6700,9 @@
4727 6700 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4728 6701 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4729 6702 <label for="ays-chart-option-width" class="form-label">
4730 6703 <?php echo esc_html(__( "Width", "chart-builder" )); ?>
4731 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container, in percents.","chart-builder") ); ?>">
6704 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container, in percents.","chart-builder") ); ?>">
4732 6705 <i class="ays_fa ays_fa_info_circle"></i>
4733 6706 </a>
4734 6707 </label>
4735 6708 </div>
@@ -4750,9 +6723,9 @@
4750 6723 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4751 6724 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4752 6725 <label for="ays-chart-option-responsive-width" class="form-label">
4753 6726 <?php echo esc_html(__( "Responsive Width", "chart-builder" )); ?>
4754 - <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") ); ?>">
6727 + <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") ); ?>">
4755 6728 <i class="ays_fa ays_fa_info_circle"></i>
4756 6729 </a>
4757 6730 </label>
4758 6731 </div>
@@ -4766,9 +6739,9 @@
4766 6739 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4767 6740 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4768 6741 <label for="ays-chart-option-position">
4769 6742 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4770 - <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") ); ?>">
6743 + <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") ); ?>">
4771 6744 <i class="ays_fa ays_fa_info_circle"></i>
4772 6745 </a>
4773 6746 </label>
4774 6747 </div>
@@ -4788,9 +6761,9 @@
4788 6761 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4789 6762 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4790 6763 <label for="ays-chart-option-height" class="form-label">
4791 6764 <?php echo esc_html(__( "Height", "chart-builder" )); ?>
4792 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
6765 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
4793 6766 <i class="ays_fa ays_fa_info_circle"></i>
4794 6767 </a>
4795 6768 </label>
4796 6769 </div>
@@ -4811,9 +6784,9 @@
4811 6784 <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">
4812 6785 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4813 6786 <label for="ays-chart-option-font-size" class="form-label">
4814 6787 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
4815 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart text.","chart-builder") ); ?>">
6788 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart text.","chart-builder") ); ?>">
4816 6789 <i class="ays_fa ays_fa_info_circle"></i>
4817 6790 </a>
4818 6791 </label>
4819 6792 </div>
@@ -4821,24 +6794,24 @@
4821 6794 <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) ?>">
4822 6795 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
4823 6796 </div>
4824 6797 </div> <!-- Font size -->
4825 - <div class="form-group row mb-2 <?= $html_class_prefix ?>options-section cb-changable-opt cb-org_chart-opt display_none">
4826 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
6798 + <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">
6799 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4827 6800 <label for="ays-chart-option-org-chart-font-size" class="form-label">
4828 - <?php echo __( "Element size", $this->plugin_name ); ?>
4829 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The size of the chart element.","chart-builder") ); ?>">
6801 + <?php echo esc_html(__( "Element size", 'chart-builder' )); ?>
6802 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The size of the chart element.","chart-builder") ); ?>">
4830 6803 <i class="ays_fa ays_fa_info_circle"></i>
4831 6804 </a>
4832 6805 </label>
4833 6806 </div>
4834 6807 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
4835 - <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]">
6808 + <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]">
4836 6809 <?php
4837 6810 foreach ( $org_chart_font_size_options as $option_slug => $option ):
4838 6811 $selected = ( $org_chart_font_size == $option_slug ) ? 'selected' : '';
4839 6812 ?>
4840 - <option value="<?php echo $option_slug; ?>" <?php echo $selected; ?>><?php echo $option; ?></option>
6813 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_attr($option); ?></option>
4841 6814 <?php
4842 6815 endforeach;
4843 6816 ?>
4844 6817 </select>
@@ -4847,9 +6820,9 @@
4847 6820 <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">
4848 6821 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4849 6822 <label for="ays-chart-option-background-color">
4850 6823 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4851 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart container.","chart-builder") ); ?>">
6824 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart container.","chart-builder") ); ?>">
4852 6825 <i class="ays_fa ays_fa_info_circle"></i>
4853 6826 </a>
4854 6827 </label>
4855 6828 </div>
@@ -4860,9 +6833,9 @@
4860 6833 <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">
4861 6834 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4862 6835 <label for="ays-chart-option-transparent-background" class="form-label">
4863 6836 <?php echo esc_html(__( "Transparent background", "chart-builder" )); ?>
4864 - <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") ); ?>">
6837 + <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") ); ?>">
4865 6838 <i class="ays_fa ays_fa_info_circle"></i>
4866 6839 </a>
4867 6840 </label>
4868 6841 </div>
@@ -4876,9 +6849,9 @@
4876 6849 <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">
4877 6850 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4878 6851 <label for="ays-chart-option-border-width">
4879 6852 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4880 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container border.","chart-builder") ); ?>">
6853 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border.","chart-builder") ); ?>">
4881 6854 <i class="ays_fa ays_fa_info_circle"></i>
4882 6855 </a>
4883 6856 </label>
4884 6857 </div>
@@ -4889,9 +6862,9 @@
4889 6862 <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">
4890 6863 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4891 6864 <label for="ays-chart-option-border-color">
4892 6865 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4893 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart container.","chart-builder") ); ?>">
6866 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart container.","chart-builder") ); ?>">
4894 6867 <i class="ays_fa ays_fa_info_circle"></i>
4895 6868 </a>
4896 6869 </label>
4897 6870 </div>
@@ -4902,9 +6875,9 @@
4902 6875 <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">
4903 6876 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4904 6877 <label for="ays-chart-option-border-radius">
4905 6878 <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
4906 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border radius of the chart container.","chart-builder") ); ?>">
6879 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border radius of the chart container.","chart-builder") ); ?>">
4907 6880 <i class="ays_fa ays_fa_info_circle"></i>
4908 6881 </a>
4909 6882 </label>
4910 6883 </div>
@@ -4915,9 +6888,9 @@
4915 6888 <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">
4916 6889 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4917 6890 <label for="ays-chart-option-border-style">
4918 6891 <?php echo esc_html(__( "Border Style", "chart-builder" )); ?>
4919 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The style of the chart container border.","chart-builder") ); ?>">
6892 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border.","chart-builder") ); ?>">
4920 6893 <i class="ays_fa ays_fa_info_circle"></i>
4921 6894 </a>
4922 6895 </label>
4923 6896 </div>
@@ -4937,9 +6910,9 @@
4937 6910 <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">
4938 6911 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4939 6912 <label for="ays-chart-option-box-shadow" class="form-label">
4940 6913 <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
4941 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add shadow to chart's container.","chart-builder") ); ?>">
6914 + <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") ); ?>">
4942 6915 <i class="ays_fa ays_fa_info_circle"></i>
4943 6916 </a>
4944 6917 </label>
4945 6918 </div>
@@ -4953,9 +6926,9 @@
4953 6926 <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 6927 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4955 6928 <label for="ays-chart-option-box-shadow-color" class="form-label">
4956 6929 <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
4957 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
6930 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
4958 6931 <i class="ays_fa ays_fa_info_circle"></i>
4959 6932 </a>
4960 6933 </label>
4961 6934 </div>
@@ -4966,9 +6939,9 @@
4966 6939 <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 6940 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4968 6941 <label for="ays-chart-option-border-width-with-title">
4969 6942 <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?>
4970 - <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") ); ?>">
6943 + <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") ); ?>">
4971 6944 <i class="ays_fa ays_fa_info_circle"></i>
4972 6945 </a>
4973 6946 </label>
4974 6947 </div>
@@ -4979,9 +6952,9 @@
4979 6952 <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">
4980 6953 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4981 6954 <label for="ays-chart-option-border-radius-with-title">
4982 6955 <?php echo esc_html(__( "Border radius (including title)", "chart-builder" )); ?>
4983 - <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") ); ?>">
6956 + <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") ); ?>">
4984 6957 <i class="ays_fa ays_fa_info_circle"></i>
4985 6958 </a>
4986 6959 </label>
4987 6960 </div>
@@ -4992,9 +6965,9 @@
4992 6965 <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">
4993 6966 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4994 6967 <label for="ays-chart-option-border-color-with-title">
4995 6968 <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?>
4996 - <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") ); ?>">
6969 + <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") ); ?>">
4997 6970 <i class="ays_fa ays_fa_info_circle"></i>
4998 6971 </a>
4999 6972 </label>
5000 6973 </div>
@@ -5005,9 +6978,9 @@
5005 6978 <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">
5006 6979 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5007 6980 <label for="ays-chart-option-border-style-with-title">
5008 6981 <?php echo esc_html(__( "Border Style (including title)", "chart-builder" )); ?>
5009 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The style of the chart container border including chart title and description.","chart-builder") ); ?>">
6982 + <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") ); ?>">
5010 6983 <i class="ays_fa ays_fa_info_circle"></i>
5011 6984 </a>
5012 6985 </label>
5013 6986 </div>
@@ -5027,9 +7000,9 @@
5027 7000 <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">
5028 7001 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5029 7002 <label for="ays-chart-option-padding-outer">
5030 7003 <?php echo esc_html(__( "Padding", "chart-builder" )); ?>
5031 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The padding of the chart container.","chart-builder") ); ?>">
7004 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The padding of the chart container.","chart-builder") ); ?>">
5032 7005 <i class="ays_fa ays_fa_info_circle"></i>
5033 7006 </a>
5034 7007 </label>
5035 7008 </div>
@@ -5051,8 +7024,273 @@
5051 7024
5052 7025 return $sources;
5053 7026 }
5054 7027
7028 + public function settings_contents_chart_styles_settings_chartjs( $sources, $args ){
7029 + $html_class_prefix = $args['html_class_prefix'];
7030 + $html_name_prefix = $args['html_name_prefix'];
7031 + $settings = $args['settings'];
7032 + $border_width_with_title = $settings['border_width_with_title'];
7033 + $border_radius_with_title = $settings['border_radius_with_title'];
7034 + $border_color_with_title = $settings['border_color_with_title'];
7035 + $border_style_with_title = $settings['border_style_with_title'];
7036 + $width = $settings['width'];
7037 + $width_format = $settings['width_format'];
7038 + $height = $settings['height'];
7039 + $height_format = $settings['height_format'];
7040 + $width_format_options = $settings['width_format_options'];
7041 + $border_width = $settings['border_width'];
7042 + $border_radius = $settings['border_radius'];
7043 + $border_color = $settings['border_color'];
7044 + $background_color_chart = $settings['background_color_chart'];
7045 + $border_style = $settings['border_style'];
7046 + $border_styles = $settings['border_styles'];
7047 + $box_shadow = $settings['box_shadow'];
7048 + $box_shadow_color = $settings['box_shadow_color'];
7049 + $padding_outer = $settings['padding_outer'];
7050 + ob_start();
7051 + ?>
7052 + <div class="ays-accordion-data-main-wrap">
7053 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
7054 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7055 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7056 + <label for="ays-chart-option-width" class="form-label">
7057 + <?php echo esc_html(__( "Width", "chart-builder" )); ?>
7058 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container, in percents.","chart-builder") ); ?>">
7059 + <i class="ays_fa ays_fa_info_circle"></i>
7060 + </a>
7061 + </label>
7062 + </div>
7063 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7064 + <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) ?>">
7065 + <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]">
7066 + <?php
7067 + foreach ( $width_format_options as $option_slug => $option ):
7068 + $selected = ( $width_format == $option_slug ) ? 'selected' : '';
7069 + ?>
7070 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7071 + <?php
7072 + endforeach;
7073 + ?>
7074 + </select>
7075 + </div>
7076 + </div> <!-- Width -->
7077 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7078 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7079 + <label for="ays-chart-option-height" class="form-label">
7080 + <?php echo esc_html(__( "Height", "chart-builder" )); ?>
7081 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
7082 + <i class="ays_fa ays_fa_info_circle"></i>
7083 + </a>
7084 + </label>
7085 + </div>
7086 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7087 + <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) ?>">
7088 + <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]">
7089 + <?php
7090 + foreach ( $width_format_options as $option_slug => $option ):
7091 + $selected = ( $height_format == $option_slug ) ? 'selected' : '';
7092 + ?>
7093 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7094 + <?php
7095 + endforeach;
7096 + ?>
7097 + </select>
7098 + </div>
7099 + </div> <!-- Height -->
7100 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7101 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7102 + <label for="ays-chart-option-border-width">
7103 + <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
7104 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border.","chart-builder") ); ?>">
7105 + <i class="ays_fa ays_fa_info_circle"></i>
7106 + </a>
7107 + </label>
7108 + </div>
7109 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7110 + <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) ?>">
7111 + </div>
7112 + </div> <!-- Border Width -->
7113 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7114 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7115 + <label for="ays-chart-option-border-radius">
7116 + <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
7117 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The radius of the chart container border.","chart-builder") ); ?>">
7118 + <i class="ays_fa ays_fa_info_circle"></i>
7119 + </a>
7120 + </label>
7121 + </div>
7122 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7123 + <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) ?>">
7124 + </div>
7125 + </div> <!-- Border Radius -->
7126 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7127 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7128 + <label for="ays-chart-option-border-color">
7129 + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
7130 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart container.","chart-builder") ); ?>">
7131 + <i class="ays_fa ays_fa_info_circle"></i>
7132 + </a>
7133 + </label>
7134 + </div>
7135 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7136 + <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) ?>">
7137 + </div>
7138 + </div> <!-- Border color -->
7139 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7140 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7141 + <label for="ays-chart-option-border-style">
7142 + <?php echo esc_html(__( "Border Style", "chart-builder" )); ?>
7143 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border.","chart-builder") ); ?>">
7144 + <i class="ays_fa ays_fa_info_circle"></i>
7145 + </a>
7146 + </label>
7147 + </div>
7148 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7149 + <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]">
7150 + <?php
7151 + foreach ( $border_styles as $option_slug => $option ):
7152 + $selected = ( $border_style == $option_slug ) ? 'selected' : '';
7153 + ?>
7154 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7155 + <?php
7156 + endforeach;
7157 + ?>
7158 + </select>
7159 + </div>
7160 + </div> <!-- Border style -->
7161 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7162 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7163 + <label for="ays-chart-option-backgorund-color">
7164 + <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
7165 + <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") ); ?>">
7166 + <i class="ays_fa ays_fa_info_circle"></i>
7167 + </a>
7168 + </label>
7169 + </div>
7170 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7171 + <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) ?>">
7172 + </div>
7173 + </div><!-- Background color -->
7174 +
7175 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7176 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7177 + <label for="ays-chart-option-box-shadow" class="form-label">
7178 + <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
7179 + <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") ); ?>">
7180 + <i class="ays_fa ays_fa_info_circle"></i>
7181 + </a>
7182 + </label>
7183 + </div>
7184 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7185 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
7186 + <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); ?> >
7187 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
7188 + </label>
7189 + </div>
7190 + </div> <!-- box shadow -->
7191 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7192 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7193 + <label for="ays-chart-option-box-shadow-color" class="form-label">
7194 + <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
7195 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
7196 + <i class="ays_fa ays_fa_info_circle"></i>
7197 + </a>
7198 + </label>
7199 + </div>
7200 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7201 + <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) ?>">
7202 + </div>
7203 + </div> <!-- box shadow color -->
7204 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7205 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7206 + <label for="ays-chart-option-border-width-with-title">
7207 + <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?>
7208 + <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") ); ?>">
7209 + <i class="ays_fa ays_fa_info_circle"></i>
7210 + </a>
7211 + </label>
7212 + </div>
7213 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7214 + <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) ?>">
7215 + </div>
7216 + </div> <!-- Border Width with title -->
7217 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7218 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7219 + <label for="ays-chart-option-border-radius-with-title">
7220 + <?php echo esc_html(__( "Border Radius (including title)", "chart-builder" )); ?>
7221 + <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") ); ?>">
7222 + <i class="ays_fa ays_fa_info_circle"></i>
7223 + </a>
7224 + </label>
7225 + </div>
7226 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7227 + <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) ?>">
7228 + </div>
7229 + </div> <!-- Border radius with title -->
7230 + <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">
7231 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7232 + <label for="ays-chart-option-border-color-with-title">
7233 + <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?>
7234 + <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") ); ?>">
7235 + <i class="ays_fa ays_fa_info_circle"></i>
7236 + </a>
7237 + </label>
7238 + </div>
7239 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7240 + <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) ?>">
7241 + </div>
7242 + </div> <!-- Border colro with title -->
7243 + <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">
7244 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7245 + <label for="ays-chart-option-border-style-with-title">
7246 + <?php echo esc_html(__( "Border Style (including title)", "chart-builder" )); ?>
7247 + <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") ); ?>">
7248 + <i class="ays_fa ays_fa_info_circle"></i>
7249 + </a>
7250 + </label>
7251 + </div>
7252 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7253 + <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]">
7254 + <?php
7255 + foreach ( $border_styles as $option_slug => $option ):
7256 + $selected = ( $border_style_with_title == $option_slug ) ? 'selected' : '';
7257 + ?>
7258 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7259 + <?php
7260 + endforeach;
7261 + ?>
7262 + </select>
7263 + </div>
7264 + </div> <!-- Border style with title -->
7265 + <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">
7266 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7267 + <label for="ays-chart-option-padding-outer">
7268 + <?php echo esc_html(__( "Padding", "chart-builder" )); ?>
7269 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The padding of the chart container.","chart-builder") ); ?>">
7270 + <i class="ays_fa ays_fa_info_circle"></i>
7271 + </a>
7272 + </label>
7273 + </div>
7274 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7275 + <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) ?>">
7276 + </div>
7277 + </div> <!-- Padding outer -->
7278 + </div>
7279 + </div>
7280 + <?php
7281 + $content = ob_get_clean();
7282 +
7283 + $title = __( 'Chart', "chart-builder" );
7284 +
7285 + $sources['chart'] = array(
7286 + 'content' => $content,
7287 + 'title' => $title
7288 + );
7289 +
7290 + return $sources;
7291 + }
7292 +
5055 7293 public function settings_contents_chart_area_styles_settings( $sources, $args ){
5056 7294 $html_class_prefix = $args['html_class_prefix'];
5057 7295 $html_name_prefix = $args['html_name_prefix'];
5058 7296 $settings = $args['settings'];
@@ -5071,9 +7309,9 @@
5071 7309 <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">
5072 7310 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5073 7311 <label for="ays-chart-option-chart-background-color">
5074 7312 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
5075 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart area.","chart-builder") ); ?>">
7313 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart area.","chart-builder") ); ?>">
5076 7314 <i class="ays_fa ays_fa_info_circle"></i>
5077 7315 </a>
5078 7316 </label>
5079 7317 </div>
@@ -5084,9 +7322,9 @@
5084 7322 <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">
5085 7323 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5086 7324 <label for="ays-chart-option-chart-border-width">
5087 7325 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
5088 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border width of the chart area.","chart-builder") ); ?>">
7326 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border width of the chart area.","chart-builder") ); ?>">
5089 7327 <i class="ays_fa ays_fa_info_circle"></i>
5090 7328 </a>
5091 7329 </label>
5092 7330 </div>
@@ -5097,9 +7335,9 @@
5097 7335 <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">
5098 7336 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5099 7337 <label for="ays-chart-option-chart-border-color">
5100 7338 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
5101 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart area.","chart-builder") ); ?>">
7339 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart area.","chart-builder") ); ?>">
5102 7340 <i class="ays_fa ays_fa_info_circle"></i>
5103 7341 </a>
5104 7342 </label>
5105 7343 </div>
@@ -5110,9 +7348,9 @@
5110 7348 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5111 7349 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5112 7350 <label for="ays-chart-option-chart-left-margin">
5113 7351 <?php echo esc_html(__( "Left Margin", "chart-builder" )); ?>
5114 - <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") ); ?>">
7352 + <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") ); ?>">
5115 7353 <i class="ays_fa ays_fa_info_circle"></i>
5116 7354 </a>
5117 7355 </label>
5118 7356 </div>
@@ -5123,9 +7361,9 @@
5123 7361 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5124 7362 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5125 7363 <label for="ays-chart-option-chart-right-margin">
5126 7364 <?php echo esc_html(__( "Right Margin", "chart-builder" )); ?>
5127 - <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") ); ?>">
7365 + <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") ); ?>">
5128 7366 <i class="ays_fa ays_fa_info_circle"></i>
5129 7367 </a>
5130 7368 </label>
5131 7369 </div>
@@ -5136,9 +7374,9 @@
5136 7374 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5137 7375 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5138 7376 <label for="ays-chart-option-chart-top-margin">
5139 7377 <?php echo esc_html(__( "Top Margin", "chart-builder" )); ?>
5140 - <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") ); ?>">
7378 + <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") ); ?>">
5141 7379 <i class="ays_fa ays_fa_info_circle"></i>
5142 7380 </a>
5143 7381 </label>
5144 7382 </div>
@@ -5149,9 +7387,9 @@
5149 7387 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5150 7388 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5151 7389 <label for="ays-chart-option-chart-bottom-margin">
5152 7390 <?php echo esc_html(__( "Bottom Margin", "chart-builder" )); ?>
5153 - <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") ); ?>">
7391 + <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") ); ?>">
5154 7392 <i class="ays_fa ays_fa_info_circle"></i>
5155 7393 </a>
5156 7394 </label>
5157 7395 </div>
@@ -5201,9 +7439,9 @@
5201 7439 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5202 7440 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5203 7441 <label for="ays-chart-option-title-color">
5204 7442 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5205 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>">
7443 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>">
5206 7444 <i class="ays_fa ays_fa_info_circle"></i>
5207 7445 </a>
5208 7446 </label>
5209 7447 </div>
@@ -5214,9 +7452,9 @@
5214 7452 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5215 7453 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5216 7454 <label for="ays-chart-option-title-font-size" class="form-label">
5217 7455 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5218 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>">
7456 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>">
5219 7457 <i class="ays_fa ays_fa_info_circle"></i>
5220 7458 </a>
5221 7459 </label>
5222 7460 </div>
@@ -5228,9 +7466,9 @@
5228 7466 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5229 7467 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5230 7468 <label for="ays-chart-option-title-bold" class="form-label">
5231 7469 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5232 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
7470 + <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") ); ?>">
5233 7471 <i class="ays_fa ays_fa_info_circle"></i>
5234 7472 </a>
5235 7473 </label>
5236 7474 </div>
@@ -5244,9 +7482,9 @@
5244 7482 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5245 7483 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5246 7484 <label for="ays-chart-option-title-italic" class="form-label">
5247 7485 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5248 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
7486 + <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") ); ?>">
5249 7487 <i class="ays_fa ays_fa_info_circle"></i>
5250 7488 </a>
5251 7489 </label>
5252 7490 </div>
@@ -5260,9 +7498,9 @@
5260 7498 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5261 7499 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5262 7500 <label for="ays-chart-option-title-position">
5263 7501 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5264 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>">
7502 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>">
5265 7503 <i class="ays_fa ays_fa_info_circle"></i>
5266 7504 </a>
5267 7505 </label>
5268 7506 </div>
@@ -5282,9 +7520,9 @@
5282 7520 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5283 7521 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5284 7522 <label for="ays-chart-option-title-gap" class="form-label">
5285 7523 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5286 - <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") ); ?>">
7524 + <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") ); ?>">
5287 7525 <i class="ays_fa ays_fa_info_circle"></i>
5288 7526 </a>
5289 7527 </label>
5290 7528 </div>
@@ -5296,9 +7534,9 @@
5296 7534 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5297 7535 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5298 7536 <label for="ays-chart-option-title-gap-description" class="form-label">
5299 7537 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5300 - <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") ); ?>">
7538 + <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") ); ?>">
5301 7539 <i class="ays_fa ays_fa_info_circle"></i>
5302 7540 </a>
5303 7541 </label>
5304 7542 </div>
@@ -5310,9 +7548,9 @@
5310 7548 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5311 7549 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5312 7550 <label for="ays-chart-option-title-text-transform">
5313 7551 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5314 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
7552 + <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") ); ?>">
5315 7553 <i class="ays_fa ays_fa_info_circle"></i>
5316 7554 </a>
5317 7555 </label>
5318 7556 </div>
@@ -5332,9 +7570,9 @@
5332 7570 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5333 7571 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5334 7572 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5335 7573 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5336 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
7574 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
5337 7575 <i class="ays_fa ays_fa_info_circle"></i>
5338 7576 </a>
5339 7577 </label>
5340 7578 </div>
@@ -5346,9 +7584,9 @@
5346 7584 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5347 7585 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5348 7586 <label for="ays-chart-option-title-text-decoration">
5349 7587 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5350 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
7588 + <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") ); ?>">
5351 7589 <i class="ays_fa ays_fa_info_circle"></i>
5352 7590 </a>
5353 7591 </label>
5354 7592 </div>
@@ -5368,9 +7606,9 @@
5368 7606 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5369 7607 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5370 7608 <label for="ays-chart-option-title-text-shadow" class="form-label">
5371 7609 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5372 - <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") ); ?>">
7610 + <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") ); ?>">
5373 7611 <i class="ays_fa ays_fa_info_circle"></i>
5374 7612 </a>
5375 7613 </label>
5376 7614 </div>
@@ -5384,9 +7622,9 @@
5384 7622 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5385 7623 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5386 7624 <label for="ays-chart-option-title-shadow-color">
5387 7625 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5388 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>">
7626 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>">
5389 7627 <i class="ays_fa ays_fa_info_circle"></i>
5390 7628 </a>
5391 7629 </label>
5392 7630 </div>
@@ -5436,9 +7674,9 @@
5436 7674 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5437 7675 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5438 7676 <label for="ays-chart-option-title-color">
5439 7677 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5440 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>">
7678 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>">
5441 7679 <i class="ays_fa ays_fa_info_circle"></i>
5442 7680 </a>
5443 7681 </label>
5444 7682 </div>
@@ -5449,9 +7687,9 @@
5449 7687 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5450 7688 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5451 7689 <label for="ays-chart-option-title-font-size" class="form-label">
5452 7690 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5453 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>">
7691 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>">
5454 7692 <i class="ays_fa ays_fa_info_circle"></i>
5455 7693 </a>
5456 7694 </label>
5457 7695 </div>
@@ -5463,9 +7701,9 @@
5463 7701 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5464 7702 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5465 7703 <label for="ays-chart-option-title-bold" class="form-label">
5466 7704 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5467 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
7705 + <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") ); ?>">
5468 7706 <i class="ays_fa ays_fa_info_circle"></i>
5469 7707 </a>
5470 7708 </label>
5471 7709 </div>
@@ -5479,9 +7717,9 @@
5479 7717 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5480 7718 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5481 7719 <label for="ays-chart-option-title-italic" class="form-label">
5482 7720 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5483 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
7721 + <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") ); ?>">
5484 7722 <i class="ays_fa ays_fa_info_circle"></i>
5485 7723 </a>
5486 7724 </label>
5487 7725 </div>
@@ -5495,9 +7733,9 @@
5495 7733 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5496 7734 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5497 7735 <label for="ays-chart-option-title-position">
5498 7736 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5499 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>">
7737 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>">
5500 7738 <i class="ays_fa ays_fa_info_circle"></i>
5501 7739 </a>
5502 7740 </label>
5503 7741 </div>
@@ -5517,9 +7755,9 @@
5517 7755 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5518 7756 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5519 7757 <label for="ays-chart-option-title-gap" class="form-label">
5520 7758 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5521 - <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") ); ?>">
7759 + <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") ); ?>">
5522 7760 <i class="ays_fa ays_fa_info_circle"></i>
5523 7761 </a>
5524 7762 </label>
5525 7763 </div>
@@ -5531,9 +7769,9 @@
5531 7769 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5532 7770 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5533 7771 <label for="ays-chart-option-title-gap-description" class="form-label">
5534 7772 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5535 - <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") ); ?>">
7773 + <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") ); ?>">
5536 7774 <i class="ays_fa ays_fa_info_circle"></i>
5537 7775 </a>
5538 7776 </label>
5539 7777 </div>
@@ -5545,9 +7783,9 @@
5545 7783 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5546 7784 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5547 7785 <label for="ays-chart-option-title-text-transform">
5548 7786 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5549 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
7787 + <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") ); ?>">
5550 7788 <i class="ays_fa ays_fa_info_circle"></i>
5551 7789 </a>
5552 7790 </label>
5553 7791 </div>
@@ -5567,9 +7805,9 @@
5567 7805 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5568 7806 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5569 7807 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5570 7808 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5571 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
7809 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
5572 7810 <i class="ays_fa ays_fa_info_circle"></i>
5573 7811 </a>
5574 7812 </label>
5575 7813 </div>
@@ -5581,9 +7819,9 @@
5581 7819 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5582 7820 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5583 7821 <label for="ays-chart-option-title-text-decoration">
5584 7822 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5585 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
7823 + <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") ); ?>">
5586 7824 <i class="ays_fa ays_fa_info_circle"></i>
5587 7825 </a>
5588 7826 </label>
5589 7827 </div>
@@ -5603,9 +7841,9 @@
5603 7841 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5604 7842 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5605 7843 <label for="ays-chart-option-title-text-shadow" class="form-label">
5606 7844 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5607 - <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") ); ?>">
7845 + <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") ); ?>">
5608 7846 <i class="ays_fa ays_fa_info_circle"></i>
5609 7847 </a>
5610 7848 </label>
5611 7849 </div>
@@ -5619,9 +7857,9 @@
5619 7857 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5620 7858 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5621 7859 <label for="ays-chart-option-title-shadow-color">
5622 7860 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5623 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>">
7861 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>">
5624 7862 <i class="ays_fa ays_fa_info_circle"></i>
5625 7863 </a>
5626 7864 </label>
5627 7865 </div>
@@ -5670,9 +7908,9 @@
5670 7908 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5671 7909 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5672 7910 <label for="ays-chart-option-description-color">
5673 7911 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5674 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>">
7912 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>">
5675 7913 <i class="ays_fa ays_fa_info_circle"></i>
5676 7914 </a>
5677 7915 </label>
5678 7916 </div>
@@ -5683,9 +7921,9 @@
5683 7921 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5684 7922 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5685 7923 <label for="ays-chart-option-description-font-size" class="form-label">
5686 7924 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5687 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>">
7925 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>">
5688 7926 <i class="ays_fa ays_fa_info_circle"></i>
5689 7927 </a>
5690 7928 </label>
5691 7929 </div>
@@ -5697,9 +7935,9 @@
5697 7935 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5698 7936 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5699 7937 <label for="ays-chart-option-description-bold" class="form-label">
5700 7938 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5701 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
7939 + <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") ); ?>">
5702 7940 <i class="ays_fa ays_fa_info_circle"></i>
5703 7941 </a>
5704 7942 </label>
5705 7943 </div>
@@ -5713,9 +7951,9 @@
5713 7951 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5714 7952 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5715 7953 <label for="ays-chart-option-description-italic" class="form-label">
5716 7954 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5717 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
7955 + <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") ); ?>">
5718 7956 <i class="ays_fa ays_fa_info_circle"></i>
5719 7957 </a>
5720 7958 </label>
5721 7959 </div>
@@ -5729,9 +7967,9 @@
5729 7967 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5730 7968 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5731 7969 <label for="ays-chart-option-description-position">
5732 7970 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5733 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>">
7971 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>">
5734 7972 <i class="ays_fa ays_fa_info_circle"></i>
5735 7973 </a>
5736 7974 </label>
5737 7975 </div>
@@ -5751,9 +7989,9 @@
5751 7989 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5752 7990 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5753 7991 <label for="ays-chart-option-description-text-transform">
5754 7992 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5755 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
7993 + <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") ); ?>">
5756 7994 <i class="ays_fa ays_fa_info_circle"></i>
5757 7995 </a>
5758 7996 </label>
5759 7997 </div>
@@ -5773,9 +8011,9 @@
5773 8011 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5774 8012 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5775 8013 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5776 8014 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5777 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
8015 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
5778 8016 <i class="ays_fa ays_fa_info_circle"></i>
5779 8017 </a>
5780 8018 </label>
5781 8019 </div>
@@ -5787,9 +8025,9 @@
5787 8025 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5788 8026 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5789 8027 <label for="ays-chart-option-description-text-decoration">
5790 8028 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5791 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
8029 + <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") ); ?>">
5792 8030 <i class="ays_fa ays_fa_info_circle"></i>
5793 8031 </a>
5794 8032 </label>
5795 8033 </div>
@@ -5809,9 +8047,9 @@
5809 8047 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5810 8048 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5811 8049 <label for="ays-chart-option-description-text-shadow" class="form-label">
5812 8050 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5813 - <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") ); ?>">
8051 + <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") ); ?>">
5814 8052 <i class="ays_fa ays_fa_info_circle"></i>
5815 8053 </a>
5816 8054 </label>
5817 8055 </div>
@@ -5825,9 +8063,9 @@
5825 8063 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5826 8064 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5827 8065 <label for="ays-chart-option-description-shadow-color">
5828 8066 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5829 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>">
8067 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>">
5830 8068 <i class="ays_fa ays_fa_info_circle"></i>
5831 8069 </a>
5832 8070 </label>
5833 8071 </div>
@@ -5876,9 +8114,9 @@
5876 8114 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5877 8115 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5878 8116 <label for="ays-chart-option-description-color">
5879 8117 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5880 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>">
8118 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>">
5881 8119 <i class="ays_fa ays_fa_info_circle"></i>
5882 8120 </a>
5883 8121 </label>
5884 8122 </div>
@@ -5889,9 +8127,9 @@
5889 8127 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5890 8128 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5891 8129 <label for="ays-chart-option-description-font-size" class="form-label">
5892 8130 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5893 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>">
8131 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>">
5894 8132 <i class="ays_fa ays_fa_info_circle"></i>
5895 8133 </a>
5896 8134 </label>
5897 8135 </div>
@@ -5903,9 +8141,9 @@
5903 8141 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5904 8142 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5905 8143 <label for="ays-chart-option-description-bold" class="form-label">
5906 8144 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5907 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
8145 + <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") ); ?>">
5908 8146 <i class="ays_fa ays_fa_info_circle"></i>
5909 8147 </a>
5910 8148 </label>
5911 8149 </div>
@@ -5919,9 +8157,9 @@
5919 8157 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5920 8158 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5921 8159 <label for="ays-chart-option-description-italic" class="form-label">
5922 8160 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5923 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
8161 + <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") ); ?>">
5924 8162 <i class="ays_fa ays_fa_info_circle"></i>
5925 8163 </a>
5926 8164 </label>
5927 8165 </div>
@@ -5935,9 +8173,9 @@
5935 8173 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5936 8174 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5937 8175 <label for="ays-chart-option-description-position">
5938 8176 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5939 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>">
8177 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>">
5940 8178 <i class="ays_fa ays_fa_info_circle"></i>
5941 8179 </a>
5942 8180 </label>
5943 8181 </div>
@@ -5957,9 +8195,9 @@
5957 8195 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5958 8196 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5959 8197 <label for="ays-chart-option-description-text-transform">
5960 8198 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5961 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
8199 + <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") ); ?>">
5962 8200 <i class="ays_fa ays_fa_info_circle"></i>
5963 8201 </a>
5964 8202 </label>
5965 8203 </div>
@@ -5979,9 +8217,9 @@
5979 8217 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5980 8218 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5981 8219 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5982 8220 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5983 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
8221 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
5984 8222 <i class="ays_fa ays_fa_info_circle"></i>
5985 8223 </a>
5986 8224 </label>
5987 8225 </div>
@@ -5993,9 +8231,9 @@
5993 8231 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5994 8232 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5995 8233 <label for="ays-chart-option-description-text-decoration">
5996 8234 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5997 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
8235 + <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") ); ?>">
5998 8236 <i class="ays_fa ays_fa_info_circle"></i>
5999 8237 </a>
6000 8238 </label>
6001 8239 </div>
@@ -6015,9 +8253,9 @@
6015 8253 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6016 8254 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6017 8255 <label for="ays-chart-option-description-text-shadow" class="form-label">
6018 8256 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
6019 - <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") ); ?>">
8257 + <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") ); ?>">
6020 8258 <i class="ays_fa ays_fa_info_circle"></i>
6021 8259 </a>
6022 8260 </label>
6023 8261 </div>
@@ -6031,9 +8269,9 @@
6031 8269 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6032 8270 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6033 8271 <label for="ays-chart-option-description-shadow-color">
6034 8272 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
6035 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>">
8273 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>">
6036 8274 <i class="ays_fa ays_fa_info_circle"></i>
6037 8275 </a>
6038 8276 </label>
6039 8277 </div>
@@ -6094,9 +8332,9 @@
6094 8332
6095 8333 $sources[] = $content;
6096 8334 }
6097 8335 $content_for_escape = implode('' , $sources );
6098 - echo html_entity_decode(esc_html( $content_for_escape ));
8336 + echo html_entity_decode( esc_html($content_for_escape) );
6099 8337 }
6100 8338
6101 8339 public function settings_contents_advanced_settings( $sources, $args ){
6102 8340 $html_class_prefix = $args['html_class_prefix'];
@@ -6201,9 +8439,9 @@
6201 8439 <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">
6202 8440 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6203 8441 <label for="ays-chart-option-slice-text">
6204 8442 <?php echo esc_html(__( "Slice text", "chart-builder" )); ?>
6205 - <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") ); ?>">
8443 + <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") ); ?>">
6206 8444 <i class="ays_fa ays_fa_info_circle"></i>
6207 8445 </a>
6208 8446 </label>
6209 8447 </div>
@@ -6223,9 +8461,9 @@
6223 8461 <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">
6224 8462 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6225 8463 <label for="ays-chart-option-tooltip-text">
6226 8464 <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?>
6227 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose how to display the text in the chart tooltip.","chart-builder") ); ?>">
8465 + <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") ); ?>">
6228 8466 <i class="ays_fa ays_fa_info_circle"></i>
6229 8467 </a>
6230 8468 </label>
6231 8469 </div>
@@ -6258,9 +8496,9 @@
6258 8496 <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">
6259 8497 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6260 8498 <label for="ays-chart-option-data-grouping-label" class="form-label">
6261 8499 <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?>
6262 - <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") ); ?>">
8500 + <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") ); ?>">
6263 8501 <i class="ays_fa ays_fa_info_circle"></i>
6264 8502 </a>
6265 8503 </label>
6266 8504 </div>
@@ -6301,17 +8539,18 @@
6301 8539 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6302 8540 <label for="ays-chart-option-focus-target">
6303 8541 <?php echo esc_html(__( "Focus target", "chart-builder" )); ?>
6304 8542 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6305 - echo htmlspecialchars( sprintf(
8543 + echo esc_html( sprintf(
8544 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6306 8545 "<p>" . __('There are two ways to focus the data table elements.', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6307 - __('%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>" .
6308 - __('%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>",
6309 - '<em>',
6310 - '</em>',
6311 - '<em>',
6312 - '</em>'
6313 - ) );
8546 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
8547 + __('%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>" .
8548 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
8549 + __('%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>",
8550 + '<em>', '</em>',
8551 + '<em>', '</em>'
8552 + ));
6314 8553 ?>">
6315 8554 <i class="ays_fa ays_fa_info_circle"></i>
6316 8555 </a>
6317 8556 </label>
@@ -6346,17 +8585,18 @@
6346 8585 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6347 8586 <label for="ays-chart-option-group-width">
6348 8587 <?php echo esc_html(__( "Bar width", "chart-builder" )); ?>
6349 8588 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6350 - echo htmlspecialchars( sprintf(
8589 + echo esc_html( sprintf(
8590 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6351 8591 "<p>" . __('The width of the bars, specified in either of these formats:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6352 - __('%sPixels:%s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
6353 - __('%sPercentage:%s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
6354 - '<em>',
6355 - '</em>',
6356 - '<em>',
6357 - '</em>'
6358 - ) );
8592 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
8593 + __('%1$sPixels:%2$s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
8594 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
8595 + __('%1$sPercentage:%2$s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
8596 + '<em>', '</em>',
8597 + '<em>', '</em>'
8598 + ));
6359 8599 ?>">
6360 8600 <i class="ays_fa ays_fa_info_circle"></i>
6361 8601 </a>
6362 8602 </label>
@@ -6408,23 +8648,24 @@
6408 8648 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6409 8649 <label for="ays-chart-option-multiple-data-format">
6410 8650 <?php echo esc_html(__( "Multiple data format", "chart-builder" )); ?>
6411 8651 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6412 - echo htmlspecialchars( sprintf(
8652 + echo esc_html( sprintf(
8653 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6413 8654 "<p>" . __('How multiple data selections are rolled up into tooltips:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6414 - __('%sCategory:%s Group selected data by row titles.', "chart-builder") . "</li><li>" .
6415 - __('%sSeries:%s Group selected data by column titles.', "chart-builder") . "</li><li>" .
6416 - __('%sAuto:%s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
6417 - __('%sNone:%s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
6418 - '<em>',
6419 - '</em>',
6420 - '<em>',
6421 - '</em>',
6422 - '<em>',
6423 - '</em>',
6424 - '<em>',
6425 - '</em>'
6426 - ) );
8655 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
8656 + __('%1$sCategory:%2$s Group selected data by row titles.', "chart-builder") . "</li><li>" .
8657 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
8658 + __('%1$sSeries:%2$s Group selected data by column titles.', "chart-builder") . "</li><li>" .
8659 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
8660 + __('%1$sAuto:%2$s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
8661 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
8662 + __('%1$sNone:%2$s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
8663 + '<em>', '</em>',
8664 + '<em>', '</em>',
8665 + '<em>', '</em>',
8666 + '<em>', '</em>'
8667 + ));
6427 8668 ?>">
6428 8669 <i class="ays_fa ays_fa_info_circle"></i>
6429 8670 </a>
6430 8671 </label>
@@ -6579,15 +8820,15 @@
6579 8820 <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) ?>">
6580 8821 </div>
6581 8822 </div> <!-- Line dash pattern -->
6582 8823 <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">
6583 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
8824 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6584 8825 <label for="ays-chart-option-donut-hole-size">
6585 - <?php echo __( "Hole size", $this->plugin_name ); ?>
8826 + <?php echo esc_html(__( "Hole size", 'chart-builder' )); ?>
6586 8827 </label>
6587 8828 </div>
6588 - <div class="col-sm-7 <?= $html_class_prefix ?>input-align-right <?= $html_class_prefix ?>option-input">
6589 - <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 ?>">
8829 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right <?php echo esc_attr($html_class_prefix) ?>option-input">
8830 + <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) ?>">
6590 8831 </div>
6591 8832 </div> <!-- Donut hole size -->
6592 8833 <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">
6593 8834 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
@@ -6594,20 +8835,20 @@
6594 8835 <div class="ays-pro-features-v2-video-button"></div>
6595 8836 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
6596 8837 <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>
6597 8838 <div class="ays-pro-features-v2-upgrade-text">
6598 - <?php echo __("Upgrade" , "chart-builder"); ?>
8839 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
6599 8840 </div>
6600 8841 </a>
6601 8842 </div>
6602 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
8843 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix )?>option-title">
6603 8844 <label for="ays-chart-option-curve-type">
6604 - <?php echo __( "Line curve type", "chart-builder" ); ?>
8845 + <?php echo esc_html(__( "Line curve type", "chart-builder" )); ?>
6605 8846 </label>
6606 8847 </div>
6607 8848 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
6608 - <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]">
6609 - <option><?php echo __( "Straight", "chart-builder" ); ?></option>
8849 + <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]">
8850 + <option><?php echo esc_html(__( "Straight", "chart-builder" )); ?></option>
6610 8851 </select>
6611 8852 </div>
6612 8853 </div> <!-- Line curve type -->
6613 8854 <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">
@@ -6655,9 +8896,9 @@
6655 8896 <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">
6656 8897 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6657 8898 <label for="ays-chart-option-org-classname" class="form-label">
6658 8899 <?php echo esc_html(__( "Custom CSS class", "chart-builder" )); ?>
6659 - <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") ); ?>">
8900 + <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") ); ?>">
6660 8901 <i class="ays_fa ays_fa_info_circle"></i>
6661 8902 </a>
6662 8903 </label>
6663 8904 </div>
@@ -6668,9 +8909,11 @@
6668 8909 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6669 8910 <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">
6670 8911 <br>
6671 8912 <blockquote>
6672 - <?php echo sprintf(__( "%sNote:%s Custom CSS class must be set for the options below to take effect.", $this->plugin_name ), '<strong>', '</strong>'); ?>
8913 + <?php echo sprintf(
8914 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
8915 + esc_html(__( '%1$sNote:%2$s Custom CSS class must be set for the options below to take effect.', 'chart-builder' )), '<strong>', '</strong>'); ?>
6673 8916 </blockquote>
6674 8917 <br>
6675 8918 </div>
6676 8919 <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">
@@ -6768,9 +9011,9 @@
6768 9011 <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">
6769 9012 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6770 9013 <label for="ays-chart-option-org-selected-classname" class="form-label">
6771 9014 <?php echo esc_html(__( "Selected node custom CSS class", "chart-builder" )); ?>
6772 - <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") ); ?>">
9015 + <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") ); ?>">
6773 9016 <i class="ays_fa ays_fa_info_circle"></i>
6774 9017 </a>
6775 9018 </label>
6776 9019 </div>
@@ -6781,9 +9024,14 @@
6781 9024 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6782 9025 <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">
6783 9026 <br>
6784 9027 <blockquote>
6785 - <?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>'); ?>
9028 + <?php echo sprintf(
9029 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
9030 + 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' )),
9031 + '<strong>',
9032 + '</strong>'
9033 + ); ?>
6786 9034 </blockquote>
6787 9035 <br>
6788 9036 </div>
6789 9037 <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">
@@ -6835,8 +9083,10 @@
6835 9083 $outer_radius = $settings['outer_radius'];
6836 9084 $slice_spacing = $settings['slice_spacing'];
6837 9085 $circumference = $settings['circumference'];
6838 9086 $start_angle = $settings['start_angle'];
9087 + $slice_border_color = $settings['slice_border_color'];
9088 + $slice_border_width = $settings['slice_border_width'];
6839 9089 // $index_axis = $settings['index_axis'];
6840 9090
6841 9091 ob_start();
6842 9092 ?>
@@ -6897,8 +9147,34 @@
6897 9147 <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) ?>">
6898 9148 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">°</div>
6899 9149 </div>
6900 9150 </div> <!-- Start Angle -->
9151 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt ">
9152 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9153 + <label for="ays-chart-option-slice-border-width">
9154 + <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
9155 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the slice borders.","chart-builder") ); ?>">
9156 + <i class="ays_fa ays_fa_info_circle"></i>
9157 + </a>
9158 + </label>
9159 + </div>
9160 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
9161 + <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) ?>">
9162 + </div>
9163 + </div> <!-- Border Width -->
9164 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt ">
9165 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9166 + <label for="ays-chart-option-slice-border-color">
9167 + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
9168 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the slice borders.","chart-builder") ); ?>">
9169 + <i class="ays_fa ays_fa_info_circle"></i>
9170 + </a>
9171 + </label>
9172 + </div>
9173 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
9174 + <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) ?>">
9175 + </div>
9176 + </div> <!-- Slice border color -->
6901 9177 <!-- <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">
6902 9178 <div class="col-sm-5 d-flex align-items-center <?php // echo esc_attr($html_class_prefix) ?>option-title">
6903 9179 <label for="ays-chart-option-index-axis">
6904 9180 <?php // echo esc_html(__( "Horizontal ", "chart-builder" )); ?>
@@ -6941,15 +9217,15 @@
6941 9217 if ( !isset( $source[0] ) ) {
6942 9218 if (count($source[1]) > 2) {
6943 9219 $titles = array();
6944 9220 for ($i = 0; $i < count($source[1]); $i++) {
6945 - array_push($titles, __("Title", $this->plugin_name).$i);
9221 + array_push($titles, __("Title", 'chart-builder').$i);
6946 9222 }
6947 9223 $source[0] = $titles;
6948 9224 } else {
6949 9225 $source[0] = array(
6950 - __("Country", $this->plugin_name),
6951 - __("Population", $this->plugin_name),
9226 + __("Country", 'chart-builder'),
9227 + __("Population", 'chart-builder'),
6952 9228 );
6953 9229 }
6954 9230
6955 9231 ksort($source);
@@ -6982,9 +9258,9 @@
6982 9258 <g>
6983 9259 <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" />
6984 9260 </g>
6985 9261 </svg>
6986 - <span><?php echo $val[0]; ?></span>
9262 + <span><?php echo esc_html($val[0]); ?></span>
6987 9263 </legend>
6988 9264 <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
6989 9265 <div class="ays-slices-accordion-data-main-wrap">
6990 9266 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6991,9 +9267,9 @@
6991 9267 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6992 9268 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6993 9269 <label for="ays-chart-option-slice-color">
6994 9270 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
6995 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for this slice.","chart-builder") ); ?>">
9271 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice.","chart-builder") ); ?>">
6996 9272 <i class="ays_fa ays_fa_info_circle"></i>
6997 9273 </a>
6998 9274 </label>
6999 9275 </div>
@@ -6998,13 +9274,13 @@
6998 9274 </label>
6999 9275 </div>
7000 9276 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7001 9277 <input type="color"
7002 - id="ays-chart-option-slice-color-<?php echo $key; ?>"
9278 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
7003 9279 class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7004 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo $key; ?>]"
7005 - value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : $slice_colors_default[$key]; ?>"
7006 - data-slice-id="<?php echo $key; ?>">
9280 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo esc_attr($key); ?>]"
9281 + value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : esc_attr($slice_colors_default[$key]); ?>"
9282 + data-slice-id="<?php echo esc_attr($key); ?>">
7007 9283 </div>
7008 9284 </div> <!-- Slice color -->
7009 9285 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7010 9286 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7016,13 +9292,13 @@
7016 9292 </label>
7017 9293 </div>
7018 9294 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7019 9295 <input type="number"
7020 - id="ays-chart-option-slice-offset-<?php echo $key; ?>"
9296 + id="ays-chart-option-slice-offset-<?php echo esc_attr($key); ?>"
7021 9297 class="ays-chart-option-slice-offset ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7022 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo $key; ?>]"
9298 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo esc_attr($key); ?>]"
7023 9299 value="<?php echo isset($slice_offset[$key]) ? esc_attr($slice_offset[$key]) : 0 ; ?>"
7024 - data-slice-id="<?php echo $key; ?>"
9300 + data-slice-id="<?php echo esc_attr($key); ?>"
7025 9301 step=".01" min="0.0" max="1.0">
7026 9302 </div>
7027 9303 </div> <!-- Slice offset -->
7028 9304 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
@@ -7028,9 +9304,9 @@
7028 9304 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7029 9305 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7030 9306 <label for="ays-chart-option-slice-text-color">
7031 9307 <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
7032 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for the text of this slice.","chart-builder") ); ?>">
9308 + <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") ); ?>">
7033 9309 <i class="ays_fa ays_fa_info_circle"></i>
7034 9310 </a>
7035 9311 </label>
7036 9312 </div>
@@ -7035,13 +9311,13 @@
7035 9311 </label>
7036 9312 </div>
7037 9313 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7038 9314 <input type="color"
7039 - id="ays-chart-option-slice-text-color-<?php echo $key; ?>"
9315 + id="ays-chart-option-slice-text-color-<?php echo esc_attr($key); ?>"
7040 9316 class="ays-chart-option-slice-text-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7041 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo $key; ?>]"
9317 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo esc_attr($key); ?>]"
7042 9318 value="<?php echo isset($slice_text_color[$key]) ? esc_attr($slice_text_color[$key]) : '#ffffff'; ?>"
7043 - data-slice-id="<?php echo $key; ?>">
9319 + data-slice-id="<?php echo esc_attr($key); ?>">
7044 9320 </div>
7045 9321 </div> <!-- Slice color -->
7046 9322 </div>
7047 9323 </div>
@@ -7053,9 +9329,9 @@
7053 9329 </div>
7054 9330 </div>
7055 9331 <br>
7056 9332 <blockquote>
7057 - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?>
9333 + <?php echo esc_html(__( "Save the chart to update the data.", "chart-builder" )); ?>
7058 9334 </blockquote>
7059 9335 </div>
7060 9336 <?php
7061 9337
@@ -7066,9 +9342,9 @@
7066 9342 }
7067 9343
7068 9344 $content = ob_get_clean();
7069 9345
7070 - $title = __( 'Slices settings', "chart-builder" );
9346 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
7071 9347
7072 9348 $sources['slices_settings'] = array(
7073 9349 'content' => $content,
7074 9350 'title' => $title
@@ -7075,9 +9351,139 @@
7075 9351 );
7076 9352
7077 9353 return $sources;
7078 9354 }
9355 +
9356 + public function settings_contents_slices_settings_chartjs( $sources, $args ){
9357 + $html_class_prefix = $args['html_class_prefix'];
9358 + $html_name_prefix = $args['html_name_prefix'];
9359 + $settings = $args['settings'];
9360 + $source = $args['source'];
9361 + $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
9362 + $source_chart_type = $args['source_chart_type'];
9363 + $settings = $args['settings'];
9364 + $title_row = array_shift($source);
7079 9365
9366 + if (isset($source) && !empty($source)) {
9367 + if ( !isset( $source[0] ) ) {
9368 + if (count($source[1]) > 2) {
9369 + $titles = array();
9370 + for ($i = 0; $i < count($source[1]); $i++) {
9371 + array_push($titles, __("Title", 'chart-builder').$i);
9372 + }
9373 + $source[0] = $titles;
9374 + } else {
9375 + $source[0] = array(
9376 + __("Country", 'chart-builder'),
9377 + __("Population", 'chart-builder'),
9378 + );
9379 + }
9380 +
9381 + ksort($source);
9382 + }
9383 + }
9384 +
9385 + if ($source_chart_type == 'pie_chart') {
9386 + foreach ($source as $key => $row) {
9387 + $source[$key] = array_slice($row, 0, 2);
9388 + }
9389 + }
9390 +
9391 + ob_start();
9392 + if ($source_chart_type == 'pie_chart') {
9393 + $slice_color = $settings['slice_color'];
9394 + $slices_border_color = $settings['slices_border_color'];
9395 + $slice_colors_default = $settings['slice_colors_default'];
9396 +
9397 + ?>
9398 + <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">
9399 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
9400 + <div class="<?php echo esc_attr($html_class_prefix) ?>slices-settings">
9401 + <?php
9402 + foreach ( $source as $key => $val ):
9403 + ?>
9404 + <fieldset class="ays-slices-accordion-options-container <?php echo esc_attr($html_class_prefix) ?>options-slices-<?php echo esc_attr($key); ?>" data-collapsed="true">
9405 + <legend class="ays-slices-accordion-options-header">
9406 + <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">
9407 + <g>
9408 + <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" />
9409 + </g>
9410 + </svg>
9411 + <span><?php echo esc_html($val[0]); ?></span>
9412 + </legend>
9413 + <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
9414 + <div class="ays-slices-accordion-data-main-wrap">
9415 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
9416 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
9417 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9418 + <label for="ays-chart-option-slice-color">
9419 + <?php echo esc_html(__( "Color", "chart-builder" )); ?>
9420 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice.","chart-builder") ); ?>">
9421 + <i class="ays_fa ays_fa_info_circle"></i>
9422 + </a>
9423 + </label>
9424 + </div>
9425 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
9426 + <input type="color"
9427 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
9428 + class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
9429 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo esc_attr($key); ?>]"
9430 + value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : esc_attr($slice_colors_default[$key]); ?>"
9431 + data-slice-id="<?php echo esc_attr($key); ?>">
9432 + </div>
9433 + </div> <!-- Slice color -->
9434 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
9435 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9436 + <label for="ays-chart-option-slice-border-color">
9437 + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
9438 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice border.","chart-builder") ); ?>">
9439 + <i class="ays_fa ays_fa_info_circle"></i>
9440 + </a>
9441 + </label>
9442 + </div>
9443 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
9444 + <input type="color"
9445 + id="ays-chart-option-slice-border-color-<?php echo esc_attr($key); ?>"
9446 + class="ays-chart-option-slice-border-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
9447 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slices_border_color][<?php echo esc_attr($key); ?>]"
9448 + value="<?php echo isset($slices_border_color[$key]) ? esc_attr($slices_border_color[$key]) : esc_attr($settings['slice_border_color']); ?>"
9449 + data-slice-id="<?php echo esc_attr($key); ?>">
9450 + </div>
9451 + </div> <!-- Slice border color -->
9452 + </div>
9453 + </div>
9454 + </div>
9455 + </fieldset>
9456 + <?php
9457 + endforeach;
9458 + ?>
9459 + </div>
9460 + </div>
9461 + <br>
9462 + <blockquote>
9463 + <?php echo esc_html(__( "Save the chart to update the data.", "chart-builder" )); ?>
9464 + </blockquote>
9465 + </div>
9466 + <?php
9467 +
9468 + } else {
9469 + ?>
9470 + <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>
9471 + <?php
9472 + }
9473 +
9474 + $content = ob_get_clean();
9475 +
9476 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
9477 +
9478 + $sources['slices_settings'] = array(
9479 + 'content' => $content,
9480 + 'title' => $title
9481 + );
9482 +
9483 + return $sources;
9484 + }
9485 +
7080 9486 public function settings_contents_series_settings( $sources, $args ){
7081 9487 $html_class_prefix = $args['html_class_prefix'];
7082 9488 $html_name_prefix = $args['html_name_prefix'];
7083 9489 $settings = $args['settings'];
@@ -7094,15 +9500,15 @@
7094 9500 if ( !isset( $source[0] ) ) {
7095 9501 if (count($source[1]) > 2) {
7096 9502 $titles = array();
7097 9503 for ($i = 0; $i < count($source[1]); $i++) {
7098 - array_push($titles, __("Title", $this->plugin_name).$i);
9504 + array_push($titles, __("Title", "chart-builder").$i);
7099 9505 }
7100 9506 $source[0] = $titles;
7101 9507 } else {
7102 9508 $source[0] = array(
7103 - __("Country", $this->plugin_name),
7104 - __("Population", $this->plugin_name),
9509 + __("Country", "chart-builder"),
9510 + __("Population", "chart-builder"),
7105 9511 );
7106 9512 }
7107 9513
7108 9514 ksort($source);
@@ -7120,8 +9526,9 @@
7120 9526 $series_row = array_shift($source);
7121 9527 $title = array_shift($series_row);
7122 9528 $series_color = $settings['series_color'];
7123 9529 $series_colors_default = $settings['series_colors_default'];
9530 + $series_format = $settings['series_format'];
7124 9531 $series_visible_in_legend = $settings['series_visible_in_legend'];
7125 9532 $series_line_width = $settings['series_line_width'];
7126 9533 $series_point_size = $settings['series_point_size'];
7127 9534 $series_point_shape = $settings['series_point_shape'];
@@ -7139,9 +9546,9 @@
7139 9546 <g>
7140 9547 <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" />
7141 9548 </g>
7142 9549 </svg>
7143 - <span><?php echo $val; ?></span>
9550 + <span><?php echo esc_attr($val); ?></span>
7144 9551 </legend>
7145 9552 <div class="ays-series-accordion-options-content ays-series-accordion-options-content">
7146 9553 <div class="ays-series-accordion-data-main-wrap">
7147 9554 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7152,13 +9559,13 @@
7152 9559 </label>
7153 9560 </div>
7154 9561 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7155 9562 <input type="color"
7156 - id="ays-chart-option-series-color-<?php echo $key; ?>"
9563 + id="ays-chart-option-series-color-<?php echo esc_attr($key); ?>"
7157 9564 class="ays-chart-option-series-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7158 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo $key; ?>]"
7159 - value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : $series_colors_default[$key]; ?>"
7160 - data-series-id="<?php echo $key; ?>">
9565 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo esc_attr($key); ?>]"
9566 + value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : esc_attr($series_colors_default[$key]); ?>"
9567 + data-series-id="<?php echo esc_attr($key); ?>">
7161 9568 </div>
7162 9569 </div> <!-- series color -->
7163 9570 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7164 9571 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7171,18 +9578,36 @@
7171 9578 </div>
7172 9579 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7173 9580 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
7174 9581 <input type="checkbox"
7175 - id="ays-chart-option-series-visible-in-legend-<?php echo $key; ?>"
9582 + id="ays-chart-option-series-visible-in-legend-<?php echo esc_attr($key); ?>"
7176 9583 class="ays-chart-option-series-visible-in-legend <?php echo esc_attr($html_class_prefix) ?>toggle-switch"
7177 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo $key; ?>]"
9584 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo esc_attr($key); ?>]"
7178 9585 value="on"
7179 - data-series-id="<?php echo $key; ?>"
9586 + data-series-id="<?php echo esc_attr($key); ?>"
7180 9587 <?php echo isset($series_visible_in_legend[$key]) && $series_visible_in_legend[$key] == 'on' ? 'checked' : (!isset($series_color[$key]) ? 'checked' : ''); ?> >
7181 9588 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
7182 9589 </label>
7183 9590 </div>
7184 9591 </div> <!-- Series visible in legend -->
9592 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
9593 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9594 + <label for="ays-chart-option-series-color">
9595 + <?php echo esc_html(__( "Format", "chart-builder" )); ?>
9596 + <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") ); ?>">
9597 + <i class="ays_fa ays_fa_info_circle"></i>
9598 + </a>
9599 + </label>
9600 + </div>
9601 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
9602 + <input type="text"
9603 + id="ays-chart-option-series-format-<?php echo $key; ?>"
9604 + class="ays-chart-option-series-format ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
9605 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_format][<?php echo $key; ?>]"
9606 + value="<?php echo isset($series_format[$key]) && '' !== $series_format[$key] ? esc_attr($series_format[$key]) : ''; ?>"
9607 + data-series-id="<?php echo $key; ?>">
9608 + </div>
9609 + </div> <!-- Format -->
7185 9610 <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">
7186 9611 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7187 9612 <label for="ays-chart-option-series-line-width">
7188 9613 <?php echo esc_html(__( "Line width", "chart-builder" )); ?>
@@ -7192,13 +9617,13 @@
7192 9617 </label>
7193 9618 </div>
7194 9619 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7195 9620 <input type="number"
7196 - id="ays-chart-option-series-line-width-<?php echo $key; ?>"
9621 + id="ays-chart-option-series-line-width-<?php echo esc_attr($key); ?>"
7197 9622 class="ays-chart-option-series-line-width ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7198 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo $key; ?>]"
7199 - value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : $line_width; ?>"
7200 - data-series-id="<?php echo $key; ?>">
9623 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo esc_attr($key); ?>]"
9624 + value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : esc_attr($line_width); ?>"
9625 + data-series-id="<?php echo esc_attr($key); ?>">
7201 9626 </div>
7202 9627 </div> <!-- Line width -->
7203 9628 <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">
7204 9629 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7210,13 +9635,13 @@
7210 9635 </label>
7211 9636 </div>
7212 9637 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7213 9638 <input type="number"
7214 - id="ays-chart-option-series-point-size-<?php echo $key; ?>"
9639 + id="ays-chart-option-series-point-size-<?php echo esc_attr($key); ?>"
7215 9640 class="ays-chart-option-series-point-size ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7216 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo $key; ?>]"
7217 - value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : $point_size; ?>"
7218 - data-series-id="<?php echo $key; ?>">
9641 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo esc_attr($key); ?>]"
9642 + value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : esc_attr($point_size); ?>"
9643 + data-series-id="<?php echo esc_attr($key); ?>">
7219 9644 </div>
7220 9645 </div> <!-- Point size -->
7221 9646 <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">
7222 9647 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7228,12 +9653,12 @@
7228 9653 </label>
7229 9654 </div>
7230 9655 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7231 9656 <select
7232 - id="ays-chart-option-series-point-shape-<?php echo $key; ?>"
9657 + id="ays-chart-option-series-point-shape-<?php echo esc_attr($key); ?>"
7233 9658 class="ays-chart-option-series-point-shape <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select"
7234 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo $key; ?>]"
7235 - data-series-id="<?php echo $key; ?>">
9659 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo esc_attr($key); ?>]"
9660 + data-series-id="<?php echo esc_attr($key); ?>">
7236 9661 >
7237 9662 <?php
7238 9663 $value = isset($series_point_shape[$key]) ? esc_attr($series_point_shape[$key]) : $point_shape;
7239 9664 foreach ( $point_shape_options as $option_slug => $option ):
@@ -7256,11 +9681,16 @@
7256 9681 </div>
7257 9682 </div>
7258 9683 <br>
7259 9684 <blockquote>
7260 - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?>
9685 + <?php echo esc_html(__( "Save the chart to update the data.", 'chart-builder' )); ?>
7261 9686 <br>
7262 - <?php echo sprintf(__( "%sNote:%s If you are not able to set the options, disable the row settings feature.", $this->plugin_name ), '<strong>', '</strong>'); ?>
9687 + <?php echo sprintf(
9688 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
9689 + esc_html(__( '%1$sNote:%2$s If you are not able to set the options, disable the row settings feature.', 'chart-builder' )),
9690 + '<strong>',
9691 + '</strong>'
9692 + ); ?>
7263 9693 </blockquote>
7264 9694 </div>
7265 9695 <?php
7266 9696
@@ -7294,15 +9724,15 @@
7294 9724 if ( !isset( $source[0] ) ) {
7295 9725 if (count($source[1]) > 2) {
7296 9726 $titles = array();
7297 9727 for ($i = 0; $i < count($source[1]); $i++) {
7298 - array_push($titles, __("Title", $this->plugin_name).$i);
9728 + array_push($titles, __("Title", 'chart-builder').$i);
7299 9729 }
7300 9730 $source[0] = $titles;
7301 9731 } else {
7302 9732 $source[0] = array(
7303 - __("Country", $this->plugin_name),
7304 - __("Population", $this->plugin_name),
9733 + __("Country", 'chart-builder'),
9734 + __("Population", 'chart-builder'),
7305 9735 );
7306 9736 }
7307 9737
7308 9738 ksort($source);
@@ -7348,9 +9778,9 @@
7348 9778 <g>
7349 9779 <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" />
7350 9780 </g>
7351 9781 </svg>
7352 - <span><?php echo $val; ?></span>
9782 + <span><?php echo esc_html($val); ?></span>
7353 9783 </legend>
7354 9784 <div class="ays-rows-accordion-options-content ays-rows-accordion-options-content">
7355 9785 <div class="ays-rows-accordion-data-main-wrap">
7356 9786 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7361,13 +9791,13 @@
7361 9791 </label>
7362 9792 </div>
7363 9793 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7364 9794 <input type="color"
7365 - id="ays-chart-option-rows-color-<?php echo $key; ?>"
9795 + id="ays-chart-option-rows-color-<?php echo esc_attr($key); ?>"
7366 9796 class="ays-chart-option-rows-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7367 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo $key; ?>]"
7368 - value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : $series_color; ?>"
7369 - data-rows-id="<?php echo $key; ?>">
9797 + name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo esc_attr($key); ?>]"
9798 + value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : esc_attr($series_color); ?>"
9799 + data-rows-id="<?php echo esc_attr($key); ?>">
7370 9800 </div>
7371 9801 </div> <!-- color -->
7372 9802 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7373 9803 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7376,13 +9806,13 @@
7376 9806 </label>
7377 9807 </div>
7378 9808 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7379 9809 <input type="number"
7380 - id="ays-chart-option-rows-opacity-<?php echo $key; ?>"
9810 + id="ays-chart-option-rows-opacity-<?php echo esc_attr($key); ?>"
7381 9811 class="ays-chart-option-rows-opacity ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7382 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo $key; ?>]"
9812 + name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo esc_attr($key); ?>]"
7383 9813 value="<?php echo isset($rows_opacity[$key]) && '' !== $rows_opacity[$key] ? esc_attr($rows_opacity[$key]) : 1.0; ?>"
7384 - data-rows-id="<?php echo $key; ?>"
9814 + data-rows-id="<?php echo esc_attr($key); ?>"
7385 9815 step=".1" min="0" max="1">
7386 9816 </div>
7387 9817 </div> <!-- opacity -->
7388 9818 </div>
@@ -7393,17 +9823,27 @@
7393 9823 endforeach;
7394 9824 ?>
7395 9825 <br>
7396 9826 <blockquote>
7397 - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?>
9827 + <?php echo esc_html(__( "Save the chart to update the data.", 'chart-builder' )); ?>
7398 9828 <br>
7399 - <?php echo sprintf(__( "%sNote:%s The applied styles will work only if the chart has one column.", $this->plugin_name ), '<strong>', '</strong>'); ?>
9829 + <?php echo sprintf(
9830 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
9831 + esc_html(__( '%1$sNote:%2$s The applied styles will work only if the chart has one column.', 'chart-builder' )),
9832 + '<strong>',
9833 + '</strong>'
9834 + ); ?>
7400 9835 </blockquote>
7401 9836 </div>
7402 9837 <div class="<?php echo esc_attr($html_class_prefix) ?>not-hidden-options-section <?php echo $enable_row_settings === 'checked' ? 'display_none' : ''; ?>">
7403 9838 <br>
7404 9839 <blockquote>
7405 - <?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>'); ?>
9840 + <?php echo sprintf(
9841 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
9842 + esc_html(__( '%1$sNote:%2$s If this option is disabled, the general options will be set from the series settings.', 'chart-builder' )),
9843 + '<strong>',
9844 + '</strong>'
9845 + ); ?>
7406 9846 </blockquote>
7407 9847 </div>
7408 9848 </div>
7409 9849 </div>
@@ -7418,5 +9858,60 @@
7418 9858 );
7419 9859
7420 9860 return $sources;
7421 9861 }
9862 +
9863 + public function ays_chart_disable_all_notice_from_plugin() {
9864 + if (!function_exists('get_current_screen')) {
9865 + return;
9866 + }
9867 +
9868 + $screen = get_current_screen();
9869 +
9870 + if (empty($screen) || strpos($screen->id, $this->plugin_name) === false) {
9871 + return;
9872 + }
9873 +
9874 + global $wp_filter;
9875 +
9876 + // Keep plugin-specific notices
9877 + $our_plugin_notices = array();
9878 +
9879 + $exclude_functions = [
9880 + 'chart_builder_general_admin_notice',
9881 + ];
9882 +
9883 + if (!empty($wp_filter['admin_notices'])) {
9884 + foreach ($wp_filter['admin_notices']->callbacks as $priority => $callbacks) {
9885 + foreach ($callbacks as $key => $callback) {
9886 + // For class-based methods
9887 + if (
9888 + is_array($callback['function']) &&
9889 + is_object($callback['function'][0]) &&
9890 + get_class($callback['function'][0]) === __CLASS__
9891 + ) {
9892 + $our_plugin_notices[$priority][$key] = $callback;
9893 + }
9894 + // For standalone functions
9895 + elseif (
9896 + is_string($callback['function']) &&
9897 + in_array($callback['function'], $exclude_functions)
9898 + ) {
9899 + $our_plugin_notices[$priority][$key] = $callback;
9900 + }
9901 + }
9902 + }
9903 + }
9904 +
9905 + // Remove all notices
9906 + remove_all_actions('admin_notices');
9907 + remove_all_actions('all_admin_notices');
9908 +
9909 + // Re-add only your plugin's notices
9910 + foreach ($our_plugin_notices as $priority => $callbacks) {
9911 + foreach ($callbacks as $callback) {
9912 + add_action('admin_notices', $callback['function'], $priority);
9913 + }
9914 + }
9915 + }
9916 +
7422 9917 }