PluginProbe
Chartify – WordPress Chart Plugin / 3.8.1
Chartify – WordPress Chart Plugin v3.8.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 +3836 -547 3.0.5 → 3.8.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 /**
@@ -306,9 +340,9 @@
306 340 $this->capability,
307 341 $this->plugin_name,
308 342 array($this, 'display_plugin_charts_page'),
309 343 CHART_BUILDER_ADMIN_URL . '/images/icons/ays_chart_logo_icon_bw.svg',
310 - '6.22'
344 + '26'
311 345 );
312 346
313 347 }
314 348
@@ -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,22 +881,439 @@
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);
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) ){
760 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);
891 + // $this->ays_chart_footer_sale_banner_2026($ays_chart_builder_flag);
761 892 // $this->ays_chart_helloween_message($ays_chart_builder_flag);
762 - // $this->ays_chart_black_friday_message($ays_chart_builder_flag);
763 893 // $this->ays_chart_christmas_message($ays_chart_builder_flag);
764 894 // $this->ays_chart_silver_bundle_message($ays_chart_builder_flag);
765 - $this->ays_chart_black_friday_message_2024($ays_chart_builder_flag);
895 + // $this->ays_chart_black_friday_message_2024($ays_chart_builder_flag);
896 + // $this->ays_chart_christmas_message_2024($ays_chart_builder_flag);
897 + // $this->ays_chart_new_halloween_bundle_message_2025($ays_chart_builder_flag);
898 + // $this->ays_chart_black_friday_message($ays_chart_builder_flag);
899 + // $this->ays_chart_christmas_banner_message_2025($ays_chart_builder_flag);
900 + $this->ays_chart_back_to_school_banner_2026($ays_chart_builder_flag);
901 + // }
902 + }
903 + }
904 + }
905 +
906 + // Back to School top banner
907 + public function ays_chart_back_to_school_banner_2026($ishmar){
908 + if($ishmar == 0 ){
909 + $content = array();
910 + $chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-builder-free&utm_campaign=back-to-school-sale-banner-' . CHART_BUILDER_VERSION);
911 + $content[] = '<div id="ays-chart-back-to-school-banner-2026" class="ays-chart-back-to-school-banner-2026 ays-chart-admin-notice notice notice-success is-dismissible ays_chart_dicount_info">';
912 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-plane" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 2 11 13"></path><path d="M22 2 15 22l-4-9-9-4Z"></path></svg>';
913 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-ruler" viewBox="0 0 36 20" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><rect x="1" y="6" width="34" height="9" rx="2"></rect><path d="M8 6v3M14 6v4M20 6v3M26 6v4"></path></svg>';
914 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-star" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m12 2 2.6 6.6L21.5 9l-5 4.6 1.4 7-5.9-3.5L6.1 20.6l1.4-7L2.5 9l6.9-.4Z"></path></svg>';
915 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-pencil" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"></path><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg>';
916 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-wave" viewBox="0 0 96 12" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="M2 8c8-8 16 8 24 0s16 8 24 0 16 8 24 0 16 8 20 2"></path></svg>';
917 + $content[] = '<div class="ays-chart-bts-content">';
918 + $content[] = '<div class="ays-chart-bts-offer">';
919 + $content[] = '<img class="ays-chart-bts-handwritten" src="'. esc_url(CHART_BUILDER_ADMIN_URL . '/images/ays-chart-back-to-school-handwritten.svg') .'" alt="Back to School Sale">';
920 + $content[] = '<span class="ays-chart-bts-dot" aria-hidden="true"></span>';
921 + $content[] = '<span class="ays-chart-bts-discount">'. esc_html__('20% OFF', 'chart-builder') .'</span>';
922 + $content[] = '</div>';
923 + $content[] = '<div class="ays-chart-bts-actions">';
924 + $content[] = '<span class="ays-chart-bts-use-code">'. esc_html__('Use code', 'chart-builder') .'</span>';
925 + $content[] = '<button type="button" class="ays-chart-bts-coupon" data-coupon="SCHOOL20" aria-label="'. esc_attr__('Copy coupon code SCHOOL20', 'chart-builder') .'"><span>SCHOOL20</span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button>';
926 + $content[] = '<a href="'. esc_url($chart_cta_button_link) .'" class="ays-chart-bts-cta" target="_blank" rel="noopener noreferrer">'. esc_html__('Upgrade Now', 'chart-builder') .'</a>';
927 + $content[] = '</div>';
928 + $content[] = '</div>';
929 + $content[] = '<div class="ays-chart-bts-dismiss"><form action="" method="POST"><div id="ays-chart-dismiss-buttons-content">';
930 + if( current_user_can( 'manage_options' ) ){
931 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn">'. esc_html__('Dismiss ad', 'chart-builder') .'</button>';
932 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner', CHART_BUILDER_NAME . '-sale-banner', true, false );
933 + }
934 + $content[] = '</div></form></div>';
935 + $content[] = '</div>';
936 + $content[] = '<style id="ays-chart-back-to-school-banner-2026-inline-css">';
937 + $content[] = '#ays-chart-back-to-school-banner-2026{box-sizing:border-box;position:relative;isolation:isolate;width:calc(100% - 20px);max-width:none;min-height:112px;margin:20px 20px 16px 0;padding:0 38px;overflow:hidden;border:1px solid #e8dcc9;border-left-width:1px;border-radius:12px;background-color:#fffdf8;background-image:radial-gradient(circle at 1px 1px,rgba(91,72,45,.09) 1px,transparent 1px),radial-gradient(120% 140% at 0 0,rgba(20,75,220,.07),transparent 55%),radial-gradient(120% 140% at 100% 100%,rgba(126,34,206,.09),transparent 55%);background-size:6px 6px,100% 100%,100% 100%;box-shadow:0 10px 30px -18px rgba(76,45,140,.55);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.ays-chart-bts-content{position:relative;z-index:2;display:flex;min-height:110px;align-items:center;justify-content:space-between;gap:28px}.ays-chart-bts-offer,.ays-chart-bts-actions{display:flex;align-items:center}.ays-chart-bts-offer{min-width:0;gap:9px}.ays-chart-bts-handwritten{width:280px;max-width:23vw;height:auto;color:#0755df;overflow:visible;flex:0 1 auto}.ays-chart-bts-dot{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:#ffc51b;align-self:flex-start;margin-top:27px}.ays-chart-bts-discount{color:#8127df;font-size:38px;font-weight:800;line-height:1;letter-spacing:-1.2px;white-space:nowrap}.ays-chart-bts-actions{flex:0 0 auto;gap:12px}.ays-chart-bts-use-code{color:#5f5b69;font-size:11px;font-weight:600;line-height:1;text-transform:uppercase;letter-spacing:.14em;white-space:nowrap}.ays-chart-bts-coupon{box-sizing:border-box;display:flex;min-height:50px;align-items:center;gap:12px;padding:8px 14px;border:2px dashed rgba(129,39,223,.5);border-radius:10px;background:#fff;color:#1147c8;cursor:pointer;box-shadow:none}.ays-chart-bts-coupon:hover,.ays-chart-bts-coupon:focus{border-color:#8127df;background:rgba(129,39,223,.05);color:#1147c8}.ays-chart-bts-coupon span{font-size:19px;font-weight:700;letter-spacing:.04em}.ays-chart-bts-coupon svg{width:16px;height:16px;color:#8127df}.ays-chart-bts-cta{display:inline-flex;min-height:48px;align-items:center;justify-content:center;padding:0 27px;border-radius:9px;background:linear-gradient(90deg,#1249e7,#8127df);color:#fff!important;font-size:16px;font-weight:700;text-decoration:none!important;white-space:nowrap;box-shadow:0 8px 18px -8px rgba(91,37,194,.9);transition:transform .15s,box-shadow .15s}.ays-chart-bts-cta:hover,.ays-chart-bts-cta:focus{color:#fff;transform:translateY(-1px);box-shadow:0 10px 20px -8px rgba(91,37,194,.95)}.ays-chart-bts-decoration{position:absolute;z-index:1;pointer-events:none}.ays-chart-bts-plane{top:8px;left:12px;width:24px;color:rgba(129,39,223,.55)}.ays-chart-bts-ruler{bottom:7px;left:24px;width:36px;color:rgba(20,73,230,.35)}.ays-chart-bts-star{top:8px;right:14px;width:19px;color:#ffc51b}.ays-chart-bts-pencil{right:31px;bottom:7px;width:21px;color:rgba(129,39,223,.5);transform:rotate(-12deg)}.ays-chart-bts-wave{bottom:3px;left:50%;width:96px;color:rgba(20,73,230,.22);transform:translateX(-50%)}#ays-chart-back-to-school-banner-2026 .notice-dismiss{top:1px;right:1px;color:#756b82}#ays-chart-back-to-school-banner-2026 .notice-dismiss:before{font-size:18px}.ays-chart-bts-dismiss{position:absolute;right:39px;bottom:0;z-index:3}.ays-chart-bts-dismiss form{margin:0}.ays-chart-bts-dismiss #ays-chart-dismiss-buttons-content .ays-button{height:22px!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;color:#777!important;font-size:10px!important;line-height:22px!important;text-decoration:underline;box-shadow:none!important}.ays-chart-bts-copy-notification{position:fixed;top:50%;left:50%;z-index:10000;transform:translate(-50%,-50%);padding:12px 24px;border-radius:8px;background:rgba(0,0,0,.82);color:#fff;font-size:14px;opacity:0;transition:opacity .25s}.ays-chart-bts-copy-notification.ays-chart-bts-show{opacity:1}@media screen and (max-width:1200px){.ays-chart-bts-content{gap:18px}.ays-chart-bts-handwritten{width:225px}.ays-chart-bts-discount{font-size:31px}.ays-chart-bts-actions{gap:8px}.ays-chart-bts-coupon{min-height:44px;padding:7px 10px}.ays-chart-bts-cta{min-height:44px;padding:0 18px;font-size:14px}}@media screen and (max-width:960px){#ays-chart-back-to-school-banner-2026{padding:15px 38px 20px}.ays-chart-bts-content{min-height:90px;flex-wrap:wrap;justify-content:center;gap:12px 24px}.ays-chart-bts-handwritten{max-width:none}.ays-chart-bts-actions{justify-content:center}.ays-chart-bts-dismiss{right:38px}}@media screen and (max-width:600px){#ays-chart-back-to-school-banner-2026{width:calc(100% - 20px);margin-right:10px;padding:18px 30px 23px 18px}.ays-chart-bts-content{flex-direction:column}.ays-chart-bts-offer{flex-wrap:wrap;justify-content:center}.ays-chart-bts-handwritten{width:210px}.ays-chart-bts-discount{font-size:28px}.ays-chart-bts-actions{flex-wrap:wrap}.ays-chart-bts-use-code{width:100%;text-align:center}.ays-chart-bts-coupon{min-height:40px}.ays-chart-bts-coupon span{font-size:16px}.ays-chart-bts-cta{min-height:40px}.ays-chart-bts-plane,.ays-chart-bts-ruler,.ays-chart-bts-pencil,.ays-chart-bts-wave{display:none}.ays-chart-bts-dismiss{right:30px}}';
938 + $content[] = '</style>';
939 + $content[] = '<script>
940 + (function() {
941 + "use strict";
942 + function initBackToSchoolBanner() {
943 + var banner = document.getElementById("ays-chart-back-to-school-banner-2026");
944 + if (!banner) {
945 + return;
946 + }
947 + var couponButton = banner.querySelector(".ays-chart-bts-coupon");
948 + if (!couponButton) {
949 + return;
950 + }
951 + couponButton.addEventListener("click", function() {
952 + var couponCode = couponButton.getAttribute("data-coupon");
953 + var textarea = document.createElement("textarea");
954 + textarea.value = couponCode;
955 + textarea.style.position = "fixed";
956 + textarea.style.opacity = "0";
957 + document.body.appendChild(textarea);
958 + textarea.focus();
959 + textarea.select();
960 + try {
961 + document.execCommand("copy");
962 + showCopyNotification();
963 + } catch (error) {
964 + // Keep the banner usable when clipboard access is unavailable.
965 + }
966 + document.body.removeChild(textarea);
967 + });
968 + }
969 + function showCopyNotification() {
970 + var notification = document.createElement("div");
971 + notification.className = "ays-chart-bts-copy-notification";
972 + notification.textContent = "'. esc_js(__('Coupon code copied', 'chart-builder')) .'";
973 + document.body.appendChild(notification);
974 + setTimeout(function() {
975 + notification.classList.add("ays-chart-bts-show");
976 + }, 10);
977 + setTimeout(function() {
978 + notification.classList.remove("ays-chart-bts-show");
979 + setTimeout(function() {
980 + if (notification.parentNode) {
981 + notification.parentNode.removeChild(notification);
982 + }
983 + }, 250);
984 + }, 2000);
985 + }
986 + if (document.readyState === "loading") {
987 + document.addEventListener("DOMContentLoaded", initBackToSchoolBanner);
988 + } else {
989 + initBackToSchoolBanner();
990 + }
991 + })();
992 + </script>';
993 + echo implode('', $content); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Static banner markup; dynamic values are escaped above.
994 + }
995 + }
996 +
997 +
998 + public function ays_chart_footer_sale_banner_2026($ishmar){
999 + if($ishmar == 0 ){
1000 + $content = array();
1001 +
1002 + $chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-builder-free&utm_campaign=private-offer-20-off-' . CHART_BUILDER_VERSION);
1003 +
1004 + $content[] = '
1005 + <div class="ays-chart-footer-banner-bottom-banner-wrapper" style="display: none;">
1006 + <div class="ays-chart-footer-banner-bottom-banner-container">
1007 + <div class="ays-chart-footer-banner-bottom-banner-content">
1008 + <div class="ays-chart-footer-banner-bottom-banner-inner">
1009 + <div class="ays-chart-footer-banner-bottom-banner-left">
1010 + <div class="ays-chart-footer-banner-bottom-banner-icon">
1011 + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
1012 + <path d="M12 7v14"></path>
1013 + <path d="M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8"></path>
1014 + <path d="M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5"></path>
1015 + <rect x="3" y="7" width="18" height="4" rx="1"></rect>
1016 + </svg>
1017 + </div>
1018 + <span class="ays-chart-footer-banner-bottom-banner-title">'. esc_html__('Chart Builder by AYS', 'ays-chart-builder') .'</span>
1019 + </div>
1020 + <span class="ays-chart-footer-banner-bottom-banner-separator"></span>
1021 + <span class="ays-chart-footer-banner-bottom-banner-discount">'. esc_html__('20% Off', 'ays-chart-builder') .'</span>
1022 + <div class="ays-chart-footer-banner-bottom-banner-code" onclick="aysChartFooterBannerCopyToClipboard()" title="'. esc_html__('Copy Coupon Code', 'ays-chart-builder') .'">
1023 + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
1024 + <path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"></path>
1025 + <path d="M13 5v2"></path>
1026 + <path d="M13 17v2"></path>
1027 + <path d="M13 11v2"></path>
1028 + </svg>
1029 + <span>CHARTPRO20</span>
1030 + <button type="button" class="ays-chart-footer-banner-bottom-banner-copy" aria-label="'. esc_html__('Copy Coupon Code', 'ays-chart-builder') .'">
1031 + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
1032 + <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
1033 + <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>
1034 + </svg>
1035 + </button>
1036 + </div>
1037 + <button type="button" class="ays-chart-footer-banner-bottom-banner-cta">
1038 + '. esc_html__('Get Deal', 'ays-chart-builder') .'
1039 + </button>
1040 + <button type="button" class="ays-chart-footer-banner-bottom-banner-close" aria-label="'. esc_html__('Close popup', 'ays-chart-builder') .'">
1041 + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
1042 + <path d="M18 6 6 18"></path>
1043 + <path d="m6 6 12 12"></path>
1044 + </svg>
1045 + </button>
1046 + </div>
1047 + </div>
1048 + </div>
1049 + </div>';
1050 +
1051 + $content[] = '<style id="ays-chart-footer-banner-styles-inline-css">';
1052 +
1053 + $content[] = '@keyframes ays-pro-slide-up{0%{opacity:0;transform:translateY(24px)}100%{opacity:1;transform:translateY(0)}}@keyframes ays-pro-slide-down{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(24px)}}.ays-chart-footer-banner-bottom-banner-wrapper{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:0 16px 28px;text-align:center;animation:.45s cubic-bezier(.16,1,.3,1) forwards ays-pro-slide-up}.ays-chart-footer-banner-bottom-banner-wrapper.ays-pro-banner-closing{animation:.32s cubic-bezier(.16,1,.3,1) forwards ays-pro-slide-down}.ays-chart-footer-banner-bottom-banner-container{display:inline-block;max-width:100%;border-radius:16px;background:linear-gradient(90deg,#2f6bff 0,#3e7bff 100%);box-shadow:0 20px 40px -15px rgba(47,107,255,.55),0 8px 20px -10px rgba(47,107,255,.35);overflow:hidden}.ays-chart-footer-banner-bottom-banner-code,.ays-chart-footer-banner-bottom-banner-content,.ays-chart-footer-banner-bottom-banner-inner,.ays-chart-footer-banner-bottom-banner-left{display:flex;align-items:center}.ays-chart-footer-banner-bottom-banner-inner{gap:16px;padding:8px 14px 8px 10px;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}.ays-chart-footer-banner-bottom-banner-left{gap:14px}.ays-chart-footer-banner-bottom-banner-icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:48px;height:48px;border-radius:50%;background:rgba(255,255,255,.15);color:#fff}.ays-chart-footer-banner-bottom-banner-icon svg{width:24px;height:24px}.ays-chart-footer-banner-bottom-banner-discount,.ays-chart-footer-banner-bottom-banner-title{font-size:17px;font-weight:600;line-height:1.25;letter-spacing:0;white-space:nowrap;color:#fff}.ays-chart-footer-banner-bottom-banner-separator{display:block;width:1px;height:24px;background:rgba(255,255,255,.4)}.ays-chart-footer-banner-bottom-banner-code{gap:6px;border:1px dashed rgba(255,255,255,.7);border-radius:999px;padding:6px 9px;color:#fff;cursor:pointer;transition:background-color .15s,border-color .15s;display:flex;align-items:center}.ays-chart-footer-banner-bottom-banner-code:hover{background:rgba(255,255,255,.1);border-color:#fff}.ays-chart-footer-banner-bottom-banner-code button svg,.ays-chart-footer-banner-bottom-banner-code>svg{width:16px;height:16px}.ays-chart-footer-banner-bottom-banner-code span{font-size:14px;font-weight:600;line-height:1;letter-spacing:.05em;color:#fff}.ays-chart-footer-banner-bottom-banner-close{display:flex;align-items:center;justify-content:center;margin:0;padding:0;background:none;border:none;color:#fff;cursor:pointer;transition:opacity .15s}.ays-chart-footer-banner-bottom-banner-close:hover{opacity:.8}.ays-chart-footer-banner-bottom-banner-copy{display:flex;align-items:center;justify-content:center;margin:0;padding:0;background:none;border:none;color:#fff;cursor:pointer;transition:opacity .15s}.ays-chart-footer-banner-bottom-banner-copy:hover{opacity:.8}.ays-chart-footer-banner-bottom-banner-cta{display:flex;align-items:center;justify-content:center;padding:8px 16px;background:#fff;color:#2f6bff;border:none;border-radius:6px;font-weight:600;font-size:14px;cursor:pointer;transition:all .15s;margin-left:12px}.ays-chart-footer-banner-bottom-banner-cta:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(47,107,255,.3)}';
1054 + $content[] = '</style>';
1055 +
1056 + $content[] = '<style id="ays-chart-footer-banner-notification-css">';
1057 + $content[] = '.ays-chart-footer-banner-copy-notification{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.9);color:#fff;padding:12px 24px;border-radius:8px;font-size:14px;z-index:10001;opacity:0;transition:opacity .3s ease;pointer-events:none}.ays-chart-footer-banner-copy-notification.show{opacity:1}';
1058 + $content[] = '</style>';
1059 +
1060 + $content[] = '<script>';
1061 +
1062 + $content[] = "
1063 + /**
1064 + * Footer Banner JavaScript - ES5 Compatible
1065 + * With delayed popup and visit tracking
1066 + */
1067 +
1068 + (function() {
1069 + 'use strict';
1070 +
1071 + // Configuration
1072 + var STORAGE_KEY = 'ays_chart_footer_banner_data';
1073 + var POPUP_RULES = [
1074 + { visit: 1, delay: 10000 }, // 1st visit: 10 seconds
1075 + { visit: 2, delay: 10000 }, // 2nd visit: 10 seconds
1076 + { visit: 3, delay: 15000 }, // 3th visit: 15 seconds
1077 + { visit: 4, delay: 15000 }, // 4th visit: 15 seconds
1078 + { visit: 5, delay: 20000 }, // 5th visit: 20 seconds
1079 + { visit: 7, delay: 20000 }, // 7th visit: 20 seconds
1080 + { visit: 10, delay: 30000 } // 10th visit: 30 seconds
1081 + ];
1082 + var MAX_SHOWS_PER_DAY = 7;
1083 +
1084 + // Wait for DOM to be ready
1085 + if (document.readyState === 'loading') {
1086 + document.addEventListener('DOMContentLoaded', initBanner);
1087 + } else {
1088 + initBanner();
1089 + }
1090 +
1091 + function initBanner() {
1092 + var banner = document.querySelector('.ays-chart-footer-banner-bottom-banner-wrapper');
1093 + var closeButton = document.querySelector('.ays-chart-footer-banner-bottom-banner-close');
1094 + var ctaButton = document.querySelector('.ays-chart-footer-banner-bottom-banner-cta');
1095 +
1096 + if (!banner) {
1097 + return;
766 1098 }
1099 +
1100 + // Hide banner initially
1101 + banner.style.display = 'none';
1102 +
1103 + // Get or initialize banner data
1104 + var bannerData = getBannerData();
1105 +
1106 + // Check if we need to reset daily data
1107 + if (shouldResetData(bannerData.lastResetDate)) {
1108 + bannerData = resetDailyData();
1109 + }
1110 +
1111 + // Increment visit count
1112 + bannerData.visitCount++;
1113 + saveBannerData(bannerData);
1114 +
1115 + // Check if banner should be shown
1116 + var shouldShow = shouldShowBanner(bannerData);
1117 +
1118 + if (shouldShow.show) {
1119 + // Show banner after delay
1120 + setTimeout(function() {
1121 + banner.style.display = 'block';
1122 +
1123 + // Increment show count
1124 + bannerData.showCount++;
1125 + saveBannerData(bannerData);
1126 + }, shouldShow.delay);
1127 + }
1128 +
1129 + // Close button handler
1130 + if (closeButton) {
1131 + closeButton.addEventListener('click', function() {
1132 + closeBanner(banner);
1133 + });
1134 + }
1135 +
1136 + // CTA button handler
1137 + if (ctaButton) {
1138 + ctaButton.addEventListener('click', function() {
1139 + window.open('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-builder-free&utm_campaign=private-offer-20-off-". CHART_BUILDER_VERSION ."', '_blank');
1140 + // Optionally close banner after click
1141 + closeBanner(banner);
1142 + });
1143 + }
1144 + }
1145 +
1146 + /**
1147 + * Get banner data from localStorage
1148 + */
1149 + function getBannerData() {
1150 + try {
1151 + var data = localStorage.getItem(STORAGE_KEY);
1152 + if (data) {
1153 + return JSON.parse(data);
1154 + }
1155 + } catch (e) {
1156 + // localStorage not available or parsing error
1157 + }
1158 +
1159 + // Return default data
1160 + return {
1161 + visitCount: 0,
1162 + showCount: 0,
1163 + lastResetDate: getTodayDate()
1164 + };
1165 + }
1166 +
1167 + /**
1168 + * Save banner data to localStorage
1169 + */
1170 + function saveBannerData(data) {
1171 + try {
1172 + localStorage.setItem(STORAGE_KEY, JSON.stringify(data));
1173 + } catch (e) {
1174 + // localStorage not available
1175 + }
1176 + }
1177 +
1178 + /**
1179 + * Check if data should be reset (new day)
1180 + */
1181 + function shouldResetData(lastResetDate) {
1182 + var today = getTodayDate();
1183 + return lastResetDate !== today;
1184 + }
1185 +
1186 + /**
1187 + * Reset daily data
1188 + */
1189 + function resetDailyData() {
1190 + var newData = {
1191 + visitCount: 0,
1192 + showCount: 0,
1193 + lastResetDate: getTodayDate()
1194 + };
1195 + saveBannerData(newData);
1196 + return newData;
1197 + }
1198 +
1199 + /**
1200 + * Get today's date as string (YYYY-MM-DD)
1201 + */
1202 + function getTodayDate() {
1203 + var date = new Date();
1204 + var year = date.getFullYear();
1205 + var month = String(date.getMonth() + 1).padStart(2, '0');
1206 + var day = String(date.getDate()).padStart(2, '0');
1207 + return year + '-' + month + '-' + day;
1208 + }
1209 +
1210 + /**
1211 + * Check if banner should be shown based on rules
1212 + */
1213 + function shouldShowBanner(bannerData) {
1214 + // Check if already shown max times today
1215 + if (bannerData.showCount >= MAX_SHOWS_PER_DAY) {
1216 + return { show: false, delay: 0 };
1217 + }
1218 +
1219 + // Check visit count against rules
1220 + for (var i = 0; i < POPUP_RULES.length; i++) {
1221 + var rule = POPUP_RULES[i];
1222 + if (bannerData.visitCount === rule.visit) {
1223 + return { show: true, delay: rule.delay };
1224 + }
1225 + }
1226 +
1227 + return { show: false, delay: 0 };
1228 + }
1229 +
1230 + /**
1231 + * Close banner with animation
1232 + */
1233 + function closeBanner(banner) {
1234 + if (!banner) {
1235 + return;
1236 + }
1237 +
1238 + // Add closing animation class
1239 + banner.classList.add('ays-pro-banner-closing');
1240 +
1241 + // Wait for animation to complete
1242 + setTimeout(function() {
1243 + banner.style.display = 'none';
1244 + }, 400);
1245 + }
1246 +
1247 + // Polyfill for String.padStart (for older browsers)
1248 + if (!String.prototype.padStart) {
1249 + String.prototype.padStart = function(targetLength, padString) {
1250 + targetLength = targetLength >> 0;
1251 + padString = String(typeof padString !== 'undefined' ? padString : ' ');
1252 + if (this.length >= targetLength) {
1253 + return String(this);
1254 + } else {
1255 + targetLength = targetLength - this.length;
1256 + if (targetLength > padString.length) {
1257 + padString += padString.repeat(targetLength / padString.length);
1258 + }
1259 + return padString.slice(0, targetLength) + String(this);
1260 + }
1261 + };
1262 + }
1263 + })();
1264 +
1265 + function aysChartFooterBannerCopyToClipboard() {
1266 + var textarea = document.createElement('textarea');
1267 + textarea.value = 'CHARTPRO20';
1268 + textarea.style.position = 'fixed';
1269 + textarea.style.opacity = '0';
1270 + document.body.appendChild(textarea);
1271 +
1272 + textarea.select();
1273 + textarea.setSelectionRange(0, 99999);
1274 +
1275 + try {
1276 + document.execCommand('copy');
1277 + aysChartFooterBannerShowCopyNotification('". esc_html__('Coupon code copied', 'ays-chart-builder') ."');
1278 + } catch (err) {
1279 + console.error('Failed to copy text: ', err);
1280 + }
1281 +
1282 + document.body.removeChild(textarea);
767 1283 }
1284 +
1285 + function aysChartFooterBannerShowCopyNotification(message) {
1286 + var existingNotification = document.querySelector('.ays-chart-footer-banner-copy-notification');
1287 + if (existingNotification) {
1288 + document.body.removeChild(existingNotification);
1289 + }
1290 +
1291 + var notification = document.createElement('div');
1292 + notification.className = 'ays-chart-footer-banner-copy-notification';
1293 + notification.textContent = message;
1294 + document.body.appendChild(notification);
1295 +
1296 + setTimeout(function() {
1297 + notification.classList.add('show');
1298 + }, 10);
1299 +
1300 + setTimeout(function() {
1301 + notification.classList.remove('show');
1302 + setTimeout(function() {
1303 + if (notification.parentNode) {
1304 + document.body.removeChild(notification);
1305 + }
1306 + }, 300);
1307 + }, 2000);
1308 + }";
1309 +
1310 + $content[] = '</script>';
1311 +
1312 + $content = implode( '', $content );
1313 + echo ($content);
768 1314 }
769 1315 }
770 -
771 1316 public function ays_chart_dismiss_button(){
772 1317
773 1318 $data = array(
774 1319 'status' => false,
@@ -774,9 +1319,9 @@
774 1319 'status' => false,
775 1320 );
776 1321
777 1322 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' )){
1323 + 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 1324 update_option('ays_chart_sale_btn', 1);
780 1325 update_option('ays_chart_sale_date', current_time( 'mysql' ));
781 1326 $data['status'] = true;
782 1327 }
@@ -788,8 +1333,357 @@
788 1333 wp_die();
789 1334
790 1335 }
791 1336
1337 + public function ays_chart_discounted_licenses_banner_message(){
1338 +
1339 + $content = array();
1340 +
1341 + $date = time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1342 + $now_date = date('M d, Y H:i:s', $date);
1343 +
1344 + $start_date = strtotime('2025-09-24');
1345 + $end_date = strtotime('2025-10-25');
1346 + $diff_end = $end_date - $date;
1347 +
1348 + $style_attr = '';
1349 + if( $diff_end < 0 ){
1350 + $style_attr = 'style="display:none;"';
1351 + }
1352 +
1353 + $total_licenses = 50;
1354 + $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);
1355 + $days_passed = floor(($date - $start_date) / (24 * 60 * 60));
1356 + $used_licenses = 0;
1357 +
1358 + for ($i = 0; $i < min($days_passed, count($progression_pattern)); $i++) {
1359 + $used_licenses += $progression_pattern[$i];
1360 + }
1361 + $used_licenses = min($used_licenses, $total_licenses);
1362 + $remaining_licenses = $total_licenses - $used_licenses;
1363 + $progress_percentage = ($used_licenses / $total_licenses) * 100;
1364 +
1365 + $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);
1366 +
1367 + $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 . '>';
1368 + $content[] = '<div class="ays-chart-progress-banner-content">';
1369 + $content[] = '<div class="ays-chart-progress-banner-left">';
1370 + $content[] = '<div class="ays-chart-progress-banner-icon">';
1371 + $content[] = '<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
1372 + <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"/>
1373 + <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"/>
1374 + <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"/>
1375 + <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"/>
1376 + <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"/>
1377 + <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"/>
1378 + </svg>';
1379 + $content[] = '</div>';
1380 + $content[] = '<div class="ays-chart-progress-banner-text">';
1381 + $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>';
1382 + $content[] = '<p class="ays-chart-progress-banner-subtitle">' . __('Unlock advanced features + 30 day Money Back Guarantee', 'chart-builder') . '</p>';
1383 + $content[] = '</div>';
1384 + $content[] = '</div>';
1385 +
1386 + $content[] = '<div class="ays-chart-progress-banner-center">';
1387 + $content[] = '<div class="ays-chart-progress-banner-coupon">';
1388 + $content[] = '<div class="ays-chart-progress-banner-coupon-box" onclick="chartCopyToClipboard(\'FREE2PRO20\')" title="' . __('Click to copy', 'chart-builder') . '">';
1389 + $content[] = '<span class="ays-chart-progress-banner-coupon-text">FREE2PRO20</span>';
1390 + $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">';
1391 + $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"/>';
1392 + $content[] = '</svg>';
1393 + $content[] = '</div>';
1394 + $content[] = '</div>';
1395 +
1396 + $content[] = '<div class="ays-chart-progress-banner-progress">';
1397 + $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>';
1398 + $content[] = '<div class="ays-chart-progress-banner-progress-bar">';
1399 + $content[] = '<div class="ays-chart-progress-banner-progress-fill" id="progress-fill" style="width: ' . $progress_percentage . '%;"></div>';
1400 + $content[] = '</div>';
1401 + $content[] = '</div>';
1402 + $content[] = '</div>';
1403 +
1404 + $content[] = '<div class="ays-chart-progress-banner-right">';
1405 + $content[] = '<a href="'. $ays_chart_cta_button_link .'" class="ays-chart-progress-banner-upgrade" target="_blank">';
1406 + $content[] = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">';
1407 + $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"/>';
1408 + $content[] = '</svg>';
1409 + $content[] = ' ' . __('Upgrade Now', 'chart-builder');
1410 + $content[] = '</a>';
1411 + $content[] = '</div>';
1412 + $content[] = '</div>';
1413 +
1414 + if( current_user_can( 'manage_options' ) ){
1415 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1416 + $content[] = '<form action="" method="POST" style="position: absolute; bottom: 0; right: 0; color: #fff;">';
1417 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="color: darkgrey; font-size: 11px;">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
1418 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1419 + $content[] = '</form>';
1420 + $content[] = '</div>';
1421 + }
1422 + $content[] = '</div>';
1423 +
1424 + // Fox LMS Pro Banner Styles
1425 + $content[] = '<style id="ays-chart-progress-banner-styles-inline-css">';
1426 + $content[] = '
1427 + .ays-chart-progress-banner-main {
1428 + background: linear-gradient(135deg, #6344ED 0%, #8C2ABE 100%);
1429 + padding: 20px 30px;
1430 + border-radius: 16px;
1431 + color: white;
1432 + position: relative;
1433 + margin: 20px 0;
1434 + box-shadow: 0 8px 32px rgba(99, 68, 237, 0.3);
1435 + border: 0;
1436 + }
1437 +
1438 + .ays-chart-progress-banner-main .ays-chart-progress-banner-content {
1439 + display: flex;
1440 + align-items: center;
1441 + justify-content: space-between;
1442 + gap: 30px;
1443 + }
1444 +
1445 + .ays-chart-progress-banner-main .ays-chart-progress-banner-left {
1446 + display: flex;
1447 + align-items: center;
1448 + gap: 20px;
1449 + flex: 1;
1450 + }
1451 +
1452 + .ays-chart-progress-banner-main .ays-chart-progress-banner-center {
1453 + display: flex;
1454 + align-items: center;
1455 + gap: 15px;
1456 + flex: 1;
1457 + }
1458 +
1459 + .ays-chart-progress-banner-main .ays-chart-progress-banner-right {
1460 + display: flex;
1461 + align-items: center;
1462 + gap: 20px;
1463 + flex-shrink: 0;
1464 + }
1465 +
1466 + .ays-chart-progress-banner-main .ays-chart-progress-banner-icon {
1467 + font-size: 32px;
1468 + filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
1469 + }
1470 +
1471 + .ays-chart-progress-banner-main .ays-chart-progress-banner-title {
1472 + font-size: 21px;
1473 + font-weight: 700;
1474 + margin: 0 0 8px 0;
1475 + line-height: 1.2;
1476 + color: #fff;
1477 + }
1478 +
1479 + .ays-chart-progress-banner-main .ays-chart-progress-banner-title a {
1480 + text-decoration: underline;
1481 + color: #fff;
1482 + }
1483 +
1484 + .ays-chart-progress-banner-main .ays-chart-progress-banner-subtitle {
1485 + font-size: 16px;
1486 + margin: 0;
1487 + opacity: 0.9;
1488 + font-weight: 400;
1489 + }
1490 +
1491 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon {
1492 + margin-bottom: 5px;
1493 + }
1494 +
1495 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-box {
1496 + border: 2px dotted rgba(255, 255, 255, 0.6);
1497 + padding: 8px 16px;
1498 + border-radius: 8px;
1499 + background: rgba(255, 255, 255, 0.1);
1500 + cursor: pointer;
1501 + transition: all 0.3s ease;
1502 + display: flex;
1503 + align-items: center;
1504 + gap: 8px;
1505 + backdrop-filter: blur(10px);
1506 + }
1507 +
1508 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-box:hover {
1509 + background: rgba(255, 255, 255, 0.2);
1510 + border-color: rgba(255, 255, 255, 0.8);
1511 + transform: translateY(-1px);
1512 + }
1513 +
1514 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-text {
1515 + font-size: 16px;
1516 + font-weight: 700;
1517 + letter-spacing: 1px;
1518 + color: #fff;
1519 + font-family: monospace;
1520 + }
1521 +
1522 + .ays-chart-progress-banner-main .ays-chart-progress-banner-copy-icon {
1523 + opacity: 0.8;
1524 + transition: opacity 0.3s ease;
1525 + }
1526 +
1527 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-box:hover .ays-chart-progress-banner-copy-icon {
1528 + opacity: 1;
1529 + }
1530 +
1531 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress {
1532 + text-align: center;
1533 + width: 100%;
1534 + }
1535 +
1536 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-text {
1537 + font-size: 14px;
1538 + margin: 0 0 10px 0;
1539 + opacity: 0.9;
1540 + }
1541 +
1542 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-bar {
1543 + width: 300px;
1544 + height: 10px;
1545 + background: rgba(255, 255, 255, 0.2);
1546 + border-radius: 4px;
1547 + overflow: hidden;
1548 + margin: 0 auto;
1549 + }
1550 +
1551 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-fill {
1552 + height: 100%;
1553 + background: linear-gradient(90deg, #4ADE80 0%, #22C55E 100%);
1554 + border-radius: 4px;
1555 + transition: width 0.8s ease;
1556 + width: 70%;
1557 + }
1558 +
1559 + .ays-chart-progress-banner-main .ays-chart-progress-banner-upgrade {
1560 + background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
1561 + color: white;
1562 + border: none;
1563 + padding: 12px 24px;
1564 + border-radius: 8px;
1565 + font-size: 16px;
1566 + font-weight: 600;
1567 + cursor: pointer;
1568 + transition: all 0.3s ease;
1569 + box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
1570 + text-decoration: none;
1571 + display: inline-flex;
1572 + align-items: center;
1573 + gap: 8px;
1574 + }
1575 +
1576 + .ays-chart-progress-banner-main .ays-chart-progress-banner-upgrade:hover {
1577 + transform: translateY(-2px);
1578 + box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
1579 + text-decoration: none;
1580 + color: white;
1581 + }
1582 +
1583 + .ays-chart-progress-banner-main .notice-dismiss:before {
1584 + color: #fff;
1585 + }
1586 +
1587 + /* Copy notification */
1588 + .ays-chart-copy-notification {
1589 + position: fixed;
1590 + top: 50%;
1591 + left: 50%;
1592 + transform: translate(-50%, -50%);
1593 + background: rgba(0, 0, 0, 0.8);
1594 + color: white;
1595 + padding: 12px 24px;
1596 + border-radius: 8px;
1597 + font-size: 14px;
1598 + z-index: 10000;
1599 + opacity: 0;
1600 + transition: opacity 0.3s ease;
1601 + }
1602 +
1603 + .ays-chart-copy-notification.show {
1604 + opacity: 1;
1605 + }
1606 +
1607 + @media (max-width: 1400px) {
1608 + .ays-chart-progress-banner-main .ays-chart-progress-banner-center {
1609 + flex-direction: column;
1610 + }
1611 + }
1612 +
1613 + @media (max-width: 1200px) {
1614 + .ays-chart-progress-banner-main .ays-chart-progress-banner-content {
1615 + flex-direction: column;
1616 + gap: 20px;
1617 + }
1618 +
1619 + .ays-chart-progress-banner-main .ays-chart-progress-banner-left {
1620 + width: 100%;
1621 + justify-content: center;
1622 + text-align: center;
1623 + flex-direction: column;
1624 + }
1625 +
1626 + .ays-chart-progress-banner-main .ays-chart-progress-banner-center {
1627 + width: 100%;
1628 + }
1629 +
1630 + .ays-chart-progress-banner-main .ays-chart-progress-banner-right {
1631 + width: 100%;
1632 + justify-content: center;
1633 + }
1634 + }
1635 +
1636 + @media (max-width: 768px) {
1637 + #ays-chart-progress-banner-main {
1638 + display: none !important;
1639 + }
1640 +
1641 + .ays-chart-progress-banner-main {
1642 + padding: 15px 20px;
1643 + margin: 15px 0;
1644 + }
1645 +
1646 + .ays-chart-progress-banner-main .ays-chart-progress-banner-title {
1647 + font-size: 18px;
1648 + }
1649 +
1650 + .ays-chart-progress-banner-main .ays-chart-progress-banner-subtitle {
1651 + font-size: 14px;
1652 + }
1653 +
1654 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-bar {
1655 + width: 100%;
1656 + max-width: 280px;
1657 + }
1658 +
1659 + .ays-chart-progress-banner-main .ays-chart-progress-banner-upgrade {
1660 + padding: 10px 20px;
1661 + font-size: 14px;
1662 + }
1663 + }
1664 +
1665 + @media (max-width: 480px) {
1666 + .ays-chart-progress-banner-main {
1667 + padding: 12px 15px;
1668 + }
1669 +
1670 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-text {
1671 + font-size: 14px;
1672 + }
1673 +
1674 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-bar {
1675 + max-width: 250px;
1676 + }
1677 + }
1678 + ';
1679 +
1680 + $content[] = '</style>';
1681 +
1682 + $content = implode( '', $content );
1683 + echo ($content);
1684 + }
1685 +
792 1686 // 30% Sale Emma
793 1687 public function ays_chart_sale_message_30_emma($ishmar){
794 1688 if($ishmar == 0 ){
795 1689 $content = array();
@@ -806,9 +1700,9 @@
806 1700 </div>';
807 1701 $content[] = '</div>';
808 1702
809 1703 $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">';
1704 + $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 1705 $content[] = '<span style="padding-left: 4px; font-size: 14px; font-weight: 600;"> 30 Day Money Back Guarantee</span>';
812 1706
813 1707 $content[] = '</div>';
814 1708
@@ -868,9 +1762,10 @@
868 1762 $content[] = '</div>';
869 1763 $content[] = '</div>';
870 1764
871 1765 $content = implode( '', $content );
872 - echo html_entity_decode(esc_html( $content ));
1766 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1767 +
873 1768 }
874 1769 }
875 1770
876 1771 // Self 20% sale
@@ -885,18 +1780,26 @@
885 1780 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
886 1781
887 1782 $content[] = '<div class="ays-chart-dicount-sale-name-discount-box">';
888 1783 $content[] = '<span class="ays-chart-new-chart-pro-title">';
889 - $content[] = __( "<span><a href='https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-plugin-name' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>", CHART_BUILDER_NAME );
1784 + // Translators: %s is the URL to the Chart Builder plugin page.
1785 + $content[] = sprintf(
1786 + /* translators: %s is the Chart Builder plugin URL. */
1787 + __(
1788 + "<span><a href='%s' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>",
1789 + 'chart-builder'
1790 + ),
1791 + "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
1792 + );
890 1793 $content[] = '</span>';
891 1794 $content[] = '<div>';
892 - $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-sale-30.svg" style="width: 70px;">';
1795 + $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 1796 $content[] = '</div>';
894 1797 $content[] = '</div>';
895 1798
896 1799 $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 );
1800 + $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
1801 + $content[] = esc_html__( "30 Days Money Back Guarantee", 'chart-builder' );
899 1802 $content[] = '</span>';
900 1803
901 1804 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-chart">';
902 1805 $content[] = '<form method="POST">';
@@ -915,15 +1818,15 @@
915 1818
916 1819 $content[] = '<div id="ays-chart-countdown-main-container">';
917 1820 $content[] = '<div class="ays-chart-countdown-container">';
918 1821 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
919 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1822 + $content[] = esc_html__( "Offer ends in:", 'chart-builder' );
920 1823
921 1824 $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>';
1825 + $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . esc_html__( 'Days', 'chart-builder' ) . '</li>';
1826 + $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . esc_html__( 'Hours', 'chart-builder' ) . '</li>';
1827 + $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . esc_html__( 'Minutes', 'chart-builder' ) . '</li>';
1828 + $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . esc_html__( 'Seconds', 'chart-builder' ) . '</li>';
926 1829 $content[] = '</ul>';
927 1830 $content[] = '</div>';
928 1831
929 1832 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
@@ -937,11 +1840,11 @@
937 1840
938 1841 $content[] = '</div>';
939 1842
940 1843 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
941 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-button" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . __( 'Buy Now', CHART_BUILDER_NAME ) . '</a>';
1844 + $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 1845 $content[] = '<span class="ays-chart-dicount-one-time-text">';
943 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1846 + $content[] = esc_html__( "One-time payment", 'chart-builder' );
944 1847 $content[] = '</span>';
945 1848 $content[] = '</div>';
946 1849
947 1850 $content[] = '</div>';
@@ -948,9 +1851,9 @@
948 1851
949 1852 $content[] = '</div>';
950 1853
951 1854 $content = implode( '', $content );
952 - echo $content;
1855 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
953 1856 }
954 1857 }
955 1858
956 1859 // Helloween banner
@@ -972,15 +1875,15 @@
972 1875 <span style='' class='ays-chart-helloween-bundle'>
973 1876 <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 1877 Chart Builder
975 1878 </a>
976 - </span>", CHART_BUILDER_NAME );
1879 + </span>", 'chart-builder' );
977 1880 $content[] = '</p>';
978 1881 $content[] = '<p>';
979 1882 $content[] = __( "Hurry up!
980 1883 <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 1884 Check it out!
982 - </a>", CHART_BUILDER_NAME );
1885 + </a>", 'chart-builder' );
983 1886 $content[] = '</p>';
984 1887
985 1888 $content[] = '</div>';
986 1889
@@ -1010,9 +1913,9 @@
1010 1913 $content[] = '</div>';
1011 1914
1012 1915 $content[] = '</div>';
1013 1916 $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>';
1917 + $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 1918 $content[] = '</div>';
1016 1919 $content[] = '</div>';
1017 1920
1018 1921 $content[] = '</div>';
@@ -1033,74 +1936,12 @@
1033 1936 $content[] = '</div>';
1034 1937
1035 1938 $content = implode( '', $content );
1036 1939
1037 - echo $content;
1940 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1038 1941 }
1039 1942 }
1040 1943
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 1944 // Christmas banner
1104 1945 public static function ays_chart_christmas_message($ishmar){
1105 1946 if($ishmar == 0 ){
1106 1947 $content = array();
@@ -1108,10 +1949,10 @@
1108 1949 $content[] = '<div id="ays-chart-dicount-christmas-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1109 1950 $content[] = '<div id="ays-chart-dicount-christmas-month" class="ays_chart_dicount_month">';
1110 1951 $content[] = '<div class="ays-chart-dicount-christmas-box">';
1111 1952 $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>';
1953 + $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>';
1954 + $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', 'chart-builder' ) . '</div>';
1114 1955 $content[] = '</div>';
1115 1956
1116 1957 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1117 1958 $content[] = '<div id="ays-chart-countdown-main-container">';
@@ -1117,12 +1958,12 @@
1117 1958 $content[] = '<div id="ays-chart-countdown-main-container">';
1118 1959 $content[] = '<div class="ays-chart-countdown-container">';
1119 1960 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1120 1961 $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>';
1962 + $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', 'chart-builder' ) . '</li>';
1963 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', 'chart-builder' ) . '</li>';
1964 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', 'chart-builder' ) . '</li>';
1965 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', 'chart-builder' ) . '</li>';
1125 1966 $content[] = '</ul>';
1126 1967 $content[] = '</div>';
1127 1968 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1128 1969 $content[] = '<span>🚀</span>';
@@ -1134,9 +1975,9 @@
1134 1975 $content[] = '</div>';
1135 1976 $content[] = '</div>';
1136 1977
1137 1978 $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>';
1979 + $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 1980 $content[] = '</div>';
1140 1981 $content[] = '</div>';
1141 1982 $content[] = '</div>';
1142 1983
@@ -1142,9 +1983,9 @@
1142 1983
1143 1984 $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-christmas">';
1144 1985 $content[] = '<form method="POST">';
1145 1986 $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>';
1987 + $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', 'chart-builder' ) . '</button>';
1147 1988 $content[] = '</div>';
1148 1989 $content[] = '</form>';
1149 1990 $content[] = '</div>';
1150 1991 $content[] = '</div>';
@@ -1150,9 +1991,9 @@
1150 1991 $content[] = '</div>';
1151 1992
1152 1993 $content = implode( '', $content );
1153 1994
1154 - echo $content;
1995 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1155 1996 }
1156 1997 }
1157 1998
1158 1999 // Silver Bundle
@@ -1161,20 +2002,20 @@
1161 2002 $content = array();
1162 2003
1163 2004 $content[] = '<div id="ays-chart-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1164 2005 $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>';
2006 + $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 2007
1167 2008 $content[] = '<div class="ays-chart-dicount-wrap-box">';
1168 2009
1169 2010 $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 );
2011 + $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 2012 $content[] = '</strong>';
1172 2013
1173 2014 $content[] = '<br>';
1174 2015
1175 2016 $content[] = '<strong>';
1176 - $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", CHART_BUILDER_NAME );
2017 + $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", 'chart-builder' );
1177 2018 $content[] = '</strong>';
1178 2019
1179 2020 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1180 2021
@@ -1213,23 +2054,134 @@
1213 2054 $content[] = '</div>';
1214 2055
1215 2056 $content[] = '</div>';
1216 2057
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>';
2058 + $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 2059 $content[] = '</div>';
1219 2060 $content[] = '</div>';
1220 2061
1221 2062 $content = implode( '', $content );
1222 - echo $content;
2063 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1223 2064 }
1224 2065 }
1225 2066
1226 - // Black Friday 2024
1227 - public function ays_chart_black_friday_message_2024($ishmar){
2067 + //silver bundle
2068 + public function ays_chart_new_silver_bundle_message_2025($ishmar){
2069 + $content = array();
2070 +
2071 + $date = time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
2072 + $now_date = date('M d, Y H:i:s', $date);
2073 +
2074 + $chart_banner_date = strtotime( $this->ays_chart_update_banner_time() );
2075 +
2076 + $diff = $chart_banner_date - $date;
2077 +
2078 + $style_attr = '';
2079 + if( $diff < 0 ){
2080 + $style_attr = 'style="display:none;"';
2081 + }
2082 +
2083 + $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 );
2084 +
2085 + $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">';
2086 + $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
2087 +
2088 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
2089 + $content[] = '<div>';
2090 + $content[] = '<div class="ays-chart-dicount-logo-box">';
2091 + $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>';
2092 +
2093 + $content[] = '<div>';
2094 + $content[] = '<span class="ays-chart-new-silver-bundle-title">';
2095 + $content[] = sprintf(
2096 + /* translators: 1: opening link wrapper with <a> tag, 2: closing </a> tag */
2097 + __( '%1$s Silver Bundle %2$s (Quiz + Form + Chart)', 'chart-builder' ),
2098 + '<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;">',
2099 + '</a></span>'
2100 + );
2101 + $content[] = '</span>';
2102 + $content[] = '</br>';
2103 + $content[] = '<span class="ays-chart-new-silver-bundle-desc">';
2104 + $content[] = __( "30 Day Money Back Guarantee", 'chart-builder' );
2105 + $content[] = '</span>';
2106 + $content[] = '</div>';
2107 +
2108 + $content[] = '<div class="ays-chart-new-silver-bundle-title-icon-row" style="display: inline-block;">';
2109 + $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;">';
2110 + $content[] = '</div>';
2111 +
2112 + $content[] = '</div>';
2113 +
2114 + $content[] = '<div class="ays-chart-new-silver-bundle-mobile-image-display-block display_none">';
2115 + $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-50.svg" style="width: 70px;">';
2116 + $content[] = '</div>';
2117 + $content[] = '</div>';
2118 +
2119 + $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
2120 +
2121 + $content[] = '<form action="" method="POST">';
2122 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
2123 + if( current_user_can( 'manage_options' ) ){
2124 + $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>';
2125 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
2126 + }
2127 + $content[] = '</div>';
2128 + $content[] = '</form>';
2129 +
2130 + $content[] = '</div>';
2131 +
2132 + $content[] = '</div>';
2133 +
2134 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
2135 +
2136 + $content[] = '<div id="ays-chart-maker-countdown-main-container">';
2137 + $content[] = '<div class="ays-chart-maker-countdown-container">';
2138 +
2139 + $content[] = '<div ' . $style_attr . ' id="ays-chart-countdown">';
2140 +
2141 + $content[] = '<ul>';
2142 +
2143 + $content[] = '<li><span id="ays-chart-countdown-days"></span></li>';
2144 + $content[] = '<li><span id="ays-chart-countdown-hours"></span></li>';
2145 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span></li>';
2146 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span></li>';
2147 + $content[] = '</ul>';
2148 + $content[] = '</div>';
2149 +
2150 + $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
2151 + $content[] = '</div>';
2152 +
2153 + $content[] = '</div>';
2154 + $content[] = '</div>';
2155 +
2156 + $content[] = '</div>';
2157 +
2158 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
2159 + $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>';
2160 + $content[] = '<span class="ays-chart-dicount-one-time-text">';
2161 + $content[] = __( "One-time payment", 'chart-builder' );
2162 + $content[] = '</span>';
2163 + $content[] = '</div>';
2164 + $content[] = '</div>';
2165 + $content[] = '</div>';
2166 +
2167 + // /* New Mega Bundle Banner Quiz | Start */
2168 + $content[] = '<style id="ays-chart-mega-bundle-styles-inline-css">';
2169 + $content[] = '
2170 + 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%}}';
2171 + $content[] = '</style>';
2172 + // /* New Mega Bundle Banner Quiz | End */
2173 +
2174 + $content = implode( '', $content );
2175 + echo ($content);
2176 + }
2177 +
2178 + // Christmas Top Banner 2024
2179 + public function ays_chart_christmas_message_2024($ishmar){
1228 2180 if($ishmar == 0 ){
1229 2181 $content = array();
1230 2182
1231 - $content[] = '<div id="ays-chart-black-friday-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
2183 + $content[] = '<div id="ays-chart-christmas-top-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1232 2184 $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1233 2185
1234 2186 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
1235 2187
@@ -1238,16 +2190,16 @@
1238 2190
1239 2191 $content[] = '<div id="ays-chart-countdown">';
1240 2192
1241 2193 $content[] = '<div>';
1242 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
2194 + $content[] = __( "Offer ends in:", 'chart-builder' );
1243 2195 $content[] = '</div>';
1244 2196
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>';
2197 + $content[] = '<ul style="padding-left: 0;">';
2198 + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>';
2199 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>';
2200 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>';
2201 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>';
1250 2202 $content[] = '</ul>';
1251 2203 $content[] = '</div>';
1252 2204
1253 2205 $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
@@ -1264,17 +2216,24 @@
1264 2216
1265 2217 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1266 2218 $content[] = '<div>';
1267 2219
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 );
2220 + $content[] = '<span class="ays-chart-christmas-top-bundle-title">';
2221 + $content[] = sprintf(
2222 + /* translators: %s is the Chart Builder plugin URL with version parameter. */
2223 + __(
2224 + "<span><a href='%s' class='ays-chart-christmas-top-bundle-title-link' target='_blank'>Christmas Sale</a></span>",
2225 + 'chart-builder'
2226 + ),
2227 + "https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner" . CHART_BUILDER_VERSION
2228 + );
1270 2229 $content[] = '</span>';
1271 2230
1272 2231 $content[] = '</br>';
1273 2232
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 );
2233 + $content[] = '<span class="ays-chart-christmas-top-bundle-desc">';
2234 + $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">';
2235 + $content[] = __( "20% Extra OFF", 'chart-builder' );
1277 2236 $content[] = '</a>';
1278 2237 $content[] = '</span>';
1279 2238 $content[] = '</div>';
1280 2239
@@ -1282,9 +2241,9 @@
1282 2241
1283 2242 $content[] = '<form action="" method="POST">';
1284 2243 $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1285 2244 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>';
2245 + $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 2246 $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1288 2247 }
1289 2248 $content[] = '</div>';
1290 2249 $content[] = '</form>';
@@ -1292,20 +2251,21 @@
1292 2251 $content[] = '</div>';
1293 2252
1294 2253 $content[] = '</div>';
1295 2254
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>';
2255 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-christmas-top-bundle-coupon-text-box">';
2256 + $content[] = '<div class="ays-chart-christmas-top-bundle-coupon-row">';
2257 + $content[] = 'xmas20off';
2258 + $content[] = '</div>';
2259 + $content[] = '<div class="ays-chart-christmas-top-bundle-text-row">';
2260 + $content[] = __( '20% Extra Discount Coupon', 'chart-builder' );
2261 + $content[] = '</div>';
1302 2262 $content[] = '</div>';
1303 2263
1304 2264 $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>';
2265 + $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 2266 $content[] = '<span class="ays-chart-dicount-one-time-text">';
1307 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
2267 + $content[] = __( "One-time payment", 'chart-builder' );
1308 2268 $content[] = '</span>';
1309 2269 $content[] = '</div>';
1310 2270 $content[] = '</div>';
1311 2271 $content[] = '</div>';
@@ -1310,18 +2270,1242 @@
1310 2270 $content[] = '</div>';
1311 2271 $content[] = '</div>';
1312 2272
1313 2273 $content = implode( '', $content );
2274 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
2275 + }
2276 + }
2277 +
2278 + // Halloween Bundle 2025
2279 + public function ays_chart_new_halloween_bundle_message_2025($ishmar){
2280 + if($ishmar == 0 ){
2281 + $content = array();
2282 +
2283 + $date = time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
2284 + $now_date = date('M d, Y H:i:s', $date);
2285 +
2286 + $start_date = strtotime('2025-09-08');
2287 + $end_date = strtotime('2025-10-31');
2288 + $diff_end = $end_date - $date;
2289 +
2290 + $style_attr = '';
2291 + if( $diff_end < 0 ){
2292 + $style_attr = 'style="display:none;"';
2293 + }
2294 +
2295 + $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);
2296 +
2297 + $content[] = '
2298 + <div id="ays-chart-halloween-banner-2025-main" class="ays-chart-halloween-banner-2025-main ays_chart_dicount_info notice notice-success is-dismissible">
2299 + <div class="ays-chart-halloween-banner-2025-content">
2300 + <div class="ays-chart-halloween-banner-2025-left">
2301 + <div class="ays-chart-halloween-banner-2025-text">
2302 + <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>
2303 + <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>
2304 + </div>
2305 + </div>
2306 +
2307 + <div class="ays-chart-halloween-banner-2025-center">';
2308 +
2309 + $content[] = '<div id="ays-chart-halloween-banner-2025-countdown" class="ays-chart-halloween-banner-2025-countdown" ' . $style_attr . '>';
2310 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-timer">';
2311 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-item">';
2312 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-value" id="ays-chart-halloween-banner-2025-days">00</div>';
2313 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-label">' . __('days', 'chart-builder') . '</div>';
2314 + $content[] = '</div>';
2315 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-separator">:</div>';
2316 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-item">';
2317 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-value" id="ays-chart-halloween-banner-2025-hours">00</div>';
2318 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-label">' . __('hours', 'chart-builder') . '</div>';
2319 + $content[] = '</div>';
2320 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-separator">:</div>';
2321 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-item">';
2322 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-value" id="ays-chart-halloween-banner-2025-minutes">00</div>';
2323 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-label">' . __('minutes', 'chart-builder') . '</div>';
2324 + $content[] = '</div>';
2325 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-separator">:</div>';
2326 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-item">';
2327 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-value" id="ays-chart-halloween-banner-2025-seconds">00</div>';
2328 + $content[] = '<div class="ays-chart-halloween-banner-2025-countdown-label">' . __('seconds', 'chart-builder') . '</div>';
2329 + $content[] = '</div>';
2330 + $content[] = '</div>';
2331 + $content[] = '</div>';
2332 +
2333 + $content[] = '</div>
2334 +
2335 + <div class="ays-chart-halloween-banner-2025-right">
2336 + <div class="ays-chart-halloween-banner-2025-pumpkin">
2337 + <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2338 + <g clip-path="url(#clip0_177_40)">
2339 + <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"/>
2340 + <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"/>
2341 + <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"/>
2342 + </g>
2343 + <defs>
2344 + <clipPath id="clip0_177_40">
2345 + <rect width="36" height="36" fill="white"/>
2346 + </clipPath>
2347 + </defs>
2348 + </svg>
2349 + </div>
2350 +
2351 +
2352 +
2353 + <div class="ays-chart-halloween-banner-2025-discount-section">
2354 + <div class="ays-chart-halloween-banner-2025-discount">25% OFF</div>
2355 + <div class="ays-chart-halloween-banner-2025-coupon-wrapper">
2356 + <div class="ays-chart-halloween-banner-2025-coupon-box" onclick="aysChartHalloweenCopyToClipboard(\'HALLOWEEN25\')" title="Click to copy">
2357 + <span class="ays-chart-halloween-banner-2025-coupon-text">HALLOWEEN25</span>
2358 + <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">
2359 + <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"/>
2360 + </svg>
2361 + </div>
2362 + </div>
2363 + <a href="'. $ays_chart_cta_button_link .'" class="ays-chart-halloween-banner-2025-upgrade" target="_blank">Upgrade Now</a>
2364 + </div>';
2365 +
2366 + if( current_user_can( 'manage_options' ) ){
2367 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
2368 + $content[] = '<form action="" method="POST" style="position: absolute; bottom: -5px; right: 0; color: #fff;">';
2369 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="color: darkgrey; font-size: 11px;">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
2370 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
2371 + $content[] = '</form>';
2372 + $content[] = '</div>';
2373 + }
2374 +
2375 + $content[] = '
2376 + </div>
2377 + </div>
2378 + </div>';
2379 +
2380 + $content[] = '<style id="ays-chart-progress-banner-styles-inline-css">';
2381 + $content[] = '
2382 + .ays-chart-halloween-banner-2025-main {
2383 + background: linear-gradient(135deg, #1A0F2E 100%, #2D1B4E 0%);
2384 + background-image: url("' . esc_attr( CHART_BUILDER_ADMIN_URL ) . '/images/halloween-banner-background-image-remove.png"), linear-gradient(135deg, #2D1B4E 0%, #1A0F2E 100%);
2385 + background-position: left center, center;
2386 + background-repeat: no-repeat, no-repeat;
2387 + background-size: auto 100%, cover;
2388 + padding: 20px 30px 20px 130px;
2389 + border-radius: 12px;
2390 + color: white;
2391 + margin: 20px 0;
2392 + border: 0;
2393 + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
2394 + overflow: hidden;
2395 + }
2396 +
2397 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-content {
2398 + display: flex;
2399 + align-items: center;
2400 + justify-content: space-between;
2401 + gap: 30px;
2402 + }
2403 +
2404 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-left {
2405 + display: flex;
2406 + align-items: center;
2407 + gap: 20px;
2408 + }
2409 +
2410 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-center {
2411 + display: flex;
2412 + align-items: center;
2413 + justify-content: center;
2414 + flex: 1;
2415 + max-width: 350px;
2416 + }
2417 +
2418 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-right {
2419 + display: flex;
2420 + align-items: center;
2421 + gap: 15px;
2422 + flex-shrink: 0;
2423 + }
2424 +
2425 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-icon {
2426 + flex-shrink: 0;
2427 + }
2428 +
2429 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-pumpkin svg {
2430 + display: inline !important;
2431 + border: none !important;
2432 + box-shadow: none !important;
2433 + height: 1em !important;
2434 + width: 1em !important;
2435 + margin: 0 0.07em !important;
2436 + vertical-align: -0.1em !important;
2437 + background: none !important;
2438 + padding: 0 !important;
2439 + }
2440 +
2441 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-orb {
2442 + width: 80px;
2443 + height: 80px;
2444 + background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
2445 + border-radius: 50%;
2446 + display: flex;
2447 + align-items: center;
2448 + justify-content: center;
2449 + box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
2450 + border: 3px solid rgba(168, 85, 247, 0.4);
2451 + }
2452 +
2453 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-question {
2454 + font-size: 48px;
2455 + font-weight: 700;
2456 + color: #E9D5FF;
2457 + }
2458 +
2459 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-bat {
2460 + font-size: 20px;
2461 + opacity: 0.8;
2462 + }
2463 +
2464 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-bat-1 {
2465 + margin-left: -100px;
2466 + margin-top: -40px;
2467 + }
2468 +
2469 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-bat-2 {
2470 + margin-left: -110px;
2471 + margin-top: 35px;
2472 + }
2473 +
2474 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-sparkle {
2475 + font-size: 12px;
2476 + opacity: 0.7;
2477 + }
2478 +
2479 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-sparkle-1 {
2480 + margin-left: -95px;
2481 + margin-top: -60px;
2482 + }
2483 +
2484 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-sparkle-2 {
2485 + margin-left: -70px;
2486 + margin-top: -15px;
2487 + }
2488 +
2489 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-sparkle-3 {
2490 + margin-left: -120px;
2491 + margin-top: 10px;
2492 + }
2493 +
2494 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-text {
2495 + flex: 1;
2496 + }
2497 +
2498 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title {
2499 + font-size: 24px;
2500 + font-weight: 700;
2501 + margin: 0 0 8px 0;
2502 + line-height: 1.2;
2503 + color: #fff;
2504 + text-transform: uppercase;
2505 + letter-spacing: 1px;
2506 + }
2507 +
2508 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title a {
2509 + color: #FB923C;
2510 + text-decoration: underline;
2511 + }
2512 +
2513 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-subtitle {
2514 + font-size: 16px;
2515 + margin: 0;
2516 + opacity: 0.9;
2517 + font-weight: 400;
2518 + color: #E9D5FF;
2519 + }
2520 +
2521 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-description {
2522 + font-size: 14px;
2523 + margin: 0;
2524 + opacity: 0.85;
2525 + line-height: 1.5;
2526 + color: #D8B4FE;
2527 + }
2528 +
2529 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-pumpkin {
2530 + font-size: 64px;
2531 + filter: drop-shadow(0 0 20px rgba(251, 146, 60, 0.8));
2532 + flex-shrink: 0;
2533 + }
2534 +
2535 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-discount-section {
2536 + display: flex;
2537 + flex-direction: column;
2538 + align-items: center;
2539 + gap: 10px;
2540 + }
2541 +
2542 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-discount {
2543 + font-size: 36px;
2544 + font-weight: 700;
2545 + color: #FB923C;
2546 + text-shadow: 0 0 20px rgba(251, 146, 60, 0.6);
2547 + margin: 0;
2548 + line-height: 1;
2549 + }
2550 +
2551 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-wrapper {
2552 + margin-bottom: 5px;
2553 + }
2554 +
2555 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-box {
2556 + border: 2px dashed rgba(255, 255, 255, 0.4);
2557 + padding: 6px 12px;
2558 + border-radius: 6px;
2559 + background: rgba(255, 255, 255, 0.1);
2560 + cursor: pointer;
2561 + transition: all 0.3s ease;
2562 + display: flex;
2563 + align-items: center;
2564 + gap: 6px;
2565 + backdrop-filter: blur(10px);
2566 + }
2567 +
2568 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-box:hover {
2569 + background: rgba(255, 255, 255, 0.2);
2570 + border-color: rgba(255, 255, 255, 0.6);
2571 + transform: translateY(-1px);
2572 + }
2573 +
2574 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-text {
2575 + font-size: 14px;
2576 + font-weight: 700;
2577 + letter-spacing: 1px;
2578 + color: #fff;
2579 + font-family: monospace;
2580 + }
2581 +
2582 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-copy-icon {
2583 + opacity: 0.8;
2584 + transition: opacity 0.3s ease;
2585 + }
2586 +
2587 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-box:hover .ays-chart-halloween-banner-2025-copy-icon {
2588 + opacity: 1;
2589 + }
2590 +
2591 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-upgrade {
2592 + background: linear-gradient(135deg, #FB923C 0%, #F97316 100%);
2593 + color: white;
2594 + border: none;
2595 + padding: 12px 28px;
2596 + border-radius: 8px;
2597 + font-size: 16px;
2598 + font-weight: 600;
2599 + cursor: pointer;
2600 + transition: all 0.3s ease;
2601 + box-shadow: 0 4px 16px rgba(251, 146, 60, 0.5);
2602 + text-decoration: none;
2603 + display: inline-flex;
2604 + align-items: center;
2605 + text-align: center;
2606 + }
2607 +
2608 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-upgrade:hover {
2609 + transform: translateY(-2px);
2610 + box-shadow: 0 6px 20px rgba(251, 146, 60, 0.7);
2611 + text-decoration: none;
2612 + color: white;
2613 + }
2614 +
2615 + .ays-chart-halloween-banner-2025-main .notice-dismiss:before {
2616 + color: #fff;
2617 + }
2618 +
2619 + .ays-chart-halloween-banner-2025-copy-notification {
2620 + position: fixed;
2621 + top: 50%;
2622 + left: 50%;
2623 + transform: translate(-50%, -50%);
2624 + background: rgba(0, 0, 0, 0.8);
2625 + color: white;
2626 + padding: 12px 24px;
2627 + border-radius: 8px;
2628 + font-size: 14px;
2629 + z-index: 10000;
2630 + opacity: 0;
2631 + transition: opacity 0.3s ease;
2632 + }
2633 +
2634 + .ays-chart-halloween-banner-2025-copy-notification.show {
2635 + opacity: 1;
2636 + }
2637 +
2638 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-timer {
2639 + display: flex;
2640 + align-items: center;
2641 + justify-content: center;
2642 + gap: 8px;
2643 + }
2644 +
2645 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-item {
2646 + background: rgba(255, 255, 255, 0.15);
2647 + border-radius: 8px;
2648 + padding: 8px 12px;
2649 + min-width: 60px;
2650 + backdrop-filter: blur(10px);
2651 + }
2652 +
2653 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-value {
2654 + font-size: 24px;
2655 + font-weight: 700;
2656 + line-height: 1;
2657 + margin-bottom: 4px;
2658 + color: #fff;
2659 + text-align: center;
2660 + }
2661 +
2662 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-label {
2663 + font-size: 11px;
2664 + opacity: 0.8;
2665 + text-transform: lowercase;
2666 + text-align: center;
2667 + }
2668 +
2669 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-countdown-separator {
2670 + font-size: 24px;
2671 + font-weight: 700;
2672 + opacity: 0.6;
2673 + margin: 0 4px;
2674 + }
2675 +
2676 + @media (min-width: 1200px) {
2677 + .ays-chart-halloween-banner-2025-main .wp-core-ui .notice.is-dismissible {
2678 + padding-right: 60px;
2679 + }
2680 + }
2681 +
2682 + @media (max-width: 1200px) {
2683 +
2684 + div.ays-chart-halloween-banner-2025-main {
2685 + padding: 20px 30px;
2686 + }
2687 +
2688 + div.ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-pumpkin {
2689 + display: none;
2690 + }
2691 +
2692 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-subtitle,
2693 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title {
2694 + text-align: center;
2695 + }
2696 +
2697 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-content {
2698 + flex-wrap: wrap;
2699 + gap: 20px;
2700 + }
2701 +
2702 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-left {
2703 + width: 100%;
2704 + }
2705 +
2706 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-center {
2707 + width: 100%;
2708 + max-width: 100%;
2709 + text-align: center;
2710 + }
2711 +
2712 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-right {
2713 + width: 100%;
2714 + justify-content: center;
2715 + }
2716 + }
2717 +
2718 + @media (max-width: 786px) {
2719 + #ays-chart-halloween-banner-2025-main {
2720 + display: none !important;
2721 + }
2722 + }
2723 +
2724 + @media (max-width: 768px) {
2725 + .ays-chart-halloween-banner-2025-main {
2726 + padding: 15px 20px;
2727 + margin: 15px 0;
2728 + }
2729 +
2730 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title {
2731 + font-size: 20px;
2732 + }
2733 +
2734 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-subtitle {
2735 + font-size: 14px;
2736 + }
2737 +
2738 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-description {
2739 + font-size: 13px;
2740 + }
2741 +
2742 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-pumpkin {
2743 + font-size: 48px;
2744 + }
2745 +
2746 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-discount {
2747 + font-size: 28px;
2748 + }
2749 +
2750 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-upgrade {
2751 + padding: 10px 20px;
2752 + font-size: 14px;
2753 + }
2754 + }
2755 +
2756 + @media (max-width: 480px) {
2757 + .ays-chart-halloween-banner-2025-main {
2758 + padding: 12px 15px;
2759 + }
2760 +
2761 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-orb {
2762 + width: 60px;
2763 + height: 60px;
2764 + }
2765 +
2766 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-question {
2767 + font-size: 36px;
2768 + }
2769 +
2770 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-title {
2771 + font-size: 18px;
2772 + }
2773 +
2774 + .ays-chart-halloween-banner-2025-main .ays-chart-halloween-banner-2025-coupon-text {
2775 + font-size: 12px;
2776 + }
2777 + }
2778 + ';
2779 +
2780 + $content[] = '</style>';
2781 +
2782 + $content[] = '<script>';
2783 + $content[] = "
2784 + function aysChartHalloweenCopyToClipboard(text) {
2785 + // Create a temporary textarea element
2786 + var textarea = document.createElement('textarea');
2787 + textarea.value = text;
2788 + textarea.style.position = 'fixed';
2789 + textarea.style.opacity = '0';
2790 + document.body.appendChild(textarea);
2791 +
2792 + // Select and copy the text
2793 + textarea.select();
2794 + textarea.setSelectionRange(0, 99999); // For mobile devices
2795 +
2796 + try {
2797 + document.execCommand('copy');
2798 + aysChartHalloweenShowCopyNotification('Coupon code copied!');
2799 + } catch (err) {
2800 + console.error('Failed to copy text: ', err);
2801 + }
2802 +
2803 + // Remove the temporary textarea
2804 + document.body.removeChild(textarea);
2805 + }
2806 +
2807 + function aysChartHalloweenShowCopyNotification(message) {
2808 + // Check if notification already exists
2809 + var existingNotification = document.querySelector('.ays-chart-halloween-banner-2025-copy-notification');
2810 + if (existingNotification) {
2811 + document.body.removeChild(existingNotification);
2812 + }
2813 +
2814 + // Create notification element
2815 + var notification = document.createElement('div');
2816 + notification.className = 'ays-chart-halloween-banner-2025-copy-notification';
2817 + notification.textContent = message;
2818 + document.body.appendChild(notification);
2819 +
2820 + // Show notification with animation
2821 + setTimeout(function() {
2822 + notification.classList.add('show');
2823 + }, 10);
2824 +
2825 + // Hide and remove notification after 2 seconds
2826 + setTimeout(function() {
2827 + notification.classList.remove('show');
2828 + setTimeout(function() {
2829 + if (notification.parentNode) {
2830 + document.body.removeChild(notification);
2831 + }
2832 + }, 300);
2833 + }, 2000);
2834 + }
2835 +
2836 + (function() {
2837 + var endDate = new Date('". date('Y-m-d H:i:s', $end_date) ."').getTime();
2838 +
2839 + function updateCountdown() {
2840 + var now = new Date().getTime();
2841 + var distance = endDate - now;
2842 +
2843 + if (distance < 0) {
2844 + clearInterval(updateCountdown);
2845 + document.getElementById('ays-chart-halloween-banner-2025-progress-banner-countdown').style.display = 'none';
2846 + return;
2847 + }
2848 +
2849 + var days = Math.floor(distance / (1000 * 60 * 60 * 24));
2850 + var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
2851 + var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
2852 + var seconds = Math.floor((distance % (1000 * 60)) / 1000);
2853 +
2854 + function padZero(num) {
2855 + return num < 10 ? '0' + num : num;
2856 + }
2857 +
2858 + document.getElementById('ays-chart-halloween-banner-2025-days').textContent = padZero(days);
2859 + document.getElementById('ays-chart-halloween-banner-2025-hours').textContent = padZero(hours);
2860 + document.getElementById('ays-chart-halloween-banner-2025-minutes').textContent = padZero(minutes);
2861 + document.getElementById('ays-chart-halloween-banner-2025-seconds').textContent = padZero(seconds);
2862 + }
2863 +
2864 + updateCountdown();
2865 + setInterval(updateCountdown, 1000);
2866 + })()";
2867 + $content[] = '</script>';
2868 +
2869 + $content = implode( '', $content );
2870 + echo ($content);
2871 + }
2872 + }
2873 +
2874 + // Black Friday
2875 + public static function ays_chart_black_friday_message($ishmar){
2876 + if($ishmar == 0 ){
2877 + $content = array();
2878 +
2879 + $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);
2880 +
2881 + $content[] = '<div id="ays-chart-dicount-black-friday-month-main" class="ays-chart notice notice-success is-dismissible ays_chart_dicount_info">';
2882 + $content[] = '<div id="ays-chart-dicount-black-friday-month" class="ays_chart_dicount_month">';
2883 + $content[] = '<div class="ays-chart-dicount-black-friday-box">';
2884 + $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-box-80" style="width: 70%;">';
2885 + $content[] = '<div class="">';
2886 + $content[] = '<div class="ays-chart-dicount-black-friday-title-row" >' . __( 'Coupon Code', "ays-popup-box" ) .' ' . '</div>';
2887 + $content[] = '<div class="ays-chart-dicount-black-friday-title-row">';
2888 +
2889 + $content[] = '
2890 + <span class="ays-chart-dicount-black-friday-banner-2025-coupon-wrapper">
2891 + <span class="ays-chart-dicount-black-friday-banner-2025-coupon-box" onclick="aysChartHalloweenCopyToClipboard(\'FREE2PROBF\')" title="Click to copy">
2892 + <span class="ays-chart-dicount-black-friday-banner-2025-coupon-text">FREE2PROBF</span>
2893 + <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">
2894 + <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"/>
2895 + </svg>
2896 + </span>
2897 + </span>';
2898 + $content[] = '</div> ';
2899 + $content[] = '</div>';
2900 +
2901 + $content[] = '</div>';
2902 +
2903 + $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-text-box">';
2904 + $content[] = '<div class="ays-chart-dicount-black-friday-text-row">' . '30% off' . '</div>';
2905 + $content[] = '</div>';
2906 +
2907 + $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
2908 + $content[] = '<div id="ays-chart-countdown-main-container">';
2909 + $content[] = '<div class="ays-chart-countdown-container">';
2910 + $content[] = '<div id="ays-chart-countdown" style="display: block;">';
2911 + $content[] = '<ul>';
2912 + $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', "ays-popup-box" ) . '</li>';
2913 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', "ays-popup-box" ) . '</li>';
2914 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', "ays-popup-box" ) . '</li>';
2915 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', "ays-popup-box" ) . '</li>';
2916 + $content[] = '</ul>';
2917 + $content[] = '</div>';
2918 + $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
2919 + $content[] = '<span></span>';
2920 + $content[] = '<span></span>';
2921 + $content[] = '<span></span>';
2922 + $content[] = '<span></span>';
2923 + $content[] = '</div>';
2924 + $content[] = '</div>';
2925 + $content[] = '</div>';
2926 + $content[] = '</div>';
2927 +
2928 + $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
2929 + $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>';
2930 + $content[] = '</div>';
2931 + $content[] = '</div>';
2932 + $content[] = '</div>';
2933 +
2934 + $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-black-friday">';
2935 + $content[] = '<form action="" method="POST">';
2936 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
2937 + if( current_user_can( 'manage_options' ) ){
2938 + $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>';
2939 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
2940 + }
2941 + $content[] = '</div>';
2942 + $content[] = '</form>';
2943 + $content[] = '</div>';
2944 + $content[] = '</div>';
2945 +
2946 + $content[] = '<script>';
2947 + $content[] = "
2948 + function aysChartHalloweenCopyToClipboard(text) {
2949 + // Create a temporary textarea element
2950 + var textarea = document.createElement('textarea');
2951 + textarea.value = text;
2952 + textarea.style.position = 'fixed';
2953 + textarea.style.opacity = '0';
2954 + document.body.appendChild(textarea);
2955 +
2956 + // Select and copy the text
2957 + textarea.select();
2958 + textarea.setSelectionRange(0, 99999); // For mobile devices
2959 +
2960 + try {
2961 + document.execCommand('copy');
2962 + aysChartHalloweenShowCopyNotification('Coupon code copied!');
2963 + } catch (err) {
2964 + console.error('Failed to copy text: ', err);
2965 + }
2966 +
2967 + // Remove the temporary textarea
2968 + document.body.removeChild(textarea);
2969 + }
2970 +
2971 + function aysChartHalloweenShowCopyNotification(message) {
2972 + // Check if notification already exists
2973 + var existingNotification = document.querySelector('.ays-chart-discount-black-friday-banner-2025-copy-notification');
2974 + if (existingNotification) {
2975 + document.body.removeChild(existingNotification);
2976 + }
2977 +
2978 + // Create notification element
2979 + var notification = document.createElement('div');
2980 + notification.className = 'ays-chart-discount-black-friday-banner-2025-copy-notification';
2981 + notification.textContent = message;
2982 + document.body.appendChild(notification);
2983 +
2984 + // Show notification with animation
2985 + setTimeout(function() {
2986 + notification.classList.add('show');
2987 + }, 10);
2988 +
2989 + // Hide and remove notification after 2 seconds
2990 + setTimeout(function() {
2991 + notification.classList.remove('show');
2992 + setTimeout(function() {
2993 + if (notification.parentNode) {
2994 + document.body.removeChild(notification);
2995 + }
2996 + }, 300);
2997 + }, 2000);
2998 + }";
2999 + $content[] = '</script>';
3000 +
3001 + $content[] = '<style>';
3002 + $content[] = '
3003 + /* Black friday banner start */
3004 + 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}}
3005 + ';
3006 + $content[] = '</style>';
3007 +
3008 + $content = implode( '', $content );
3009 +
1314 3010 echo $content;
1315 3011 }
1316 3012 }
1317 3013
3014 + // Christmas Banner 2025
3015 + public static function ays_chart_christmas_banner_message_2025($ishmar){
3016 + if($ishmar == 0 ){
3017 + $content = array();
1318 3018
3019 + $svg_icon = '<svg width="21" height="22" viewBox="0 0 21 22" fill="none" xmlns="http://www.w3.org/2000/svg">
3020 + <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"/>
3021 + </svg>
3022 + ';
3023 +
3024 + $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);
3025 +
3026 + $content[] = '<div id="ays-chart-christmas-banner-main" class="notice notice-success is-dismissible ays-chart-christmas-banner-info ays_chart_dicount_info">';
3027 + $content[] = '<div id="ays-chart-christmas-banner-month" class="ays-chart-christmas-banner-month">';
3028 +
3029 + // Background effects
3030 + $content[] = '<div class="ays-chart-christmas-banner-bg-effects">';
3031 + $content[] = '<div class="ays-chart-christmas-banner-bg-gradient-1"></div>';
3032 + $content[] = '<div class="ays-chart-christmas-banner-bg-gradient-2"></div>';
3033 +
3034 + // Snowflakes
3035 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 5%; animation-delay: 0s; animation-duration: 8s;">'. $svg_icon .'</div>';
3036 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 15%; animation-delay: 2s; animation-duration: 10s;">'. $svg_icon .'</div>';
3037 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 25%; animation-delay: 4s; animation-duration: 9s;">'. $svg_icon .'</div>';
3038 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 75%; animation-delay: 1s; animation-duration: 11s;">'. $svg_icon .'</div>';
3039 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 85%; animation-delay: 3s; animation-duration: 8s;">'. $svg_icon .'</div>';
3040 + $content[] = '<div class="ays-chart-christmas-banner-snowflake" style="left: 92%; animation-delay: 5s; animation-duration: 10s;">'. $svg_icon .'</div>';
3041 +
3042 + // Sparkles
3043 + $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">';
3044 + $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"/>';
3045 + $content[] = '</svg>';
3046 + $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">';
3047 + $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"/>';
3048 + $content[] = '</svg>';
3049 + $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">';
3050 + $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"/>';
3051 + $content[] = '</svg>';
3052 + $content[] = '</div>';
3053 +
3054 + // Main content
3055 + $content[] = '<div class="ays-chart-christmas-banner-content">';
3056 + $content[] = '<div class="ays-chart-christmas-banner-left">';
3057 + // Gift icon with hat
3058 + $content[] = '<div class="ays-chart-christmas-banner-gift-wrapper">';
3059 + $content[] = '<svg class="ays-chart-christmas-banner-gift-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">';
3060 + $content[] = '<rect x="3" y="8" width="18" height="4" rx="1"></rect>';
3061 + $content[] = '<path d="M12 8v13"></path>';
3062 + $content[] = '<path d="M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7"></path>';
3063 + $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>';
3064 + $content[] = '</svg>';
3065 + $content[] = '<div class="ays-chart-christmas-banner-hat">';
3066 + $content[] = '<svg viewBox="0 0 24 24" fill="none" class="ays-chart-christmas-banner-hat-svg">';
3067 + $content[] = '<path d="M12 2L4 14h16L12 2z" fill="hsl(0 80% 45%)"></path>';
3068 + $content[] = '<path d="M4 14c0 2 3.5 3 8 3s8-1 8-3" fill="hsl(0 0% 100%)"></path>';
3069 + $content[] = '<circle cx="12" cy="3" r="2" fill="hsl(0 0% 100%)"></circle>';
3070 + $content[] = '</svg>';
3071 + $content[] = '</div>';
3072 + $content[] = '</div>';
3073 +
3074 + $content[] = '<div class="ays-chart-christmas-banner-special-label">';
3075 + $content[] = '<div class="ays-chart-christmas-banner-special-label-name">';
3076 + $content[] = '<a href="'. $ays_chart_cta_button_link .'" class="ays-chart-christmas-banner-special-label-name-link" target="_blank">';
3077 + $content[] = __( 'Chart Builder', "chart-builder" );
3078 + $content[] = '</a>';
3079 + $content[] = '</div>';
3080 +
3081 + $content[] = '<div>✦ ' . __( 'CHRISTMAS SPECIAL', "chart-builder" ) . ' ✦</div>';
3082 + $content[] = '</div>';
3083 + $content[] = '</div>';
3084 +
3085 + $content[] = '<div class="ays-chart-christmas-banner-center">';
3086 + $content[] = '<div class="ays-chart-christmas-banner-discount-text">25% OFF</div>';
3087 + $content[] = '<div class="ays-chart-christmas-banner-limited-offer">' . __( 'Limited time offer', "chart-builder" ) . '</div>';
3088 + $content[] = '</div>';
3089 +
3090 + $content[] = '<div class="ays-chart-christmas-banner-right">';
3091 + $content[] = '<div class="ays-chart-christmas-banner-coupon-box" onclick="aysChartChristmasCopyToClipboard(\'XMAS25\')" title="' . __( 'Click to copy', "chart-builder" ) . '">';
3092 + $content[] = '<span class="ays-chart-christmas-banner-coupon-text">XMAS25</span>';
3093 + $content[] = '<svg class="ays-chart-christmas-banner-copy-icon" width="16" height="16" viewBox="0 0 16 16" fill="none">';
3094 + $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"/>';
3095 + $content[] = '</svg>';
3096 + $content[] = '</div>';
3097 +
3098 + $content[] = '<a href="'. $ays_chart_cta_button_link .'" class="ays-chart-christmas-banner-buy-now-btn" target="_blank">';
3099 + $content[] = __( 'Buy Now', "chart-builder" );
3100 + $content[] = '</a>';
3101 + $content[] = '</div>';
3102 + $content[] = '</div>';
3103 +
3104 + $content[] = '</div>';
3105 +
3106 + if( current_user_can( 'manage_options' ) ){
3107 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
3108 + $content[] = '<form action="" method="POST" style="position: absolute; bottom: 0; right: 0; color: #fff;">';
3109 + $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>';
3110 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
3111 + $content[] = '</form>';
3112 + $content[] = '</div>';
3113 + }
3114 +
3115 + $content[] = '</div>';
3116 +
3117 + $content[] = '<script>';
3118 + $content[] = "
3119 + function aysChartChristmasCopyToClipboard(text) {
3120 + var textarea = document.createElement('textarea');
3121 + textarea.value = text;
3122 + textarea.style.position = 'fixed';
3123 + textarea.style.opacity = '0';
3124 + document.body.appendChild(textarea);
3125 +
3126 + textarea.select();
3127 + textarea.setSelectionRange(0, 99999);
3128 +
3129 + try {
3130 + document.execCommand('copy');
3131 + aysChartChristmasShowCopyNotification('" . __( 'Coupon code copied!', "chart-builder" ) . "');
3132 + } catch (err) {
3133 + console.error('Failed to copy text: ', err);
3134 + }
3135 +
3136 + document.body.removeChild(textarea);
3137 + }
3138 +
3139 + function aysChartChristmasShowCopyNotification(message) {
3140 + var existingNotification = document.querySelector('.ays-chart-christmas-banner-copy-notification');
3141 + if (existingNotification) {
3142 + document.body.removeChild(existingNotification);
3143 + }
3144 +
3145 + var notification = document.createElement('div');
3146 + notification.className = 'ays-chart-christmas-banner-copy-notification';
3147 + notification.textContent = message;
3148 + document.body.appendChild(notification);
3149 +
3150 + setTimeout(function() {
3151 + notification.classList.add('show');
3152 + }, 10);
3153 +
3154 + setTimeout(function() {
3155 + notification.classList.remove('show');
3156 + setTimeout(function() {
3157 + if (notification.parentNode) {
3158 + document.body.removeChild(notification);
3159 + }
3160 + }, 300);
3161 + }, 2000);
3162 + }";
3163 + $content[] = '</script>';
3164 +
3165 + $content[] = '<style>';
3166 + $content[] = '
3167 + /* Christmas banner start */
3168 +
3169 + div#ays-chart-christmas-banner-main .btn-link {
3170 + background-color: transparent;
3171 + display: inline-block;
3172 + font-weight: 400;
3173 + text-align: center;
3174 + white-space: nowrap;
3175 + vertical-align: middle;
3176 + -webkit-user-select: none;
3177 + -moz-user-select: none;
3178 + -ms-user-select: none;
3179 + user-select: none;
3180 + border: 1px solid transparent;
3181 + padding: .375rem .75rem;
3182 + font-size: 12px;
3183 + line-height: 1.5;
3184 + border-radius: .25rem;
3185 + color: rgba(255, 255, 255, .6);
3186 + }
3187 +
3188 + div#ays-chart-christmas-banner-main.ays-chart-christmas-banner-info {
3189 + background: linear-gradient(to right, hsl(0, 70%, 28%), hsl(0, 65%, 38%), hsl(0, 70%, 28%));
3190 + padding: unset;
3191 + border-left: 0;
3192 + position: relative;
3193 + }
3194 +
3195 + #ays-chart-christmas-banner-main .ays-chart-christmas-banner-month {
3196 + position: relative;
3197 + padding: 15px 40px;
3198 + overflow: hidden;
3199 + }
3200 +
3201 + /* Background effects */
3202 + .ays-chart-christmas-banner-bg-effects {
3203 + position: absolute;
3204 + top: 0;
3205 + left: 0;
3206 + right: 0;
3207 + bottom: 0;
3208 + pointer-events: none;
3209 + z-index: 1;
3210 + }
3211 +
3212 + .ays-chart-christmas-banner-bg-gradient-1 {
3213 + position: absolute;
3214 + top: 0;
3215 + left: 30%;
3216 + width: 40%;
3217 + height: 100%;
3218 + background: radial-gradient(circle, rgba(202, 43, 43, 0.5) 0%, transparent 60%);
3219 + opacity: 0.4;
3220 + }
3221 +
3222 + .ays-chart-christmas-banner-bg-gradient-2 {
3223 + position: absolute;
3224 + top: 0;
3225 + right: 15%;
3226 + width: 35%;
3227 + height: 100%;
3228 + background: radial-gradient(circle, rgba(246, 201, 85, 0.15) 0%, transparent 50%);
3229 + opacity: 0.3;
3230 + }
3231 +
3232 + .ays-chart-christmas-banner-snowflake {
3233 + position: absolute;
3234 + color: rgba(255, 255, 255, 0.2);
3235 + font-size: 20px;
3236 + animation: ays-chart-christmas-snowfall linear infinite;
3237 + top: -10px;
3238 + }
3239 +
3240 + @keyframes ays-chart-christmas-snowfall {
3241 + 0% {
3242 + transform: translateY(-10px) rotate(0deg);
3243 + opacity: 0;
3244 + }
3245 + 10% {
3246 + opacity: 0.8;
3247 + }
3248 + 90% {
3249 + opacity: 0.8;
3250 + }
3251 + 100% {
3252 + transform: translateY(100%) rotate(360deg);
3253 + opacity: 0;
3254 + }
3255 + }
3256 +
3257 + .ays-chart-christmas-banner-sparkle {
3258 + position: absolute;
3259 + color: hsl(43, 90%, 65%);
3260 + animation: ays-chart-christmas-twinkle 2s ease-in-out infinite;
3261 + }
3262 +
3263 + @keyframes ays-chart-christmas-twinkle {
3264 + 0%, 100% {
3265 + opacity: 0.3;
3266 + transform: scale(0.8);
3267 + }
3268 + 50% {
3269 + opacity: 1;
3270 + transform: scale(1.2);
3271 + }
3272 + }
3273 +
3274 + /* Main content */
3275 + .ays-chart-christmas-banner-content {
3276 + position: relative;
3277 + display: flex;
3278 + align-items: center;
3279 + justify-content: space-between;
3280 + z-index: 2;
3281 + }
3282 +
3283 + /* Left section */
3284 + .ays-chart-christmas-banner-left {
3285 + display: flex;
3286 + align-items: center;
3287 + gap: 50px;
3288 + }
3289 +
3290 + .ays-chart-christmas-banner-gift-wrapper {
3291 + position: relative;
3292 + animation: ays-chart-christmas-float 3s ease-in-out infinite;
3293 + }
3294 +
3295 + .ays-chart-christmas-banner-gift-icon {
3296 + width: 48px;
3297 + height: 48px;
3298 + color: rgba(255, 247, 237, 0.9);
3299 + }
3300 +
3301 + @keyframes ays-chart-christmas-float {
3302 + 0%, 100% {
3303 + transform: translateY(0);
3304 + }
3305 + 50% {
3306 + transform: translateY(-5px);
3307 + }
3308 + }
3309 +
3310 + .ays-chart-christmas-banner-hat {
3311 + position: absolute;
3312 + top: -12px;
3313 + right: -4px;
3314 + width: 24px;
3315 + height: 24px;
3316 + }
3317 +
3318 + .ays-chart-christmas-banner-hat-svg {
3319 + width: 100%;
3320 + height: 100%;
3321 + }
3322 +
3323 + .ays-chart-christmas-banner-special-label {
3324 + color: hsl(43, 90%, 65%);
3325 + font-size: 14px;
3326 + font-weight: 500;
3327 + text-transform: uppercase;
3328 + letter-spacing: 1px;
3329 + /* font-family: "Outfit", sans-serif; */
3330 + }
3331 +
3332 + .ays-chart-christmas-banner-special-label-name {
3333 + color: #fffaf0;
3334 + text-align: center;
3335 + }
3336 +
3337 + div#ays-chart-christmas-banner-main .ays-chart-christmas-banner-special-label-name-link {
3338 + color: #fffaf0;
3339 + box-shadow: unset;
3340 + }
3341 +
3342 + /* Center section */
3343 + .ays-chart-christmas-banner-center {
3344 + display: flex;
3345 + flex-direction: row;
3346 + text-align: center;
3347 + justify-content: center;
3348 + align-items: center;
3349 + gap: 30px;
3350 + }
3351 +
3352 + .ays-chart-christmas-banner-discount-text {
3353 + font-family: "Outfit", sans-serif;
3354 + font-weight: 800;
3355 + font-size: 30px;
3356 + color: hsl(40, 100%, 97%);
3357 + letter-spacing: -1px;
3358 + line-height: 1;
3359 + }
3360 +
3361 + .ays-chart-christmas-banner-limited-offer {
3362 + color: rgba(255, 247, 237, 0.7);
3363 + font-size: 13px;
3364 + font-weight: 500;
3365 + }
3366 +
3367 + /* Right section */
3368 + .ays-chart-christmas-banner-right {
3369 + display: flex;
3370 + align-items: center;
3371 + gap: 20px;
3372 + }
3373 +
3374 + .ays-chart-christmas-banner-coupon-box {
3375 + border: 2px dashed rgba(255, 255, 255, 0.4);
3376 + padding: 8px 16px;
3377 + border-radius: 6px;
3378 + background: rgba(255, 255, 255, 0.1);
3379 + cursor: pointer;
3380 + transition: all 0.3s;
3381 + display: flex;
3382 + align-items: center;
3383 + gap: 8px;
3384 + backdrop-filter: blur(10px);
3385 + }
3386 +
3387 + .ays-chart-christmas-banner-coupon-box:hover {
3388 + background: rgba(255, 255, 255, 0.2);
3389 + border-color: rgba(255, 255, 255, 0.6);
3390 + transform: translateY(-1px);
3391 + }
3392 +
3393 + .ays-chart-christmas-banner-coupon-text {
3394 + font-size: 16px;
3395 + font-weight: 700;
3396 + letter-spacing: 1px;
3397 + color: #fff;
3398 + font-family: monospace;
3399 + }
3400 +
3401 + .ays-chart-christmas-banner-copy-icon {
3402 + opacity: 0.8;
3403 + transition: opacity 0.3s;
3404 + }
3405 +
3406 + .ays-chart-christmas-banner-coupon-box:hover .ays-chart-christmas-banner-copy-icon {
3407 + opacity: 1;
3408 + }
3409 +
3410 + #ays-chart-christmas-banner-main .ays-chart-christmas-banner-buy-now-btn {
3411 + background-color: #fbe19f;
3412 + color: hsl(0, 72%, 35%);
3413 + padding: 10px 30px;
3414 + border-radius: 9999px;
3415 + font-size: 16px;
3416 + font-weight: 600;
3417 + font-family: "Outfit", sans-serif;
3418 + border: none;
3419 + cursor: pointer;
3420 + transition: all 0.3s;
3421 + text-decoration: none;
3422 + display: flex;
3423 + align-items: center;
3424 + gap: 6px;
3425 + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 30px rgba(246, 201, 85, 0.2);
3426 + }
3427 +
3428 + #ays-chart-christmas-banner-main .ays-chart-christmas-banner-buy-now-btn:hover {
3429 + background-color: #f2d58c;
3430 + transform: scale(1.05);
3431 + box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), 0 0 40px rgba(246, 201, 85, 0.3);
3432 + }
3433 +
3434 + .ays-chart-christmas-banner-btn-arrow {
3435 + display: inline-block;
3436 + transition: transform 0.3s;
3437 + }
3438 +
3439 + .ays-chart-christmas-banner-buy-now-btn:hover .ays-chart-christmas-banner-btn-arrow {
3440 + transform: translateX(4px);
3441 + }
3442 +
3443 + /* Notification */
3444 + .ays-chart-christmas-banner-copy-notification {
3445 + position: fixed;
3446 + top: 50%;
3447 + left: 50%;
3448 + transform: translate(-50%, -50%);
3449 + background: rgba(0, 0, 0, 0.8);
3450 + color: #fff;
3451 + padding: 12px 24px;
3452 + border-radius: 8px;
3453 + font-size: 14px;
3454 + z-index: 10000;
3455 + opacity: 0;
3456 + transition: opacity 0.3s;
3457 + }
3458 +
3459 + .ays-chart-christmas-banner-copy-notification.show {
3460 + opacity: 1;
3461 + }
3462 +
3463 + /* Dismiss button */
3464 + #ays-chart-christmas-banner-main #ays-chart-christmas-banner-dismiss-content {
3465 + display: flex;
3466 + justify-content: center;
3467 + }
3468 +
3469 + #ays-chart-christmas-banner-main #ays-chart-christmas-banner-dismiss-content .ays-button {
3470 + margin: 0 !important;
3471 + font-size: 13px;
3472 + color: rgba(150, 147, 147, 0.69);
3473 + }
3474 +
3475 + /* Responsive */
3476 + @media (max-width: 1024px) {
3477 + .ays-chart-christmas-banner-discount-text {
3478 + font-size: 40px;
3479 + }
3480 + .ays-chart-christmas-banner-content {
3481 + flex-wrap: wrap;
3482 + }
3483 + }
3484 +
3485 + @media (max-width: 768px) {
3486 + #ays-chart-christmas-banner-main {
3487 + display: none !important;
3488 + }
3489 + }
3490 + /* Christmas banner end */
3491 + ';
3492 + $content[] = '</style>';
3493 +
3494 + $content = implode( '', $content );
3495 +
3496 + echo $content;
3497 + }
3498 + }
3499 +
1319 3500 public function ays_chart_update_banner_time(){
3501 + if (!current_user_can('manage_options')) {
3502 + return array('error' => 'Insufficient permissions');
3503 + }
1320 3504
1321 3505 $date = time() + ( 3 * 24 * 60 * 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1322 3506 // $date = time() + ( 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS); // for testing | 1 min
1323 - $next_3_days = date('M d, Y H:i:s', $date);
3507 + $next_3_days = gmdate('M d, Y H:i:s', $date);
1324 3508
1325 3509 $ays_chart_banner_time = get_option('ays_chart_20_bundle_banner_time');
1326 3510
1327 3511 if ( !$ays_chart_banner_time || is_null( $ays_chart_banner_time ) ) {
@@ -1344,11 +3528,26 @@
1344 3528
1345 3529 return $get_ays_chart_banner_time;
1346 3530 }
1347 3531
3532 +
3533 + public function ays_chart_add_body_class( $classes ) {
3534 + global $pagenow;
3535 +
3536 + if ( $pagenow === 'admin.php' ) {
3537 + $page = isset( $_GET['page'] ) ? sanitize_key( $_GET['page'] ) : '';
3538 +
3539 + if ( strpos( $page, $this->plugin_name ) === 0 ) {
3540 + $classes .= ' ays-chart-builder-admin';
3541 + }
3542 + }
3543 +
3544 + return $classes;
3545 + }
3546 +
1348 3547 public function author_user_search() {
1349 3548 check_ajax_referer( 'cbuilder-author-user-search', 'security' );
1350 - $params = $_REQUEST['params'];
3549 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1351 3550 $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null;
1352 3551 $checked = isset($params['val']) && $params['val'] !='' ? sanitize_text_field( $params['val'] ) : null;
1353 3552 $args = 'search=';
1354 3553 if ($search !== null) {
@@ -1465,10 +3664,11 @@
1465 3664 */
1466 3665 public function ays_chart_activate_plugin() {
1467 3666
1468 3667 // Run a security check.
1469 - check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
3668 + check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', '_ajax_nonce' );
1470 3669
3670 +
1471 3671 // Check for permissions.
1472 3672 if ( ! current_user_can( 'activate_plugins' ) ) {
1473 3673 wp_send_json_error( esc_html__( 'Plugin activation is disabled for you on this site.', 'chart-builder' ) );
1474 3674 }
@@ -1508,10 +3708,11 @@
1508 3708 */
1509 3709 public function ays_chart_install_plugin() {
1510 3710
1511 3711 // Run a security check.
1512 - check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
3712 + check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', '_ajax_nonce' );
1513 3713
3714 +
1514 3715 $generic_error = esc_html__( 'There was an error while performing your request.', 'chart-builder' );
1515 3716 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : '';
1516 3717
1517 3718 // Check if new installations are allowed.
@@ -1627,11 +3828,13 @@
1627 3828
1628 3829 $images_url = CHART_BUILDER_ADMIN_URL . '/images/icons/';
1629 3830
1630 3831 $plugin_slug = array(
3832 + 'fox-lms',
1631 3833 'quiz-maker',
1632 3834 'survey-maker',
1633 3835 'poll-maker',
3836 + 'chart-builder',
1634 3837 'ays-popup-box',
1635 3838 'secure-copy-content-protection',
1636 3839 'gallery-photo-gallery',
1637 3840 'ays-chatgpt-assistant',
@@ -1641,9 +3844,9 @@
1641 3844 $plugin_url_arr = array();
1642 3845 foreach ($plugin_slug as $key => $slug) {
1643 3846 if ( isset( $_SESSION['ays_chart_our_product_links'] ) && !empty( $_SESSION['ays_chart_our_product_links'] )
1644 3847 && isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && !empty( $_SESSION['ays_chart_our_product_links'][$slug] ) ) {
1645 - $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] ) : "";
3848 + $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])) : "";
1646 3849 } else {
1647 3850 $latest_version = $this->ays_chart_get_latest_plugin_version($slug);
1648 3851 $plugin_url = 'https://downloads.wordpress.org/plugin/'. $slug .'.zip';
1649 3852 if ( $latest_version != '' ) {
@@ -1655,13 +3858,22 @@
1655 3858 $plugin_url_arr[$slug] = $plugin_url;
1656 3859 }
1657 3860
1658 3861 $plugins_array = array(
3862 + 'fox-lms/fox-lms.php' => array(
3863 + 'icon' => $images_url . 'icon-fox-lms-128x128.png',
3864 + 'name' => __( 'Fox LMS', 'chart-builder' ),
3865 + 'desc' => __( 'Build and manage online courses directly on your WordPress site.', 'chart-builder' ),
3866 + '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' ),
3867 + 'wporg' => 'https://wordpress.org/plugins/fox-lms/',
3868 + 'buy_now' => 'https://foxlms.com/pricing/?utm_source=dashboard&utm_medium=chart-free&utm_campaign=fox-lms-our-products-page',
3869 + 'url' => $plugin_url_arr['fox-lms'],
3870 + ),
1659 3871 'quiz-maker/quiz-maker.php' => array(
1660 3872 'icon' => $images_url . 'icon-quiz-128x128.png',
1661 - 'name' => __( 'Quiz Maker', "easy-form" ),
1662 - 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', "easy-form" ),
1663 - 'desc_hidden' => __( 'Build an unlimited number of quizzes and questions.', "easy-form" ),
3873 + 'name' => __( 'Quiz Maker', 'chart-builder' ),
3874 + 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', 'chart-builder' ),
3875 + 'desc_hidden' => __( 'Build an unlimited number of quizzes and questions.', 'chart-builder' ),
1664 3876 'wporg' => 'https://wordpress.org/plugins/quiz-maker/',
1665 3877 'buy_now' => 'https://ays-pro.com/wordpress/quiz-maker/',
1666 3878 'url' => $plugin_url_arr['quiz-maker'],
1667 3879 ),
@@ -1701,9 +3913,9 @@
1701 3913 'buy_now' => 'https://ays-pro.com/wordpress/secure-copy-content-protection/',
1702 3914 'url' => $plugin_url_arr['secure-copy-content-protection'],
1703 3915 ),
1704 3916 'gallery-photo-gallery/gallery-photo-gallery.php' => array(
1705 - 'icon' => $images_url . 'icon-gallery-128x128.jpg',
3917 + 'icon' => $images_url . 'icon-gallery-128x128.png',
1706 3918 'name' => __( 'Gallery Photo Gallery', 'chart-builder' ),
1707 3919 'desc' => __( 'Create unlimited galleries and include unlimited images in those galleries.', 'chart-builder' ),
1708 3920 'desc_hidden' => __( 'Represent images in an attractive way. Attract people with your own single and multiple free galleries from your photo library.', 'chart-builder' ),
1709 3921 'wporg' => 'https://wordpress.org/plugins/gallery-photo-gallery/',
@@ -1903,9 +4115,9 @@
1903 4115 <span aria-hidden="true" class="dashicons dashicons-external"></span>
1904 4116 </a>';
1905 4117 }
1906 4118 $content .='
1907 - <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', $this->plugin_name) .'</a>
4119 + <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', 'chart-builder') .'</a>
1908 4120 </div>
1909 4121 </div>';
1910 4122 }
1911 4123 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
@@ -1911,9 +4123,9 @@
1911 4123 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
1912 4124 $content.= '<input type="hidden" id="ays_chart_ajax_install_plugin_nonce" name="ays_chart_ajax_install_plugin_nonce" value="'. $install_plugin_nonce .'">';
1913 4125 $content.= '</div>';
1914 4126
1915 - echo $content;
4127 + echo html_entity_decode($content);
1916 4128 }
1917 4129
1918 4130 /**
1919 4131 * Returns the data from Quiz maker.
@@ -1922,9 +4134,9 @@
1922 4134 */
1923 4135 public function fetch_quiz_maker_data(){
1924 4136 check_ajax_referer( 'cbuilder-fetch-quiz-maker-data', 'security' );
1925 4137
1926 - $params = $_POST['params'];
4138 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
1927 4139 if ( !isset($params) || empty($params) ) {
1928 4140 return array(
1929 4141 'success' => false,
1930 4142 'data' => array(
@@ -2046,9 +4258,9 @@
2046 4258 */
2047 4259 public function save_quiz_maker_data() {
2048 4260 check_ajax_referer( 'cbuilder-save-quiz-maker-data', 'security' );
2049 4261
2050 - $params = $_POST['params'];
4262 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
2051 4263 if ( !isset($params) || empty($params) ) {
2052 4264 return array(
2053 4265 'success' => false,
2054 4266 'data' => array(
@@ -2162,9 +4374,9 @@
2162 4374 'data' => array(
2163 4375 'msg' => __( 'Data was successfully saved.', "chart-builder" )
2164 4376 )
2165 4377 );
2166 - }
4378 + }
2167 4379
2168 4380 /**
2169 4381 * Chart page action hooks
2170 4382 */
@@ -2208,9 +4420,9 @@
2208 4420
2209 4421 $sources[] = $content;
2210 4422 }
2211 4423 $content_for_escape = implode('' , $sources );
2212 - echo html_entity_decode(esc_html( $content_for_escape ));
4424 + echo html_entity_decode( esc_html($content_for_escape) );
2213 4425 }
2214 4426
2215 4427 public function source_contents_import_from_csv_settings( $sources, $args ){
2216 4428 $html_class_prefix = $args['html_class_prefix'];
@@ -2222,25 +4434,25 @@
2222 4434 <div class="ays-pro-features-v2-big-buttons-box">
2223 4435 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2224 4436 <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>
2225 4437 <div class="ays-pro-features-v2-video-text">
2226 - <?php echo __("Watch Video" , "chart-builder"); ?>
4438 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2227 4439 </div>
2228 4440 </a>
2229 4441 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2230 4442 <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>
2231 4443 <div class="ays-pro-features-v2-upgrade-text">
2232 - <?php echo __("Upgrade" , "chart-builder"); ?>
4444 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2233 4445 </div>
2234 4446 </a>
2235 4447 </div>
2236 - <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main">
4448 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main ays-accordion-data-main-wrap">
2237 4449 <div class="<?php echo esc_attr($html_class_prefix) ?>file-import-form">
2238 - <h6><?php echo __("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6>
4450 + <h6><?php echo esc_html__("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6>
2239 4451 <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>import-files-file-type">
2240 4452 <option value="csv">CSV File</option>
2241 4453 </select>
2242 - <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>
4454 + <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>
2243 4455 <p class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example" style="font-size: 15px; font-style: italic;">Example:
2244 4456 <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>
2245 4457 </p>
2246 4458 <div>
@@ -2249,16 +4461,16 @@
2249 4461 <div class='ays-chart-file-import-success'></div>
2250 4462 <div class='ays-chart-file-import-error'></div>
2251 4463 <div class="ays-chart-buttons-group">
2252 4464 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-fetch">
2253 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4465 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2254 4466 </button>
2255 4467 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-show-on-chart">
2256 4468 <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>
2257 - <?php echo __( 'Preview', "chart-builder" ); ?>
4469 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2258 4470 </button>
2259 4471 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-save">
2260 - <?php echo __( 'Save data', "chart-builder" ); ?>
4472 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2261 4473 </button>
2262 4474 </div>
2263 4475 </div>
2264 4476 </div>
@@ -2288,38 +4500,38 @@
2288 4500 <div class="ays-pro-features-v2-big-buttons-box">
2289 4501 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2290 4502 <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>
2291 4503 <div class="ays-pro-features-v2-video-text">
2292 - <?php echo __("Watch Video" , "chart-builder"); ?>
4504 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2293 4505 </div>
2294 4506 </a>
2295 4507 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2296 4508 <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>
2297 4509 <div class="ays-pro-features-v2-upgrade-text">
2298 - <?php echo __("Upgrade" , "chart-builder"); ?>
4510 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2299 4511 </div>
2300 4512 </a>
2301 4513 </div>
2302 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2303 - <div class="<?= $html_class_prefix ?>chart-source-data-main">
4514 + <div class="<?php echo esc_attr( $html_class_prefix ) ?>source-data-main-wrap ays-accordion-data-main-wrap ">
4515 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main">
2304 4516 <div id="ays-chart-db-query">
2305 - <div class="<?= $html_class_prefix ?>-db-query-form">
4517 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2306 4518 <div id="db-query-form">
2307 4519 <input type="hidden" name="chart_id" value="1">
2308 - <textarea name="query" class="<?= $html_class_prefix ?>db-query" placeholder="<?php echo __( "Add your query here.", $this->plugin_name ); ?>"></textarea>
4520 + <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>
2309 4521 <div class='db-wizard-success'></div>
2310 4522 <div class='db-wizard-error'></div>
2311 4523 </div>
2312 4524 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2313 4525 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-fetch">
2314 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4526 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2315 4527 </button>
2316 4528 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-show-on-chart">
2317 4529 <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>
2318 - <?php echo __( 'Preview', "chart-builder" ); ?>
4530 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2319 4531 </button>
2320 4532 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-save">
2321 - <?php echo __( 'Save data', "chart-builder" ); ?>
4533 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2322 4534 </button>
2323 4535 </div>
2324 4536 </div>
2325 4537 <div class="db-wizard-hints">
@@ -2324,9 +4536,18 @@
2324 4536 </div>
2325 4537 <div class="db-wizard-hints">
2326 4538 <ul>
2327 4539 <!-- <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> -->
2328 - <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>
4540 + <li>
4541 + <?php
4542 + echo sprintf(
4543 + /* translators: %1$s and %2$s are HTML span tags for styling. */
4544 + esc_html__( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', 'chart-builder' ),
4545 + '<span class="ays-chart-emboss">',
4546 + '</span>'
4547 + );
4548 + ?>
4549 + </li>
2329 4550 </ul>
2330 4551 </div>
2331 4552 </div>
2332 4553 </div>
@@ -2334,9 +4555,9 @@
2334 4555 </div>
2335 4556 <?php
2336 4557 $content = ob_get_clean();
2337 4558
2338 - $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) . '">
4559 + $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') . '">
2339 4560 <i class="ays_fa ays_fa_info_circle"></i>
2340 4561 </a>';
2341 4562
2342 4563 $sources['import_from_db'] = array(
@@ -2357,16 +4578,16 @@
2357 4578 <div class="ays-pro-features-v2-big-buttons-box">
2358 4579 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2359 4580 <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>
2360 4581 <div class="ays-pro-features-v2-upgrade-text">
2361 - <?php echo __("Upgrade" , "chart-builder"); ?>
4582 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2362 4583 </div>
2363 4584 </a>
2364 4585 </div>
2365 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2366 - <div class="<?= $html_class_prefix ?>chart-source-data-main">
4586 + <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap ays-accordion-data-main-wrap ">
4587 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main">
2367 4588 <div class="form-group row mb-2">
2368 - <div class="col-sm-5 <?php echo esc_attr($html_class_prefix) ?>option-title">
4589 + <div class="col-sm-8 <?php echo esc_attr($html_class_prefix) ?>option-title">
2369 4590 <label class="form-label">
2370 4591 <?php echo esc_html(__('Use custom database settings for this chart', "chart-builder")); ?>
2371 4592 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __(".","chart-builder") ); ?>">
2372 4593 <i class="ays_fa ays_fa_info_circle"></i>
@@ -2372,9 +4593,9 @@
2372 4593 <i class="ays_fa ays_fa_info_circle"></i>
2373 4594 </a>
2374 4595 </label>
2375 4596 </div>
2376 - <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4597 + <div class="col-sm-3 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
2377 4598 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
2378 4599 <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" type="checkbox" />
2379 4600 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
2380 4601 </label>
@@ -2380,25 +4601,25 @@
2380 4601 </label>
2381 4602 </div>
2382 4603 </div>
2383 4604 <div id="ays-chart-external-db-query">
2384 - <div class="<?= $html_class_prefix ?>-db-query-form">
4605 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2385 4606 <div id="external-db-query-form">
2386 4607 <input type="hidden" name="chart_id" value="1">
2387 - <textarea name="query" class="<?= $html_class_prefix ?>external-db-query" placeholder="<?php echo __( "Add your query here.", $this->plugin_name ); ?>"></textarea>
4608 + <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>
2388 4609 <div class='db-wizard-success'></div>
2389 4610 <div class='db-wizard-error'></div>
2390 4611 </div>
2391 4612 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2392 4613 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-fetch">
2393 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4614 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2394 4615 </button>
2395 4616 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-show-on-chart">
2396 4617 <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>
2397 - <?php echo __( 'Preview', "chart-builder" ); ?>
4618 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2398 4619 </button>
2399 4620 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-save">
2400 - <?php echo __( 'Save data', "chart-builder" ); ?>
4621 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2401 4622 </button>
2402 4623 </div>
2403 4624 </div>
2404 4625 <div class="db-wizard-hints">
@@ -2403,9 +4624,18 @@
2403 4624 </div>
2404 4625 <div class="db-wizard-hints">
2405 4626 <ul>
2406 4627 <!-- <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> -->
2407 - <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>
4628 + <li>
4629 + <?php
4630 + echo sprintf(
4631 + /* translators: %1$s and %2$s are HTML span tags for styling. */
4632 + esc_html__( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', 'chart-builder' ),
4633 + '<span class="ays-chart-emboss">',
4634 + '</span>'
4635 + );
4636 + ?>
4637 + </li>
2408 4638 </ul>
2409 4639 </div>
2410 4640 </div>
2411 4641 </div>
@@ -2413,9 +4643,9 @@
2413 4643 </div>
2414 4644 <?php
2415 4645 $content = ob_get_clean();
2416 4646
2417 - $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) . '">
4647 + $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') . '">
2418 4648 <i class="ays_fa ays_fa_info_circle"></i>
2419 4649 </a>';
2420 4650
2421 4651 $sources['import_from_external_db'] = array(
@@ -2437,9 +4667,9 @@
2437 4667 $quiz_query_tooltips = $args['quiz_query_tooltips'];
2438 4668 $quiz_id = $args['quiz_id'];
2439 4669 $quiz_query = $args['quiz_query'];
2440 4670
2441 - if ( !is_plugin_active('quiz-maker/quiz-maker.php') ) {
4671 + if ( !is_plugin_active('quiz-maker/quiz-maker.php') && !is_plugin_active('quiz-maker-pro/quiz-maker-pro.php') ) {
2442 4672 // $title = sprintf( __( 'Get Quiz Maker data', "chart-builder" ) . ' <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.","chart-builder") . '">
2443 4673 // <i class="ays_fa ays_fa_info_circle"></i>
2444 4674 // </a>', '<br>', '<b>', '</b>');
2445 4675 // $content = $this->blockquote_content_quiz;
@@ -2449,35 +4679,42 @@
2449 4679 // );
2450 4680
2451 4681 return $sources;
2452 4682 }
4683 + $quizes = $wpdb->get_results( // phpcs:ignore
4684 + $wpdb->prepare(
4685 + "SELECT `title`, `id` FROM {$wpdb->prefix}aysquiz_quizes
4686 + WHERE `published` = %d AND `question_ids` <> %s",
4687 + 1,
4688 + ''
4689 + ),
4690 + ARRAY_A
4691 + );
4692 +
2453 4693
2454 - $sql = "SELECT `title`, `id` FROM " . $wpdb->prefix . "aysquiz_quizes WHERE `published` = 1 AND `question_ids` <> ''";
2455 - $quizes = $wpdb->get_results($sql, "ARRAY_A");
2456 -
2457 4694 ob_start();
2458 4695 ?>
2459 4696 <div class="ays-accordion-data-main-wrap">
2460 4697 <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">
2461 4698 <div id="<?php echo esc_attr($html_class_prefix) ?>quiz-maker-form">
2462 - <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?= $chart_id ?>">
2463 - <div class="<?= $html_class_prefix ?>select-quiz-maker-data-query-container" id="<?= $html_class_prefix ?>quiz-queries">
2464 - <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 ) ?>">
4699 + <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?php echo esc_attr($chart_id) ?>">
4700 + <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">
4701 + <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' ) ?>">
2465 4702 <i class="ays_fa ays_fa_info_circle"></i>
2466 4703 </a>
2467 - <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">
2468 - <option value=""><?= __( "Select query", "chart-builder" ) ?></option>
4704 + <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">
4705 + <option value=""><?php echo esc_html__( "Select query", "chart-builder" ) ?></option>
2469 4706 <?php foreach ( $quiz_queries as $id => $q):
2470 4707 $disabled = preg_replace('/[^0-9]/', '', $id) <= 6 ? "false" : "true" ; ?>
2471 - <option value="<?= $id ?>" <?= $quiz_query == $id ? 'selected' : '' ?> <?php echo 'is-pro="'.$disabled.'"'; ?>><?= $q ?></option>
4708 + <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>
2472 4709 <?php endforeach; ?>
2473 4710 </select>
2474 4711 </div>
2475 4712 <div class="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz-container">
2476 - <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">
2477 - <option value="0"><?= __( "Select quiz", "chart-builder" ) ?></option>
4713 + <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">
4714 + <option value="0"><?php echo esc_html__( "Select quiz", "chart-builder" ) ?></option>
2478 4715 <?php foreach ( $quizes as $quiz): ?>
2479 - <option value="<?= $quiz['id'] ?>" <?= $quiz_id == $quiz['id'] ? 'selected' : '' ?> ><?= $quiz['title'] ?></option>
4716 + <option value="<?php echo esc_attr($quiz['id']) ?>" <?php echo $quiz_id == $quiz['id'] ? 'selected' : '' ?> ><?php echo esc_html($quiz['title'] )?></option>
2480 4717 <?php endforeach; ?>
2481 4718 </select>
2482 4719 </div>
2483 4720 <div id="ays-chart-quiz-maker-success"></div>
@@ -2483,21 +4720,21 @@
2483 4720 <div id="ays-chart-quiz-maker-success"></div>
2484 4721 <div id="ays-chart-quiz-maker-error"></div>
2485 4722 <div class="ays-chart-buttons-group">
2486 4723 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-fetch">
2487 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4724 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2488 4725 </button>
2489 4726 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-show-on-chart">
2490 4727 <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>
2491 - <?php echo __( 'Preview', "chart-builder" ); ?>
4728 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2492 4729 </button>
2493 4730 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-save">
2494 - <?php echo __( 'Save data', "chart-builder" ); ?>
4731 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2495 4732 </button>
2496 4733 </div>
2497 4734 </div>
2498 4735 <div>
2499 - <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>
4736 + <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>
2500 4737 </div>
2501 4738 </div>
2502 4739 </div>
2503 4740 <?php
@@ -2502,11 +4739,18 @@
2502 4739 </div>
2503 4740 <?php
2504 4741 $content = ob_get_clean();
2505 4742
2506 - $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) . '">
2507 - <i class="ays_fa ays_fa_info_circle"></i>
2508 - </a>', '<br>', '<b>', '</b>');
4743 + $title = sprintf(
4744 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
4745 + __( 'Get Quiz Maker data', 'chart-builder' ) .
4746 + ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' .
4747 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
4748 + __( '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' ) . '">
4749 + <i class="ays_fa ays_fa_info_circle"></i>
4750 + </a>',
4751 + '<br>', '<b>', '</b>'
4752 + );
2509 4753 $sources['quiz_maker'] = array(
2510 4754 'content' => $content,
2511 4755 'title' => $title
2512 4756 );
@@ -2529,23 +4773,23 @@
2529 4773 <div class="ays-pro-features-v2-video-button"></div>
2530 4774 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2531 4775 <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>
2532 4776 <div class="ays-pro-features-v2-upgrade-text">
2533 - <?php echo __("Upgrade" , "chart-builder"); ?>
4777 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2534 4778 </div>
2535 4779 </a>
2536 4780 </div>
2537 - <div class="<?= $html_class_prefix ?>chart-source-data-main">
4781 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main ays-accordion-data-main-wrap ">
2538 4782 <div id="ays-chart-woocommerce-datas">
2539 - <div class="<?= $html_class_prefix ?>woocommerce-datas-form">
4783 + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-form">
2540 4784 <div id="woocommerce-datas-form">
2541 - <input type="hidden" name="chart_id" value="<?= $chart_id ?>">
2542 - <div class="<?= $html_class_prefix ?>woocommerce-datas-query-container" id="<?= $html_class_prefix ?>woocommerce-datas-container-id" >
2543 - <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 ) ?>">
4785 + <input type="hidden" name="chart_id" value="<?php echo esc_attr( $chart_id )?>">
4786 + <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" >
4787 + <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' ) ?>">
2544 4788 <i class="ays_fa ays_fa_info_circle"></i>
2545 4789 </a>
2546 - <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]">
2547 - <option value=""><?= __( 'Select query', $this->plugin_name ) ?></option>
4790 + <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]">
4791 + <option value=""><?php echo esc_html__( 'Select query', 'chart-builder') ?></option>
2548 4792 </select>
2549 4793 </div>
2550 4794 <div class='ays-chart-woocommerce-datas-success'></div>
2551 4795 <div class='ays-chart-woocommerce-datas-error'></div>
@@ -2551,16 +4795,16 @@
2551 4795 <div class='ays-chart-woocommerce-datas-error'></div>
2552 4796 </div>
2553 4797 <div class="ays-chart-buttons-group">
2554 4798 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-fetch">
2555 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4799 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2556 4800 </button>
2557 4801 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-show-on-chart">
2558 4802 <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>
2559 - <?php echo __( 'Preview', "chart-builder" ); ?>
4803 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2560 4804 </button>
2561 4805 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-save">
2562 - <?php echo __( 'Save data', "chart-builder" ); ?>
4806 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2563 4807 </button>
2564 4808 </div>
2565 4809 </div>
2566 4810 </div>
@@ -2567,12 +4811,19 @@
2567 4811 </div>
2568 4812 </div>
2569 4813 <?php
2570 4814 $content = ob_get_clean();
2571 -
2572 - $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) . '">
2573 - <i class="ays_fa ays_fa_info_circle"></i>
2574 - </a>', '<br>', '<b>', '</b>');
4815 +
4816 + $title = sprintf(
4817 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
4818 + esc_html__( 'Get WooCommerce data', 'chart-builder' ) .
4819 + ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' .
4820 + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */
4821 + __( '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' ) . '">
4822 + <i class="ays_fa ays_fa_info_circle"></i>
4823 + </a>',
4824 + '<br>', '<b>', '</b>'
4825 + );
2575 4826 $sources['woocommerce'] = array(
2576 4827 'content' => $content,
2577 4828 'title' => $title
2578 4829 );
@@ -2586,9 +4837,10 @@
2586 4837 $source = $args['source'];
2587 4838 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2588 4839 $settings = $args['settings'];
2589 4840 $source_chart_type = $args['source_chart_type'];
2590 - $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : 'add';
4841 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
4842 + $action = isset($_GET['action']) ? sanitize_text_field(wp_unslash($_GET['action'])) : 'add';
2591 4843
2592 4844 if (isset($source) && !empty($source)) {
2593 4845 if ( !isset( $source[0] ) ) {
2594 4846 if (count($source[1]) > 2) {
@@ -2593,15 +4845,15 @@
2593 4845 if ( !isset( $source[0] ) ) {
2594 4846 if (count($source[1]) > 2) {
2595 4847 $titles = array();
2596 4848 for ($i = 0; $i < count($source[1]); $i++) {
2597 - array_push($titles, __("Title", $this->plugin_name).$i);
4849 + array_push($titles, __("Title", 'chart-builder').$i);
2598 4850 }
2599 4851 $source[0] = $titles;
2600 4852 } else {
2601 4853 $source[0] = array(
2602 - __("Country", $this->plugin_name),
2603 - __("Population", $this->plugin_name),
4854 + __("Country", 'chart-builder'),
4855 + __("Population", 'chart-builder'),
2604 4856 );
2605 4857 }
2606 4858
2607 4859 ksort($source);
@@ -2623,9 +4875,9 @@
2623 4875 ?>
2624 4876 <div class="ays-accordion-data-main-wrap">
2625 4877 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2626 4878 <?php if($source_chart_type != 'org_chart'): ?>
2627 - <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">
4879 + <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">
2628 4880 <!-- <div class="<//?= $html_class_prefix ?>icons-box">
2629 4881 <img class="<//?= $html_class_prefix ?>add-new-row" src="<//?php echo CHART_BUILDER_ADMIN_URL; ?>/images/icons/add-circle-outline.svg">
2630 4882 </div> -->
2631 4883 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
@@ -2636,14 +4888,14 @@
2636 4888 if ($source_id == 0): ?>
2637 4889 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2638 4890 <div class="ays-chart-empty-data-table-cell"></div>
2639 4891 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2640 - <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); ?>">
4892 + <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); ?>">
2641 4893 <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">
2642 4894 <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;" />
2643 4895 </svg>
2644 4896 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2645 - <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'" : "" ?>>
4897 + <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'" : "" ?>>
2646 4898 <?php if ($each_source_id !== 0): ?>
2647 4899 <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">
2648 4900 <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;" />
2649 4901 </svg>
@@ -2665,14 +4917,14 @@
2665 4917 </svg>
2666 4918 </div>
2667 4919 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2668 4920 <?php if ($each_source_id == 0): ?>
2669 - <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); ?>">
2670 - <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)); ?>">
4921 + <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); ?>">
4922 + <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)); ?>">
2671 4923 </div>
2672 4924 <?php else: ?>
2673 4925 <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); ?>">
2674 - <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">
4926 + <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">
2675 4927 </div>
2676 4928 <?php endif; ?>
2677 4929 <?php endforeach; ?>
2678 4930 </div>
@@ -2679,16 +4931,16 @@
2679 4931 <?php endif; ?>
2680 4932 <?php endif; ?>
2681 4933 <?php endforeach; ?>
2682 4934 <?php else:?>
2683 - <div class="<?= $html_class_prefix ?>chart-source-data-edit-block">
4935 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block">
2684 4936 <div style="height: 63.11px; padding: 0 15px;"></div>
2685 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box">
4937 + <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">
2686 4938 <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">
2687 4939 <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;" />
2688 4940 </svg>
2689 4941 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2690 - <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'>
4942 + <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'>
2691 4943 <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">
2692 4944 <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;" />
2693 4945 </svg>
2694 4946 </div>
@@ -2715,30 +4967,30 @@
2715 4967 <?php endif; ?>
2716 4968 </div>
2717 4969 <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">
2718 4970 <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">
2719 - <?php echo __( 'Add column', "chart-builder" ); ?>
4971 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2720 4972 </div>
2721 4973 </div>
2722 4974 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2723 4975 <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">
2724 - <?php echo __( 'Add row', "chart-builder" ); ?>
4976 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2725 4977 </div>
2726 4978 <br>
2727 4979 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns <?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttn">
2728 4980 <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>
2729 - <?php echo __( 'Preview', "chart-builder" ); ?>
4981 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2730 4982 </button>
2731 4983 </div>
2732 4984 <?php endif; ?>
2733 - <div class="<?= $html_class_prefix ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
2734 - <div class="<?= $html_class_prefix ?>chart-source-data-content-org-type">
2735 - <ul id="<?= $html_class_prefix ?>chart-source-data-edit-tree-content">
4985 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
4986 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-org-type">
4987 + <ul id="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-tree-content">
2736 4988 </ul>
2737 4989 </div>
2738 4990 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns <?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttn">
2739 4991 <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>
2740 - <?php echo __( 'Preview', "chart-builder" ); ?>
4992 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2741 4993 </button>
2742 4994 </div>
2743 4995 </div>
2744 4996 </div>
@@ -2763,15 +5015,16 @@
2763 5015 $source = $args['source'];
2764 5016 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2765 5017 $settings = $args['settings'];
2766 5018 $source_chart_type = $args['source_chart_type'];
2767 - $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : 'add';
5019 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
5020 + $action = isset($_GET['action']) ? sanitize_text_field((wp_unslash($_GET['action']))) : 'add';
2768 5021
2769 5022 ob_start();
2770 5023 ?>
2771 5024 <div class="ays-accordion-data-main-wrap">
2772 5025 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2773 - <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?= $html_class_prefix ?>chart-source-data-manual">
5026 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?php echo esc_attr($html_class_prefix) ?>chart-source-data-manual">
2774 5027 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
2775 5028 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content">
2776 5029 <?php if(!empty($source)):
2777 5030 foreach($source as $source_id => $source_value):
@@ -2779,14 +5032,14 @@
2779 5032 if ($source_id == 0): ?>
2780 5033 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2781 5034 <div class="ays-chart-empty-data-table-cell"></div>
2782 5035 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2783 - <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); ?>">
5036 + <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); ?>">
2784 5037 <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">
2785 5038 <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;" />
2786 5039 </svg>
2787 5040 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2788 - <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'" : "" ?>>
5041 + <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'" : "" ?>>
2789 5042 <?php if ($each_source_id !== 0): ?>
2790 5043 <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">
2791 5044 <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;" />
2792 5045 </svg>
@@ -2808,14 +5061,14 @@
2808 5061 </svg>
2809 5062 </div>
2810 5063 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2811 5064 <?php if ($each_source_id == 0): ?>
2812 - <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); ?>">
2813 - <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)); ?>">
5065 + <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); ?>">
5066 + <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)); ?>">
2814 5067 </div>
2815 5068 <?php else: ?>
2816 5069 <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); ?>">
2817 - <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">
5070 + <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">
2818 5071 </div>
2819 5072 <?php endif; ?>
2820 5073 <?php endforeach; ?>
2821 5074 </div>
@@ -2822,16 +5075,16 @@
2822 5075 <?php endif; ?>
2823 5076 <?php endif; ?>
2824 5077 <?php endforeach; ?>
2825 5078 <?php else:?>
2826 - <div class="<?= $html_class_prefix ?>chart-source-data-edit-block">
5079 + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block">
2827 5080 <div style="height: 63.11px; padding: 0 15px;"></div>
2828 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box">
5081 + <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">
2829 5082 <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">
2830 5083 <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;" />
2831 5084 </svg>
2832 5085 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2833 - <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'>
5086 + <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'>
2834 5087 <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">
2835 5088 <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;" />
2836 5089 </svg>
2837 5090 </div>
@@ -2858,19 +5111,19 @@
2858 5111 <?php endif; ?>
2859 5112 </div>
2860 5113 <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">
2861 5114 <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">
2862 - <?php echo __( 'Add column', "chart-builder" ); ?>
5115 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2863 5116 </div>
2864 5117 </div>
2865 5118 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2866 5119 <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">
2867 - <?php echo __( 'Add row', "chart-builder" ); ?>
5120 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2868 5121 </div>
2869 5122 <br>
2870 5123 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns <?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttn">
2871 5124 <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>
2872 - <?php echo __( 'Preview', "chart-builder" ); ?>
5125 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2873 5126 </button>
2874 5127 </div>
2875 5128 </div>
2876 5129 </div>
@@ -2926,9 +5179,9 @@
2926 5179
2927 5180 $sources[] = $content;
2928 5181 }
2929 5182 $content_for_escape = implode('' , $sources );
2930 - echo html_entity_decode(esc_html( $content_for_escape ));
5183 + echo html_entity_decode( $content_for_escape );
2931 5184 }
2932 5185
2933 5186 public function settings_contents_general_settings( $sources, $args ){
2934 5187 $html_class_prefix = $args['html_class_prefix'];
@@ -3082,8 +5335,9 @@
3082 5335 $settings = $args['settings'];
3083 5336
3084 5337 $show_title = $settings['show_title'];
3085 5338 $show_description = $settings['show_description'];
5339 + $enable_interactivity = $settings['enable_interactivity'];
3086 5340
3087 5341 ob_start();
3088 5342 ?>
3089 5343 <div class="ays-accordion-data-main-wrap">
@@ -3166,8 +5420,24 @@
3166 5420 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
3167 5421 </label>
3168 5422 </div>
3169 5423 </div> <!-- Show description -->
5424 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5425 + <div class="col-sm-5 <?php echo esc_attr($html_class_prefix) ?>option-title">
5426 + <label for="ays-chart-option-enable-interactivity" class="form-label">
5427 + <?php echo esc_html(__('Enable interactivity', "chart-builder")); ?>
5428 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Decide if the chart shows events based on user actions or responds to user interaction. If not, the chart won't generate 'select' or similar interaction-based events (but will generate ready or error events), and won't show hovertext or change based on user input.","chart-builder") ); ?>">
5429 + <i class="ays_fa ays_fa_info_circle"></i>
5430 + </a>
5431 + </label>
5432 + </div>
5433 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5434 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5435 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-enable-interactivity" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[enable_interactivity]" value="on" <?php echo esc_attr($enable_interactivity); ?> >
5436 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5437 + </label>
5438 + </div>
5439 + </div> <!-- Enable interactivity -->
3170 5440 </div>
3171 5441 </div>
3172 5442 <?php
3173 5443 $content = ob_get_clean();
@@ -3203,9 +5473,9 @@
3203 5473 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3204 5474 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3205 5475 <label for="ays-chart-option-tooltip-trigger">
3206 5476 <?php echo esc_html(__( "Trigger", "chart-builder" )); ?>
3207 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") ); ?>">
5477 + <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") )); ?>">
3208 5478 <i class="ays_fa ays_fa_info_circle"></i>
3209 5479 </a>
3210 5480 </label>
3211 5481 </div>
@@ -3254,9 +5524,9 @@
3254 5524 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3255 5525 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3256 5526 <label for="ays-chart-option-tooltip-font-size" class="form-label">
3257 5527 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3258 - <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") ); ?>">
5528 + <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") )); ?>">
3259 5529 <i class="ays_fa ays_fa_info_circle"></i>
3260 5530 </a>
3261 5531 </label>
3262 5532 </div>
@@ -3284,9 +5554,9 @@
3284 5554 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3285 5555 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3286 5556 <label for="ays-chart-option-tooltip-bold">
3287 5557 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
3288 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") ); ?>">
5558 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Make the tooltip text bold. Choose 'Enable' to apply bold formatting, 'Disable' for normal text, or 'Default' to use the chart's default font weight.","chart-builder") )); ?>">
3289 5559 <i class="ays_fa ays_fa_info_circle"></i>
3290 5560 </a>
3291 5561 </label>
3292 5562 </div>
@@ -3317,8 +5587,120 @@
3317 5587
3318 5588 return $sources;
3319 5589 }
3320 5590
5591 + public function settings_contents_tooltip_settings_chartjs( $sources, $args ){
5592 + $html_class_prefix = $args['html_class_prefix'];
5593 + $html_name_prefix = $args['html_name_prefix'];
5594 + $settings = $args['settings'];
5595 +
5596 + $tooltip_text_color = $settings['tooltip_text_color'];
5597 + $show_color_code = $settings['show_color_code'];
5598 + $tooltip_italic = $settings['tooltip_italic'];
5599 + $tooltip_font_size = $settings['tooltip_font_size'];
5600 + $tooltip_bold = $settings['tooltip_bold'];
5601 + $tooltip_bold_options = $settings['tooltip_bold_options'];
5602 +
5603 + ob_start();
5604 + ?>
5605 + <div class="ays-accordion-data-main-wrap ">
5606 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
5607 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5608 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5609 + <label for="ays-chart-option-show-color-code">
5610 + <?php echo esc_html(__( "Show Color Code", "chart-builder" )); ?>
5611 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color will be displayed while clicking on a particular part of the chart.","chart-builder") ); ?>">
5612 + <i class="ays_fa ays_fa_info_circle"></i>
5613 + </a>
5614 + </label>
5615 + </div>
5616 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5617 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5618 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-show-color-code" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[show_color_code]" value="on" <?php echo esc_attr($show_color_code); ?> >
5619 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5620 + </label>
5621 + </div>
5622 + </div> <!-- Show Color Code -->
5623 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5624 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5625 + <label for="ays-chart-option-tooltip-text-color">
5626 + <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
5627 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the tooltip text.","chart-builder") ); ?>">
5628 + <i class="ays_fa ays_fa_info_circle"></i>
5629 + </a>
5630 + </label>
5631 + </div>
5632 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5633 + <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) ?>">
5634 + </div>
5635 + </div> <!-- Text color -->
5636 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5637 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5638 + <label for="ays-chart-option-tooltip-italic">
5639 + <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5640 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart tooltip text italic.","chart-builder") ); ?>">
5641 + <i class="ays_fa ays_fa_info_circle"></i>
5642 + </a>
5643 + </label>
5644 + </div>
5645 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5646 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5647 + <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-tooltip-italic" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[tooltip_italic]" value="on" <?php echo esc_attr($tooltip_italic); ?> >
5648 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5649 + </label>
5650 + </div>
5651 + </div> <!-- Italic text -->
5652 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5653 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5654 + <label for="ays-chart-option-tooltip-font-size" class="form-label">
5655 + <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5656 + <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") )); ?>">
5657 + <i class="ays_fa ays_fa_info_circle"></i>
5658 + </a>
5659 + </label>
5660 + </div>
5661 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5662 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-tooltip-font-size" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[tooltip_font_size]" value="<?php echo esc_attr($tooltip_font_size) ?>">
5663 + <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
5664 + </div>
5665 + </div> <!-- Font size -->
5666 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5667 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5668 + <label for="ays-chart-option-tooltip-bold">
5669 + <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5670 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Make the tooltip text bold. Choose 'Enable' to apply bold formatting, 'Disable' for normal text, or 'Default' to use the chart's default font weight.","chart-builder") )); ?>">
5671 + <i class="ays_fa ays_fa_info_circle"></i>
5672 + </a>
5673 + </label>
5674 + </div>
5675 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5676 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-tooltip-bold" name="<?php echo esc_attr($html_name_prefix); ?>settings[tooltip_bold]">
5677 + <?php
5678 + foreach ( $tooltip_bold_options as $option_slug => $option ):
5679 + $selected = ( $tooltip_bold == $option_slug ) ? 'selected' : '';
5680 + ?>
5681 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
5682 + <?php
5683 + endforeach;
5684 + ?>
5685 + </select>
5686 + </div>
5687 + </div> <!-- Bold text -->
5688 + </div>
5689 + </div>
5690 + <?php
5691 + $content = ob_get_clean();
5692 +
5693 + $title = __( 'Tooltip', "chart-builder" );
5694 +
5695 + $sources['tooltip'] = array(
5696 + 'content' => $content,
5697 + 'title' => $title
5698 + );
5699 +
5700 + return $sources;
5701 + }
5702 +
3321 5703 public function settings_contents_legend_settings( $sources, $args ){
3322 5704 $html_class_prefix = $args['html_class_prefix'];
3323 5705 $html_name_prefix = $args['html_name_prefix'];
3324 5706 $settings = $args['settings'];
@@ -3338,9 +5720,9 @@
3338 5720 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3339 5721 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3340 5722 <label for="ays-chart-option-legend-position">
3341 5723 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3342 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") ); ?>">
5724 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") )); ?>">
3343 5725 <i class="ays_fa ays_fa_info_circle"></i>
3344 5726 </a>
3345 5727 </label>
3346 5728 </div>
@@ -3371,9 +5753,9 @@
3371 5753 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3372 5754 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3373 5755 <label for="ays-chart-option-legend-alignment">
3374 5756 <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
3375 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") ); ?>">
5757 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") )); ?>">
3376 5758 <i class="ays_fa ays_fa_info_circle"></i>
3377 5759 </a>
3378 5760 </label>
3379 5761 </div>
@@ -3393,9 +5775,9 @@
3393 5775 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3394 5776 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3395 5777 <label for="ays-chart-option-legend-font-color">
3396 5778 <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
3397 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") ); ?>">
5779 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") )); ?>">
3398 5780 <i class="ays_fa ays_fa_info_circle"></i>
3399 5781 </a>
3400 5782 </label>
3401 5783 </div>
@@ -3406,9 +5788,9 @@
3406 5788 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3407 5789 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3408 5790 <label for="ays-chart-option-legend-font-size" class="form-label">
3409 5791 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3410 - <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") ); ?>">
5792 + <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") )); ?>">
3411 5793 <i class="ays_fa ays_fa_info_circle"></i>
3412 5794 </a>
3413 5795 </label>
3414 5796 </div>
@@ -3463,8 +5845,159 @@
3463 5845
3464 5846 return $sources;
3465 5847 }
3466 5848
5849 + public function settings_contents_legend_settings_chartjs( $sources, $args ){
5850 + $html_class_prefix = $args['html_class_prefix'];
5851 + $html_name_prefix = $args['html_name_prefix'];
5852 + $settings = $args['settings'];
5853 + $legend_positions = $settings['legend_positions'];
5854 + $legend_position = $settings['legend_position'];
5855 + $legend_alignments = $settings['legend_alignments'];
5856 + $legend_alignment = $settings['legend_alignment'];
5857 + $legend_color = $settings['legend_color'];
5858 + $legend_font_size = $settings['legend_font_size'];
5859 + $legend_reverse = $settings['legend_reverse'];
5860 + $legend_bold = $settings['legend_bold'];
5861 + $legend_italic = $settings['legend_italic'];
5862 + ob_start();
5863 + ?>
5864 + <div class="ays-accordion-data-main-wrap">
5865 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
5866 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5867 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5868 + <label for="ays-chart-option-legend-position">
5869 + <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5870 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") )); ?>">
5871 + <i class="ays_fa ays_fa_info_circle"></i>
5872 + </a>
5873 + </label>
5874 + </div>
5875 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5876 + <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]">
5877 + <?php
5878 + foreach ( $legend_positions as $option_slug => $option ):
5879 + $selected = ( $legend_position == $option_slug ) ? 'selected' : '';
5880 + ?>
5881 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?> ><?php echo esc_html($option); ?></option>
5882 + <?php
5883 + endforeach;
5884 + ?>
5885 + </select>
5886 + </div>
5887 + </div> <!-- Legend position -->
5888 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5889 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5890 + <label for="ays-chart-option-legend-alignment">
5891 + <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
5892 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") )); ?>">
5893 + <i class="ays_fa ays_fa_info_circle"></i>
5894 + </a>
5895 + </label>
5896 + </div>
5897 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5898 + <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]">
5899 + <?php
5900 + foreach ( $legend_alignments as $option_slug => $option ):
5901 + $selected = ( $legend_alignment == $option_slug ) ? 'selected' : '';
5902 + ?>
5903 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
5904 + <?php
5905 + endforeach;
5906 + ?>
5907 + </select>
5908 + </div>
5909 + </div> <!-- Legend alignment -->
5910 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5911 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5912 + <label for="ays-chart-option-legend-font-color">
5913 + <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
5914 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") )); ?>">
5915 + <i class="ays_fa ays_fa_info_circle"></i>
5916 + </a>
5917 + </label>
5918 + </div>
5919 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5920 + <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) ?>">
5921 + </div>
5922 + </div> <!-- Legend font color -->
5923 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5924 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5925 + <label for="ays-chart-option-legend-font-size" class="form-label">
5926 + <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5927 + <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") )); ?>">
5928 + <i class="ays_fa ays_fa_info_circle"></i>
5929 + </a>
5930 + </label>
5931 + </div>
5932 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
5933 + <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) ?>">
5934 + <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
5935 + </div>
5936 + </div> <!-- Font size -->
5937 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5938 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5939 + <label for="ays-chart-option-legend-italic">
5940 + <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5941 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart legend text italic.","chart-builder") ); ?>">
5942 + <i class="ays_fa ays_fa_info_circle"></i>
5943 + </a>
5944 + </label>
5945 + </div>
5946 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5947 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5948 + <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); ?> >
5949 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5950 + </label>
5951 + </div>
5952 + </div> <!-- Italic text -->
5953 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5954 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5955 + <label for="ays-chart-option-legend-bold">
5956 + <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5957 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart legend text bold.","chart-builder") ); ?>">
5958 + <i class="ays_fa ays_fa_info_circle"></i>
5959 + </a>
5960 + </label>
5961 + </div>
5962 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5963 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5964 + <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); ?> >
5965 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5966 + </label>
5967 + </div>
5968 + </div> <!-- Bold text -->
5969 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt">
5970 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5971 + <label for="ays-chart-option-legend-revers">
5972 + <?php echo esc_html(__( "Show datasets in reverse order", "chart-builder" )); ?>
5973 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this toggle to show datasets in reverse ordering.","chart-builder") ); ?>">
5974 + <i class="ays_fa ays_fa_info_circle"></i>
5975 + </a>
5976 + </label>
5977 + </div>
5978 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
5979 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
5980 + <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); ?> >
5981 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
5982 + </label>
5983 + </div>
5984 + </div> <!-- reverse datasets -->
5985 + </div>
5986 + </div>
5987 + <?php
5988 + $content = ob_get_clean();
5989 +
5990 + $title = __( 'Legend', "chart-builder" );
5991 +
5992 + $sources['legend'] = array(
5993 + 'content' => $content,
5994 + 'title' => $title
5995 + );
5996 +
5997 + return $sources;
5998 + }
5999 +
3467 6000 public function settings_contents_horizontal_axis_settings( $sources, $args ){
3468 6001 $html_class_prefix = $args['html_class_prefix'];
3469 6002 $html_name_prefix = $args['html_name_prefix'];
3470 6003 $settings = $args['settings'];
@@ -3480,8 +6013,9 @@
3480 6013 $haxis_slanted_text_angle = $settings['haxis_slanted_text_angle'];
3481 6014 $haxis_show_text_every = $settings['haxis_show_text_every'];
3482 6015 $haxis_format_options = $settings['axes_format_options'];
3483 6016 $haxis_format = $settings['haxis_format'];
6017 + $haxis_enable_divide_percent = $settings['haxis_enable_divide_percent'];
3484 6018 $haxis_label_font_size = $settings['haxis_label_font_size'];
3485 6019 $haxis_max_value = $settings['haxis_max_value'];
3486 6020 $haxis_min_value = $settings['haxis_min_value'];
3487 6021 $haxis_text_font_size = $settings['haxis_text_font_size'];
@@ -3495,9 +6029,9 @@
3495 6029 $haxis_minor_gridlines_color = $settings['haxis_minor_gridlines_color'];
3496 6030
3497 6031 ob_start();
3498 6032 ?>
3499 - <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">
6033 + <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">
3500 6034 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3501 6035 <h6>Label</h6>
3502 6036 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3503 6037 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3502,9 +6036,9 @@
3502 6036 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3503 6037 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3504 6038 <label for="ays-chart-option-haxis-title" class="form-label">
3505 6039 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3506 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The title of the horizontal axis","chart-builder") ); ?>">
6040 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the horizontal axis","chart-builder") ); ?>">
3507 6041 <i class="ays_fa ays_fa_info_circle"></i>
3508 6042 </a>
3509 6043 </label>
3510 6044 </div>
@@ -3589,9 +6123,9 @@
3589 6123 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3590 6124 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3591 6125 <label for="ays-chart-option-haxis-text-position" class="form-label">
3592 6126 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3593 - <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") ); ?>">
6127 + <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") ); ?>">
3594 6128 <i class="ays_fa ays_fa_info_circle"></i>
3595 6129 </a>
3596 6130 </label>
3597 6131 </div>
@@ -3772,32 +6306,40 @@
3772 6306 <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) ?>">
3773 6307 </div>
3774 6308 </div> <!-- Horizontal axis baseline color -->
3775 6309
3776 - <br>
3777 - <h6>Format</h6>
3778 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6310 + <br class="cb-changable-opt cb-bar_chart-opt " >
6311 + <h6 class="cb-changable-opt cb-bar_chart-opt">Format</h6>
6312 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt " >
3779 6313 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3780 6314 <label for="ays-chart-option-haxis-format" class="form-label">
3781 6315 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
3782 6316 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
3783 - echo htmlspecialchars( sprintf (
3784 - "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
3785 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
3786 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
3787 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
3788 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
3789 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
3790 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
3791 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
3792 - '<em>', '</em>',
3793 - '<em>', '</em>',
3794 - '<em>', '</em>',
3795 - '<em>', '</em>',
3796 - '<em>', '</em>',
3797 - '<em>', '</em>',
3798 - '<em>', '</em>'
3799 - ) );
6317 + echo esc_attr( sprintf(
6318 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6319 + "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6320 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6321 + __('%1$sNone:%2$s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
6322 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6323 + __('%1$sDecimal:%2$s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
6324 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6325 + __('%1$sScientific:%2$s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
6326 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6327 + __('%1$sCurrency:%2$s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
6328 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6329 + __('%1$sPercent:%2$s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
6330 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6331 + __('%1$sShort:%2$s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
6332 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6333 + __('%1$sLong:%2$s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
6334 + '<em>', '</em>',
6335 + '<em>', '</em>',
6336 + '<em>', '</em>',
6337 + '<em>', '</em>',
6338 + '<em>', '</em>',
6339 + '<em>', '</em>',
6340 + '<em>', '</em>'
6341 + ));
3800 6342 ?>">
3801 6343 <i class="ays_fa ays_fa_info_circle"></i>
3802 6344 </a>
3803 6345 </label>
@@ -3814,10 +6356,26 @@
3814 6356 ?>
3815 6357 </select>
3816 6358 </div>
3817 6359 </div> <!-- Horizontal axis format -->
3818 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6360 + <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;'; ?>">
3819 6361 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6362 + <label for="ays-chart-option-haxis-enable-divide-percent">
6363 + <?php echo esc_html(__( "Remove Extra Zeros ", "chart-builder" )); ?>
6364 + <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") ); ?>">
6365 + <i class="ays_fa ays_fa_info_circle"></i>
6366 + </a>
6367 + </label>
6368 + </div>
6369 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6370 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
6371 + <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); ?> >
6372 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
6373 + </label>
6374 + </div>
6375 + </div> <!--Remove Extra Zeros"-->
6376 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt" >
6377 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3820 6378 <label for="ays-chart-option-haxis-max-value" class="form-label">
3821 6379 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
3822 6380 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
3823 6381 <i class="ays_fa ays_fa_info_circle"></i>
@@ -3827,9 +6385,9 @@
3827 6385 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right">
3828 6386 <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) ?>">
3829 6387 </div>
3830 6388 </div> <!-- Horizontal axis max value -->
3831 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6389 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt" >
3832 6390 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3833 6391 <label for="ays-chart-option-haxis-min-value" class="form-label">
3834 6392 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
3835 6393 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -3868,8 +6426,9 @@
3868 6426 $vaxis_text_color = $settings['vaxis_text_color'];
3869 6427 $vaxis_baseline_color = $settings['vaxis_baseline_color'];
3870 6428 $vaxis_format_options = $settings['axes_format_options'];
3871 6429 $vaxis_format = $settings['vaxis_format'];
6430 + $vaxis_enable_divide_percent = $settings['vaxis_enable_divide_percent'];
3872 6431 $vaxis_label_font_size = $settings['vaxis_label_font_size'];
3873 6432 $vaxis_max_value = $settings['vaxis_max_value'];
3874 6433 $vaxis_min_value = $settings['vaxis_min_value'];
3875 6434 $vaxis_text_font_size = $settings['vaxis_text_font_size'];
@@ -3883,9 +6442,9 @@
3883 6442 $vaxis_minor_gridlines_color = $settings['vaxis_minor_gridlines_color'];
3884 6443
3885 6444 ob_start();
3886 6445 ?>
3887 - <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">
6446 + <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">
3888 6447 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3889 6448 <h6>Label</h6>
3890 6449 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3891 6450 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3890,9 +6449,9 @@
3890 6449 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3891 6450 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3892 6451 <label for="ays-chart-option-vaxis-title" class="form-label">
3893 6452 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3894 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The title of the vertical axis","chart-builder") ); ?>">
6453 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the vertical axis","chart-builder") ); ?>">
3895 6454 <i class="ays_fa ays_fa_info_circle"></i>
3896 6455 </a>
3897 6456 </label>
3898 6457 </div>
@@ -3964,9 +6523,9 @@
3964 6523 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3965 6524 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3966 6525 <label for="ays-chart-option-vaxis-text-position" class="form-label">
3967 6526 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3968 - <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") ); ?>">
6527 + <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") ); ?>">
3969 6528 <i class="ays_fa ays_fa_info_circle"></i>
3970 6529 </a>
3971 6530 </label>
3972 6531 </div>
@@ -4112,24 +6671,32 @@
4112 6671 <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) ?>">
4113 6672 </div>
4114 6673 </div> <!-- Vertical axis baseline color -->
4115 6674
4116 - <br>
4117 - <h6>Format</h6>
4118 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6675 + <br class="cb-changable-opt cb-column_chart-opt cb-line_chart-opt">
6676 + <h6 class="cb-changable-opt cb-column_chart-opt cb-line_chart-opt">Format</h6>
6677 + <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">
4119 6678 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4120 6679 <label for="ays-chart-option-vaxis-format" class="form-label">
4121 6680 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
4122 6681 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4123 - echo htmlspecialchars( sprintf (
6682 + echo esc_attr( sprintf(
6683 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4124 6684 "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4125 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
4126 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
4127 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
4128 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
4129 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
4130 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
4131 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
6685 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6686 + __('%1$sNone:%2$s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
6687 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6688 + __('%1$sDecimal:%2$s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
6689 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6690 + __('%1$sScientific:%2$s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
6691 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6692 + __('%1$sCurrency:%2$s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
6693 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6694 + __('%1$sPercent:%2$s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
6695 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6696 + __('%1$sShort:%2$s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
6697 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6698 + __('%1$sLong:%2$s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
4132 6699 '<em>', '</em>',
4133 6700 '<em>', '</em>',
4134 6701 '<em>', '</em>',
4135 6702 '<em>', '</em>',
@@ -4135,9 +6702,9 @@
4135 6702 '<em>', '</em>',
4136 6703 '<em>', '</em>',
4137 6704 '<em>', '</em>',
4138 6705 '<em>', '</em>'
4139 - ) );
6706 + ));
4140 6707 ?>">
4141 6708 <i class="ays_fa ays_fa_info_circle"></i>
4142 6709 </a>
4143 6710 </label>
@@ -4154,10 +6721,26 @@
4154 6721 ?>
4155 6722 </select>
4156 6723 </div>
4157 6724 </div> <!-- Vertical axis format -->
4158 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6725 + <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;'; ?>">
4159 6726 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6727 + <label for="ays-chart-option-vaxis-enable-divide-percent">
6728 + <?php echo esc_html(__( "Remove Extra Zeros", "chart-builder" )); ?>
6729 + <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") ); ?>">
6730 + <i class="ays_fa ays_fa_info_circle"></i>
6731 + </a>
6732 + </label>
6733 + </div>
6734 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6735 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
6736 + <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); ?> >
6737 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
6738 + </label>
6739 + </div>
6740 + </div> <!--Remove Extra Zeros-->
6741 + <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">
6742 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4160 6743 <label for="ays-chart-option-vaxis-max-value" class="form-label">
4161 6744 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
4162 6745 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
4163 6746 <i class="ays_fa ays_fa_info_circle"></i>
@@ -4167,9 +6750,9 @@
4167 6750 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4168 6751 <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) ?>">
4169 6752 </div>
4170 6753 </div> <!-- Vertical axis max value -->
4171 - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6754 + <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">
4172 6755 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4173 6756 <label for="ays-chart-option-vaxis-min-value" class="form-label">
4174 6757 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
4175 6758 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -4208,9 +6791,9 @@
4208 6791 $animation_easing = $settings['animation_easing'];
4209 6792
4210 6793 ob_start();
4211 6794 ?>
4212 - <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">
6795 + <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">
4213 6796 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4214 6797 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4215 6798 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4216 6799 <label for="ays-chart-option-enable-animation">
@@ -4261,23 +6844,24 @@
4261 6844 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4262 6845 <label for="ays-chart-option-animation-easing" class="form-label">
4263 6846 <?php echo esc_html(__( "Easing", "chart-builder" )); ?>
4264 6847 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4265 - echo htmlspecialchars( sprintf(
6848 + echo esc_attr( sprintf(
6849 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4266 6850 "<p>" . __('The easing function applied to the chart animation. The following options are available:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4267 - __('%sLinear:%s Constant speed.', "chart-builder") . "</li><li>" .
4268 - __('%sEase in:%s Start slow and speed up.', "chart-builder") . "</li><li>" .
4269 - __('%sEase out:%s Start fast and slow down.', "chart-builder") . "</li><li>" .
4270 - __('%sEase in and out:%s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
4271 - '<em>',
4272 - '</em>',
4273 - '<em>',
4274 - '</em>',
4275 - '<em>',
4276 - '</em>',
4277 - '<em>',
4278 - '</em>'
4279 - ) );
6851 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6852 + __('%1$sLinear:%2$s Constant speed.', "chart-builder") . "</li><li>" .
6853 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6854 + __('%1$sEase in:%2$s Start slow and speed up.', "chart-builder") . "</li><li>" .
6855 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6856 + __('%1$sEase out:%2$s Start fast and slow down.', "chart-builder") . "</li><li>" .
6857 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6858 + __('%1$sEase in and out:%2$s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
6859 + '<em>', '</em>',
6860 + '<em>', '</em>',
6861 + '<em>', '</em>',
6862 + '<em>', '</em>'
6863 + ));
4280 6864 ?>">
4281 6865 <i class="ays_fa ays_fa_info_circle"></i>
4282 6866 </a>
4283 6867 </label>
@@ -4316,9 +6900,9 @@
4316 6900 $html_name_prefix = $args['html_name_prefix'];
4317 6901
4318 6902 ob_start();
4319 6903 ?>
4320 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-live-chart-settings-tab">
6904 + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-live-chart-settings-tab">
4321 6905 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4322 6906 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4323 6907 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4324 6908 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4323,15 +6907,15 @@
4323 6907 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4324 6908 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4325 6909 <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>
4326 6910 <div class="ays-pro-features-v2-video-text">
4327 - <?php echo __("Watch Video" , "chart-builder"); ?>
6911 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4328 6912 </div>
4329 6913 </a>
4330 6914 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4331 6915 <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>
4332 6916 <div class="ays-pro-features-v2-upgrade-text">
4333 - <?php echo __("Upgrade" , "chart-builder"); ?>
6917 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4334 6918 </div>
4335 6919 </a>
4336 6920 </div>
4337 6921 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4353,15 +6937,15 @@
4353 6937 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4354 6938 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4355 6939 <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>
4356 6940 <div class="ays-pro-features-v2-video-text">
4357 - <?php echo __("Watch Video" , "chart-builder"); ?>
6941 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4358 6942 </div>
4359 6943 </a>
4360 6944 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4361 6945 <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>
4362 6946 <div class="ays-pro-features-v2-upgrade-text">
4363 - <?php echo __("Upgrade" , "chart-builder"); ?>
6947 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4364 6948 </div>
4365 6949 </a>
4366 6950 </div>
4367 6951 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4401,9 +6985,9 @@
4401 6985 $enable_img = $settings['enable_img'];
4402 6986
4403 6987 ob_start();
4404 6988 ?>
4405 - <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">
6989 + <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">
4406 6990 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4407 6991 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4408 6992 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4409 6993 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4408,15 +6992,15 @@
4408 6992 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4409 6993 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4410 6994 <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>
4411 6995 <div class="ays-pro-features-v2-video-text">
4412 - <?php echo __("Watch Video" , "chart-builder"); ?>
6996 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4413 6997 </div>
4414 6998 </a>
4415 6999 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4416 7000 <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>
4417 7001 <div class="ays-pro-features-v2-upgrade-text">
4418 - <?php echo __("Upgrade" , "chart-builder"); ?>
7002 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4419 7003 </div>
4420 7004 </a>
4421 7005 </div>
4422 7006 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4438,15 +7022,15 @@
4438 7022 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4439 7023 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4440 7024 <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>
4441 7025 <div class="ays-pro-features-v2-video-text">
4442 - <?php echo __("Watch Video" , "chart-builder"); ?>
7026 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4443 7027 </div>
4444 7028 </a>
4445 7029 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4446 7030 <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>
4447 7031 <div class="ays-pro-features-v2-upgrade-text">
4448 - <?php echo __("Upgrade" , "chart-builder"); ?>
7032 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4449 7033 </div>
4450 7034 </a>
4451 7035 </div>
4452 7036 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4468,15 +7052,15 @@
4468 7052 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4469 7053 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4470 7054 <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>
4471 7055 <div class="ays-pro-features-v2-video-text">
4472 - <?php echo __("Watch Video" , "chart-builder"); ?>
7056 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4473 7057 </div>
4474 7058 </a>
4475 7059 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4476 7060 <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>
4477 7061 <div class="ays-pro-features-v2-upgrade-text">
4478 - <?php echo __("Upgrade" , "chart-builder"); ?>
7062 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4479 7063 </div>
4480 7064 </a>
4481 7065 </div>
4482 7066 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4498,15 +7082,15 @@
4498 7082 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4499 7083 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4500 7084 <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>
4501 7085 <div class="ays-pro-features-v2-video-text">
4502 - <?php echo __("Watch Video" , "chart-builder"); ?>
7086 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4503 7087 </div>
4504 7088 </a>
4505 7089 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4506 7090 <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>
4507 7091 <div class="ays-pro-features-v2-upgrade-text">
4508 - <?php echo __("Upgrade" , "chart-builder"); ?>
7092 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4509 7093 </div>
4510 7094 </a>
4511 7095 </div>
4512 7096 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4534,9 +7118,9 @@
4534 7118 </label>
4535 7119 </div>
4536 7120 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4537 7121 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
4538 - <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?> >
7122 + <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)?> >
4539 7123 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4540 7124 </label>
4541 7125 </div>
4542 7126 </div> <!-- IMG option end -->
@@ -4593,9 +7177,9 @@
4593 7177
4594 7178 $sources[] = $content;
4595 7179 }
4596 7180 $content_for_escape = implode('' , $sources );
4597 - echo html_entity_decode(esc_html( $content_for_escape ));
7181 + echo html_entity_decode( esc_html($content_for_escape) );
4598 7182 }
4599 7183
4600 7184 public function settings_contents_chart_styles_settings( $sources, $args ){
4601 7185 $html_class_prefix = $args['html_class_prefix'];
@@ -4615,12 +7199,19 @@
4615 7199 $org_chart_font_size = $settings['org_chart_font_size'];
4616 7200 $background_color = $settings['background_color'];
4617 7201 $transparent_background = $settings['transparent_background'];
4618 7202 $border_width = $settings['border_width'];
7203 + $border_width_with_title = $settings['border_width_with_title'];
7204 + $border_radius_with_title = $settings['border_radius_with_title'];
7205 + $border_color_with_title = $settings['border_color_with_title'];
7206 + $border_style_with_title = $settings['border_style_with_title'];
7207 + $border_style = $settings['border_style'];
7208 + $border_styles = $settings['border_styles'];
4619 7209 $border_radius = $settings['border_radius'];
4620 7210 $border_color = $settings['border_color'];
4621 7211 $box_shadow = $settings['box_shadow'];
4622 7212 $box_shadow_color = $settings['box_shadow_color'];
7213 + $padding_outer = $settings['padding_outer'];
4623 7214 ob_start();
4624 7215 ?>
4625 7216 <div class="ays-accordion-data-main-wrap">
4626 7217 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -4627,9 +7218,9 @@
4627 7218 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4628 7219 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4629 7220 <label for="ays-chart-option-width" class="form-label">
4630 7221 <?php echo esc_html(__( "Width", "chart-builder" )); ?>
4631 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container, in percents.","chart-builder") ); ?>">
7222 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container, in percents.","chart-builder") ); ?>">
4632 7223 <i class="ays_fa ays_fa_info_circle"></i>
4633 7224 </a>
4634 7225 </label>
4635 7226 </div>
@@ -4650,9 +7241,9 @@
4650 7241 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4651 7242 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4652 7243 <label for="ays-chart-option-responsive-width" class="form-label">
4653 7244 <?php echo esc_html(__( "Responsive Width", "chart-builder" )); ?>
4654 - <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") ); ?>">
7245 + <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") ); ?>">
4655 7246 <i class="ays_fa ays_fa_info_circle"></i>
4656 7247 </a>
4657 7248 </label>
4658 7249 </div>
@@ -4666,9 +7257,9 @@
4666 7257 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4667 7258 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4668 7259 <label for="ays-chart-option-position">
4669 7260 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4670 - <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") ); ?>">
7261 + <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") ); ?>">
4671 7262 <i class="ays_fa ays_fa_info_circle"></i>
4672 7263 </a>
4673 7264 </label>
4674 7265 </div>
@@ -4683,14 +7274,14 @@
4683 7274 endforeach;
4684 7275 ?>
4685 7276 </select>
4686 7277 </div>
4687 - </div> <!-- Title position -->
7278 + </div> <!-- Position -->
4688 7279 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4689 7280 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4690 7281 <label for="ays-chart-option-height" class="form-label">
4691 7282 <?php echo esc_html(__( "Height", "chart-builder" )); ?>
4692 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
7283 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
4693 7284 <i class="ays_fa ays_fa_info_circle"></i>
4694 7285 </a>
4695 7286 </label>
4696 7287 </div>
@@ -4711,9 +7302,9 @@
4711 7302 <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">
4712 7303 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4713 7304 <label for="ays-chart-option-font-size" class="form-label">
4714 7305 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
4715 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart text.","chart-builder") ); ?>">
7306 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart text.","chart-builder") ); ?>">
4716 7307 <i class="ays_fa ays_fa_info_circle"></i>
4717 7308 </a>
4718 7309 </label>
4719 7310 </div>
@@ -4721,24 +7312,24 @@
4721 7312 <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) ?>">
4722 7313 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
4723 7314 </div>
4724 7315 </div> <!-- Font size -->
4725 - <div class="form-group row mb-2 <?= $html_class_prefix ?>options-section cb-changable-opt cb-org_chart-opt display_none">
4726 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
7316 + <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">
7317 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4727 7318 <label for="ays-chart-option-org-chart-font-size" class="form-label">
4728 - <?php echo __( "Element size", $this->plugin_name ); ?>
4729 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The size of the chart element.","chart-builder") ); ?>">
7319 + <?php echo esc_html(__( "Element size", 'chart-builder' )); ?>
7320 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The size of the chart element.","chart-builder") ); ?>">
4730 7321 <i class="ays_fa ays_fa_info_circle"></i>
4731 7322 </a>
4732 7323 </label>
4733 7324 </div>
4734 7325 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
4735 - <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]">
7326 + <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]">
4736 7327 <?php
4737 7328 foreach ( $org_chart_font_size_options as $option_slug => $option ):
4738 7329 $selected = ( $org_chart_font_size == $option_slug ) ? 'selected' : '';
4739 7330 ?>
4740 - <option value="<?php echo $option_slug; ?>" <?php echo $selected; ?>><?php echo $option; ?></option>
7331 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_attr($option); ?></option>
4741 7332 <?php
4742 7333 endforeach;
4743 7334 ?>
4744 7335 </select>
@@ -4747,9 +7338,9 @@
4747 7338 <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">
4748 7339 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4749 7340 <label for="ays-chart-option-background-color">
4750 7341 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4751 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart container.","chart-builder") ); ?>">
7342 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart container.","chart-builder") ); ?>">
4752 7343 <i class="ays_fa ays_fa_info_circle"></i>
4753 7344 </a>
4754 7345 </label>
4755 7346 </div>
@@ -4760,9 +7351,9 @@
4760 7351 <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">
4761 7352 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4762 7353 <label for="ays-chart-option-transparent-background" class="form-label">
4763 7354 <?php echo esc_html(__( "Transparent background", "chart-builder" )); ?>
4764 - <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") ); ?>">
7355 + <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") ); ?>">
4765 7356 <i class="ays_fa ays_fa_info_circle"></i>
4766 7357 </a>
4767 7358 </label>
4768 7359 </div>
@@ -4776,9 +7367,9 @@
4776 7367 <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">
4777 7368 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4778 7369 <label for="ays-chart-option-border-width">
4779 7370 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4780 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container border.","chart-builder") ); ?>">
7371 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border.","chart-builder") ); ?>">
4781 7372 <i class="ays_fa ays_fa_info_circle"></i>
4782 7373 </a>
4783 7374 </label>
4784 7375 </div>
@@ -4789,9 +7380,9 @@
4789 7380 <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">
4790 7381 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4791 7382 <label for="ays-chart-option-border-color">
4792 7383 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4793 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart container.","chart-builder") ); ?>">
7384 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart container.","chart-builder") ); ?>">
4794 7385 <i class="ays_fa ays_fa_info_circle"></i>
4795 7386 </a>
4796 7387 </label>
4797 7388 </div>
@@ -4802,9 +7393,9 @@
4802 7393 <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">
4803 7394 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4804 7395 <label for="ays-chart-option-border-radius">
4805 7396 <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
4806 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border radius of the chart container.","chart-builder") ); ?>">
7397 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border radius of the chart container.","chart-builder") ); ?>">
4807 7398 <i class="ays_fa ays_fa_info_circle"></i>
4808 7399 </a>
4809 7400 </label>
4810 7401 </div>
@@ -4813,11 +7404,33 @@
4813 7404 </div>
4814 7405 </div> <!-- Border radius -->
4815 7406 <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">
4816 7407 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7408 + <label for="ays-chart-option-border-style">
7409 + <?php echo esc_html(__( "Border Style", "chart-builder" )); ?>
7410 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border.","chart-builder") ); ?>">
7411 + <i class="ays_fa ays_fa_info_circle"></i>
7412 + </a>
7413 + </label>
7414 + </div>
7415 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7416 + <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]">
7417 + <?php
7418 + foreach ( $border_styles as $option_slug => $option ):
7419 + $selected = ( $border_style == $option_slug ) ? 'selected' : '';
7420 + ?>
7421 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7422 + <?php
7423 + endforeach;
7424 + ?>
7425 + </select>
7426 + </div>
7427 + </div> <!-- Border style -->
7428 + <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">
7429 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4817 7430 <label for="ays-chart-option-box-shadow" class="form-label">
4818 7431 <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
4819 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add shadow to chart's container.","chart-builder") ); ?>">
7432 + <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") ); ?>">
4820 7433 <i class="ays_fa ays_fa_info_circle"></i>
4821 7434 </a>
4822 7435 </label>
4823 7436 </div>
@@ -4831,9 +7444,9 @@
4831 7444 <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">
4832 7445 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4833 7446 <label for="ays-chart-option-box-shadow-color" class="form-label">
4834 7447 <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
4835 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
7448 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
4836 7449 <i class="ays_fa ays_fa_info_circle"></i>
4837 7450 </a>
4838 7451 </label>
4839 7452 </div>
@@ -4840,8 +7453,82 @@
4840 7453 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4841 7454 <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) ?>">
4842 7455 </div>
4843 7456 </div> <!-- box shadow color -->
7457 + <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">
7458 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7459 + <label for="ays-chart-option-border-width-with-title">
7460 + <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?>
7461 + <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") ); ?>">
7462 + <i class="ays_fa ays_fa_info_circle"></i>
7463 + </a>
7464 + </label>
7465 + </div>
7466 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7467 + <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) ?>">
7468 + </div>
7469 + </div> <!-- Border Width with title -->
7470 + <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">
7471 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7472 + <label for="ays-chart-option-border-radius-with-title">
7473 + <?php echo esc_html(__( "Border radius (including title)", "chart-builder" )); ?>
7474 + <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") ); ?>">
7475 + <i class="ays_fa ays_fa_info_circle"></i>
7476 + </a>
7477 + </label>
7478 + </div>
7479 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7480 + <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) ?>">
7481 + </div>
7482 + </div> <!-- Border radius with title -->
7483 + <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">
7484 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7485 + <label for="ays-chart-option-border-color-with-title">
7486 + <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?>
7487 + <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") ); ?>">
7488 + <i class="ays_fa ays_fa_info_circle"></i>
7489 + </a>
7490 + </label>
7491 + </div>
7492 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7493 + <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) ?>">
7494 + </div>
7495 + </div> <!-- Border color with title -->
7496 + <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">
7497 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7498 + <label for="ays-chart-option-border-style-with-title">
7499 + <?php echo esc_html(__( "Border Style (including title)", "chart-builder" )); ?>
7500 + <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") ); ?>">
7501 + <i class="ays_fa ays_fa_info_circle"></i>
7502 + </a>
7503 + </label>
7504 + </div>
7505 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7506 + <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]">
7507 + <?php
7508 + foreach ( $border_styles as $option_slug => $option ):
7509 + $selected = ( $border_style_with_title == $option_slug ) ? 'selected' : '';
7510 + ?>
7511 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7512 + <?php
7513 + endforeach;
7514 + ?>
7515 + </select>
7516 + </div>
7517 + </div> <!-- Border style with title -->
7518 + <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">
7519 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7520 + <label for="ays-chart-option-padding-outer">
7521 + <?php echo esc_html(__( "Padding", "chart-builder" )); ?>
7522 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The padding of the chart container.","chart-builder") ); ?>">
7523 + <i class="ays_fa ays_fa_info_circle"></i>
7524 + </a>
7525 + </label>
7526 + </div>
7527 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7528 + <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) ?>">
7529 + </div>
7530 + </div> <!-- Padding outer -->
4844 7531 </div>
4845 7532 </div>
4846 7533 <?php
4847 7534 $content = ob_get_clean();
@@ -4855,8 +7542,273 @@
4855 7542
4856 7543 return $sources;
4857 7544 }
4858 7545
7546 + public function settings_contents_chart_styles_settings_chartjs( $sources, $args ){
7547 + $html_class_prefix = $args['html_class_prefix'];
7548 + $html_name_prefix = $args['html_name_prefix'];
7549 + $settings = $args['settings'];
7550 + $border_width_with_title = $settings['border_width_with_title'];
7551 + $border_radius_with_title = $settings['border_radius_with_title'];
7552 + $border_color_with_title = $settings['border_color_with_title'];
7553 + $border_style_with_title = $settings['border_style_with_title'];
7554 + $width = $settings['width'];
7555 + $width_format = $settings['width_format'];
7556 + $height = $settings['height'];
7557 + $height_format = $settings['height_format'];
7558 + $width_format_options = $settings['width_format_options'];
7559 + $border_width = $settings['border_width'];
7560 + $border_radius = $settings['border_radius'];
7561 + $border_color = $settings['border_color'];
7562 + $background_color_chart = $settings['background_color_chart'];
7563 + $border_style = $settings['border_style'];
7564 + $border_styles = $settings['border_styles'];
7565 + $box_shadow = $settings['box_shadow'];
7566 + $box_shadow_color = $settings['box_shadow_color'];
7567 + $padding_outer = $settings['padding_outer'];
7568 + ob_start();
7569 + ?>
7570 + <div class="ays-accordion-data-main-wrap">
7571 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
7572 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7573 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7574 + <label for="ays-chart-option-width" class="form-label">
7575 + <?php echo esc_html(__( "Width", "chart-builder" )); ?>
7576 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container, in percents.","chart-builder") ); ?>">
7577 + <i class="ays_fa ays_fa_info_circle"></i>
7578 + </a>
7579 + </label>
7580 + </div>
7581 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7582 + <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) ?>">
7583 + <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]">
7584 + <?php
7585 + foreach ( $width_format_options as $option_slug => $option ):
7586 + $selected = ( $width_format == $option_slug ) ? 'selected' : '';
7587 + ?>
7588 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7589 + <?php
7590 + endforeach;
7591 + ?>
7592 + </select>
7593 + </div>
7594 + </div> <!-- Width -->
7595 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7596 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7597 + <label for="ays-chart-option-height" class="form-label">
7598 + <?php echo esc_html(__( "Height", "chart-builder" )); ?>
7599 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
7600 + <i class="ays_fa ays_fa_info_circle"></i>
7601 + </a>
7602 + </label>
7603 + </div>
7604 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7605 + <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) ?>">
7606 + <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]">
7607 + <?php
7608 + foreach ( $width_format_options as $option_slug => $option ):
7609 + $selected = ( $height_format == $option_slug ) ? 'selected' : '';
7610 + ?>
7611 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7612 + <?php
7613 + endforeach;
7614 + ?>
7615 + </select>
7616 + </div>
7617 + </div> <!-- Height -->
7618 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7619 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7620 + <label for="ays-chart-option-border-width">
7621 + <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
7622 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border.","chart-builder") ); ?>">
7623 + <i class="ays_fa ays_fa_info_circle"></i>
7624 + </a>
7625 + </label>
7626 + </div>
7627 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7628 + <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) ?>">
7629 + </div>
7630 + </div> <!-- Border Width -->
7631 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7632 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7633 + <label for="ays-chart-option-border-radius">
7634 + <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
7635 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The radius of the chart container border.","chart-builder") ); ?>">
7636 + <i class="ays_fa ays_fa_info_circle"></i>
7637 + </a>
7638 + </label>
7639 + </div>
7640 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7641 + <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) ?>">
7642 + </div>
7643 + </div> <!-- Border Radius -->
7644 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7645 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7646 + <label for="ays-chart-option-border-color">
7647 + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
7648 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart container.","chart-builder") ); ?>">
7649 + <i class="ays_fa ays_fa_info_circle"></i>
7650 + </a>
7651 + </label>
7652 + </div>
7653 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7654 + <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) ?>">
7655 + </div>
7656 + </div> <!-- Border color -->
7657 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7658 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7659 + <label for="ays-chart-option-border-style">
7660 + <?php echo esc_html(__( "Border Style", "chart-builder" )); ?>
7661 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border.","chart-builder") ); ?>">
7662 + <i class="ays_fa ays_fa_info_circle"></i>
7663 + </a>
7664 + </label>
7665 + </div>
7666 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7667 + <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]">
7668 + <?php
7669 + foreach ( $border_styles as $option_slug => $option ):
7670 + $selected = ( $border_style == $option_slug ) ? 'selected' : '';
7671 + ?>
7672 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7673 + <?php
7674 + endforeach;
7675 + ?>
7676 + </select>
7677 + </div>
7678 + </div> <!-- Border style -->
7679 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7680 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7681 + <label for="ays-chart-option-backgorund-color">
7682 + <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
7683 + <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") ); ?>">
7684 + <i class="ays_fa ays_fa_info_circle"></i>
7685 + </a>
7686 + </label>
7687 + </div>
7688 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7689 + <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) ?>">
7690 + </div>
7691 + </div><!-- Background color -->
7692 +
7693 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7694 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7695 + <label for="ays-chart-option-box-shadow" class="form-label">
7696 + <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
7697 + <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") ); ?>">
7698 + <i class="ays_fa ays_fa_info_circle"></i>
7699 + </a>
7700 + </label>
7701 + </div>
7702 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7703 + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
7704 + <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); ?> >
7705 + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
7706 + </label>
7707 + </div>
7708 + </div> <!-- box shadow -->
7709 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7710 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7711 + <label for="ays-chart-option-box-shadow-color" class="form-label">
7712 + <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
7713 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
7714 + <i class="ays_fa ays_fa_info_circle"></i>
7715 + </a>
7716 + </label>
7717 + </div>
7718 + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7719 + <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) ?>">
7720 + </div>
7721 + </div> <!-- box shadow color -->
7722 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7723 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7724 + <label for="ays-chart-option-border-width-with-title">
7725 + <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?>
7726 + <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") ); ?>">
7727 + <i class="ays_fa ays_fa_info_circle"></i>
7728 + </a>
7729 + </label>
7730 + </div>
7731 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7732 + <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) ?>">
7733 + </div>
7734 + </div> <!-- Border Width with title -->
7735 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7736 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7737 + <label for="ays-chart-option-border-radius-with-title">
7738 + <?php echo esc_html(__( "Border Radius (including title)", "chart-builder" )); ?>
7739 + <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") ); ?>">
7740 + <i class="ays_fa ays_fa_info_circle"></i>
7741 + </a>
7742 + </label>
7743 + </div>
7744 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7745 + <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) ?>">
7746 + </div>
7747 + </div> <!-- Border radius with title -->
7748 + <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">
7749 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7750 + <label for="ays-chart-option-border-color-with-title">
7751 + <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?>
7752 + <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") ); ?>">
7753 + <i class="ays_fa ays_fa_info_circle"></i>
7754 + </a>
7755 + </label>
7756 + </div>
7757 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7758 + <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) ?>">
7759 + </div>
7760 + </div> <!-- Border colro with title -->
7761 + <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">
7762 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7763 + <label for="ays-chart-option-border-style-with-title">
7764 + <?php echo esc_html(__( "Border Style (including title)", "chart-builder" )); ?>
7765 + <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") ); ?>">
7766 + <i class="ays_fa ays_fa_info_circle"></i>
7767 + </a>
7768 + </label>
7769 + </div>
7770 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7771 + <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]">
7772 + <?php
7773 + foreach ( $border_styles as $option_slug => $option ):
7774 + $selected = ( $border_style_with_title == $option_slug ) ? 'selected' : '';
7775 + ?>
7776 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
7777 + <?php
7778 + endforeach;
7779 + ?>
7780 + </select>
7781 + </div>
7782 + </div> <!-- Border style with title -->
7783 + <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">
7784 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7785 + <label for="ays-chart-option-padding-outer">
7786 + <?php echo esc_html(__( "Padding", "chart-builder" )); ?>
7787 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The padding of the chart container.","chart-builder") ); ?>">
7788 + <i class="ays_fa ays_fa_info_circle"></i>
7789 + </a>
7790 + </label>
7791 + </div>
7792 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
7793 + <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) ?>">
7794 + </div>
7795 + </div> <!-- Padding outer -->
7796 + </div>
7797 + </div>
7798 + <?php
7799 + $content = ob_get_clean();
7800 +
7801 + $title = __( 'Chart', "chart-builder" );
7802 +
7803 + $sources['chart'] = array(
7804 + 'content' => $content,
7805 + 'title' => $title
7806 + );
7807 +
7808 + return $sources;
7809 + }
7810 +
4859 7811 public function settings_contents_chart_area_styles_settings( $sources, $args ){
4860 7812 $html_class_prefix = $args['html_class_prefix'];
4861 7813 $html_name_prefix = $args['html_name_prefix'];
4862 7814 $settings = $args['settings'];
@@ -4875,9 +7827,9 @@
4875 7827 <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">
4876 7828 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4877 7829 <label for="ays-chart-option-chart-background-color">
4878 7830 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4879 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart area.","chart-builder") ); ?>">
7831 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart area.","chart-builder") ); ?>">
4880 7832 <i class="ays_fa ays_fa_info_circle"></i>
4881 7833 </a>
4882 7834 </label>
4883 7835 </div>
@@ -4888,9 +7840,9 @@
4888 7840 <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">
4889 7841 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4890 7842 <label for="ays-chart-option-chart-border-width">
4891 7843 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4892 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border width of the chart area.","chart-builder") ); ?>">
7844 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border width of the chart area.","chart-builder") ); ?>">
4893 7845 <i class="ays_fa ays_fa_info_circle"></i>
4894 7846 </a>
4895 7847 </label>
4896 7848 </div>
@@ -4901,9 +7853,9 @@
4901 7853 <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">
4902 7854 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4903 7855 <label for="ays-chart-option-chart-border-color">
4904 7856 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4905 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart area.","chart-builder") ); ?>">
7857 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart area.","chart-builder") ); ?>">
4906 7858 <i class="ays_fa ays_fa_info_circle"></i>
4907 7859 </a>
4908 7860 </label>
4909 7861 </div>
@@ -4914,9 +7866,9 @@
4914 7866 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4915 7867 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4916 7868 <label for="ays-chart-option-chart-left-margin">
4917 7869 <?php echo esc_html(__( "Left Margin", "chart-builder" )); ?>
4918 - <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") ); ?>">
7870 + <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") ); ?>">
4919 7871 <i class="ays_fa ays_fa_info_circle"></i>
4920 7872 </a>
4921 7873 </label>
4922 7874 </div>
@@ -4927,9 +7879,9 @@
4927 7879 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4928 7880 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4929 7881 <label for="ays-chart-option-chart-right-margin">
4930 7882 <?php echo esc_html(__( "Right Margin", "chart-builder" )); ?>
4931 - <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") ); ?>">
7883 + <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") ); ?>">
4932 7884 <i class="ays_fa ays_fa_info_circle"></i>
4933 7885 </a>
4934 7886 </label>
4935 7887 </div>
@@ -4940,9 +7892,9 @@
4940 7892 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4941 7893 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4942 7894 <label for="ays-chart-option-chart-top-margin">
4943 7895 <?php echo esc_html(__( "Top Margin", "chart-builder" )); ?>
4944 - <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") ); ?>">
7896 + <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") ); ?>">
4945 7897 <i class="ays_fa ays_fa_info_circle"></i>
4946 7898 </a>
4947 7899 </label>
4948 7900 </div>
@@ -4953,9 +7905,9 @@
4953 7905 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4954 7906 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4955 7907 <label for="ays-chart-option-chart-bottom-margin">
4956 7908 <?php echo esc_html(__( "Bottom Margin", "chart-builder" )); ?>
4957 - <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") ); ?>">
7909 + <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") ); ?>">
4958 7910 <i class="ays_fa ays_fa_info_circle"></i>
4959 7911 </a>
4960 7912 </label>
4961 7913 </div>
@@ -5005,9 +7957,9 @@
5005 7957 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5006 7958 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5007 7959 <label for="ays-chart-option-title-color">
5008 7960 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5009 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>">
7961 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>">
5010 7962 <i class="ays_fa ays_fa_info_circle"></i>
5011 7963 </a>
5012 7964 </label>
5013 7965 </div>
@@ -5018,9 +7970,9 @@
5018 7970 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5019 7971 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5020 7972 <label for="ays-chart-option-title-font-size" class="form-label">
5021 7973 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5022 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>">
7974 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>">
5023 7975 <i class="ays_fa ays_fa_info_circle"></i>
5024 7976 </a>
5025 7977 </label>
5026 7978 </div>
@@ -5032,9 +7984,9 @@
5032 7984 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5033 7985 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5034 7986 <label for="ays-chart-option-title-bold" class="form-label">
5035 7987 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5036 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
7988 + <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") ); ?>">
5037 7989 <i class="ays_fa ays_fa_info_circle"></i>
5038 7990 </a>
5039 7991 </label>
5040 7992 </div>
@@ -5048,9 +8000,9 @@
5048 8000 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5049 8001 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5050 8002 <label for="ays-chart-option-title-italic" class="form-label">
5051 8003 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5052 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
8004 + <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") ); ?>">
5053 8005 <i class="ays_fa ays_fa_info_circle"></i>
5054 8006 </a>
5055 8007 </label>
5056 8008 </div>
@@ -5064,9 +8016,9 @@
5064 8016 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5065 8017 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5066 8018 <label for="ays-chart-option-title-position">
5067 8019 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5068 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>">
8020 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>">
5069 8021 <i class="ays_fa ays_fa_info_circle"></i>
5070 8022 </a>
5071 8023 </label>
5072 8024 </div>
@@ -5086,9 +8038,9 @@
5086 8038 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5087 8039 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5088 8040 <label for="ays-chart-option-title-gap" class="form-label">
5089 8041 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5090 - <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") ); ?>">
8042 + <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") ); ?>">
5091 8043 <i class="ays_fa ays_fa_info_circle"></i>
5092 8044 </a>
5093 8045 </label>
5094 8046 </div>
@@ -5100,9 +8052,9 @@
5100 8052 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5101 8053 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5102 8054 <label for="ays-chart-option-title-gap-description" class="form-label">
5103 8055 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5104 - <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") ); ?>">
8056 + <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") ); ?>">
5105 8057 <i class="ays_fa ays_fa_info_circle"></i>
5106 8058 </a>
5107 8059 </label>
5108 8060 </div>
@@ -5114,9 +8066,9 @@
5114 8066 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5115 8067 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5116 8068 <label for="ays-chart-option-title-text-transform">
5117 8069 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5118 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
8070 + <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") ); ?>">
5119 8071 <i class="ays_fa ays_fa_info_circle"></i>
5120 8072 </a>
5121 8073 </label>
5122 8074 </div>
@@ -5136,9 +8088,9 @@
5136 8088 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5137 8089 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5138 8090 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5139 8091 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5140 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
8092 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
5141 8093 <i class="ays_fa ays_fa_info_circle"></i>
5142 8094 </a>
5143 8095 </label>
5144 8096 </div>
@@ -5150,9 +8102,9 @@
5150 8102 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5151 8103 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5152 8104 <label for="ays-chart-option-title-text-decoration">
5153 8105 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5154 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
8106 + <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") ); ?>">
5155 8107 <i class="ays_fa ays_fa_info_circle"></i>
5156 8108 </a>
5157 8109 </label>
5158 8110 </div>
@@ -5172,9 +8124,9 @@
5172 8124 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5173 8125 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5174 8126 <label for="ays-chart-option-title-text-shadow" class="form-label">
5175 8127 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5176 - <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") ); ?>">
8128 + <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") ); ?>">
5177 8129 <i class="ays_fa ays_fa_info_circle"></i>
5178 8130 </a>
5179 8131 </label>
5180 8132 </div>
@@ -5188,9 +8140,9 @@
5188 8140 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5189 8141 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5190 8142 <label for="ays-chart-option-title-shadow-color">
5191 8143 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5192 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>">
8144 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>">
5193 8145 <i class="ays_fa ays_fa_info_circle"></i>
5194 8146 </a>
5195 8147 </label>
5196 8148 </div>
@@ -5240,9 +8192,9 @@
5240 8192 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5241 8193 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5242 8194 <label for="ays-chart-option-title-color">
5243 8195 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5244 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>">
8196 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>">
5245 8197 <i class="ays_fa ays_fa_info_circle"></i>
5246 8198 </a>
5247 8199 </label>
5248 8200 </div>
@@ -5253,9 +8205,9 @@
5253 8205 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5254 8206 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5255 8207 <label for="ays-chart-option-title-font-size" class="form-label">
5256 8208 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5257 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>">
8209 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>">
5258 8210 <i class="ays_fa ays_fa_info_circle"></i>
5259 8211 </a>
5260 8212 </label>
5261 8213 </div>
@@ -5267,9 +8219,9 @@
5267 8219 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5268 8220 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5269 8221 <label for="ays-chart-option-title-bold" class="form-label">
5270 8222 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5271 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
8223 + <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") ); ?>">
5272 8224 <i class="ays_fa ays_fa_info_circle"></i>
5273 8225 </a>
5274 8226 </label>
5275 8227 </div>
@@ -5283,9 +8235,9 @@
5283 8235 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5284 8236 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5285 8237 <label for="ays-chart-option-title-italic" class="form-label">
5286 8238 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5287 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
8239 + <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") ); ?>">
5288 8240 <i class="ays_fa ays_fa_info_circle"></i>
5289 8241 </a>
5290 8242 </label>
5291 8243 </div>
@@ -5299,9 +8251,9 @@
5299 8251 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5300 8252 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5301 8253 <label for="ays-chart-option-title-position">
5302 8254 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5303 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>">
8255 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>">
5304 8256 <i class="ays_fa ays_fa_info_circle"></i>
5305 8257 </a>
5306 8258 </label>
5307 8259 </div>
@@ -5321,9 +8273,9 @@
5321 8273 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5322 8274 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5323 8275 <label for="ays-chart-option-title-gap" class="form-label">
5324 8276 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5325 - <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") ); ?>">
8277 + <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") ); ?>">
5326 8278 <i class="ays_fa ays_fa_info_circle"></i>
5327 8279 </a>
5328 8280 </label>
5329 8281 </div>
@@ -5335,9 +8287,9 @@
5335 8287 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5336 8288 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5337 8289 <label for="ays-chart-option-title-gap-description" class="form-label">
5338 8290 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5339 - <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") ); ?>">
8291 + <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") ); ?>">
5340 8292 <i class="ays_fa ays_fa_info_circle"></i>
5341 8293 </a>
5342 8294 </label>
5343 8295 </div>
@@ -5349,9 +8301,9 @@
5349 8301 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5350 8302 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5351 8303 <label for="ays-chart-option-title-text-transform">
5352 8304 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5353 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
8305 + <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") ); ?>">
5354 8306 <i class="ays_fa ays_fa_info_circle"></i>
5355 8307 </a>
5356 8308 </label>
5357 8309 </div>
@@ -5371,9 +8323,9 @@
5371 8323 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5372 8324 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5373 8325 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5374 8326 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5375 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
8327 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
5376 8328 <i class="ays_fa ays_fa_info_circle"></i>
5377 8329 </a>
5378 8330 </label>
5379 8331 </div>
@@ -5385,9 +8337,9 @@
5385 8337 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5386 8338 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5387 8339 <label for="ays-chart-option-title-text-decoration">
5388 8340 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5389 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
8341 + <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") ); ?>">
5390 8342 <i class="ays_fa ays_fa_info_circle"></i>
5391 8343 </a>
5392 8344 </label>
5393 8345 </div>
@@ -5407,9 +8359,9 @@
5407 8359 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5408 8360 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5409 8361 <label for="ays-chart-option-title-text-shadow" class="form-label">
5410 8362 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5411 - <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") ); ?>">
8363 + <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") ); ?>">
5412 8364 <i class="ays_fa ays_fa_info_circle"></i>
5413 8365 </a>
5414 8366 </label>
5415 8367 </div>
@@ -5423,9 +8375,9 @@
5423 8375 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5424 8376 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5425 8377 <label for="ays-chart-option-title-shadow-color">
5426 8378 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5427 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>">
8379 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>">
5428 8380 <i class="ays_fa ays_fa_info_circle"></i>
5429 8381 </a>
5430 8382 </label>
5431 8383 </div>
@@ -5474,9 +8426,9 @@
5474 8426 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5475 8427 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5476 8428 <label for="ays-chart-option-description-color">
5477 8429 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5478 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>">
8430 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>">
5479 8431 <i class="ays_fa ays_fa_info_circle"></i>
5480 8432 </a>
5481 8433 </label>
5482 8434 </div>
@@ -5487,9 +8439,9 @@
5487 8439 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5488 8440 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5489 8441 <label for="ays-chart-option-description-font-size" class="form-label">
5490 8442 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5491 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>">
8443 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>">
5492 8444 <i class="ays_fa ays_fa_info_circle"></i>
5493 8445 </a>
5494 8446 </label>
5495 8447 </div>
@@ -5501,9 +8453,9 @@
5501 8453 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5502 8454 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5503 8455 <label for="ays-chart-option-description-bold" class="form-label">
5504 8456 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5505 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
8457 + <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") ); ?>">
5506 8458 <i class="ays_fa ays_fa_info_circle"></i>
5507 8459 </a>
5508 8460 </label>
5509 8461 </div>
@@ -5517,9 +8469,9 @@
5517 8469 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5518 8470 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5519 8471 <label for="ays-chart-option-description-italic" class="form-label">
5520 8472 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5521 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
8473 + <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") ); ?>">
5522 8474 <i class="ays_fa ays_fa_info_circle"></i>
5523 8475 </a>
5524 8476 </label>
5525 8477 </div>
@@ -5533,9 +8485,9 @@
5533 8485 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5534 8486 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5535 8487 <label for="ays-chart-option-description-position">
5536 8488 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5537 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>">
8489 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>">
5538 8490 <i class="ays_fa ays_fa_info_circle"></i>
5539 8491 </a>
5540 8492 </label>
5541 8493 </div>
@@ -5555,9 +8507,9 @@
5555 8507 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5556 8508 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5557 8509 <label for="ays-chart-option-description-text-transform">
5558 8510 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5559 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
8511 + <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") ); ?>">
5560 8512 <i class="ays_fa ays_fa_info_circle"></i>
5561 8513 </a>
5562 8514 </label>
5563 8515 </div>
@@ -5577,9 +8529,9 @@
5577 8529 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5578 8530 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5579 8531 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5580 8532 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5581 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
8533 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
5582 8534 <i class="ays_fa ays_fa_info_circle"></i>
5583 8535 </a>
5584 8536 </label>
5585 8537 </div>
@@ -5591,9 +8543,9 @@
5591 8543 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5592 8544 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5593 8545 <label for="ays-chart-option-description-text-decoration">
5594 8546 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5595 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
8547 + <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") ); ?>">
5596 8548 <i class="ays_fa ays_fa_info_circle"></i>
5597 8549 </a>
5598 8550 </label>
5599 8551 </div>
@@ -5613,9 +8565,9 @@
5613 8565 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5614 8566 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5615 8567 <label for="ays-chart-option-description-text-shadow" class="form-label">
5616 8568 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5617 - <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") ); ?>">
8569 + <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") ); ?>">
5618 8570 <i class="ays_fa ays_fa_info_circle"></i>
5619 8571 </a>
5620 8572 </label>
5621 8573 </div>
@@ -5629,9 +8581,9 @@
5629 8581 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5630 8582 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5631 8583 <label for="ays-chart-option-description-shadow-color">
5632 8584 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5633 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>">
8585 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>">
5634 8586 <i class="ays_fa ays_fa_info_circle"></i>
5635 8587 </a>
5636 8588 </label>
5637 8589 </div>
@@ -5680,9 +8632,9 @@
5680 8632 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5681 8633 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5682 8634 <label for="ays-chart-option-description-color">
5683 8635 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5684 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>">
8636 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>">
5685 8637 <i class="ays_fa ays_fa_info_circle"></i>
5686 8638 </a>
5687 8639 </label>
5688 8640 </div>
@@ -5693,9 +8645,9 @@
5693 8645 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5694 8646 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5695 8647 <label for="ays-chart-option-description-font-size" class="form-label">
5696 8648 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5697 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>">
8649 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>">
5698 8650 <i class="ays_fa ays_fa_info_circle"></i>
5699 8651 </a>
5700 8652 </label>
5701 8653 </div>
@@ -5707,9 +8659,9 @@
5707 8659 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5708 8660 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5709 8661 <label for="ays-chart-option-description-bold" class="form-label">
5710 8662 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5711 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
8663 + <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") ); ?>">
5712 8664 <i class="ays_fa ays_fa_info_circle"></i>
5713 8665 </a>
5714 8666 </label>
5715 8667 </div>
@@ -5723,9 +8675,9 @@
5723 8675 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5724 8676 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5725 8677 <label for="ays-chart-option-description-italic" class="form-label">
5726 8678 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5727 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
8679 + <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") ); ?>">
5728 8680 <i class="ays_fa ays_fa_info_circle"></i>
5729 8681 </a>
5730 8682 </label>
5731 8683 </div>
@@ -5739,9 +8691,9 @@
5739 8691 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5740 8692 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5741 8693 <label for="ays-chart-option-description-position">
5742 8694 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5743 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>">
8695 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>">
5744 8696 <i class="ays_fa ays_fa_info_circle"></i>
5745 8697 </a>
5746 8698 </label>
5747 8699 </div>
@@ -5761,9 +8713,9 @@
5761 8713 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5762 8714 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5763 8715 <label for="ays-chart-option-description-text-transform">
5764 8716 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5765 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
8717 + <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") ); ?>">
5766 8718 <i class="ays_fa ays_fa_info_circle"></i>
5767 8719 </a>
5768 8720 </label>
5769 8721 </div>
@@ -5783,9 +8735,9 @@
5783 8735 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5784 8736 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5785 8737 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5786 8738 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5787 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
8739 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
5788 8740 <i class="ays_fa ays_fa_info_circle"></i>
5789 8741 </a>
5790 8742 </label>
5791 8743 </div>
@@ -5797,9 +8749,9 @@
5797 8749 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5798 8750 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5799 8751 <label for="ays-chart-option-description-text-decoration">
5800 8752 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5801 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
8753 + <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") ); ?>">
5802 8754 <i class="ays_fa ays_fa_info_circle"></i>
5803 8755 </a>
5804 8756 </label>
5805 8757 </div>
@@ -5819,9 +8771,9 @@
5819 8771 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5820 8772 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5821 8773 <label for="ays-chart-option-description-text-shadow" class="form-label">
5822 8774 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5823 - <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") ); ?>">
8775 + <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") ); ?>">
5824 8776 <i class="ays_fa ays_fa_info_circle"></i>
5825 8777 </a>
5826 8778 </label>
5827 8779 </div>
@@ -5835,9 +8787,9 @@
5835 8787 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5836 8788 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5837 8789 <label for="ays-chart-option-description-shadow-color">
5838 8790 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5839 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>">
8791 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>">
5840 8792 <i class="ays_fa ays_fa_info_circle"></i>
5841 8793 </a>
5842 8794 </label>
5843 8795 </div>
@@ -5898,9 +8850,9 @@
5898 8850
5899 8851 $sources[] = $content;
5900 8852 }
5901 8853 $content_for_escape = implode('' , $sources );
5902 - echo html_entity_decode(esc_html( $content_for_escape ));
8854 + echo html_entity_decode( esc_html($content_for_escape) );
5903 8855 }
5904 8856
5905 8857 public function settings_contents_advanced_settings( $sources, $args ){
5906 8858 $html_class_prefix = $args['html_class_prefix'];
@@ -6005,9 +8957,9 @@
6005 8957 <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">
6006 8958 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6007 8959 <label for="ays-chart-option-slice-text">
6008 8960 <?php echo esc_html(__( "Slice text", "chart-builder" )); ?>
6009 - <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") ); ?>">
8961 + <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") ); ?>">
6010 8962 <i class="ays_fa ays_fa_info_circle"></i>
6011 8963 </a>
6012 8964 </label>
6013 8965 </div>
@@ -6027,9 +8979,9 @@
6027 8979 <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">
6028 8980 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6029 8981 <label for="ays-chart-option-tooltip-text">
6030 8982 <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?>
6031 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose how to display the text in the chart tooltip.","chart-builder") ); ?>">
8983 + <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") ); ?>">
6032 8984 <i class="ays_fa ays_fa_info_circle"></i>
6033 8985 </a>
6034 8986 </label>
6035 8987 </div>
@@ -6062,9 +9014,9 @@
6062 9014 <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">
6063 9015 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6064 9016 <label for="ays-chart-option-data-grouping-label" class="form-label">
6065 9017 <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?>
6066 - <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") ); ?>">
9018 + <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") ); ?>">
6067 9019 <i class="ays_fa ays_fa_info_circle"></i>
6068 9020 </a>
6069 9021 </label>
6070 9022 </div>
@@ -6105,17 +9057,18 @@
6105 9057 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6106 9058 <label for="ays-chart-option-focus-target">
6107 9059 <?php echo esc_html(__( "Focus target", "chart-builder" )); ?>
6108 9060 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6109 - echo htmlspecialchars( sprintf(
9061 + echo esc_html( sprintf(
9062 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6110 9063 "<p>" . __('There are two ways to focus the data table elements.', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6111 - __('%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>" .
6112 - __('%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>",
6113 - '<em>',
6114 - '</em>',
6115 - '<em>',
6116 - '</em>'
6117 - ) );
9064 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
9065 + __('%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>" .
9066 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
9067 + __('%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>",
9068 + '<em>', '</em>',
9069 + '<em>', '</em>'
9070 + ));
6118 9071 ?>">
6119 9072 <i class="ays_fa ays_fa_info_circle"></i>
6120 9073 </a>
6121 9074 </label>
@@ -6150,17 +9103,18 @@
6150 9103 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6151 9104 <label for="ays-chart-option-group-width">
6152 9105 <?php echo esc_html(__( "Bar width", "chart-builder" )); ?>
6153 9106 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6154 - echo htmlspecialchars( sprintf(
9107 + echo esc_html( sprintf(
9108 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6155 9109 "<p>" . __('The width of the bars, specified in either of these formats:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6156 - __('%sPixels:%s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
6157 - __('%sPercentage:%s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
6158 - '<em>',
6159 - '</em>',
6160 - '<em>',
6161 - '</em>'
6162 - ) );
9110 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
9111 + __('%1$sPixels:%2$s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
9112 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
9113 + __('%1$sPercentage:%2$s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
9114 + '<em>', '</em>',
9115 + '<em>', '</em>'
9116 + ));
6163 9117 ?>">
6164 9118 <i class="ays_fa ays_fa_info_circle"></i>
6165 9119 </a>
6166 9120 </label>
@@ -6212,23 +9166,24 @@
6212 9166 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6213 9167 <label for="ays-chart-option-multiple-data-format">
6214 9168 <?php echo esc_html(__( "Multiple data format", "chart-builder" )); ?>
6215 9169 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6216 - echo htmlspecialchars( sprintf(
9170 + echo esc_html( sprintf(
9171 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6217 9172 "<p>" . __('How multiple data selections are rolled up into tooltips:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6218 - __('%sCategory:%s Group selected data by row titles.', "chart-builder") . "</li><li>" .
6219 - __('%sSeries:%s Group selected data by column titles.', "chart-builder") . "</li><li>" .
6220 - __('%sAuto:%s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
6221 - __('%sNone:%s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
6222 - '<em>',
6223 - '</em>',
6224 - '<em>',
6225 - '</em>',
6226 - '<em>',
6227 - '</em>',
6228 - '<em>',
6229 - '</em>'
6230 - ) );
9173 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
9174 + __('%1$sCategory:%2$s Group selected data by row titles.', "chart-builder") . "</li><li>" .
9175 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
9176 + __('%1$sSeries:%2$s Group selected data by column titles.', "chart-builder") . "</li><li>" .
9177 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
9178 + __('%1$sAuto:%2$s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
9179 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
9180 + __('%1$sNone:%2$s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
9181 + '<em>', '</em>',
9182 + '<em>', '</em>',
9183 + '<em>', '</em>',
9184 + '<em>', '</em>'
9185 + ));
6231 9186 ?>">
6232 9187 <i class="ays_fa ays_fa_info_circle"></i>
6233 9188 </a>
6234 9189 </label>
@@ -6383,15 +9338,15 @@
6383 9338 <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) ?>">
6384 9339 </div>
6385 9340 </div> <!-- Line dash pattern -->
6386 9341 <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">
6387 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
9342 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6388 9343 <label for="ays-chart-option-donut-hole-size">
6389 - <?php echo __( "Hole size", $this->plugin_name ); ?>
9344 + <?php echo esc_html(__( "Hole size", 'chart-builder' )); ?>
6390 9345 </label>
6391 9346 </div>
6392 - <div class="col-sm-7 <?= $html_class_prefix ?>input-align-right <?= $html_class_prefix ?>option-input">
6393 - <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 ?>">
9347 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right <?php echo esc_attr($html_class_prefix) ?>option-input">
9348 + <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) ?>">
6394 9349 </div>
6395 9350 </div> <!-- Donut hole size -->
6396 9351 <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">
6397 9352 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
@@ -6398,20 +9353,20 @@
6398 9353 <div class="ays-pro-features-v2-video-button"></div>
6399 9354 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
6400 9355 <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>
6401 9356 <div class="ays-pro-features-v2-upgrade-text">
6402 - <?php echo __("Upgrade" , "chart-builder"); ?>
9357 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
6403 9358 </div>
6404 9359 </a>
6405 9360 </div>
6406 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
9361 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix )?>option-title">
6407 9362 <label for="ays-chart-option-curve-type">
6408 - <?php echo __( "Line curve type", "chart-builder" ); ?>
9363 + <?php echo esc_html(__( "Line curve type", "chart-builder" )); ?>
6409 9364 </label>
6410 9365 </div>
6411 9366 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
6412 - <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]">
6413 - <option><?php echo __( "Straight", "chart-builder" ); ?></option>
9367 + <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]">
9368 + <option><?php echo esc_html(__( "Straight", "chart-builder" )); ?></option>
6414 9369 </select>
6415 9370 </div>
6416 9371 </div> <!-- Line curve type -->
6417 9372 <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">
@@ -6459,9 +9414,9 @@
6459 9414 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none">
6460 9415 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6461 9416 <label for="ays-chart-option-org-classname" class="form-label">
6462 9417 <?php echo esc_html(__( "Custom CSS class", "chart-builder" )); ?>
6463 - <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") ); ?>">
9418 + <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") ); ?>">
6464 9419 <i class="ays_fa ays_fa_info_circle"></i>
6465 9420 </a>
6466 9421 </label>
6467 9422 </div>
@@ -6472,9 +9427,11 @@
6472 9427 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6473 9428 <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">
6474 9429 <br>
6475 9430 <blockquote>
6476 - <?php echo sprintf(__( "%sNote:%s Custom CSS class must be set for the options below to take effect.", $this->plugin_name ), '<strong>', '</strong>'); ?>
9431 + <?php echo sprintf(
9432 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
9433 + esc_html(__( '%1$sNote:%2$s Custom CSS class must be set for the options below to take effect.', 'chart-builder' )), '<strong>', '</strong>'); ?>
6477 9434 </blockquote>
6478 9435 <br>
6479 9436 </div>
6480 9437 <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">
@@ -6572,9 +9529,9 @@
6572 9529 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-org_chart-opt display_none">
6573 9530 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6574 9531 <label for="ays-chart-option-org-selected-classname" class="form-label">
6575 9532 <?php echo esc_html(__( "Selected node custom CSS class", "chart-builder" )); ?>
6576 - <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") ); ?>">
9533 + <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") ); ?>">
6577 9534 <i class="ays_fa ays_fa_info_circle"></i>
6578 9535 </a>
6579 9536 </label>
6580 9537 </div>
@@ -6585,9 +9542,14 @@
6585 9542 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6586 9543 <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">
6587 9544 <br>
6588 9545 <blockquote>
6589 - <?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>'); ?>
9546 + <?php echo sprintf(
9547 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
9548 + 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' )),
9549 + '<strong>',
9550 + '</strong>'
9551 + ); ?>
6590 9552 </blockquote>
6591 9553 <br>
6592 9554 </div>
6593 9555 <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">
@@ -6639,8 +9601,16 @@
6639 9601 $outer_radius = $settings['outer_radius'];
6640 9602 $slice_spacing = $settings['slice_spacing'];
6641 9603 $circumference = $settings['circumference'];
6642 9604 $start_angle = $settings['start_angle'];
9605 + $rotation_degree = $settings['rotation_degree'];
9606 + $slice_border_color = $settings['slice_border_color'];
9607 + $slice_border_width = $settings['slice_border_width'];
9608 + $tooltip_text_options = $settings['tooltip_text_options'];
9609 + $tooltip_text = $settings['tooltip_text'];
9610 + $data_grouping_limit = $settings['data_grouping_limit'];
9611 + $data_grouping_label = $settings['data_grouping_label'];
9612 + $data_grouping_color = $settings['data_grouping_color'];
6643 9613 // $index_axis = $settings['index_axis'];
6644 9614
6645 9615 ob_start();
6646 9616 ?>
@@ -6701,8 +9671,108 @@
6701 9671 <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) ?>">
6702 9672 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">°</div>
6703 9673 </div>
6704 9674 </div> <!-- Start Angle -->
9675 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt display_none">
9676 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9677 + <label for="ays-chart-option-rotation-degree" class="form-label">
9678 + <?php echo esc_html(__( "Degree of chart rotation", "chart-builder" )); ?>
9679 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The angle, in degrees, to rotate the chart by. The default of 0 will orient the leftmost edge of the first slice directly up.","chart-builder") ); ?>">
9680 + <i class="ays_fa ays_fa_info_circle"></i>
9681 + </a>
9682 + </label>
9683 + </div>
9684 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right">
9685 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-rotation-degree" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[rotation_degree]" value="<?php echo esc_attr($rotation_degree) ?>">
9686 + </div>
9687 + </div> <!-- Rotation degree -->
9688 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt ">
9689 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9690 + <label for="ays-chart-option-slice-border-width">
9691 + <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
9692 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the slice borders.","chart-builder") ); ?>">
9693 + <i class="ays_fa ays_fa_info_circle"></i>
9694 + </a>
9695 + </label>
9696 + </div>
9697 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
9698 + <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) ?>">
9699 + </div>
9700 + </div> <!-- Border Width -->
9701 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt ">
9702 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9703 + <label for="ays-chart-option-slice-border-color">
9704 + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
9705 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the slice borders.","chart-builder") ); ?>">
9706 + <i class="ays_fa ays_fa_info_circle"></i>
9707 + </a>
9708 + </label>
9709 + </div>
9710 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
9711 + <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) ?>">
9712 + </div>
9713 + </div> <!-- Slice border color -->
9714 + <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">
9715 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9716 + <label for="ays-chart-option-tooltip-text">
9717 + <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?>
9718 + <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") ); ?>">
9719 + <i class="ays_fa ays_fa_info_circle"></i>
9720 + </a>
9721 + </label>
9722 + </div>
9723 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
9724 + <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-tooltip-text" name="<?php echo esc_attr($html_name_prefix); ?>settings[tooltip_text]">
9725 + <?php
9726 + foreach ( $tooltip_text_options as $option_slug => $option ):
9727 + $selected = ( $tooltip_text == $option_slug ) ? 'selected' : '';
9728 + ?>
9729 + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option>
9730 + <?php
9731 + endforeach;
9732 + ?>
9733 + </select>
9734 + </div>
9735 + </div> <!-- Slice tooltip Text -->
9736 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt display_none">
9737 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9738 + <label for="ays-chart-option-data-grouping-limit" class="form-label">
9739 + <?php echo esc_html(__( "Chart Data Grouping Limit", "chart-builder" )); ?>
9740 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __( "The percentage value of the pie, below which a slice will not show individually. All slices that have not passed this value will be combined to a single 'Other' slice, whose size is the sum of all their sizes. Default is not to show individually any slice which is smaller than half a degree.", "chart-builder" ) ); ?>">
9741 + <i class="ays_fa ays_fa_info_circle"></i>
9742 + </a>
9743 + </label>
9744 + </div>
9745 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right">
9746 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-data-grouping-limit" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[data_grouping_limit]" value="<?php echo esc_attr($data_grouping_limit) ?>" step=".1" min="0" max="360">
9747 + </div>
9748 + </div> <!-- Data Grouping Limit -->
9749 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt display_none">
9750 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9751 + <label for="ays-chart-option-data-grouping-label" class="form-label">
9752 + <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?>
9753 + <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" ) ); ?>">
9754 + <i class="ays_fa ays_fa_info_circle"></i>
9755 + </a>
9756 + </label>
9757 + </div>
9758 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
9759 + <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-data-grouping-label" type="text" name="<?php echo esc_attr($html_name_prefix); ?>settings[data_grouping_label]" value="<?php echo esc_attr($data_grouping_label) ?>">
9760 + </div>
9761 + </div> <!-- Data Grouping Label -->
9762 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt display_none">
9763 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
9764 + <label for="ays-chart-option-data-grouping-color">
9765 + <?php echo esc_html(__( "Chart Data Grouping Color", "chart-builder" )); ?>
9766 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __( "Color for the combination slice that holds all slices below chart data grouping limit.", "chart-builder" ) ); ?>">
9767 + <i class="ays_fa ays_fa_info_circle"></i>
9768 + </a>
9769 + </label>
9770 + </div>
9771 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
9772 + <input id="ays-chart-option-data-grouping-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[data_grouping_color]" value="<?php echo esc_attr($data_grouping_color) ?>">
9773 + </div>
9774 + </div> <!-- Data Grouping Color -->
6705 9775 <!-- <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">
6706 9776 <div class="col-sm-5 d-flex align-items-center <?php // echo esc_attr($html_class_prefix) ?>option-title">
6707 9777 <label for="ays-chart-option-index-axis">
6708 9778 <?php // echo esc_html(__( "Horizontal ", "chart-builder" )); ?>
@@ -6745,15 +9815,15 @@
6745 9815 if ( !isset( $source[0] ) ) {
6746 9816 if (count($source[1]) > 2) {
6747 9817 $titles = array();
6748 9818 for ($i = 0; $i < count($source[1]); $i++) {
6749 - array_push($titles, __("Title", $this->plugin_name).$i);
9819 + array_push($titles, __("Title", 'chart-builder').$i);
6750 9820 }
6751 9821 $source[0] = $titles;
6752 9822 } else {
6753 9823 $source[0] = array(
6754 - __("Country", $this->plugin_name),
6755 - __("Population", $this->plugin_name),
9824 + __("Country", 'chart-builder'),
9825 + __("Population", 'chart-builder'),
6756 9826 );
6757 9827 }
6758 9828
6759 9829 ksort($source);
@@ -6786,9 +9856,9 @@
6786 9856 <g>
6787 9857 <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" />
6788 9858 </g>
6789 9859 </svg>
6790 - <span><?php echo $val[0]; ?></span>
9860 + <span><?php echo esc_html($val[0]); ?></span>
6791 9861 </legend>
6792 9862 <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
6793 9863 <div class="ays-slices-accordion-data-main-wrap">
6794 9864 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6795,9 +9865,9 @@
6795 9865 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6796 9866 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6797 9867 <label for="ays-chart-option-slice-color">
6798 9868 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
6799 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for this slice.","chart-builder") ); ?>">
9869 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice.","chart-builder") ); ?>">
6800 9870 <i class="ays_fa ays_fa_info_circle"></i>
6801 9871 </a>
6802 9872 </label>
6803 9873 </div>
@@ -6802,13 +9872,13 @@
6802 9872 </label>
6803 9873 </div>
6804 9874 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6805 9875 <input type="color"
6806 - id="ays-chart-option-slice-color-<?php echo $key; ?>"
9876 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
6807 9877 class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6808 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo $key; ?>]"
6809 - value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : $slice_colors_default[$key]; ?>"
6810 - data-slice-id="<?php echo $key; ?>">
9878 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo esc_attr($key); ?>]"
9879 + value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : esc_attr($slice_colors_default[$key]); ?>"
9880 + data-slice-id="<?php echo esc_attr($key); ?>">
6811 9881 </div>
6812 9882 </div> <!-- Slice color -->
6813 9883 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6814 9884 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6820,13 +9890,13 @@
6820 9890 </label>
6821 9891 </div>
6822 9892 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6823 9893 <input type="number"
6824 - id="ays-chart-option-slice-offset-<?php echo $key; ?>"
9894 + id="ays-chart-option-slice-offset-<?php echo esc_attr($key); ?>"
6825 9895 class="ays-chart-option-slice-offset ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
6826 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo $key; ?>]"
9896 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo esc_attr($key); ?>]"
6827 9897 value="<?php echo isset($slice_offset[$key]) ? esc_attr($slice_offset[$key]) : 0 ; ?>"
6828 - data-slice-id="<?php echo $key; ?>"
9898 + data-slice-id="<?php echo esc_attr($key); ?>"
6829 9899 step=".01" min="0.0" max="1.0">
6830 9900 </div>
6831 9901 </div> <!-- Slice offset -->
6832 9902 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
@@ -6832,9 +9902,9 @@
6832 9902 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6833 9903 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6834 9904 <label for="ays-chart-option-slice-text-color">
6835 9905 <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
6836 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for the text of this slice.","chart-builder") ); ?>">
9906 + <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") ); ?>">
6837 9907 <i class="ays_fa ays_fa_info_circle"></i>
6838 9908 </a>
6839 9909 </label>
6840 9910 </div>
@@ -6839,13 +9909,13 @@
6839 9909 </label>
6840 9910 </div>
6841 9911 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6842 9912 <input type="color"
6843 - id="ays-chart-option-slice-text-color-<?php echo $key; ?>"
9913 + id="ays-chart-option-slice-text-color-<?php echo esc_attr($key); ?>"
6844 9914 class="ays-chart-option-slice-text-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6845 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo $key; ?>]"
9915 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo esc_attr($key); ?>]"
6846 9916 value="<?php echo isset($slice_text_color[$key]) ? esc_attr($slice_text_color[$key]) : '#ffffff'; ?>"
6847 - data-slice-id="<?php echo $key; ?>">
9917 + data-slice-id="<?php echo esc_attr($key); ?>">
6848 9918 </div>
6849 9919 </div> <!-- Slice color -->
6850 9920 </div>
6851 9921 </div>
@@ -6857,9 +9927,9 @@
6857 9927 </div>
6858 9928 </div>
6859 9929 <br>
6860 9930 <blockquote>
6861 - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?>
9931 + <?php echo esc_html(__( "Save the chart to update the data.", "chart-builder" )); ?>
6862 9932 </blockquote>
6863 9933 </div>
6864 9934 <?php
6865 9935
@@ -6870,9 +9940,9 @@
6870 9940 }
6871 9941
6872 9942 $content = ob_get_clean();
6873 9943
6874 - $title = __( 'Slices settings', "chart-builder" );
9944 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
6875 9945
6876 9946 $sources['slices_settings'] = array(
6877 9947 'content' => $content,
6878 9948 'title' => $title
@@ -6879,9 +9949,139 @@
6879 9949 );
6880 9950
6881 9951 return $sources;
6882 9952 }
9953 +
9954 + public function settings_contents_slices_settings_chartjs( $sources, $args ){
9955 + $html_class_prefix = $args['html_class_prefix'];
9956 + $html_name_prefix = $args['html_name_prefix'];
9957 + $settings = $args['settings'];
9958 + $source = $args['source'];
9959 + $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
9960 + $source_chart_type = $args['source_chart_type'];
9961 + $settings = $args['settings'];
9962 + $title_row = array_shift($source);
6883 9963
9964 + if (isset($source) && !empty($source)) {
9965 + if ( !isset( $source[0] ) ) {
9966 + if (count($source[1]) > 2) {
9967 + $titles = array();
9968 + for ($i = 0; $i < count($source[1]); $i++) {
9969 + array_push($titles, __("Title", 'chart-builder').$i);
9970 + }
9971 + $source[0] = $titles;
9972 + } else {
9973 + $source[0] = array(
9974 + __("Country", 'chart-builder'),
9975 + __("Population", 'chart-builder'),
9976 + );
9977 + }
9978 +
9979 + ksort($source);
9980 + }
9981 + }
9982 +
9983 + if ($source_chart_type == 'pie_chart') {
9984 + foreach ($source as $key => $row) {
9985 + $source[$key] = array_slice($row, 0, 2);
9986 + }
9987 + }
9988 +
9989 + ob_start();
9990 + if ($source_chart_type == 'pie_chart') {
9991 + $slice_color = $settings['slice_color'];
9992 + $slices_border_color = $settings['slices_border_color'];
9993 + $slice_colors_default = $settings['slice_colors_default'];
9994 +
9995 + ?>
9996 + <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">
9997 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
9998 + <div class="<?php echo esc_attr($html_class_prefix) ?>slices-settings">
9999 + <?php
10000 + foreach ( $source as $key => $val ):
10001 + ?>
10002 + <fieldset class="ays-slices-accordion-options-container <?php echo esc_attr($html_class_prefix) ?>options-slices-<?php echo esc_attr($key); ?>" data-collapsed="true">
10003 + <legend class="ays-slices-accordion-options-header">
10004 + <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">
10005 + <g>
10006 + <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" />
10007 + </g>
10008 + </svg>
10009 + <span><?php echo esc_html($val[0]); ?></span>
10010 + </legend>
10011 + <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
10012 + <div class="ays-slices-accordion-data-main-wrap">
10013 + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
10014 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
10015 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
10016 + <label for="ays-chart-option-slice-color">
10017 + <?php echo esc_html(__( "Color", "chart-builder" )); ?>
10018 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice.","chart-builder") ); ?>">
10019 + <i class="ays_fa ays_fa_info_circle"></i>
10020 + </a>
10021 + </label>
10022 + </div>
10023 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
10024 + <input type="color"
10025 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
10026 + class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
10027 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo esc_attr($key); ?>]"
10028 + value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : esc_attr($slice_colors_default[$key]); ?>"
10029 + data-slice-id="<?php echo esc_attr($key); ?>">
10030 + </div>
10031 + </div> <!-- Slice color -->
10032 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
10033 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
10034 + <label for="ays-chart-option-slice-border-color">
10035 + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
10036 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice border.","chart-builder") ); ?>">
10037 + <i class="ays_fa ays_fa_info_circle"></i>
10038 + </a>
10039 + </label>
10040 + </div>
10041 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
10042 + <input type="color"
10043 + id="ays-chart-option-slice-border-color-<?php echo esc_attr($key); ?>"
10044 + class="ays-chart-option-slice-border-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
10045 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slices_border_color][<?php echo esc_attr($key); ?>]"
10046 + value="<?php echo isset($slices_border_color[$key]) ? esc_attr($slices_border_color[$key]) : esc_attr($settings['slice_border_color']); ?>"
10047 + data-slice-id="<?php echo esc_attr($key); ?>">
10048 + </div>
10049 + </div> <!-- Slice border color -->
10050 + </div>
10051 + </div>
10052 + </div>
10053 + </fieldset>
10054 + <?php
10055 + endforeach;
10056 + ?>
10057 + </div>
10058 + </div>
10059 + <br>
10060 + <blockquote>
10061 + <?php echo esc_html(__( "Save the chart to update the data.", "chart-builder" )); ?>
10062 + </blockquote>
10063 + </div>
10064 + <?php
10065 +
10066 + } else {
10067 + ?>
10068 + <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>
10069 + <?php
10070 + }
10071 +
10072 + $content = ob_get_clean();
10073 +
10074 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
10075 +
10076 + $sources['slices_settings'] = array(
10077 + 'content' => $content,
10078 + 'title' => $title
10079 + );
10080 +
10081 + return $sources;
10082 + }
10083 +
6884 10084 public function settings_contents_series_settings( $sources, $args ){
6885 10085 $html_class_prefix = $args['html_class_prefix'];
6886 10086 $html_name_prefix = $args['html_name_prefix'];
6887 10087 $settings = $args['settings'];
@@ -6898,15 +10098,15 @@
6898 10098 if ( !isset( $source[0] ) ) {
6899 10099 if (count($source[1]) > 2) {
6900 10100 $titles = array();
6901 10101 for ($i = 0; $i < count($source[1]); $i++) {
6902 - array_push($titles, __("Title", $this->plugin_name).$i);
10102 + array_push($titles, __("Title", "chart-builder").$i);
6903 10103 }
6904 10104 $source[0] = $titles;
6905 10105 } else {
6906 10106 $source[0] = array(
6907 - __("Country", $this->plugin_name),
6908 - __("Population", $this->plugin_name),
10107 + __("Country", "chart-builder"),
10108 + __("Population", "chart-builder"),
6909 10109 );
6910 10110 }
6911 10111
6912 10112 ksort($source);
@@ -6924,8 +10124,9 @@
6924 10124 $series_row = array_shift($source);
6925 10125 $title = array_shift($series_row);
6926 10126 $series_color = $settings['series_color'];
6927 10127 $series_colors_default = $settings['series_colors_default'];
10128 + $series_format = $settings['series_format'];
6928 10129 $series_visible_in_legend = $settings['series_visible_in_legend'];
6929 10130 $series_line_width = $settings['series_line_width'];
6930 10131 $series_point_size = $settings['series_point_size'];
6931 10132 $series_point_shape = $settings['series_point_shape'];
@@ -6943,9 +10144,9 @@
6943 10144 <g>
6944 10145 <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" />
6945 10146 </g>
6946 10147 </svg>
6947 - <span><?php echo $val; ?></span>
10148 + <span><?php echo esc_attr($val); ?></span>
6948 10149 </legend>
6949 10150 <div class="ays-series-accordion-options-content ays-series-accordion-options-content">
6950 10151 <div class="ays-series-accordion-data-main-wrap">
6951 10152 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6956,13 +10157,13 @@
6956 10157 </label>
6957 10158 </div>
6958 10159 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6959 10160 <input type="color"
6960 - id="ays-chart-option-series-color-<?php echo $key; ?>"
10161 + id="ays-chart-option-series-color-<?php echo esc_attr($key); ?>"
6961 10162 class="ays-chart-option-series-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6962 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo $key; ?>]"
6963 - value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : $series_colors_default[$key]; ?>"
6964 - data-series-id="<?php echo $key; ?>">
10163 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo esc_attr($key); ?>]"
10164 + value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : esc_attr($series_colors_default[$key]); ?>"
10165 + data-series-id="<?php echo esc_attr($key); ?>">
6965 10166 </div>
6966 10167 </div> <!-- series color -->
6967 10168 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6968 10169 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6975,18 +10176,36 @@
6975 10176 </div>
6976 10177 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6977 10178 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
6978 10179 <input type="checkbox"
6979 - id="ays-chart-option-series-visible-in-legend-<?php echo $key; ?>"
10180 + id="ays-chart-option-series-visible-in-legend-<?php echo esc_attr($key); ?>"
6980 10181 class="ays-chart-option-series-visible-in-legend <?php echo esc_attr($html_class_prefix) ?>toggle-switch"
6981 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo $key; ?>]"
10182 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo esc_attr($key); ?>]"
6982 10183 value="on"
6983 - data-series-id="<?php echo $key; ?>"
10184 + data-series-id="<?php echo esc_attr($key); ?>"
6984 10185 <?php echo isset($series_visible_in_legend[$key]) && $series_visible_in_legend[$key] == 'on' ? 'checked' : (!isset($series_color[$key]) ? 'checked' : ''); ?> >
6985 10186 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
6986 10187 </label>
6987 10188 </div>
6988 10189 </div> <!-- Series visible in legend -->
10190 + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
10191 + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
10192 + <label for="ays-chart-option-series-color">
10193 + <?php echo esc_html(__( "Format", "chart-builder" )); ?>
10194 + <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") ); ?>">
10195 + <i class="ays_fa ays_fa_info_circle"></i>
10196 + </a>
10197 + </label>
10198 + </div>
10199 + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
10200 + <input type="text"
10201 + id="ays-chart-option-series-format-<?php echo $key; ?>"
10202 + class="ays-chart-option-series-format ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
10203 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_format][<?php echo $key; ?>]"
10204 + value="<?php echo isset($series_format[$key]) && '' !== $series_format[$key] ? esc_attr($series_format[$key]) : ''; ?>"
10205 + data-series-id="<?php echo $key; ?>">
10206 + </div>
10207 + </div> <!-- Format -->
6989 10208 <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">
6990 10209 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6991 10210 <label for="ays-chart-option-series-line-width">
6992 10211 <?php echo esc_html(__( "Line width", "chart-builder" )); ?>
@@ -6996,13 +10215,13 @@
6996 10215 </label>
6997 10216 </div>
6998 10217 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6999 10218 <input type="number"
7000 - id="ays-chart-option-series-line-width-<?php echo $key; ?>"
10219 + id="ays-chart-option-series-line-width-<?php echo esc_attr($key); ?>"
7001 10220 class="ays-chart-option-series-line-width ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7002 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo $key; ?>]"
7003 - value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : $line_width; ?>"
7004 - data-series-id="<?php echo $key; ?>">
10221 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo esc_attr($key); ?>]"
10222 + value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : esc_attr($line_width); ?>"
10223 + data-series-id="<?php echo esc_attr($key); ?>">
7005 10224 </div>
7006 10225 </div> <!-- Line width -->
7007 10226 <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">
7008 10227 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7014,13 +10233,13 @@
7014 10233 </label>
7015 10234 </div>
7016 10235 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7017 10236 <input type="number"
7018 - id="ays-chart-option-series-point-size-<?php echo $key; ?>"
10237 + id="ays-chart-option-series-point-size-<?php echo esc_attr($key); ?>"
7019 10238 class="ays-chart-option-series-point-size ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7020 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo $key; ?>]"
7021 - value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : $point_size; ?>"
7022 - data-series-id="<?php echo $key; ?>">
10239 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo esc_attr($key); ?>]"
10240 + value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : esc_attr($point_size); ?>"
10241 + data-series-id="<?php echo esc_attr($key); ?>">
7023 10242 </div>
7024 10243 </div> <!-- Point size -->
7025 10244 <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">
7026 10245 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7032,12 +10251,12 @@
7032 10251 </label>
7033 10252 </div>
7034 10253 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7035 10254 <select
7036 - id="ays-chart-option-series-point-shape-<?php echo $key; ?>"
10255 + id="ays-chart-option-series-point-shape-<?php echo esc_attr($key); ?>"
7037 10256 class="ays-chart-option-series-point-shape <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select"
7038 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo $key; ?>]"
7039 - data-series-id="<?php echo $key; ?>">
10257 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo esc_attr($key); ?>]"
10258 + data-series-id="<?php echo esc_attr($key); ?>">
7040 10259 >
7041 10260 <?php
7042 10261 $value = isset($series_point_shape[$key]) ? esc_attr($series_point_shape[$key]) : $point_shape;
7043 10262 foreach ( $point_shape_options as $option_slug => $option ):
@@ -7060,11 +10279,16 @@
7060 10279 </div>
7061 10280 </div>
7062 10281 <br>
7063 10282 <blockquote>
7064 - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?>
10283 + <?php echo esc_html(__( "Save the chart to update the data.", 'chart-builder' )); ?>
7065 10284 <br>
7066 - <?php echo sprintf(__( "%sNote:%s If you are not able to set the options, disable the row settings feature.", $this->plugin_name ), '<strong>', '</strong>'); ?>
10285 + <?php echo sprintf(
10286 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
10287 + esc_html(__( '%1$sNote:%2$s If you are not able to set the options, disable the row settings feature.', 'chart-builder' )),
10288 + '<strong>',
10289 + '</strong>'
10290 + ); ?>
7067 10291 </blockquote>
7068 10292 </div>
7069 10293 <?php
7070 10294
@@ -7098,15 +10322,15 @@
7098 10322 if ( !isset( $source[0] ) ) {
7099 10323 if (count($source[1]) > 2) {
7100 10324 $titles = array();
7101 10325 for ($i = 0; $i < count($source[1]); $i++) {
7102 - array_push($titles, __("Title", $this->plugin_name).$i);
10326 + array_push($titles, __("Title", 'chart-builder').$i);
7103 10327 }
7104 10328 $source[0] = $titles;
7105 10329 } else {
7106 10330 $source[0] = array(
7107 - __("Country", $this->plugin_name),
7108 - __("Population", $this->plugin_name),
10331 + __("Country", 'chart-builder'),
10332 + __("Population", 'chart-builder'),
7109 10333 );
7110 10334 }
7111 10335
7112 10336 ksort($source);
@@ -7152,9 +10376,9 @@
7152 10376 <g>
7153 10377 <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" />
7154 10378 </g>
7155 10379 </svg>
7156 - <span><?php echo $val; ?></span>
10380 + <span><?php echo esc_html($val); ?></span>
7157 10381 </legend>
7158 10382 <div class="ays-rows-accordion-options-content ays-rows-accordion-options-content">
7159 10383 <div class="ays-rows-accordion-data-main-wrap">
7160 10384 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7165,13 +10389,13 @@
7165 10389 </label>
7166 10390 </div>
7167 10391 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7168 10392 <input type="color"
7169 - id="ays-chart-option-rows-color-<?php echo $key; ?>"
10393 + id="ays-chart-option-rows-color-<?php echo esc_attr($key); ?>"
7170 10394 class="ays-chart-option-rows-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7171 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo $key; ?>]"
7172 - value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : $series_color; ?>"
7173 - data-rows-id="<?php echo $key; ?>">
10395 + name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo esc_attr($key); ?>]"
10396 + value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : esc_attr($series_color); ?>"
10397 + data-rows-id="<?php echo esc_attr($key); ?>">
7174 10398 </div>
7175 10399 </div> <!-- color -->
7176 10400 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7177 10401 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7180,13 +10404,13 @@
7180 10404 </label>
7181 10405 </div>
7182 10406 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7183 10407 <input type="number"
7184 - id="ays-chart-option-rows-opacity-<?php echo $key; ?>"
10408 + id="ays-chart-option-rows-opacity-<?php echo esc_attr($key); ?>"
7185 10409 class="ays-chart-option-rows-opacity ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7186 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo $key; ?>]"
10410 + name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo esc_attr($key); ?>]"
7187 10411 value="<?php echo isset($rows_opacity[$key]) && '' !== $rows_opacity[$key] ? esc_attr($rows_opacity[$key]) : 1.0; ?>"
7188 - data-rows-id="<?php echo $key; ?>"
10412 + data-rows-id="<?php echo esc_attr($key); ?>"
7189 10413 step=".1" min="0" max="1">
7190 10414 </div>
7191 10415 </div> <!-- opacity -->
7192 10416 </div>
@@ -7197,17 +10421,27 @@
7197 10421 endforeach;
7198 10422 ?>
7199 10423 <br>
7200 10424 <blockquote>
7201 - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?>
10425 + <?php echo esc_html(__( "Save the chart to update the data.", 'chart-builder' )); ?>
7202 10426 <br>
7203 - <?php echo sprintf(__( "%sNote:%s The applied styles will work only if the chart has one column.", $this->plugin_name ), '<strong>', '</strong>'); ?>
10427 + <?php echo sprintf(
10428 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
10429 + esc_html(__( '%1$sNote:%2$s The applied styles will work only if the chart has one column.', 'chart-builder' )),
10430 + '<strong>',
10431 + '</strong>'
10432 + ); ?>
7204 10433 </blockquote>
7205 10434 </div>
7206 10435 <div class="<?php echo esc_attr($html_class_prefix) ?>not-hidden-options-section <?php echo $enable_row_settings === 'checked' ? 'display_none' : ''; ?>">
7207 10436 <br>
7208 10437 <blockquote>
7209 - <?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>'); ?>
10438 + <?php echo sprintf(
10439 + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */
10440 + esc_html(__( '%1$sNote:%2$s If this option is disabled, the general options will be set from the series settings.', 'chart-builder' )),
10441 + '<strong>',
10442 + '</strong>'
10443 + ); ?>
7210 10444 </blockquote>
7211 10445 </div>
7212 10446 </div>
7213 10447 </div>
@@ -7222,5 +10456,60 @@
7222 10456 );
7223 10457
7224 10458 return $sources;
7225 10459 }
10460 +
10461 + public function ays_chart_disable_all_notice_from_plugin() {
10462 + if (!function_exists('get_current_screen')) {
10463 + return;
10464 + }
10465 +
10466 + $screen = get_current_screen();
10467 +
10468 + if (empty($screen) || strpos($screen->id, $this->plugin_name) === false) {
10469 + return;
10470 + }
10471 +
10472 + global $wp_filter;
10473 +
10474 + // Keep plugin-specific notices
10475 + $our_plugin_notices = array();
10476 +
10477 + $exclude_functions = [
10478 + 'chart_builder_general_admin_notice',
10479 + ];
10480 +
10481 + if (!empty($wp_filter['admin_notices'])) {
10482 + foreach ($wp_filter['admin_notices']->callbacks as $priority => $callbacks) {
10483 + foreach ($callbacks as $key => $callback) {
10484 + // For class-based methods
10485 + if (
10486 + is_array($callback['function']) &&
10487 + is_object($callback['function'][0]) &&
10488 + get_class($callback['function'][0]) === __CLASS__
10489 + ) {
10490 + $our_plugin_notices[$priority][$key] = $callback;
10491 + }
10492 + // For standalone functions
10493 + elseif (
10494 + is_string($callback['function']) &&
10495 + in_array($callback['function'], $exclude_functions)
10496 + ) {
10497 + $our_plugin_notices[$priority][$key] = $callback;
10498 + }
10499 + }
10500 + }
10501 + }
10502 +
10503 + // Remove all notices
10504 + remove_all_actions('admin_notices');
10505 + remove_all_actions('all_admin_notices');
10506 +
10507 + // Re-add only your plugin's notices
10508 + foreach ($our_plugin_notices as $priority => $callbacks) {
10509 + foreach ($callbacks as $callback) {
10510 + add_action('admin_notices', $callback['function'], $priority);
10511 + }
10512 + }
10513 + }
10514 +
7226 10515 }