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 +3837 -546 3.0.6 → 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,21 +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);
760 - $this->ays_chart_sale_message20($ays_chart_builder_flag);
885 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
886 + if ( isset( $_GET['page'] ) && strpos( sanitize_text_field( wp_unslash( $_GET['page'] ) ), CHART_BUILDER_NAME ) !== false ) {
887 + // if( !(Chart_Builder_Admin::get_max_id('charts') <= 2) ){
888 + // $this->ays_chart_sale_message20($ays_chart_builder_flag);
889 + // $this->ays_chart_discounted_licenses_banner_message();
890 + // $this->ays_chart_new_silver_bundle_message_2025($ays_chart_builder_flag);
891 + // $this->ays_chart_footer_sale_banner_2026($ays_chart_builder_flag);
761 892 // $this->ays_chart_helloween_message($ays_chart_builder_flag);
762 893 // $this->ays_chart_christmas_message($ays_chart_builder_flag);
763 894 // $this->ays_chart_silver_bundle_message($ays_chart_builder_flag);
764 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;
765 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);
766 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);
767 1314 }
768 1315 }
769 -
770 1316 public function ays_chart_dismiss_button(){
771 1317
772 1318 $data = array(
773 1319 'status' => false,
@@ -773,9 +1319,9 @@
773 1319 'status' => false,
774 1320 );
775 1321
776 1322 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'ays_chart_dismiss_button') {
777 - if( (isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( $_REQUEST['_ajax_nonce'], $this->plugin_name . '-sale-banner' )) && current_user_can( 'manage_options' )){
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' ) ) {
778 1324 update_option('ays_chart_sale_btn', 1);
779 1325 update_option('ays_chart_sale_date', current_time( 'mysql' ));
780 1326 $data['status'] = true;
781 1327 }
@@ -787,8 +1333,357 @@
787 1333 wp_die();
788 1334
789 1335 }
790 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 +
791 1686 // 30% Sale Emma
792 1687 public function ays_chart_sale_message_30_emma($ishmar){
793 1688 if($ishmar == 0 ){
794 1689 $content = array();
@@ -805,9 +1700,9 @@
805 1700 </div>';
806 1701 $content[] = '</div>';
807 1702
808 1703 $content[] = '<div style="font-size: 17px;">';
809 - $content[] = '<img style="width: 24px;height: 24px;" src="' . esc_attr(CHART_BUILDER_ADMIN_URL) . '/images/icons/guarantee-new.png">';
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
810 1705 $content[] = '<span style="padding-left: 4px; font-size: 14px; font-weight: 600;"> 30 Day Money Back Guarantee</span>';
811 1706
812 1707 $content[] = '</div>';
813 1708
@@ -867,9 +1762,10 @@
867 1762 $content[] = '</div>';
868 1763 $content[] = '</div>';
869 1764
870 1765 $content = implode( '', $content );
871 - echo html_entity_decode(esc_html( $content ));
1766 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1767 +
872 1768 }
873 1769 }
874 1770
875 1771 // Self 20% sale
@@ -884,18 +1780,26 @@
884 1780 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
885 1781
886 1782 $content[] = '<div class="ays-chart-dicount-sale-name-discount-box">';
887 1783 $content[] = '<span class="ays-chart-new-chart-pro-title">';
888 - $content[] = __( "<span><a href='https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-plugin-name' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>", CHART_BUILDER_NAME );
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 + );
889 1793 $content[] = '</span>';
890 1794 $content[] = '<div>';
891 - $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
892 1796 $content[] = '</div>';
893 1797 $content[] = '</div>';
894 1798
895 1799 $content[] = '<span class="ays-chart-new-chart-pro-desc">';
896 - $content[] = '<img class="ays-chart-new-chart-pro-guaranteeicon" src="' . CHART_BUILDER_ADMIN_URL . '/images/chart-builder-guaranteeicon.webp" style="width: 30px;">';
897 - $content[] = __( "30 Days Money Back Guarantee", CHART_BUILDER_NAME );
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' );
898 1802 $content[] = '</span>';
899 1803
900 1804 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-chart">';
901 1805 $content[] = '<form method="POST">';
@@ -914,15 +1818,15 @@
914 1818
915 1819 $content[] = '<div id="ays-chart-countdown-main-container">';
916 1820 $content[] = '<div class="ays-chart-countdown-container">';
917 1821 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
918 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1822 + $content[] = esc_html__( "Offer ends in:", 'chart-builder' );
919 1823
920 1824 $content[] = '<ul style="padding: 0">';
921 - $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
922 - $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
923 - $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
924 - $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . __( 'Seconds', CHART_BUILDER_NAME ) . '</li>';
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>';
925 1829 $content[] = '</ul>';
926 1830 $content[] = '</div>';
927 1831
928 1832 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
@@ -936,11 +1840,11 @@
936 1840
937 1841 $content[] = '</div>';
938 1842
939 1843 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
940 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-button" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . __( 'Buy Now', CHART_BUILDER_NAME ) . '</a>';
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>';
941 1845 $content[] = '<span class="ays-chart-dicount-one-time-text">';
942 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1846 + $content[] = esc_html__( "One-time payment", 'chart-builder' );
943 1847 $content[] = '</span>';
944 1848 $content[] = '</div>';
945 1849
946 1850 $content[] = '</div>';
@@ -947,9 +1851,9 @@
947 1851
948 1852 $content[] = '</div>';
949 1853
950 1854 $content = implode( '', $content );
951 - echo $content;
1855 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
952 1856 }
953 1857 }
954 1858
955 1859 // Helloween banner
@@ -971,15 +1875,15 @@
971 1875 <span style='' class='ays-chart-helloween-bundle'>
972 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;'>
973 1877 Chart Builder
974 1878 </a>
975 - </span>", CHART_BUILDER_NAME );
1879 + </span>", 'chart-builder' );
976 1880 $content[] = '</p>';
977 1881 $content[] = '<p>';
978 1882 $content[] = __( "Hurry up!
979 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;'>
980 1884 Check it out!
981 - </a>", CHART_BUILDER_NAME );
1885 + </a>", 'chart-builder' );
982 1886 $content[] = '</p>';
983 1887
984 1888 $content[] = '</div>';
985 1889
@@ -1009,9 +1913,9 @@
1009 1913 $content[] = '</div>';
1010 1914
1011 1915 $content[] = '</div>';
1012 1916 $content[] = '<div class="ays-chart-dicount-wrap-box ays-buy-now-button-box-helloween">';
1013 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner" class="button button-primary ays-buy-now-button-helloween" id="ays-button-top-buy-now-helloween" target="_blank" style="" >' . __( 'Buy Now !', CHART_BUILDER_NAME ) . '</a>';
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>';
1014 1918 $content[] = '</div>';
1015 1919 $content[] = '</div>';
1016 1920
1017 1921 $content[] = '</div>';
@@ -1032,74 +1936,12 @@
1032 1936 $content[] = '</div>';
1033 1937
1034 1938 $content = implode( '', $content );
1035 1939
1036 - echo $content;
1940 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1037 1941 }
1038 1942 }
1039 1943
1040 - // Black Friday banner
1041 - public static function ays_chart_black_friday_message($ishmar){
1042 - if($ishmar == 0 ){
1043 - $content = array();
1044 -
1045 - $content[] = '<div id="ays-chart-dicount-black-friday-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1046 - $content[] = '<div id="ays-chart-dicount-black-friday-month" class="ays_chart_dicount_month">';
1047 - $content[] = '<div class="ays-chart-dicount-black-friday-box">';
1048 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-box-80" style="width: 70%;">';
1049 - $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>';
1050 - $content[] = '<div class="ays-chart-dicount-black-friday-title-row">' . __( 'Chart Builder plugin', "chart-builder" ) . '</div>';
1051 - $content[] = '</div>';
1052 -
1053 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-text-box">';
1054 - $content[] = '<div class="ays-chart-dicount-black-friday-text-row">' . __( '20% off', "chart-builder" ) . '</div>';
1055 - $content[] = '</div>';
1056 -
1057 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
1058 - $content[] = '<div id="ays-chart-countdown-main-container">';
1059 - $content[] = '<div class="ays-chart-countdown-container">';
1060 - $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1061 - $content[] = '<ul>';
1062 - $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . __( 'Days', "chart-builder" ) . '</li>';
1063 - $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . __( 'Hours', "chart-builder" ) . '</li>';
1064 - $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . __( 'Minutes', "chart-builder" ) . '</li>';
1065 - $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . __( 'Seconds', "chart-builder" ) . '</li>';
1066 - $content[] = '</ul>';
1067 - $content[] = '</div>';
1068 - $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1069 - $content[] = '<span>🚀</span>';
1070 - $content[] = '<span>⌛</span>';
1071 - $content[] = '<span>🔥</span>';
1072 - $content[] = '<span>💣</span>';
1073 - $content[] = '</div>';
1074 - $content[] = '</div>';
1075 - $content[] = '</div>';
1076 - $content[] = '</div>';
1077 -
1078 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
1079 - $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>';
1080 - $content[] = '</div>';
1081 - $content[] = '</div>';
1082 - $content[] = '</div>';
1083 -
1084 - $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-black-friday">';
1085 - $content[] = '<form method="POST">';
1086 - $content[] = '<div id="ays-chart-dismiss-buttons-content-black-friday">';
1087 - if( current_user_can( 'manage_options' ) ){
1088 - $content[] = '<button class="btn btn-link ays-button-black-friday" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', "chart-builder" ) . '</button>';
1089 - $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1090 - }
1091 - $content[] = '</div>';
1092 - $content[] = '</form>';
1093 - $content[] = '</div>';
1094 - $content[] = '</div>';
1095 -
1096 - $content = implode( '', $content );
1097 -
1098 - echo $content;
1099 - }
1100 - }
1101 -
1102 1944 // Christmas banner
1103 1945 public static function ays_chart_christmas_message($ishmar){
1104 1946 if($ishmar == 0 ){
1105 1947 $content = array();
@@ -1107,10 +1949,10 @@
1107 1949 $content[] = '<div id="ays-chart-dicount-christmas-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1108 1950 $content[] = '<div id="ays-chart-dicount-christmas-month" class="ays_chart_dicount_month">';
1109 1951 $content[] = '<div class="ays-chart-dicount-christmas-box">';
1110 1952 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box ays-chart-dicount-christmas-wrap-box-80">';
1111 - $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Limited Time', CHART_BUILDER_NAME ) .' '. '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-sale" target="_blank">' . __( '40%', CHART_BUILDER_NAME ) . '</a>' . ' SALE</div>';
1112 - $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', CHART_BUILDER_NAME ) . '</div>';
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>';
1113 1955 $content[] = '</div>';
1114 1956
1115 1957 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1116 1958 $content[] = '<div id="ays-chart-countdown-main-container">';
@@ -1116,12 +1958,12 @@
1116 1958 $content[] = '<div id="ays-chart-countdown-main-container">';
1117 1959 $content[] = '<div class="ays-chart-countdown-container">';
1118 1960 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1119 1961 $content[] = '<ul>';
1120 - $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
1121 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
1122 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
1123 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', CHART_BUILDER_NAME ) . '</li>';
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>';
1124 1966 $content[] = '</ul>';
1125 1967 $content[] = '</div>';
1126 1968 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1127 1969 $content[] = '<span>🚀</span>';
@@ -1133,9 +1975,9 @@
1133 1975 $content[] = '</div>';
1134 1976 $content[] = '</div>';
1135 1977
1136 1978 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1137 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-buy-now" target="_blank">' . __( 'BUY NOW!', CHART_BUILDER_NAME ) . '</a>';
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>';
1138 1980 $content[] = '</div>';
1139 1981 $content[] = '</div>';
1140 1982 $content[] = '</div>';
1141 1983
@@ -1141,9 +1983,9 @@
1141 1983
1142 1984 $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-christmas">';
1143 1985 $content[] = '<form method="POST">';
1144 1986 $content[] = '<div id="ays-chart-dismiss-buttons-content-christmas">';
1145 - $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', CHART_BUILDER_NAME ) . '</button>';
1987 + $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', 'chart-builder' ) . '</button>';
1146 1988 $content[] = '</div>';
1147 1989 $content[] = '</form>';
1148 1990 $content[] = '</div>';
1149 1991 $content[] = '</div>';
@@ -1149,9 +1991,9 @@
1149 1991 $content[] = '</div>';
1150 1992
1151 1993 $content = implode( '', $content );
1152 1994
1153 - echo $content;
1995 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1154 1996 }
1155 1997 }
1156 1998
1157 1999 // Silver Bundle
@@ -1160,20 +2002,20 @@
1160 2002 $content = array();
1161 2003
1162 2004 $content[] = '<div id="ays-chart-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1163 2005 $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1164 - $content[] = '<a href="https://ays-pro.com/silver-bundle" target="_blank" class="ays-chart-sale-banner-link"><img src="' . CHART_BUILDER_ADMIN_URL . '/images/silver_bundle_logo_box.png"></a>';
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
1165 2007
1166 2008 $content[] = '<div class="ays-chart-dicount-wrap-box">';
1167 2009
1168 2010 $content[] = '<strong style="font-weight: bold;">';
1169 - $content[] = __( "Limited Time <span style='color:#E85011;'>50%</span> SALE on <br><span><a href='https://ays-pro.com/silver-bundle' target='_blank' style='color:#E85011; text-decoration: underline;'>Silver Bundle</a></span> (Quiz + Chart + Form)!", CHART_BUILDER_NAME );
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' );
1170 2012 $content[] = '</strong>';
1171 2013
1172 2014 $content[] = '<br>';
1173 2015
1174 2016 $content[] = '<strong>';
1175 - $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' );
1176 2018 $content[] = '</strong>';
1177 2019
1178 2020 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1179 2021
@@ -1212,23 +2054,134 @@
1212 2054 $content[] = '</div>';
1213 2055
1214 2056 $content[] = '</div>';
1215 2057
1216 - $content[] = '<a href="https://ays-pro.com/silver-bundle" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="height: 32px; display: flex; align-items: center; font-weight: 500; " >' . __( 'Buy Now !', CHART_BUILDER_NAME ) . '</a>';
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>';
1217 2059 $content[] = '</div>';
1218 2060 $content[] = '</div>';
1219 2061
1220 2062 $content = implode( '', $content );
1221 - echo $content;
2063 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1222 2064 }
1223 2065 }
1224 2066
1225 - // Black Friday 2024
1226 - 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){
1227 2180 if($ishmar == 0 ){
1228 2181 $content = array();
1229 2182
1230 - $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">';
1231 2184 $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1232 2185
1233 2186 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
1234 2187
@@ -1237,16 +2190,16 @@
1237 2190
1238 2191 $content[] = '<div id="ays-chart-countdown">';
1239 2192
1240 2193 $content[] = '<div>';
1241 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
2194 + $content[] = __( "Offer ends in:", 'chart-builder' );
1242 2195 $content[] = '</div>';
1243 2196
1244 - $content[] = '<ul>';
1245 - $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", CHART_BUILDER_NAME ) .'</li>';
1246 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", CHART_BUILDER_NAME ) .'</li>';
1247 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", CHART_BUILDER_NAME ) .'</li>';
1248 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", CHART_BUILDER_NAME ) .'</li>';
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>';
1249 2202 $content[] = '</ul>';
1250 2203 $content[] = '</div>';
1251 2204
1252 2205 $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
@@ -1263,17 +2216,24 @@
1263 2216
1264 2217 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1265 2218 $content[] = '<div>';
1266 2219
1267 - $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1268 - $content[] = __( "<span><a href='https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner' class='ays-chart-black-friday-bundle-title-link' target='_blank'>Black Friday Sale</a></span>", CHART_BUILDER_NAME );
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 + );
1269 2229 $content[] = '</span>';
1270 2230
1271 2231 $content[] = '</br>';
1272 2232
1273 - $content[] = '<span class="ays-chart-black-friday-bundle-desc">';
1274 - $content[] = '<a class="ays-chart-black-friday-bundle-desc" href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner" class="ays-chart-black-friday-bundle-title-link" target="_blank">';
1275 - $content[] = __( "50% OFF", CHART_BUILDER_NAME );
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' );
1276 2236 $content[] = '</a>';
1277 2237 $content[] = '</span>';
1278 2238 $content[] = '</div>';
1279 2239
@@ -1281,9 +2241,9 @@
1281 2241
1282 2242 $content[] = '<form action="" method="POST">';
1283 2243 $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1284 2244 if( current_user_can( 'manage_options' ) ){
1285 - $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", CHART_BUILDER_NAME ) .'</button>';
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>';
1286 2246 $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1287 2247 }
1288 2248 $content[] = '</div>';
1289 2249 $content[] = '</form>';
@@ -1291,20 +2251,21 @@
1291 2251 $content[] = '</div>';
1292 2252
1293 2253 $content[] = '</div>';
1294 2254
1295 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1296 - $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1297 - $content[] = '<a class="ays-chart-black-friday-bundle-title-link" href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner" target="_blank">';
1298 - $content[] = __( 'Silver Bundle', "ays-popup-box" );
1299 - $content[] = '</a>';
1300 - $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>';
1301 2262 $content[] = '</div>';
1302 2263
1303 2264 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1304 - $content[] = '<a href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', CHART_BUILDER_NAME ) . '</a>';
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>';
1305 2266 $content[] = '<span class="ays-chart-dicount-one-time-text">';
1306 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
2267 + $content[] = __( "One-time payment", 'chart-builder' );
1307 2268 $content[] = '</span>';
1308 2269 $content[] = '</div>';
1309 2270 $content[] = '</div>';
1310 2271 $content[] = '</div>';
@@ -1309,17 +2270,1242 @@
1309 2270 $content[] = '</div>';
1310 2271 $content[] = '</div>';
1311 2272
1312 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 +
1313 3010 echo $content;
1314 3011 }
1315 3012 }
1316 3013
3014 + // Christmas Banner 2025
3015 + public static function ays_chart_christmas_banner_message_2025($ishmar){
3016 + if($ishmar == 0 ){
3017 + $content = array();
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 +
1317 3500 public function ays_chart_update_banner_time(){
3501 + if (!current_user_can('manage_options')) {
3502 + return array('error' => 'Insufficient permissions');
3503 + }
1318 3504
1319 3505 $date = time() + ( 3 * 24 * 60 * 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1320 3506 // $date = time() + ( 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS); // for testing | 1 min
1321 - $next_3_days = date('M d, Y H:i:s', $date);
3507 + $next_3_days = gmdate('M d, Y H:i:s', $date);
1322 3508
1323 3509 $ays_chart_banner_time = get_option('ays_chart_20_bundle_banner_time');
1324 3510
1325 3511 if ( !$ays_chart_banner_time || is_null( $ays_chart_banner_time ) ) {
@@ -1342,11 +3528,26 @@
1342 3528
1343 3529 return $get_ays_chart_banner_time;
1344 3530 }
1345 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 +
1346 3547 public function author_user_search() {
1347 3548 check_ajax_referer( 'cbuilder-author-user-search', 'security' );
1348 - $params = $_REQUEST['params'];
3549 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1349 3550 $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null;
1350 3551 $checked = isset($params['val']) && $params['val'] !='' ? sanitize_text_field( $params['val'] ) : null;
1351 3552 $args = 'search=';
1352 3553 if ($search !== null) {
@@ -1463,10 +3664,11 @@
1463 3664 */
1464 3665 public function ays_chart_activate_plugin() {
1465 3666
1466 3667 // Run a security check.
1467 - 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' );
1468 3669
3670 +
1469 3671 // Check for permissions.
1470 3672 if ( ! current_user_can( 'activate_plugins' ) ) {
1471 3673 wp_send_json_error( esc_html__( 'Plugin activation is disabled for you on this site.', 'chart-builder' ) );
1472 3674 }
@@ -1506,10 +3708,11 @@
1506 3708 */
1507 3709 public function ays_chart_install_plugin() {
1508 3710
1509 3711 // Run a security check.
1510 - 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' );
1511 3713
3714 +
1512 3715 $generic_error = esc_html__( 'There was an error while performing your request.', 'chart-builder' );
1513 3716 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : '';
1514 3717
1515 3718 // Check if new installations are allowed.
@@ -1625,11 +3828,13 @@
1625 3828
1626 3829 $images_url = CHART_BUILDER_ADMIN_URL . '/images/icons/';
1627 3830
1628 3831 $plugin_slug = array(
3832 + 'fox-lms',
1629 3833 'quiz-maker',
1630 3834 'survey-maker',
1631 3835 'poll-maker',
3836 + 'chart-builder',
1632 3837 'ays-popup-box',
1633 3838 'secure-copy-content-protection',
1634 3839 'gallery-photo-gallery',
1635 3840 'ays-chatgpt-assistant',
@@ -1639,9 +3844,9 @@
1639 3844 $plugin_url_arr = array();
1640 3845 foreach ($plugin_slug as $key => $slug) {
1641 3846 if ( isset( $_SESSION['ays_chart_our_product_links'] ) && !empty( $_SESSION['ays_chart_our_product_links'] )
1642 3847 && isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && !empty( $_SESSION['ays_chart_our_product_links'][$slug] ) ) {
1643 - $plugin_url = (isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && $_SESSION['ays_chart_our_product_links'][$slug] != "") ? esc_url( $_SESSION['ays_chart_our_product_links'][$slug] ) : "";
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])) : "";
1644 3849 } else {
1645 3850 $latest_version = $this->ays_chart_get_latest_plugin_version($slug);
1646 3851 $plugin_url = 'https://downloads.wordpress.org/plugin/'. $slug .'.zip';
1647 3852 if ( $latest_version != '' ) {
@@ -1653,13 +3858,22 @@
1653 3858 $plugin_url_arr[$slug] = $plugin_url;
1654 3859 }
1655 3860
1656 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 + ),
1657 3871 'quiz-maker/quiz-maker.php' => array(
1658 3872 'icon' => $images_url . 'icon-quiz-128x128.png',
1659 - 'name' => __( 'Quiz Maker', "easy-form" ),
1660 - 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', "easy-form" ),
1661 - 'desc_hidden' => __( 'Build an unlimited number of quizzes and questions.', "easy-form" ),
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' ),
1662 3876 'wporg' => 'https://wordpress.org/plugins/quiz-maker/',
1663 3877 'buy_now' => 'https://ays-pro.com/wordpress/quiz-maker/',
1664 3878 'url' => $plugin_url_arr['quiz-maker'],
1665 3879 ),
@@ -1699,9 +3913,9 @@
1699 3913 'buy_now' => 'https://ays-pro.com/wordpress/secure-copy-content-protection/',
1700 3914 'url' => $plugin_url_arr['secure-copy-content-protection'],
1701 3915 ),
1702 3916 'gallery-photo-gallery/gallery-photo-gallery.php' => array(
1703 - 'icon' => $images_url . 'icon-gallery-128x128.jpg',
3917 + 'icon' => $images_url . 'icon-gallery-128x128.png',
1704 3918 'name' => __( 'Gallery Photo Gallery', 'chart-builder' ),
1705 3919 'desc' => __( 'Create unlimited galleries and include unlimited images in those galleries.', 'chart-builder' ),
1706 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' ),
1707 3921 'wporg' => 'https://wordpress.org/plugins/gallery-photo-gallery/',
@@ -1901,9 +4115,9 @@
1901 4115 <span aria-hidden="true" class="dashicons dashicons-external"></span>
1902 4116 </a>';
1903 4117 }
1904 4118 $content .='
1905 - <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', $this->plugin_name) .'</a>
4119 + <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', 'chart-builder') .'</a>
1906 4120 </div>
1907 4121 </div>';
1908 4122 }
1909 4123 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
@@ -1909,9 +4123,9 @@
1909 4123 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
1910 4124 $content.= '<input type="hidden" id="ays_chart_ajax_install_plugin_nonce" name="ays_chart_ajax_install_plugin_nonce" value="'. $install_plugin_nonce .'">';
1911 4125 $content.= '</div>';
1912 4126
1913 - echo $content;
4127 + echo html_entity_decode($content);
1914 4128 }
1915 4129
1916 4130 /**
1917 4131 * Returns the data from Quiz maker.
@@ -1920,9 +4134,9 @@
1920 4134 */
1921 4135 public function fetch_quiz_maker_data(){
1922 4136 check_ajax_referer( 'cbuilder-fetch-quiz-maker-data', 'security' );
1923 4137
1924 - $params = $_POST['params'];
4138 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
1925 4139 if ( !isset($params) || empty($params) ) {
1926 4140 return array(
1927 4141 'success' => false,
1928 4142 'data' => array(
@@ -2044,9 +4258,9 @@
2044 4258 */
2045 4259 public function save_quiz_maker_data() {
2046 4260 check_ajax_referer( 'cbuilder-save-quiz-maker-data', 'security' );
2047 4261
2048 - $params = $_POST['params'];
4262 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
2049 4263 if ( !isset($params) || empty($params) ) {
2050 4264 return array(
2051 4265 'success' => false,
2052 4266 'data' => array(
@@ -2160,9 +4374,9 @@
2160 4374 'data' => array(
2161 4375 'msg' => __( 'Data was successfully saved.', "chart-builder" )
2162 4376 )
2163 4377 );
2164 - }
4378 + }
2165 4379
2166 4380 /**
2167 4381 * Chart page action hooks
2168 4382 */
@@ -2206,9 +4420,9 @@
2206 4420
2207 4421 $sources[] = $content;
2208 4422 }
2209 4423 $content_for_escape = implode('' , $sources );
2210 - echo html_entity_decode(esc_html( $content_for_escape ));
4424 + echo html_entity_decode( esc_html($content_for_escape) );
2211 4425 }
2212 4426
2213 4427 public function source_contents_import_from_csv_settings( $sources, $args ){
2214 4428 $html_class_prefix = $args['html_class_prefix'];
@@ -2220,25 +4434,25 @@
2220 4434 <div class="ays-pro-features-v2-big-buttons-box">
2221 4435 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2222 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>
2223 4437 <div class="ays-pro-features-v2-video-text">
2224 - <?php echo __("Watch Video" , "chart-builder"); ?>
4438 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2225 4439 </div>
2226 4440 </a>
2227 4441 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2228 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>
2229 4443 <div class="ays-pro-features-v2-upgrade-text">
2230 - <?php echo __("Upgrade" , "chart-builder"); ?>
4444 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2231 4445 </div>
2232 4446 </a>
2233 4447 </div>
2234 - <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">
2235 4449 <div class="<?php echo esc_attr($html_class_prefix) ?>file-import-form">
2236 - <h6><?php echo __("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6>
4450 + <h6><?php echo esc_html__("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6>
2237 4451 <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>import-files-file-type">
2238 4452 <option value="csv">CSV File</option>
2239 4453 </select>
2240 - <span style="display: block; font-style: italic; color: gray; font-size: 12px; margin: 5px 0;" class="<?php echo esc_attr($html_class_prefix) ?>small-hint-text"><?php echo __("Choose the format of the file you are going to import.", "chart-builder"); ?></span>
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>
2241 4455 <p class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example" style="font-size: 15px; font-style: italic;">Example:
2242 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>
2243 4457 </p>
2244 4458 <div>
@@ -2247,16 +4461,16 @@
2247 4461 <div class='ays-chart-file-import-success'></div>
2248 4462 <div class='ays-chart-file-import-error'></div>
2249 4463 <div class="ays-chart-buttons-group">
2250 4464 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-fetch">
2251 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4465 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2252 4466 </button>
2253 4467 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-show-on-chart">
2254 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>
2255 - <?php echo __( 'Preview', "chart-builder" ); ?>
4469 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2256 4470 </button>
2257 4471 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-save">
2258 - <?php echo __( 'Save data', "chart-builder" ); ?>
4472 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2259 4473 </button>
2260 4474 </div>
2261 4475 </div>
2262 4476 </div>
@@ -2286,38 +4500,38 @@
2286 4500 <div class="ays-pro-features-v2-big-buttons-box">
2287 4501 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2288 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>
2289 4503 <div class="ays-pro-features-v2-video-text">
2290 - <?php echo __("Watch Video" , "chart-builder"); ?>
4504 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2291 4505 </div>
2292 4506 </a>
2293 4507 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2294 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>
2295 4509 <div class="ays-pro-features-v2-upgrade-text">
2296 - <?php echo __("Upgrade" , "chart-builder"); ?>
4510 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2297 4511 </div>
2298 4512 </a>
2299 4513 </div>
2300 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2301 - <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">
2302 4516 <div id="ays-chart-db-query">
2303 - <div class="<?= $html_class_prefix ?>-db-query-form">
4517 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2304 4518 <div id="db-query-form">
2305 4519 <input type="hidden" name="chart_id" value="1">
2306 - <textarea name="query" class="<?= $html_class_prefix ?>db-query" placeholder="<?php echo __( "Add your query here.", $this->plugin_name ); ?>"></textarea>
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>
2307 4521 <div class='db-wizard-success'></div>
2308 4522 <div class='db-wizard-error'></div>
2309 4523 </div>
2310 4524 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2311 4525 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-fetch">
2312 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4526 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2313 4527 </button>
2314 4528 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-show-on-chart">
2315 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>
2316 - <?php echo __( 'Preview', "chart-builder" ); ?>
4530 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2317 4531 </button>
2318 4532 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-save">
2319 - <?php echo __( 'Save data', "chart-builder" ); ?>
4533 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2320 4534 </button>
2321 4535 </div>
2322 4536 </div>
2323 4537 <div class="db-wizard-hints">
@@ -2322,9 +4536,18 @@
2322 4536 </div>
2323 4537 <div class="db-wizard-hints">
2324 4538 <ul>
2325 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> -->
2326 - <li><?php echo sprintf( __( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', $this->plugin_name ), '<span class="ays-chart-emboss">', '</span>' ); ?></li>
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>
2327 4550 </ul>
2328 4551 </div>
2329 4552 </div>
2330 4553 </div>
@@ -2332,9 +4555,9 @@
2332 4555 </div>
2333 4556 <?php
2334 4557 $content = ob_get_clean();
2335 4558
2336 - $title = __( 'Connect to Database', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" title="' . __("Insert the Database query and the appropriate information from your Database will be displayed in the chart.",$this->plugin_name) . '">
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') . '">
2337 4560 <i class="ays_fa ays_fa_info_circle"></i>
2338 4561 </a>';
2339 4562
2340 4563 $sources['import_from_db'] = array(
@@ -2355,16 +4578,16 @@
2355 4578 <div class="ays-pro-features-v2-big-buttons-box">
2356 4579 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2357 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>
2358 4581 <div class="ays-pro-features-v2-upgrade-text">
2359 - <?php echo __("Upgrade" , "chart-builder"); ?>
4582 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2360 4583 </div>
2361 4584 </a>
2362 4585 </div>
2363 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2364 - <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">
2365 4588 <div class="form-group row mb-2">
2366 - <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">
2367 4590 <label class="form-label">
2368 4591 <?php echo esc_html(__('Use custom database settings for this chart', "chart-builder")); ?>
2369 4592 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __(".","chart-builder") ); ?>">
2370 4593 <i class="ays_fa ays_fa_info_circle"></i>
@@ -2370,9 +4593,9 @@
2370 4593 <i class="ays_fa ays_fa_info_circle"></i>
2371 4594 </a>
2372 4595 </label>
2373 4596 </div>
2374 - <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">
2375 4598 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
2376 4599 <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" type="checkbox" />
2377 4600 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
2378 4601 </label>
@@ -2378,25 +4601,25 @@
2378 4601 </label>
2379 4602 </div>
2380 4603 </div>
2381 4604 <div id="ays-chart-external-db-query">
2382 - <div class="<?= $html_class_prefix ?>-db-query-form">
4605 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2383 4606 <div id="external-db-query-form">
2384 4607 <input type="hidden" name="chart_id" value="1">
2385 - <textarea name="query" class="<?= $html_class_prefix ?>external-db-query" placeholder="<?php echo __( "Add your query here.", $this->plugin_name ); ?>"></textarea>
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>
2386 4609 <div class='db-wizard-success'></div>
2387 4610 <div class='db-wizard-error'></div>
2388 4611 </div>
2389 4612 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2390 4613 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-fetch">
2391 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4614 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2392 4615 </button>
2393 4616 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-show-on-chart">
2394 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>
2395 - <?php echo __( 'Preview', "chart-builder" ); ?>
4618 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2396 4619 </button>
2397 4620 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-save">
2398 - <?php echo __( 'Save data', "chart-builder" ); ?>
4621 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2399 4622 </button>
2400 4623 </div>
2401 4624 </div>
2402 4625 <div class="db-wizard-hints">
@@ -2401,9 +4624,18 @@
2401 4624 </div>
2402 4625 <div class="db-wizard-hints">
2403 4626 <ul>
2404 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> -->
2405 - <li><?php echo sprintf( __( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', $this->plugin_name ), '<span class="ays-chart-emboss">', '</span>' ); ?></li>
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>
2406 4638 </ul>
2407 4639 </div>
2408 4640 </div>
2409 4641 </div>
@@ -2411,9 +4643,9 @@
2411 4643 </div>
2412 4644 <?php
2413 4645 $content = ob_get_clean();
2414 4646
2415 - $title = __( 'Connect to External Database', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" title="' . __("Insert the Database query and fetch data from an external database.", $this->plugin_name) . '">
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') . '">
2416 4648 <i class="ays_fa ays_fa_info_circle"></i>
2417 4649 </a>';
2418 4650
2419 4651 $sources['import_from_external_db'] = array(
@@ -2435,9 +4667,9 @@
2435 4667 $quiz_query_tooltips = $args['quiz_query_tooltips'];
2436 4668 $quiz_id = $args['quiz_id'];
2437 4669 $quiz_query = $args['quiz_query'];
2438 4670
2439 - 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') ) {
2440 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") . '">
2441 4673 // <i class="ays_fa ays_fa_info_circle"></i>
2442 4674 // </a>', '<br>', '<b>', '</b>');
2443 4675 // $content = $this->blockquote_content_quiz;
@@ -2447,35 +4679,42 @@
2447 4679 // );
2448 4680
2449 4681 return $sources;
2450 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 +
2451 4693
2452 - $sql = "SELECT `title`, `id` FROM " . $wpdb->prefix . "aysquiz_quizes WHERE `published` = 1 AND `question_ids` <> ''";
2453 - $quizes = $wpdb->get_results($sql, "ARRAY_A");
2454 -
2455 4694 ob_start();
2456 4695 ?>
2457 4696 <div class="ays-accordion-data-main-wrap">
2458 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">
2459 4698 <div id="<?php echo esc_attr($html_class_prefix) ?>quiz-maker-form">
2460 - <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?= $chart_id ?>">
2461 - <div class="<?= $html_class_prefix ?>select-quiz-maker-data-query-container" id="<?= $html_class_prefix ?>quiz-queries">
2462 - <a class="ays_help <?= $html_class_prefix ?>quiz-query-tooltip" data-bs-toggle="tooltip" data-bs-html="true" title="<?php echo isset($quiz_query) ? $quiz_query_tooltips[$quiz_query] : __( 'Select a query to display quiz data.', $this->plugin_name ) ?>">
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' ) ?>">
2463 4702 <i class="ays_fa ays_fa_info_circle"></i>
2464 4703 </a>
2465 - <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-data-query" name="<?= $html_name_prefix ?>quiz_query">
2466 - <option value=""><?= __( "Select query", "chart-builder" ) ?></option>
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>
2467 4706 <?php foreach ( $quiz_queries as $id => $q):
2468 4707 $disabled = preg_replace('/[^0-9]/', '', $id) <= 6 ? "false" : "true" ; ?>
2469 - <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>
2470 4709 <?php endforeach; ?>
2471 4710 </select>
2472 4711 </div>
2473 4712 <div class="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz-container">
2474 - <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz" name="<?= $html_name_prefix ?>quiz_id">
2475 - <option value="0"><?= __( "Select quiz", "chart-builder" ) ?></option>
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>
2476 4715 <?php foreach ( $quizes as $quiz): ?>
2477 - <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>
2478 4717 <?php endforeach; ?>
2479 4718 </select>
2480 4719 </div>
2481 4720 <div id="ays-chart-quiz-maker-success"></div>
@@ -2481,21 +4720,21 @@
2481 4720 <div id="ays-chart-quiz-maker-success"></div>
2482 4721 <div id="ays-chart-quiz-maker-error"></div>
2483 4722 <div class="ays-chart-buttons-group">
2484 4723 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-fetch">
2485 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4724 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2486 4725 </button>
2487 4726 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-show-on-chart">
2488 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>
2489 - <?php echo __( 'Preview', "chart-builder" ); ?>
4728 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2490 4729 </button>
2491 4730 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-save">
2492 - <?php echo __( 'Save data', "chart-builder" ); ?>
4731 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2493 4732 </button>
2494 4733 </div>
2495 4734 </div>
2496 4735 <div>
2497 - <a href="https://www.youtube.com/watch?v=vqx76dw6NC8" target="_blank" style="text-decoration:none;font-style:italic"><?php echo __('How to Connect Quizzes to Charts', 'chart-builder'); ?></a>
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>
2498 4737 </div>
2499 4738 </div>
2500 4739 </div>
2501 4740 <?php
@@ -2500,11 +4739,18 @@
2500 4739 </div>
2501 4740 <?php
2502 4741 $content = ob_get_clean();
2503 4742
2504 - $title = sprintf( __( 'Get Quiz Maker data', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' . __("By using this option, you can display the quiz statistics by charts.%s %sNote:%s The Quiz Maker plugin must be active.",$this->plugin_name) . '">
2505 - <i class="ays_fa ays_fa_info_circle"></i>
2506 - </a>', '<br>', '<b>', '</b>');
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 + );
2507 4753 $sources['quiz_maker'] = array(
2508 4754 'content' => $content,
2509 4755 'title' => $title
2510 4756 );
@@ -2527,23 +4773,23 @@
2527 4773 <div class="ays-pro-features-v2-video-button"></div>
2528 4774 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2529 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>
2530 4776 <div class="ays-pro-features-v2-upgrade-text">
2531 - <?php echo __("Upgrade" , "chart-builder"); ?>
4777 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2532 4778 </div>
2533 4779 </a>
2534 4780 </div>
2535 - <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 ">
2536 4782 <div id="ays-chart-woocommerce-datas">
2537 - <div class="<?= $html_class_prefix ?>woocommerce-datas-form">
4783 + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-form">
2538 4784 <div id="woocommerce-datas-form">
2539 - <input type="hidden" name="chart_id" value="<?= $chart_id ?>">
2540 - <div class="<?= $html_class_prefix ?>woocommerce-datas-query-container" id="<?= $html_class_prefix ?>woocommerce-datas-container-id" >
2541 - <a class="ays_help <?= $html_class_prefix ?>woocommerce-datas-tooltip" data-bs-toggle="tooltip" data-bs-html="true" title="<?php echo __( 'Select a query to display data.', $this->plugin_name ) ?>">
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' ) ?>">
2542 4788 <i class="ays_fa ays_fa_info_circle"></i>
2543 4789 </a>
2544 - <select class="form-select" style="max-width: none;" id="<?= $html_class_prefix ?>woocommerce-datas-select" name="<?php echo esc_attr($html_name_prefix); ?>settings[woocommerce_data_id]">
2545 - <option value=""><?= __( 'Select query', $this->plugin_name ) ?></option>
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>
2546 4792 </select>
2547 4793 </div>
2548 4794 <div class='ays-chart-woocommerce-datas-success'></div>
2549 4795 <div class='ays-chart-woocommerce-datas-error'></div>
@@ -2549,16 +4795,16 @@
2549 4795 <div class='ays-chart-woocommerce-datas-error'></div>
2550 4796 </div>
2551 4797 <div class="ays-chart-buttons-group">
2552 4798 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-fetch">
2553 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4799 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2554 4800 </button>
2555 4801 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-show-on-chart">
2556 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>
2557 - <?php echo __( 'Preview', "chart-builder" ); ?>
4803 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2558 4804 </button>
2559 4805 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-save">
2560 - <?php echo __( 'Save data', "chart-builder" ); ?>
4806 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2561 4807 </button>
2562 4808 </div>
2563 4809 </div>
2564 4810 </div>
@@ -2565,12 +4811,19 @@
2565 4811 </div>
2566 4812 </div>
2567 4813 <?php
2568 4814 $content = ob_get_clean();
2569 -
2570 - $title = sprintf( __( 'Get WooCommerce data', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' . __("By using this option, you can display the WooCommerce statistics by charts.%s %sNote:%s The WooCommerce plugin must be active.",$this->plugin_name) . '">
2571 - <i class="ays_fa ays_fa_info_circle"></i>
2572 - </a>', '<br>', '<b>', '</b>');
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 + );
2573 4826 $sources['woocommerce'] = array(
2574 4827 'content' => $content,
2575 4828 'title' => $title
2576 4829 );
@@ -2584,9 +4837,10 @@
2584 4837 $source = $args['source'];
2585 4838 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2586 4839 $settings = $args['settings'];
2587 4840 $source_chart_type = $args['source_chart_type'];
2588 - $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';
2589 4843
2590 4844 if (isset($source) && !empty($source)) {
2591 4845 if ( !isset( $source[0] ) ) {
2592 4846 if (count($source[1]) > 2) {
@@ -2591,15 +4845,15 @@
2591 4845 if ( !isset( $source[0] ) ) {
2592 4846 if (count($source[1]) > 2) {
2593 4847 $titles = array();
2594 4848 for ($i = 0; $i < count($source[1]); $i++) {
2595 - array_push($titles, __("Title", $this->plugin_name).$i);
4849 + array_push($titles, __("Title", 'chart-builder').$i);
2596 4850 }
2597 4851 $source[0] = $titles;
2598 4852 } else {
2599 4853 $source[0] = array(
2600 - __("Country", $this->plugin_name),
2601 - __("Population", $this->plugin_name),
4854 + __("Country", 'chart-builder'),
4855 + __("Population", 'chart-builder'),
2602 4856 );
2603 4857 }
2604 4858
2605 4859 ksort($source);
@@ -2621,9 +4875,9 @@
2621 4875 ?>
2622 4876 <div class="ays-accordion-data-main-wrap">
2623 4877 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2624 4878 <?php if($source_chart_type != 'org_chart'): ?>
2625 - <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?= $html_class_prefix ?>chart-source-data-manual cb-changable-manual cb-pie_chart-manual cb-bar_chart-manual cb-column_chart-manual cb-line_chart-manual cb-donut_chart-manual display_none">
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">
2626 4880 <!-- <div class="<//?= $html_class_prefix ?>icons-box">
2627 4881 <img class="<//?= $html_class_prefix ?>add-new-row" src="<//?php echo CHART_BUILDER_ADMIN_URL; ?>/images/icons/add-circle-outline.svg">
2628 4882 </div> -->
2629 4883 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
@@ -2634,14 +4888,14 @@
2634 4888 if ($source_id == 0): ?>
2635 4889 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2636 4890 <div class="ays-chart-empty-data-table-cell"></div>
2637 4891 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2638 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
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); ?>">
2639 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">
2640 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;" />
2641 4895 </svg>
2642 4896 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2643 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" <?php echo $each_source_id == 0 ? "style='min-width:100px'" : "" ?>>
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'" : "" ?>>
2644 4898 <?php if ($each_source_id !== 0): ?>
2645 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">
2646 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;" />
2647 4901 </svg>
@@ -2663,14 +4917,14 @@
2663 4917 </svg>
2664 4918 </div>
2665 4919 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2666 4920 <?php if ($each_source_id == 0): ?>
2667 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-data-name-input-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2668 - <input type="text" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo htmlspecialchars(esc_attr($each_source_value)); ?>">
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)); ?>">
2669 4923 </div>
2670 4924 <?php else: ?>
2671 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); ?>">
2672 - <input type="number" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" step="any">
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">
2673 4927 </div>
2674 4928 <?php endif; ?>
2675 4929 <?php endforeach; ?>
2676 4930 </div>
@@ -2677,16 +4931,16 @@
2677 4931 <?php endif; ?>
2678 4932 <?php endif; ?>
2679 4933 <?php endforeach; ?>
2680 4934 <?php else:?>
2681 - <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">
2682 4936 <div style="height: 63.11px; padding: 0 15px;"></div>
2683 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box">
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">
2684 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">
2685 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;" />
2686 4940 </svg>
2687 4941 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2688 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[0][]" style='min-width:100px'>
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'>
2689 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">
2690 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;" />
2691 4945 </svg>
2692 4946 </div>
@@ -2713,30 +4967,30 @@
2713 4967 <?php endif; ?>
2714 4968 </div>
2715 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">
2716 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">
2717 - <?php echo __( 'Add column', "chart-builder" ); ?>
4971 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2718 4972 </div>
2719 4973 </div>
2720 4974 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2721 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">
2722 - <?php echo __( 'Add row', "chart-builder" ); ?>
4976 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2723 4977 </div>
2724 4978 <br>
2725 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">
2726 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>
2727 - <?php echo __( 'Preview', "chart-builder" ); ?>
4981 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2728 4982 </button>
2729 4983 </div>
2730 4984 <?php endif; ?>
2731 - <div class="<?= $html_class_prefix ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
2732 - <div class="<?= $html_class_prefix ?>chart-source-data-content-org-type">
2733 - <ul id="<?= $html_class_prefix ?>chart-source-data-edit-tree-content">
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">
2734 4988 </ul>
2735 4989 </div>
2736 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">
2737 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>
2738 - <?php echo __( 'Preview', "chart-builder" ); ?>
4992 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2739 4993 </button>
2740 4994 </div>
2741 4995 </div>
2742 4996 </div>
@@ -2761,15 +5015,16 @@
2761 5015 $source = $args['source'];
2762 5016 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2763 5017 $settings = $args['settings'];
2764 5018 $source_chart_type = $args['source_chart_type'];
2765 - $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';
2766 5021
2767 5022 ob_start();
2768 5023 ?>
2769 5024 <div class="ays-accordion-data-main-wrap">
2770 5025 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2771 - <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?= $html_class_prefix ?>chart-source-data-manual">
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">
2772 5027 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
2773 5028 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content">
2774 5029 <?php if(!empty($source)):
2775 5030 foreach($source as $source_id => $source_value):
@@ -2777,14 +5032,14 @@
2777 5032 if ($source_id == 0): ?>
2778 5033 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2779 5034 <div class="ays-chart-empty-data-table-cell"></div>
2780 5035 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2781 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
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); ?>">
2782 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">
2783 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;" />
2784 5039 </svg>
2785 5040 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2786 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" <?php echo $each_source_id == 0 ? "style='min-width:100px'" : "" ?>>
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'" : "" ?>>
2787 5042 <?php if ($each_source_id !== 0): ?>
2788 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">
2789 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;" />
2790 5045 </svg>
@@ -2806,14 +5061,14 @@
2806 5061 </svg>
2807 5062 </div>
2808 5063 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2809 5064 <?php if ($each_source_id == 0): ?>
2810 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-data-name-input-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2811 - <input type="text" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo htmlspecialchars(esc_attr($each_source_value)); ?>">
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)); ?>">
2812 5067 </div>
2813 5068 <?php else: ?>
2814 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); ?>">
2815 - <input type="number" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" step="any">
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">
2816 5071 </div>
2817 5072 <?php endif; ?>
2818 5073 <?php endforeach; ?>
2819 5074 </div>
@@ -2820,16 +5075,16 @@
2820 5075 <?php endif; ?>
2821 5076 <?php endif; ?>
2822 5077 <?php endforeach; ?>
2823 5078 <?php else:?>
2824 - <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">
2825 5080 <div style="height: 63.11px; padding: 0 15px;"></div>
2826 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box">
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">
2827 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">
2828 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;" />
2829 5084 </svg>
2830 5085 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2831 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[0][]" style='min-width:100px'>
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'>
2832 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">
2833 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;" />
2834 5089 </svg>
2835 5090 </div>
@@ -2856,19 +5111,19 @@
2856 5111 <?php endif; ?>
2857 5112 </div>
2858 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">
2859 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">
2860 - <?php echo __( 'Add column', "chart-builder" ); ?>
5115 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2861 5116 </div>
2862 5117 </div>
2863 5118 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2864 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">
2865 - <?php echo __( 'Add row', "chart-builder" ); ?>
5120 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2866 5121 </div>
2867 5122 <br>
2868 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">
2869 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>
2870 - <?php echo __( 'Preview', "chart-builder" ); ?>
5125 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2871 5126 </button>
2872 5127 </div>
2873 5128 </div>
2874 5129 </div>
@@ -2924,9 +5179,9 @@
2924 5179
2925 5180 $sources[] = $content;
2926 5181 }
2927 5182 $content_for_escape = implode('' , $sources );
2928 - echo html_entity_decode(esc_html( $content_for_escape ));
5183 + echo html_entity_decode( $content_for_escape );
2929 5184 }
2930 5185
2931 5186 public function settings_contents_general_settings( $sources, $args ){
2932 5187 $html_class_prefix = $args['html_class_prefix'];
@@ -3080,8 +5335,9 @@
3080 5335 $settings = $args['settings'];
3081 5336
3082 5337 $show_title = $settings['show_title'];
3083 5338 $show_description = $settings['show_description'];
5339 + $enable_interactivity = $settings['enable_interactivity'];
3084 5340
3085 5341 ob_start();
3086 5342 ?>
3087 5343 <div class="ays-accordion-data-main-wrap">
@@ -3164,8 +5420,24 @@
3164 5420 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
3165 5421 </label>
3166 5422 </div>
3167 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 -->
3168 5440 </div>
3169 5441 </div>
3170 5442 <?php
3171 5443 $content = ob_get_clean();
@@ -3201,9 +5473,9 @@
3201 5473 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3202 5474 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3203 5475 <label for="ays-chart-option-tooltip-trigger">
3204 5476 <?php echo esc_html(__( "Trigger", "chart-builder" )); ?>
3205 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") ); ?>">
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") )); ?>">
3206 5478 <i class="ays_fa ays_fa_info_circle"></i>
3207 5479 </a>
3208 5480 </label>
3209 5481 </div>
@@ -3252,9 +5524,9 @@
3252 5524 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3253 5525 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3254 5526 <label for="ays-chart-option-tooltip-font-size" class="form-label">
3255 5527 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3256 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size for all text within the chart tooltip, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") ); ?>">
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") )); ?>">
3257 5529 <i class="ays_fa ays_fa_info_circle"></i>
3258 5530 </a>
3259 5531 </label>
3260 5532 </div>
@@ -3282,9 +5554,9 @@
3282 5554 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3283 5555 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3284 5556 <label for="ays-chart-option-tooltip-bold">
3285 5557 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
3286 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") ); ?>">
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") )); ?>">
3287 5559 <i class="ays_fa ays_fa_info_circle"></i>
3288 5560 </a>
3289 5561 </label>
3290 5562 </div>
@@ -3315,8 +5587,120 @@
3315 5587
3316 5588 return $sources;
3317 5589 }
3318 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 +
3319 5703 public function settings_contents_legend_settings( $sources, $args ){
3320 5704 $html_class_prefix = $args['html_class_prefix'];
3321 5705 $html_name_prefix = $args['html_name_prefix'];
3322 5706 $settings = $args['settings'];
@@ -3336,9 +5720,9 @@
3336 5720 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3337 5721 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3338 5722 <label for="ays-chart-option-legend-position">
3339 5723 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3340 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") ); ?>">
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") )); ?>">
3341 5725 <i class="ays_fa ays_fa_info_circle"></i>
3342 5726 </a>
3343 5727 </label>
3344 5728 </div>
@@ -3369,9 +5753,9 @@
3369 5753 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3370 5754 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3371 5755 <label for="ays-chart-option-legend-alignment">
3372 5756 <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
3373 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") ); ?>">
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") )); ?>">
3374 5758 <i class="ays_fa ays_fa_info_circle"></i>
3375 5759 </a>
3376 5760 </label>
3377 5761 </div>
@@ -3391,9 +5775,9 @@
3391 5775 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3392 5776 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3393 5777 <label for="ays-chart-option-legend-font-color">
3394 5778 <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
3395 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") ); ?>">
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") )); ?>">
3396 5780 <i class="ays_fa ays_fa_info_circle"></i>
3397 5781 </a>
3398 5782 </label>
3399 5783 </div>
@@ -3404,9 +5788,9 @@
3404 5788 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3405 5789 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3406 5790 <label for="ays-chart-option-legend-font-size" class="form-label">
3407 5791 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3408 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size for all text within the chart legend, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") ); ?>">
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") )); ?>">
3409 5793 <i class="ays_fa ays_fa_info_circle"></i>
3410 5794 </a>
3411 5795 </label>
3412 5796 </div>
@@ -3461,8 +5845,159 @@
3461 5845
3462 5846 return $sources;
3463 5847 }
3464 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 +
3465 6000 public function settings_contents_horizontal_axis_settings( $sources, $args ){
3466 6001 $html_class_prefix = $args['html_class_prefix'];
3467 6002 $html_name_prefix = $args['html_name_prefix'];
3468 6003 $settings = $args['settings'];
@@ -3478,8 +6013,9 @@
3478 6013 $haxis_slanted_text_angle = $settings['haxis_slanted_text_angle'];
3479 6014 $haxis_show_text_every = $settings['haxis_show_text_every'];
3480 6015 $haxis_format_options = $settings['axes_format_options'];
3481 6016 $haxis_format = $settings['haxis_format'];
6017 + $haxis_enable_divide_percent = $settings['haxis_enable_divide_percent'];
3482 6018 $haxis_label_font_size = $settings['haxis_label_font_size'];
3483 6019 $haxis_max_value = $settings['haxis_max_value'];
3484 6020 $haxis_min_value = $settings['haxis_min_value'];
3485 6021 $haxis_text_font_size = $settings['haxis_text_font_size'];
@@ -3493,9 +6029,9 @@
3493 6029 $haxis_minor_gridlines_color = $settings['haxis_minor_gridlines_color'];
3494 6030
3495 6031 ob_start();
3496 6032 ?>
3497 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-haxis-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
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">
3498 6034 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3499 6035 <h6>Label</h6>
3500 6036 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3501 6037 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3500,9 +6036,9 @@
3500 6036 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3501 6037 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3502 6038 <label for="ays-chart-option-haxis-title" class="form-label">
3503 6039 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3504 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The title of the horizontal axis","chart-builder") ); ?>">
6040 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the horizontal axis","chart-builder") ); ?>">
3505 6041 <i class="ays_fa ays_fa_info_circle"></i>
3506 6042 </a>
3507 6043 </label>
3508 6044 </div>
@@ -3587,9 +6123,9 @@
3587 6123 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3588 6124 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3589 6125 <label for="ays-chart-option-haxis-text-position" class="form-label">
3590 6126 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3591 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Position of the horizontal axis text, relative to the chart area.","chart-builder") ); ?>">
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") ); ?>">
3592 6128 <i class="ays_fa ays_fa_info_circle"></i>
3593 6129 </a>
3594 6130 </label>
3595 6131 </div>
@@ -3770,32 +6306,40 @@
3770 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) ?>">
3771 6307 </div>
3772 6308 </div> <!-- Horizontal axis baseline color -->
3773 6309
3774 - <br>
3775 - <h6>Format</h6>
3776 - <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 " >
3777 6313 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3778 6314 <label for="ays-chart-option-haxis-format" class="form-label">
3779 6315 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
3780 6316 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
3781 - echo htmlspecialchars( sprintf (
3782 - "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
3783 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
3784 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
3785 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
3786 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
3787 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
3788 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
3789 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
3790 - '<em>', '</em>',
3791 - '<em>', '</em>',
3792 - '<em>', '</em>',
3793 - '<em>', '</em>',
3794 - '<em>', '</em>',
3795 - '<em>', '</em>',
3796 - '<em>', '</em>'
3797 - ) );
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 + ));
3798 6342 ?>">
3799 6343 <i class="ays_fa ays_fa_info_circle"></i>
3800 6344 </a>
3801 6345 </label>
@@ -3812,10 +6356,26 @@
3812 6356 ?>
3813 6357 </select>
3814 6358 </div>
3815 6359 </div> <!-- Horizontal axis format -->
3816 - <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;'; ?>">
3817 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">
3818 6378 <label for="ays-chart-option-haxis-max-value" class="form-label">
3819 6379 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
3820 6380 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
3821 6381 <i class="ays_fa ays_fa_info_circle"></i>
@@ -3825,9 +6385,9 @@
3825 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">
3826 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) ?>">
3827 6387 </div>
3828 6388 </div> <!-- Horizontal axis max value -->
3829 - <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" >
3830 6390 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3831 6391 <label for="ays-chart-option-haxis-min-value" class="form-label">
3832 6392 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
3833 6393 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -3866,8 +6426,9 @@
3866 6426 $vaxis_text_color = $settings['vaxis_text_color'];
3867 6427 $vaxis_baseline_color = $settings['vaxis_baseline_color'];
3868 6428 $vaxis_format_options = $settings['axes_format_options'];
3869 6429 $vaxis_format = $settings['vaxis_format'];
6430 + $vaxis_enable_divide_percent = $settings['vaxis_enable_divide_percent'];
3870 6431 $vaxis_label_font_size = $settings['vaxis_label_font_size'];
3871 6432 $vaxis_max_value = $settings['vaxis_max_value'];
3872 6433 $vaxis_min_value = $settings['vaxis_min_value'];
3873 6434 $vaxis_text_font_size = $settings['vaxis_text_font_size'];
@@ -3881,9 +6442,9 @@
3881 6442 $vaxis_minor_gridlines_color = $settings['vaxis_minor_gridlines_color'];
3882 6443
3883 6444 ob_start();
3884 6445 ?>
3885 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-vaxis-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
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">
3886 6447 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3887 6448 <h6>Label</h6>
3888 6449 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3889 6450 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3888,9 +6449,9 @@
3888 6449 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3889 6450 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3890 6451 <label for="ays-chart-option-vaxis-title" class="form-label">
3891 6452 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3892 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The title of the vertical axis","chart-builder") ); ?>">
6453 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the vertical axis","chart-builder") ); ?>">
3893 6454 <i class="ays_fa ays_fa_info_circle"></i>
3894 6455 </a>
3895 6456 </label>
3896 6457 </div>
@@ -3962,9 +6523,9 @@
3962 6523 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3963 6524 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3964 6525 <label for="ays-chart-option-vaxis-text-position" class="form-label">
3965 6526 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3966 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Position of the vertical axis text, relative to the chart area.","chart-builder") ); ?>">
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") ); ?>">
3967 6528 <i class="ays_fa ays_fa_info_circle"></i>
3968 6529 </a>
3969 6530 </label>
3970 6531 </div>
@@ -4110,24 +6671,32 @@
4110 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) ?>">
4111 6672 </div>
4112 6673 </div> <!-- Vertical axis baseline color -->
4113 6674
4114 - <br>
4115 - <h6>Format</h6>
4116 - <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">
4117 6678 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4118 6679 <label for="ays-chart-option-vaxis-format" class="form-label">
4119 6680 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
4120 6681 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4121 - echo htmlspecialchars( sprintf (
6682 + echo esc_attr( sprintf(
6683 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4122 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>" .
4123 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
4124 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
4125 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
4126 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
4127 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
4128 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
4129 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
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>",
4130 6699 '<em>', '</em>',
4131 6700 '<em>', '</em>',
4132 6701 '<em>', '</em>',
4133 6702 '<em>', '</em>',
@@ -4133,9 +6702,9 @@
4133 6702 '<em>', '</em>',
4134 6703 '<em>', '</em>',
4135 6704 '<em>', '</em>',
4136 6705 '<em>', '</em>'
4137 - ) );
6706 + ));
4138 6707 ?>">
4139 6708 <i class="ays_fa ays_fa_info_circle"></i>
4140 6709 </a>
4141 6710 </label>
@@ -4152,10 +6721,26 @@
4152 6721 ?>
4153 6722 </select>
4154 6723 </div>
4155 6724 </div> <!-- Vertical axis format -->
4156 - <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;'; ?>">
4157 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">
4158 6743 <label for="ays-chart-option-vaxis-max-value" class="form-label">
4159 6744 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
4160 6745 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
4161 6746 <i class="ays_fa ays_fa_info_circle"></i>
@@ -4165,9 +6750,9 @@
4165 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">
4166 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) ?>">
4167 6752 </div>
4168 6753 </div> <!-- Vertical axis max value -->
4169 - <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">
4170 6755 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4171 6756 <label for="ays-chart-option-vaxis-min-value" class="form-label">
4172 6757 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
4173 6758 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -4206,9 +6791,9 @@
4206 6791 $animation_easing = $settings['animation_easing'];
4207 6792
4208 6793 ob_start();
4209 6794 ?>
4210 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-animation-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
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">
4211 6796 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4212 6797 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4213 6798 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4214 6799 <label for="ays-chart-option-enable-animation">
@@ -4259,23 +6844,24 @@
4259 6844 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4260 6845 <label for="ays-chart-option-animation-easing" class="form-label">
4261 6846 <?php echo esc_html(__( "Easing", "chart-builder" )); ?>
4262 6847 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4263 - echo htmlspecialchars( sprintf(
6848 + echo esc_attr( sprintf(
6849 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4264 6850 "<p>" . __('The easing function applied to the chart animation. The following options are available:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4265 - __('%sLinear:%s Constant speed.', "chart-builder") . "</li><li>" .
4266 - __('%sEase in:%s Start slow and speed up.', "chart-builder") . "</li><li>" .
4267 - __('%sEase out:%s Start fast and slow down.', "chart-builder") . "</li><li>" .
4268 - __('%sEase in and out:%s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
4269 - '<em>',
4270 - '</em>',
4271 - '<em>',
4272 - '</em>',
4273 - '<em>',
4274 - '</em>',
4275 - '<em>',
4276 - '</em>'
4277 - ) );
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 + ));
4278 6864 ?>">
4279 6865 <i class="ays_fa ays_fa_info_circle"></i>
4280 6866 </a>
4281 6867 </label>
@@ -4314,9 +6900,9 @@
4314 6900 $html_name_prefix = $args['html_name_prefix'];
4315 6901
4316 6902 ob_start();
4317 6903 ?>
4318 - <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">
4319 6905 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4320 6906 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4321 6907 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4322 6908 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4321,15 +6907,15 @@
4321 6907 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4322 6908 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4323 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>
4324 6910 <div class="ays-pro-features-v2-video-text">
4325 - <?php echo __("Watch Video" , "chart-builder"); ?>
6911 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4326 6912 </div>
4327 6913 </a>
4328 6914 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4329 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>
4330 6916 <div class="ays-pro-features-v2-upgrade-text">
4331 - <?php echo __("Upgrade" , "chart-builder"); ?>
6917 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4332 6918 </div>
4333 6919 </a>
4334 6920 </div>
4335 6921 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4351,15 +6937,15 @@
4351 6937 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4352 6938 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4353 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>
4354 6940 <div class="ays-pro-features-v2-video-text">
4355 - <?php echo __("Watch Video" , "chart-builder"); ?>
6941 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4356 6942 </div>
4357 6943 </a>
4358 6944 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4359 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>
4360 6946 <div class="ays-pro-features-v2-upgrade-text">
4361 - <?php echo __("Upgrade" , "chart-builder"); ?>
6947 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4362 6948 </div>
4363 6949 </a>
4364 6950 </div>
4365 6951 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4399,9 +6985,9 @@
4399 6985 $enable_img = $settings['enable_img'];
4400 6986
4401 6987 ob_start();
4402 6988 ?>
4403 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-export-tab cb-changable-tab cb-pie_chart-tab cb-donut_chart-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
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">
4404 6990 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4405 6991 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4406 6992 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4407 6993 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4406,15 +6992,15 @@
4406 6992 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4407 6993 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4408 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>
4409 6995 <div class="ays-pro-features-v2-video-text">
4410 - <?php echo __("Watch Video" , "chart-builder"); ?>
6996 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4411 6997 </div>
4412 6998 </a>
4413 6999 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4414 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>
4415 7001 <div class="ays-pro-features-v2-upgrade-text">
4416 - <?php echo __("Upgrade" , "chart-builder"); ?>
7002 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4417 7003 </div>
4418 7004 </a>
4419 7005 </div>
4420 7006 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4436,15 +7022,15 @@
4436 7022 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4437 7023 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4438 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>
4439 7025 <div class="ays-pro-features-v2-video-text">
4440 - <?php echo __("Watch Video" , "chart-builder"); ?>
7026 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4441 7027 </div>
4442 7028 </a>
4443 7029 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4444 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>
4445 7031 <div class="ays-pro-features-v2-upgrade-text">
4446 - <?php echo __("Upgrade" , "chart-builder"); ?>
7032 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4447 7033 </div>
4448 7034 </a>
4449 7035 </div>
4450 7036 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4466,15 +7052,15 @@
4466 7052 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4467 7053 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4468 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>
4469 7055 <div class="ays-pro-features-v2-video-text">
4470 - <?php echo __("Watch Video" , "chart-builder"); ?>
7056 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4471 7057 </div>
4472 7058 </a>
4473 7059 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4474 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>
4475 7061 <div class="ays-pro-features-v2-upgrade-text">
4476 - <?php echo __("Upgrade" , "chart-builder"); ?>
7062 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4477 7063 </div>
4478 7064 </a>
4479 7065 </div>
4480 7066 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4496,15 +7082,15 @@
4496 7082 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4497 7083 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4498 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>
4499 7085 <div class="ays-pro-features-v2-video-text">
4500 - <?php echo __("Watch Video" , "chart-builder"); ?>
7086 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4501 7087 </div>
4502 7088 </a>
4503 7089 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4504 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>
4505 7091 <div class="ays-pro-features-v2-upgrade-text">
4506 - <?php echo __("Upgrade" , "chart-builder"); ?>
7092 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4507 7093 </div>
4508 7094 </a>
4509 7095 </div>
4510 7096 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4532,9 +7118,9 @@
4532 7118 </label>
4533 7119 </div>
4534 7120 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4535 7121 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
4536 - <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-export-img" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[enable_img]" value="on" <?php echo $enable_img?> >
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)?> >
4537 7123 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4538 7124 </label>
4539 7125 </div>
4540 7126 </div> <!-- IMG option end -->
@@ -4591,9 +7177,9 @@
4591 7177
4592 7178 $sources[] = $content;
4593 7179 }
4594 7180 $content_for_escape = implode('' , $sources );
4595 - echo html_entity_decode(esc_html( $content_for_escape ));
7181 + echo html_entity_decode( esc_html($content_for_escape) );
4596 7182 }
4597 7183
4598 7184 public function settings_contents_chart_styles_settings( $sources, $args ){
4599 7185 $html_class_prefix = $args['html_class_prefix'];
@@ -4613,12 +7199,19 @@
4613 7199 $org_chart_font_size = $settings['org_chart_font_size'];
4614 7200 $background_color = $settings['background_color'];
4615 7201 $transparent_background = $settings['transparent_background'];
4616 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'];
4617 7209 $border_radius = $settings['border_radius'];
4618 7210 $border_color = $settings['border_color'];
4619 7211 $box_shadow = $settings['box_shadow'];
4620 7212 $box_shadow_color = $settings['box_shadow_color'];
7213 + $padding_outer = $settings['padding_outer'];
4621 7214 ob_start();
4622 7215 ?>
4623 7216 <div class="ays-accordion-data-main-wrap">
4624 7217 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -4625,9 +7218,9 @@
4625 7218 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4626 7219 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4627 7220 <label for="ays-chart-option-width" class="form-label">
4628 7221 <?php echo esc_html(__( "Width", "chart-builder" )); ?>
4629 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container, in percents.","chart-builder") ); ?>">
7222 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container, in percents.","chart-builder") ); ?>">
4630 7223 <i class="ays_fa ays_fa_info_circle"></i>
4631 7224 </a>
4632 7225 </label>
4633 7226 </div>
@@ -4648,9 +7241,9 @@
4648 7241 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4649 7242 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4650 7243 <label for="ays-chart-option-responsive-width" class="form-label">
4651 7244 <?php echo esc_html(__( "Responsive Width", "chart-builder" )); ?>
4652 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to keep the chart's width fixed at 100%, no matter what is set for the Width option. This makes the chart more responsive.","chart-builder") ); ?>">
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") ); ?>">
4653 7246 <i class="ays_fa ays_fa_info_circle"></i>
4654 7247 </a>
4655 7248 </label>
4656 7249 </div>
@@ -4664,9 +7257,9 @@
4664 7257 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4665 7258 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4666 7259 <label for="ays-chart-option-position">
4667 7260 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4668 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart. Note: The changes will be visible when the width option is not set to 100%","chart-builder") ); ?>">
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") ); ?>">
4669 7262 <i class="ays_fa ays_fa_info_circle"></i>
4670 7263 </a>
4671 7264 </label>
4672 7265 </div>
@@ -4681,14 +7274,14 @@
4681 7274 endforeach;
4682 7275 ?>
4683 7276 </select>
4684 7277 </div>
4685 - </div> <!-- Title position -->
7278 + </div> <!-- Position -->
4686 7279 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4687 7280 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4688 7281 <label for="ays-chart-option-height" class="form-label">
4689 7282 <?php echo esc_html(__( "Height", "chart-builder" )); ?>
4690 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
7283 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The height of the chart container, in pixels.","chart-builder") ); ?>">
4691 7284 <i class="ays_fa ays_fa_info_circle"></i>
4692 7285 </a>
4693 7286 </label>
4694 7287 </div>
@@ -4709,9 +7302,9 @@
4709 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">
4710 7303 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4711 7304 <label for="ays-chart-option-font-size" class="form-label">
4712 7305 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
4713 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart text.","chart-builder") ); ?>">
7306 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart text.","chart-builder") ); ?>">
4714 7307 <i class="ays_fa ays_fa_info_circle"></i>
4715 7308 </a>
4716 7309 </label>
4717 7310 </div>
@@ -4719,24 +7312,24 @@
4719 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) ?>">
4720 7313 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
4721 7314 </div>
4722 7315 </div> <!-- Font size -->
4723 - <div class="form-group row mb-2 <?= $html_class_prefix ?>options-section cb-changable-opt cb-org_chart-opt display_none">
4724 - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title">
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">
4725 7318 <label for="ays-chart-option-org-chart-font-size" class="form-label">
4726 - <?php echo __( "Element size", $this->plugin_name ); ?>
4727 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The size of the chart element.","chart-builder") ); ?>">
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") ); ?>">
4728 7321 <i class="ays_fa ays_fa_info_circle"></i>
4729 7322 </a>
4730 7323 </label>
4731 7324 </div>
4732 7325 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
4733 - <select class="<?= $html_class_prefix ?>option-select-input form-select" id="ays-chart-option-org-chart-font-size" name="<?php echo $html_name_prefix; ?>settings[org_chart_font_size]">
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]">
4734 7327 <?php
4735 7328 foreach ( $org_chart_font_size_options as $option_slug => $option ):
4736 7329 $selected = ( $org_chart_font_size == $option_slug ) ? 'selected' : '';
4737 7330 ?>
4738 - <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>
4739 7332 <?php
4740 7333 endforeach;
4741 7334 ?>
4742 7335 </select>
@@ -4745,9 +7338,9 @@
4745 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">
4746 7339 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4747 7340 <label for="ays-chart-option-background-color">
4748 7341 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4749 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart container.","chart-builder") ); ?>">
7342 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart container.","chart-builder") ); ?>">
4750 7343 <i class="ays_fa ays_fa_info_circle"></i>
4751 7344 </a>
4752 7345 </label>
4753 7346 </div>
@@ -4758,9 +7351,9 @@
4758 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">
4759 7352 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4760 7353 <label for="ays-chart-option-transparent-background" class="form-label">
4761 7354 <?php echo esc_html(__( "Transparent background", "chart-builder" )); ?>
4762 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart's background transparent. When enabled, both Background Color and Chart Area Background Color options will not work","chart-builder") ); ?>">
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") ); ?>">
4763 7356 <i class="ays_fa ays_fa_info_circle"></i>
4764 7357 </a>
4765 7358 </label>
4766 7359 </div>
@@ -4774,9 +7367,9 @@
4774 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">
4775 7368 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4776 7369 <label for="ays-chart-option-border-width">
4777 7370 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4778 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container border.","chart-builder") ); ?>">
7371 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border.","chart-builder") ); ?>">
4779 7372 <i class="ays_fa ays_fa_info_circle"></i>
4780 7373 </a>
4781 7374 </label>
4782 7375 </div>
@@ -4787,9 +7380,9 @@
4787 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">
4788 7381 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4789 7382 <label for="ays-chart-option-border-color">
4790 7383 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4791 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart container.","chart-builder") ); ?>">
7384 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart container.","chart-builder") ); ?>">
4792 7385 <i class="ays_fa ays_fa_info_circle"></i>
4793 7386 </a>
4794 7387 </label>
4795 7388 </div>
@@ -4800,9 +7393,9 @@
4800 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">
4801 7394 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4802 7395 <label for="ays-chart-option-border-radius">
4803 7396 <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
4804 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border radius of the chart container.","chart-builder") ); ?>">
7397 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border radius of the chart container.","chart-builder") ); ?>">
4805 7398 <i class="ays_fa ays_fa_info_circle"></i>
4806 7399 </a>
4807 7400 </label>
4808 7401 </div>
@@ -4811,11 +7404,33 @@
4811 7404 </div>
4812 7405 </div> <!-- Border radius -->
4813 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">
4814 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">
4815 7430 <label for="ays-chart-option-box-shadow" class="form-label">
4816 7431 <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
4817 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add shadow to chart's container.","chart-builder") ); ?>">
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") ); ?>">
4818 7433 <i class="ays_fa ays_fa_info_circle"></i>
4819 7434 </a>
4820 7435 </label>
4821 7436 </div>
@@ -4829,9 +7444,9 @@
4829 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">
4830 7445 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4831 7446 <label for="ays-chart-option-box-shadow-color" class="form-label">
4832 7447 <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
4833 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
7448 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose chart container's box shadow color.","chart-builder") ); ?>">
4834 7449 <i class="ays_fa ays_fa_info_circle"></i>
4835 7450 </a>
4836 7451 </label>
4837 7452 </div>
@@ -4838,8 +7453,82 @@
4838 7453 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4839 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) ?>">
4840 7455 </div>
4841 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 -->
4842 7531 </div>
4843 7532 </div>
4844 7533 <?php
4845 7534 $content = ob_get_clean();
@@ -4853,8 +7542,273 @@
4853 7542
4854 7543 return $sources;
4855 7544 }
4856 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 +
4857 7811 public function settings_contents_chart_area_styles_settings( $sources, $args ){
4858 7812 $html_class_prefix = $args['html_class_prefix'];
4859 7813 $html_name_prefix = $args['html_name_prefix'];
4860 7814 $settings = $args['settings'];
@@ -4873,9 +7827,9 @@
4873 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">
4874 7828 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4875 7829 <label for="ays-chart-option-chart-background-color">
4876 7830 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4877 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart area.","chart-builder") ); ?>">
7831 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart area.","chart-builder") ); ?>">
4878 7832 <i class="ays_fa ays_fa_info_circle"></i>
4879 7833 </a>
4880 7834 </label>
4881 7835 </div>
@@ -4886,9 +7840,9 @@
4886 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">
4887 7841 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4888 7842 <label for="ays-chart-option-chart-border-width">
4889 7843 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4890 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border width of the chart area.","chart-builder") ); ?>">
7844 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border width of the chart area.","chart-builder") ); ?>">
4891 7845 <i class="ays_fa ays_fa_info_circle"></i>
4892 7846 </a>
4893 7847 </label>
4894 7848 </div>
@@ -4899,9 +7853,9 @@
4899 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">
4900 7854 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4901 7855 <label for="ays-chart-option-chart-border-color">
4902 7856 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4903 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart area.","chart-builder") ); ?>">
7857 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart area.","chart-builder") ); ?>">
4904 7858 <i class="ays_fa ays_fa_info_circle"></i>
4905 7859 </a>
4906 7860 </label>
4907 7861 </div>
@@ -4912,9 +7866,9 @@
4912 7866 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4913 7867 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4914 7868 <label for="ays-chart-option-chart-left-margin">
4915 7869 <?php echo esc_html(__( "Left Margin", "chart-builder" )); ?>
4916 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the chart's distance from the left border. Leave blank for auto-positioning.","chart-builder") ); ?>">
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") ); ?>">
4917 7871 <i class="ays_fa ays_fa_info_circle"></i>
4918 7872 </a>
4919 7873 </label>
4920 7874 </div>
@@ -4925,9 +7879,9 @@
4925 7879 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4926 7880 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4927 7881 <label for="ays-chart-option-chart-right-margin">
4928 7882 <?php echo esc_html(__( "Right Margin", "chart-builder" )); ?>
4929 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the chart's distance from the right border. Leave blank for auto-positioning.","chart-builder") ); ?>">
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") ); ?>">
4930 7884 <i class="ays_fa ays_fa_info_circle"></i>
4931 7885 </a>
4932 7886 </label>
4933 7887 </div>
@@ -4938,9 +7892,9 @@
4938 7892 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4939 7893 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4940 7894 <label for="ays-chart-option-chart-top-margin">
4941 7895 <?php echo esc_html(__( "Top Margin", "chart-builder" )); ?>
4942 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the chart's distance from the top border. Leave blank for auto-positioning.","chart-builder") ); ?>">
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") ); ?>">
4943 7897 <i class="ays_fa ays_fa_info_circle"></i>
4944 7898 </a>
4945 7899 </label>
4946 7900 </div>
@@ -4951,9 +7905,9 @@
4951 7905 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4952 7906 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4953 7907 <label for="ays-chart-option-chart-bottom-margin">
4954 7908 <?php echo esc_html(__( "Bottom Margin", "chart-builder" )); ?>
4955 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the chart's distance from the bottom border. Leave blank for auto-positioning.","chart-builder") ); ?>">
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") ); ?>">
4956 7910 <i class="ays_fa ays_fa_info_circle"></i>
4957 7911 </a>
4958 7912 </label>
4959 7913 </div>
@@ -5003,9 +7957,9 @@
5003 7957 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5004 7958 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5005 7959 <label for="ays-chart-option-title-color">
5006 7960 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5007 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>">
7961 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>">
5008 7962 <i class="ays_fa ays_fa_info_circle"></i>
5009 7963 </a>
5010 7964 </label>
5011 7965 </div>
@@ -5016,9 +7970,9 @@
5016 7970 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5017 7971 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5018 7972 <label for="ays-chart-option-title-font-size" class="form-label">
5019 7973 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5020 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>">
7974 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>">
5021 7975 <i class="ays_fa ays_fa_info_circle"></i>
5022 7976 </a>
5023 7977 </label>
5024 7978 </div>
@@ -5030,9 +7984,9 @@
5030 7984 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5031 7985 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5032 7986 <label for="ays-chart-option-title-bold" class="form-label">
5033 7987 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5034 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
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") ); ?>">
5035 7989 <i class="ays_fa ays_fa_info_circle"></i>
5036 7990 </a>
5037 7991 </label>
5038 7992 </div>
@@ -5046,9 +8000,9 @@
5046 8000 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5047 8001 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5048 8002 <label for="ays-chart-option-title-italic" class="form-label">
5049 8003 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5050 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
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") ); ?>">
5051 8005 <i class="ays_fa ays_fa_info_circle"></i>
5052 8006 </a>
5053 8007 </label>
5054 8008 </div>
@@ -5062,9 +8016,9 @@
5062 8016 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5063 8017 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5064 8018 <label for="ays-chart-option-title-position">
5065 8019 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5066 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>">
8020 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>">
5067 8021 <i class="ays_fa ays_fa_info_circle"></i>
5068 8022 </a>
5069 8023 </label>
5070 8024 </div>
@@ -5084,9 +8038,9 @@
5084 8038 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5085 8039 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5086 8040 <label for="ays-chart-option-title-gap" class="form-label">
5087 8041 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5088 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart container.","chart-builder") ); ?>">
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") ); ?>">
5089 8043 <i class="ays_fa ays_fa_info_circle"></i>
5090 8044 </a>
5091 8045 </label>
5092 8046 </div>
@@ -5098,9 +8052,9 @@
5098 8052 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5099 8053 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5100 8054 <label for="ays-chart-option-title-gap-description" class="form-label">
5101 8055 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5102 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart description.","chart-builder") ); ?>">
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") ); ?>">
5103 8057 <i class="ays_fa ays_fa_info_circle"></i>
5104 8058 </a>
5105 8059 </label>
5106 8060 </div>
@@ -5112,9 +8066,9 @@
5112 8066 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5113 8067 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5114 8068 <label for="ays-chart-option-title-text-transform">
5115 8069 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5116 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
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") ); ?>">
5117 8071 <i class="ays_fa ays_fa_info_circle"></i>
5118 8072 </a>
5119 8073 </label>
5120 8074 </div>
@@ -5134,9 +8088,9 @@
5134 8088 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5135 8089 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5136 8090 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5137 8091 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5138 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
8092 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
5139 8093 <i class="ays_fa ays_fa_info_circle"></i>
5140 8094 </a>
5141 8095 </label>
5142 8096 </div>
@@ -5148,9 +8102,9 @@
5148 8102 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5149 8103 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5150 8104 <label for="ays-chart-option-title-text-decoration">
5151 8105 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5152 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
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") ); ?>">
5153 8107 <i class="ays_fa ays_fa_info_circle"></i>
5154 8108 </a>
5155 8109 </label>
5156 8110 </div>
@@ -5170,9 +8124,9 @@
5170 8124 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5171 8125 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5172 8126 <label for="ays-chart-option-title-text-shadow" class="form-label">
5173 8127 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5174 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add a text shadow to chart title.","chart-builder") ); ?>">
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") ); ?>">
5175 8129 <i class="ays_fa ays_fa_info_circle"></i>
5176 8130 </a>
5177 8131 </label>
5178 8132 </div>
@@ -5186,9 +8140,9 @@
5186 8140 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5187 8141 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5188 8142 <label for="ays-chart-option-title-shadow-color">
5189 8143 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5190 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>">
8144 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>">
5191 8145 <i class="ays_fa ays_fa_info_circle"></i>
5192 8146 </a>
5193 8147 </label>
5194 8148 </div>
@@ -5238,9 +8192,9 @@
5238 8192 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5239 8193 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5240 8194 <label for="ays-chart-option-title-color">
5241 8195 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5242 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>">
8196 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>">
5243 8197 <i class="ays_fa ays_fa_info_circle"></i>
5244 8198 </a>
5245 8199 </label>
5246 8200 </div>
@@ -5251,9 +8205,9 @@
5251 8205 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5252 8206 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5253 8207 <label for="ays-chart-option-title-font-size" class="form-label">
5254 8208 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5255 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>">
8209 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>">
5256 8210 <i class="ays_fa ays_fa_info_circle"></i>
5257 8211 </a>
5258 8212 </label>
5259 8213 </div>
@@ -5265,9 +8219,9 @@
5265 8219 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5266 8220 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5267 8221 <label for="ays-chart-option-title-bold" class="form-label">
5268 8222 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5269 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>">
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") ); ?>">
5270 8224 <i class="ays_fa ays_fa_info_circle"></i>
5271 8225 </a>
5272 8226 </label>
5273 8227 </div>
@@ -5281,9 +8235,9 @@
5281 8235 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5282 8236 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5283 8237 <label for="ays-chart-option-title-italic" class="form-label">
5284 8238 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5285 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>">
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") ); ?>">
5286 8240 <i class="ays_fa ays_fa_info_circle"></i>
5287 8241 </a>
5288 8242 </label>
5289 8243 </div>
@@ -5297,9 +8251,9 @@
5297 8251 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5298 8252 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5299 8253 <label for="ays-chart-option-title-position">
5300 8254 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5301 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>">
8255 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>">
5302 8256 <i class="ays_fa ays_fa_info_circle"></i>
5303 8257 </a>
5304 8258 </label>
5305 8259 </div>
@@ -5319,9 +8273,9 @@
5319 8273 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5320 8274 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5321 8275 <label for="ays-chart-option-title-gap" class="form-label">
5322 8276 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5323 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart container.","chart-builder") ); ?>">
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") ); ?>">
5324 8278 <i class="ays_fa ays_fa_info_circle"></i>
5325 8279 </a>
5326 8280 </label>
5327 8281 </div>
@@ -5333,9 +8287,9 @@
5333 8287 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5334 8288 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5335 8289 <label for="ays-chart-option-title-gap-description" class="form-label">
5336 8290 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5337 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart description.","chart-builder") ); ?>">
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") ); ?>">
5338 8292 <i class="ays_fa ays_fa_info_circle"></i>
5339 8293 </a>
5340 8294 </label>
5341 8295 </div>
@@ -5347,9 +8301,9 @@
5347 8301 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5348 8302 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5349 8303 <label for="ays-chart-option-title-text-transform">
5350 8304 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5351 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
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") ); ?>">
5352 8306 <i class="ays_fa ays_fa_info_circle"></i>
5353 8307 </a>
5354 8308 </label>
5355 8309 </div>
@@ -5369,9 +8323,9 @@
5369 8323 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5370 8324 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5371 8325 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5372 8326 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5373 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
8327 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>">
5374 8328 <i class="ays_fa ays_fa_info_circle"></i>
5375 8329 </a>
5376 8330 </label>
5377 8331 </div>
@@ -5383,9 +8337,9 @@
5383 8337 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5384 8338 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5385 8339 <label for="ays-chart-option-title-text-decoration">
5386 8340 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5387 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>">
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") ); ?>">
5388 8342 <i class="ays_fa ays_fa_info_circle"></i>
5389 8343 </a>
5390 8344 </label>
5391 8345 </div>
@@ -5405,9 +8359,9 @@
5405 8359 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5406 8360 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5407 8361 <label for="ays-chart-option-title-text-shadow" class="form-label">
5408 8362 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5409 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add a text shadow to chart title.","chart-builder") ); ?>">
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") ); ?>">
5410 8364 <i class="ays_fa ays_fa_info_circle"></i>
5411 8365 </a>
5412 8366 </label>
5413 8367 </div>
@@ -5421,9 +8375,9 @@
5421 8375 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5422 8376 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5423 8377 <label for="ays-chart-option-title-shadow-color">
5424 8378 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5425 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>">
8379 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>">
5426 8380 <i class="ays_fa ays_fa_info_circle"></i>
5427 8381 </a>
5428 8382 </label>
5429 8383 </div>
@@ -5472,9 +8426,9 @@
5472 8426 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5473 8427 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5474 8428 <label for="ays-chart-option-description-color">
5475 8429 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5476 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>">
8430 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>">
5477 8431 <i class="ays_fa ays_fa_info_circle"></i>
5478 8432 </a>
5479 8433 </label>
5480 8434 </div>
@@ -5485,9 +8439,9 @@
5485 8439 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5486 8440 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5487 8441 <label for="ays-chart-option-description-font-size" class="form-label">
5488 8442 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5489 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>">
8443 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>">
5490 8444 <i class="ays_fa ays_fa_info_circle"></i>
5491 8445 </a>
5492 8446 </label>
5493 8447 </div>
@@ -5499,9 +8453,9 @@
5499 8453 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5500 8454 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5501 8455 <label for="ays-chart-option-description-bold" class="form-label">
5502 8456 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5503 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
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") ); ?>">
5504 8458 <i class="ays_fa ays_fa_info_circle"></i>
5505 8459 </a>
5506 8460 </label>
5507 8461 </div>
@@ -5515,9 +8469,9 @@
5515 8469 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5516 8470 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5517 8471 <label for="ays-chart-option-description-italic" class="form-label">
5518 8472 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5519 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
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") ); ?>">
5520 8474 <i class="ays_fa ays_fa_info_circle"></i>
5521 8475 </a>
5522 8476 </label>
5523 8477 </div>
@@ -5531,9 +8485,9 @@
5531 8485 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5532 8486 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5533 8487 <label for="ays-chart-option-description-position">
5534 8488 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5535 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>">
8489 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>">
5536 8490 <i class="ays_fa ays_fa_info_circle"></i>
5537 8491 </a>
5538 8492 </label>
5539 8493 </div>
@@ -5553,9 +8507,9 @@
5553 8507 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5554 8508 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5555 8509 <label for="ays-chart-option-description-text-transform">
5556 8510 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5557 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
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") ); ?>">
5558 8512 <i class="ays_fa ays_fa_info_circle"></i>
5559 8513 </a>
5560 8514 </label>
5561 8515 </div>
@@ -5575,9 +8529,9 @@
5575 8529 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5576 8530 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5577 8531 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5578 8532 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5579 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
8533 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
5580 8534 <i class="ays_fa ays_fa_info_circle"></i>
5581 8535 </a>
5582 8536 </label>
5583 8537 </div>
@@ -5589,9 +8543,9 @@
5589 8543 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5590 8544 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5591 8545 <label for="ays-chart-option-description-text-decoration">
5592 8546 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5593 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
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") ); ?>">
5594 8548 <i class="ays_fa ays_fa_info_circle"></i>
5595 8549 </a>
5596 8550 </label>
5597 8551 </div>
@@ -5611,9 +8565,9 @@
5611 8565 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5612 8566 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5613 8567 <label for="ays-chart-option-description-text-shadow" class="form-label">
5614 8568 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5615 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add a text shadow to chart description.","chart-builder") ); ?>">
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") ); ?>">
5616 8570 <i class="ays_fa ays_fa_info_circle"></i>
5617 8571 </a>
5618 8572 </label>
5619 8573 </div>
@@ -5627,9 +8581,9 @@
5627 8581 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5628 8582 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5629 8583 <label for="ays-chart-option-description-shadow-color">
5630 8584 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5631 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>">
8585 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>">
5632 8586 <i class="ays_fa ays_fa_info_circle"></i>
5633 8587 </a>
5634 8588 </label>
5635 8589 </div>
@@ -5678,9 +8632,9 @@
5678 8632 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5679 8633 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5680 8634 <label for="ays-chart-option-description-color">
5681 8635 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5682 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>">
8636 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>">
5683 8637 <i class="ays_fa ays_fa_info_circle"></i>
5684 8638 </a>
5685 8639 </label>
5686 8640 </div>
@@ -5691,9 +8645,9 @@
5691 8645 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5692 8646 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5693 8647 <label for="ays-chart-option-description-font-size" class="form-label">
5694 8648 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5695 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>">
8649 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>">
5696 8650 <i class="ays_fa ays_fa_info_circle"></i>
5697 8651 </a>
5698 8652 </label>
5699 8653 </div>
@@ -5705,9 +8659,9 @@
5705 8659 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5706 8660 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5707 8661 <label for="ays-chart-option-description-bold" class="form-label">
5708 8662 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5709 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>">
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") ); ?>">
5710 8664 <i class="ays_fa ays_fa_info_circle"></i>
5711 8665 </a>
5712 8666 </label>
5713 8667 </div>
@@ -5721,9 +8675,9 @@
5721 8675 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5722 8676 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5723 8677 <label for="ays-chart-option-description-italic" class="form-label">
5724 8678 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5725 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>">
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") ); ?>">
5726 8680 <i class="ays_fa ays_fa_info_circle"></i>
5727 8681 </a>
5728 8682 </label>
5729 8683 </div>
@@ -5737,9 +8691,9 @@
5737 8691 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5738 8692 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5739 8693 <label for="ays-chart-option-description-position">
5740 8694 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5741 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>">
8695 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>">
5742 8696 <i class="ays_fa ays_fa_info_circle"></i>
5743 8697 </a>
5744 8698 </label>
5745 8699 </div>
@@ -5759,9 +8713,9 @@
5759 8713 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5760 8714 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5761 8715 <label for="ays-chart-option-description-text-transform">
5762 8716 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5763 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
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") ); ?>">
5764 8718 <i class="ays_fa ays_fa_info_circle"></i>
5765 8719 </a>
5766 8720 </label>
5767 8721 </div>
@@ -5781,9 +8735,9 @@
5781 8735 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5782 8736 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5783 8737 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5784 8738 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5785 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
8739 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>">
5786 8740 <i class="ays_fa ays_fa_info_circle"></i>
5787 8741 </a>
5788 8742 </label>
5789 8743 </div>
@@ -5795,9 +8749,9 @@
5795 8749 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5796 8750 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5797 8751 <label for="ays-chart-option-description-text-decoration">
5798 8752 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5799 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>">
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") ); ?>">
5800 8754 <i class="ays_fa ays_fa_info_circle"></i>
5801 8755 </a>
5802 8756 </label>
5803 8757 </div>
@@ -5817,9 +8771,9 @@
5817 8771 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5818 8772 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5819 8773 <label for="ays-chart-option-description-text-shadow" class="form-label">
5820 8774 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5821 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add a text shadow to chart description.","chart-builder") ); ?>">
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") ); ?>">
5822 8776 <i class="ays_fa ays_fa_info_circle"></i>
5823 8777 </a>
5824 8778 </label>
5825 8779 </div>
@@ -5833,9 +8787,9 @@
5833 8787 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5834 8788 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5835 8789 <label for="ays-chart-option-description-shadow-color">
5836 8790 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5837 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>">
8791 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>">
5838 8792 <i class="ays_fa ays_fa_info_circle"></i>
5839 8793 </a>
5840 8794 </label>
5841 8795 </div>
@@ -5896,9 +8850,9 @@
5896 8850
5897 8851 $sources[] = $content;
5898 8852 }
5899 8853 $content_for_escape = implode('' , $sources );
5900 - echo html_entity_decode(esc_html( $content_for_escape ));
8854 + echo html_entity_decode( esc_html($content_for_escape) );
5901 8855 }
5902 8856
5903 8857 public function settings_contents_advanced_settings( $sources, $args ){
5904 8858 $html_class_prefix = $args['html_class_prefix'];
@@ -6003,9 +8957,9 @@
6003 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">
6004 8958 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6005 8959 <label for="ays-chart-option-slice-text">
6006 8960 <?php echo esc_html(__( "Slice text", "chart-builder" )); ?>
6007 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the content of the text to be displayed on the pie slice.","chart-builder") ); ?>">
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") ); ?>">
6008 8962 <i class="ays_fa ays_fa_info_circle"></i>
6009 8963 </a>
6010 8964 </label>
6011 8965 </div>
@@ -6025,9 +8979,9 @@
6025 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">
6026 8980 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6027 8981 <label for="ays-chart-option-tooltip-text">
6028 8982 <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?>
6029 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose how to display the text in the chart tooltip.","chart-builder") ); ?>">
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") ); ?>">
6030 8984 <i class="ays_fa ays_fa_info_circle"></i>
6031 8985 </a>
6032 8986 </label>
6033 8987 </div>
@@ -6060,9 +9014,9 @@
6060 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">
6061 9015 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6062 9016 <label for="ays-chart-option-data-grouping-label" class="form-label">
6063 9017 <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?>
6064 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("A label for the combination slice that holds all slices below chart data grouping limit.","chart-builder") ); ?>">
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") ); ?>">
6065 9019 <i class="ays_fa ays_fa_info_circle"></i>
6066 9020 </a>
6067 9021 </label>
6068 9022 </div>
@@ -6103,17 +9057,18 @@
6103 9057 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6104 9058 <label for="ays-chart-option-focus-target">
6105 9059 <?php echo esc_html(__( "Focus target", "chart-builder" )); ?>
6106 9060 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6107 - echo htmlspecialchars( sprintf(
9061 + echo esc_html( sprintf(
9062 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6108 9063 "<p>" . __('There are two ways to focus the data table elements.', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6109 - __('%sSingle data:%s If you choose the Single Data option, the focus will be on the single data point. By this, the particular cell of the data table will be focused.', "chart-builder") . "</li><li>" .
6110 - __('%sGroup data:%s If you choose the Group Data option, the focus will be on the grouped data points. By this, a row of the data table will be focused.', "chart-builder") . "</li></ul>",
6111 - '<em>',
6112 - '</em>',
6113 - '<em>',
6114 - '</em>'
6115 - ) );
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 + ));
6116 9071 ?>">
6117 9072 <i class="ays_fa ays_fa_info_circle"></i>
6118 9073 </a>
6119 9074 </label>
@@ -6148,17 +9103,18 @@
6148 9103 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6149 9104 <label for="ays-chart-option-group-width">
6150 9105 <?php echo esc_html(__( "Bar width", "chart-builder" )); ?>
6151 9106 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6152 - echo htmlspecialchars( sprintf(
9107 + echo esc_html( sprintf(
9108 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6153 9109 "<p>" . __('The width of the bars, specified in either of these formats:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6154 - __('%sPixels:%s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
6155 - __('%sPercentage:%s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
6156 - '<em>',
6157 - '</em>',
6158 - '<em>',
6159 - '</em>'
6160 - ) );
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 + ));
6161 9117 ?>">
6162 9118 <i class="ays_fa ays_fa_info_circle"></i>
6163 9119 </a>
6164 9120 </label>
@@ -6210,23 +9166,24 @@
6210 9166 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6211 9167 <label for="ays-chart-option-multiple-data-format">
6212 9168 <?php echo esc_html(__( "Multiple data format", "chart-builder" )); ?>
6213 9169 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6214 - echo htmlspecialchars( sprintf(
9170 + echo esc_html( sprintf(
9171 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6215 9172 "<p>" . __('How multiple data selections are rolled up into tooltips:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6216 - __('%sCategory:%s Group selected data by row titles.', "chart-builder") . "</li><li>" .
6217 - __('%sSeries:%s Group selected data by column titles.', "chart-builder") . "</li><li>" .
6218 - __('%sAuto:%s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
6219 - __('%sNone:%s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
6220 - '<em>',
6221 - '</em>',
6222 - '<em>',
6223 - '</em>',
6224 - '<em>',
6225 - '</em>',
6226 - '<em>',
6227 - '</em>'
6228 - ) );
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 + ));
6229 9186 ?>">
6230 9187 <i class="ays_fa ays_fa_info_circle"></i>
6231 9188 </a>
6232 9189 </label>
@@ -6381,15 +9338,15 @@
6381 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) ?>">
6382 9339 </div>
6383 9340 </div> <!-- Line dash pattern -->
6384 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">
6385 - <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">
6386 9343 <label for="ays-chart-option-donut-hole-size">
6387 - <?php echo __( "Hole size", $this->plugin_name ); ?>
9344 + <?php echo esc_html(__( "Hole size", 'chart-builder' )); ?>
6388 9345 </label>
6389 9346 </div>
6390 - <div class="col-sm-7 <?= $html_class_prefix ?>input-align-right <?= $html_class_prefix ?>option-input">
6391 - <input class="ays-text-input form-control <?= $html_class_prefix ?>option-text-input" id="ays-chart-option-donut-hole-size" type="number" min="0" max="1" step=".1" name="<?php echo $html_name_prefix; ?>settings[donut_hole_size]" value="<?= $donut_hole_size ?>">
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) ?>">
6392 9349 </div>
6393 9350 </div> <!-- Donut hole size -->
6394 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">
6395 9352 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
@@ -6396,20 +9353,20 @@
6396 9353 <div class="ays-pro-features-v2-video-button"></div>
6397 9354 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
6398 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>
6399 9356 <div class="ays-pro-features-v2-upgrade-text">
6400 - <?php echo __("Upgrade" , "chart-builder"); ?>
9357 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
6401 9358 </div>
6402 9359 </a>
6403 9360 </div>
6404 - <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">
6405 9362 <label for="ays-chart-option-curve-type">
6406 - <?php echo __( "Line curve type", "chart-builder" ); ?>
9363 + <?php echo esc_html(__( "Line curve type", "chart-builder" )); ?>
6407 9364 </label>
6408 9365 </div>
6409 9366 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
6410 - <select class="<?= $html_class_prefix ?>option-select-input form-select" id="ays-chart-option-line-curve-type" name="<?php echo $html_name_prefix; ?>settings[line_curve_type]">
6411 - <option><?php echo __( "Straight", "chart-builder" ); ?></option>
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>
6412 9369 </select>
6413 9370 </div>
6414 9371 </div> <!-- Line curve type -->
6415 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">
@@ -6457,9 +9414,9 @@
6457 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">
6458 9415 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6459 9416 <label for="ays-chart-option-org-classname" class="form-label">
6460 9417 <?php echo esc_html(__( "Custom CSS class", "chart-builder" )); ?>
6461 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("A class name to assign to node elements to specify styles for the chart elements.","chart-builder") ); ?>">
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") ); ?>">
6462 9419 <i class="ays_fa ays_fa_info_circle"></i>
6463 9420 </a>
6464 9421 </label>
6465 9422 </div>
@@ -6470,9 +9427,11 @@
6470 9427 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6471 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">
6472 9429 <br>
6473 9430 <blockquote>
6474 - <?php echo sprintf(__( "%sNote:%s Custom CSS class must be set for the options below to take effect.", $this->plugin_name ), '<strong>', '</strong>'); ?>
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>'); ?>
6475 9434 </blockquote>
6476 9435 <br>
6477 9436 </div>
6478 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">
@@ -6570,9 +9529,9 @@
6570 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">
6571 9530 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6572 9531 <label for="ays-chart-option-org-selected-classname" class="form-label">
6573 9532 <?php echo esc_html(__( "Selected node custom CSS class", "chart-builder" )); ?>
6574 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("A class name to assign to node elements to specify styles for the selected chart elements.","chart-builder") ); ?>">
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") ); ?>">
6575 9534 <i class="ays_fa ays_fa_info_circle"></i>
6576 9535 </a>
6577 9536 </label>
6578 9537 </div>
@@ -6583,9 +9542,14 @@
6583 9542 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6584 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">
6585 9544 <br>
6586 9545 <blockquote>
6587 - <?php echo sprintf(__( "%sNote:%s Selected node custom CSS class must be set for the options below to take effect.", $this->plugin_name ), '<strong>', '</strong>'); ?>
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 + ); ?>
6588 9552 </blockquote>
6589 9553 <br>
6590 9554 </div>
6591 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">
@@ -6637,8 +9601,16 @@
6637 9601 $outer_radius = $settings['outer_radius'];
6638 9602 $slice_spacing = $settings['slice_spacing'];
6639 9603 $circumference = $settings['circumference'];
6640 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'];
6641 9613 // $index_axis = $settings['index_axis'];
6642 9614
6643 9615 ob_start();
6644 9616 ?>
@@ -6699,8 +9671,108 @@
6699 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) ?>">
6700 9672 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">°</div>
6701 9673 </div>
6702 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 -->
6703 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">
6704 9776 <div class="col-sm-5 d-flex align-items-center <?php // echo esc_attr($html_class_prefix) ?>option-title">
6705 9777 <label for="ays-chart-option-index-axis">
6706 9778 <?php // echo esc_html(__( "Horizontal ", "chart-builder" )); ?>
@@ -6743,15 +9815,15 @@
6743 9815 if ( !isset( $source[0] ) ) {
6744 9816 if (count($source[1]) > 2) {
6745 9817 $titles = array();
6746 9818 for ($i = 0; $i < count($source[1]); $i++) {
6747 - array_push($titles, __("Title", $this->plugin_name).$i);
9819 + array_push($titles, __("Title", 'chart-builder').$i);
6748 9820 }
6749 9821 $source[0] = $titles;
6750 9822 } else {
6751 9823 $source[0] = array(
6752 - __("Country", $this->plugin_name),
6753 - __("Population", $this->plugin_name),
9824 + __("Country", 'chart-builder'),
9825 + __("Population", 'chart-builder'),
6754 9826 );
6755 9827 }
6756 9828
6757 9829 ksort($source);
@@ -6784,9 +9856,9 @@
6784 9856 <g>
6785 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" />
6786 9858 </g>
6787 9859 </svg>
6788 - <span><?php echo $val[0]; ?></span>
9860 + <span><?php echo esc_html($val[0]); ?></span>
6789 9861 </legend>
6790 9862 <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
6791 9863 <div class="ays-slices-accordion-data-main-wrap">
6792 9864 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6793,9 +9865,9 @@
6793 9865 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6794 9866 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6795 9867 <label for="ays-chart-option-slice-color">
6796 9868 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
6797 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for this slice.","chart-builder") ); ?>">
9869 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice.","chart-builder") ); ?>">
6798 9870 <i class="ays_fa ays_fa_info_circle"></i>
6799 9871 </a>
6800 9872 </label>
6801 9873 </div>
@@ -6800,13 +9872,13 @@
6800 9872 </label>
6801 9873 </div>
6802 9874 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6803 9875 <input type="color"
6804 - id="ays-chart-option-slice-color-<?php echo $key; ?>"
9876 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
6805 9877 class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6806 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo $key; ?>]"
6807 - value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : $slice_colors_default[$key]; ?>"
6808 - data-slice-id="<?php echo $key; ?>">
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); ?>">
6809 9881 </div>
6810 9882 </div> <!-- Slice color -->
6811 9883 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6812 9884 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6818,13 +9890,13 @@
6818 9890 </label>
6819 9891 </div>
6820 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">
6821 9893 <input type="number"
6822 - id="ays-chart-option-slice-offset-<?php echo $key; ?>"
9894 + id="ays-chart-option-slice-offset-<?php echo esc_attr($key); ?>"
6823 9895 class="ays-chart-option-slice-offset ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
6824 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo $key; ?>]"
9896 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo esc_attr($key); ?>]"
6825 9897 value="<?php echo isset($slice_offset[$key]) ? esc_attr($slice_offset[$key]) : 0 ; ?>"
6826 - data-slice-id="<?php echo $key; ?>"
9898 + data-slice-id="<?php echo esc_attr($key); ?>"
6827 9899 step=".01" min="0.0" max="1.0">
6828 9900 </div>
6829 9901 </div> <!-- Slice offset -->
6830 9902 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
@@ -6830,9 +9902,9 @@
6830 9902 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6831 9903 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6832 9904 <label for="ays-chart-option-slice-text-color">
6833 9905 <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
6834 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for the text of this slice.","chart-builder") ); ?>">
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") ); ?>">
6835 9907 <i class="ays_fa ays_fa_info_circle"></i>
6836 9908 </a>
6837 9909 </label>
6838 9910 </div>
@@ -6837,13 +9909,13 @@
6837 9909 </label>
6838 9910 </div>
6839 9911 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6840 9912 <input type="color"
6841 - id="ays-chart-option-slice-text-color-<?php echo $key; ?>"
9913 + id="ays-chart-option-slice-text-color-<?php echo esc_attr($key); ?>"
6842 9914 class="ays-chart-option-slice-text-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6843 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo $key; ?>]"
9915 + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo esc_attr($key); ?>]"
6844 9916 value="<?php echo isset($slice_text_color[$key]) ? esc_attr($slice_text_color[$key]) : '#ffffff'; ?>"
6845 - data-slice-id="<?php echo $key; ?>">
9917 + data-slice-id="<?php echo esc_attr($key); ?>">
6846 9918 </div>
6847 9919 </div> <!-- Slice color -->
6848 9920 </div>
6849 9921 </div>
@@ -6855,9 +9927,9 @@
6855 9927 </div>
6856 9928 </div>
6857 9929 <br>
6858 9930 <blockquote>
6859 - <?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" )); ?>
6860 9932 </blockquote>
6861 9933 </div>
6862 9934 <?php
6863 9935
@@ -6868,9 +9940,9 @@
6868 9940 }
6869 9941
6870 9942 $content = ob_get_clean();
6871 9943
6872 - $title = __( 'Slices settings', "chart-builder" );
9944 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
6873 9945
6874 9946 $sources['slices_settings'] = array(
6875 9947 'content' => $content,
6876 9948 'title' => $title
@@ -6877,9 +9949,139 @@
6877 9949 );
6878 9950
6879 9951 return $sources;
6880 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);
6881 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 +
6882 10084 public function settings_contents_series_settings( $sources, $args ){
6883 10085 $html_class_prefix = $args['html_class_prefix'];
6884 10086 $html_name_prefix = $args['html_name_prefix'];
6885 10087 $settings = $args['settings'];
@@ -6896,15 +10098,15 @@
6896 10098 if ( !isset( $source[0] ) ) {
6897 10099 if (count($source[1]) > 2) {
6898 10100 $titles = array();
6899 10101 for ($i = 0; $i < count($source[1]); $i++) {
6900 - array_push($titles, __("Title", $this->plugin_name).$i);
10102 + array_push($titles, __("Title", "chart-builder").$i);
6901 10103 }
6902 10104 $source[0] = $titles;
6903 10105 } else {
6904 10106 $source[0] = array(
6905 - __("Country", $this->plugin_name),
6906 - __("Population", $this->plugin_name),
10107 + __("Country", "chart-builder"),
10108 + __("Population", "chart-builder"),
6907 10109 );
6908 10110 }
6909 10111
6910 10112 ksort($source);
@@ -6922,8 +10124,9 @@
6922 10124 $series_row = array_shift($source);
6923 10125 $title = array_shift($series_row);
6924 10126 $series_color = $settings['series_color'];
6925 10127 $series_colors_default = $settings['series_colors_default'];
10128 + $series_format = $settings['series_format'];
6926 10129 $series_visible_in_legend = $settings['series_visible_in_legend'];
6927 10130 $series_line_width = $settings['series_line_width'];
6928 10131 $series_point_size = $settings['series_point_size'];
6929 10132 $series_point_shape = $settings['series_point_shape'];
@@ -6941,9 +10144,9 @@
6941 10144 <g>
6942 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" />
6943 10146 </g>
6944 10147 </svg>
6945 - <span><?php echo $val; ?></span>
10148 + <span><?php echo esc_attr($val); ?></span>
6946 10149 </legend>
6947 10150 <div class="ays-series-accordion-options-content ays-series-accordion-options-content">
6948 10151 <div class="ays-series-accordion-data-main-wrap">
6949 10152 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6954,13 +10157,13 @@
6954 10157 </label>
6955 10158 </div>
6956 10159 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6957 10160 <input type="color"
6958 - id="ays-chart-option-series-color-<?php echo $key; ?>"
10161 + id="ays-chart-option-series-color-<?php echo esc_attr($key); ?>"
6959 10162 class="ays-chart-option-series-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6960 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo $key; ?>]"
6961 - value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : $series_colors_default[$key]; ?>"
6962 - data-series-id="<?php echo $key; ?>">
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); ?>">
6963 10166 </div>
6964 10167 </div> <!-- series color -->
6965 10168 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6966 10169 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6973,18 +10176,36 @@
6973 10176 </div>
6974 10177 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6975 10178 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
6976 10179 <input type="checkbox"
6977 - 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); ?>"
6978 10181 class="ays-chart-option-series-visible-in-legend <?php echo esc_attr($html_class_prefix) ?>toggle-switch"
6979 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo $key; ?>]"
10182 + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo esc_attr($key); ?>]"
6980 10183 value="on"
6981 - data-series-id="<?php echo $key; ?>"
10184 + data-series-id="<?php echo esc_attr($key); ?>"
6982 10185 <?php echo isset($series_visible_in_legend[$key]) && $series_visible_in_legend[$key] == 'on' ? 'checked' : (!isset($series_color[$key]) ? 'checked' : ''); ?> >
6983 10186 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
6984 10187 </label>
6985 10188 </div>
6986 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 -->
6987 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">
6988 10209 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6989 10210 <label for="ays-chart-option-series-line-width">
6990 10211 <?php echo esc_html(__( "Line width", "chart-builder" )); ?>
@@ -6994,13 +10215,13 @@
6994 10215 </label>
6995 10216 </div>
6996 10217 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6997 10218 <input type="number"
6998 - id="ays-chart-option-series-line-width-<?php echo $key; ?>"
10219 + id="ays-chart-option-series-line-width-<?php echo esc_attr($key); ?>"
6999 10220 class="ays-chart-option-series-line-width ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7000 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo $key; ?>]"
7001 - value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : $line_width; ?>"
7002 - data-series-id="<?php echo $key; ?>">
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); ?>">
7003 10224 </div>
7004 10225 </div> <!-- Line width -->
7005 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">
7006 10227 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7012,13 +10233,13 @@
7012 10233 </label>
7013 10234 </div>
7014 10235 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7015 10236 <input type="number"
7016 - id="ays-chart-option-series-point-size-<?php echo $key; ?>"
10237 + id="ays-chart-option-series-point-size-<?php echo esc_attr($key); ?>"
7017 10238 class="ays-chart-option-series-point-size ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7018 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo $key; ?>]"
7019 - value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : $point_size; ?>"
7020 - data-series-id="<?php echo $key; ?>">
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); ?>">
7021 10242 </div>
7022 10243 </div> <!-- Point size -->
7023 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">
7024 10245 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7030,12 +10251,12 @@
7030 10251 </label>
7031 10252 </div>
7032 10253 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7033 10254 <select
7034 - id="ays-chart-option-series-point-shape-<?php echo $key; ?>"
10255 + id="ays-chart-option-series-point-shape-<?php echo esc_attr($key); ?>"
7035 10256 class="ays-chart-option-series-point-shape <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select"
7036 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo $key; ?>]"
7037 - data-series-id="<?php echo $key; ?>">
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); ?>">
7038 10259 >
7039 10260 <?php
7040 10261 $value = isset($series_point_shape[$key]) ? esc_attr($series_point_shape[$key]) : $point_shape;
7041 10262 foreach ( $point_shape_options as $option_slug => $option ):
@@ -7058,11 +10279,16 @@
7058 10279 </div>
7059 10280 </div>
7060 10281 <br>
7061 10282 <blockquote>
7062 - <?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' )); ?>
7063 10284 <br>
7064 - <?php echo sprintf(__( "%sNote:%s If you are not able to set the options, disable the row settings feature.", $this->plugin_name ), '<strong>', '</strong>'); ?>
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 + ); ?>
7065 10291 </blockquote>
7066 10292 </div>
7067 10293 <?php
7068 10294
@@ -7096,15 +10322,15 @@
7096 10322 if ( !isset( $source[0] ) ) {
7097 10323 if (count($source[1]) > 2) {
7098 10324 $titles = array();
7099 10325 for ($i = 0; $i < count($source[1]); $i++) {
7100 - array_push($titles, __("Title", $this->plugin_name).$i);
10326 + array_push($titles, __("Title", 'chart-builder').$i);
7101 10327 }
7102 10328 $source[0] = $titles;
7103 10329 } else {
7104 10330 $source[0] = array(
7105 - __("Country", $this->plugin_name),
7106 - __("Population", $this->plugin_name),
10331 + __("Country", 'chart-builder'),
10332 + __("Population", 'chart-builder'),
7107 10333 );
7108 10334 }
7109 10335
7110 10336 ksort($source);
@@ -7150,9 +10376,9 @@
7150 10376 <g>
7151 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" />
7152 10378 </g>
7153 10379 </svg>
7154 - <span><?php echo $val; ?></span>
10380 + <span><?php echo esc_html($val); ?></span>
7155 10381 </legend>
7156 10382 <div class="ays-rows-accordion-options-content ays-rows-accordion-options-content">
7157 10383 <div class="ays-rows-accordion-data-main-wrap">
7158 10384 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7163,13 +10389,13 @@
7163 10389 </label>
7164 10390 </div>
7165 10391 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7166 10392 <input type="color"
7167 - id="ays-chart-option-rows-color-<?php echo $key; ?>"
10393 + id="ays-chart-option-rows-color-<?php echo esc_attr($key); ?>"
7168 10394 class="ays-chart-option-rows-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7169 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo $key; ?>]"
7170 - value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : $series_color; ?>"
7171 - data-rows-id="<?php echo $key; ?>">
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); ?>">
7172 10398 </div>
7173 10399 </div> <!-- color -->
7174 10400 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7175 10401 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7178,13 +10404,13 @@
7178 10404 </label>
7179 10405 </div>
7180 10406 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7181 10407 <input type="number"
7182 - id="ays-chart-option-rows-opacity-<?php echo $key; ?>"
10408 + id="ays-chart-option-rows-opacity-<?php echo esc_attr($key); ?>"
7183 10409 class="ays-chart-option-rows-opacity ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7184 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo $key; ?>]"
10410 + name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo esc_attr($key); ?>]"
7185 10411 value="<?php echo isset($rows_opacity[$key]) && '' !== $rows_opacity[$key] ? esc_attr($rows_opacity[$key]) : 1.0; ?>"
7186 - data-rows-id="<?php echo $key; ?>"
10412 + data-rows-id="<?php echo esc_attr($key); ?>"
7187 10413 step=".1" min="0" max="1">
7188 10414 </div>
7189 10415 </div> <!-- opacity -->
7190 10416 </div>
@@ -7195,17 +10421,27 @@
7195 10421 endforeach;
7196 10422 ?>
7197 10423 <br>
7198 10424 <blockquote>
7199 - <?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' )); ?>
7200 10426 <br>
7201 - <?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 + ); ?>
7202 10433 </blockquote>
7203 10434 </div>
7204 10435 <div class="<?php echo esc_attr($html_class_prefix) ?>not-hidden-options-section <?php echo $enable_row_settings === 'checked' ? 'display_none' : ''; ?>">
7205 10436 <br>
7206 10437 <blockquote>
7207 - <?php echo sprintf(__( "%sNote:%s If this option is disabled, the general options will be set from the series settings.", $this->plugin_name ), '<strong>', '</strong>'); ?>
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 + ); ?>
7208 10444 </blockquote>
7209 10445 </div>
7210 10446 </div>
7211 10447 </div>
@@ -7220,5 +10456,60 @@
7220 10456 );
7221 10457
7222 10458 return $sources;
7223 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 +
7224 10515 }