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 +3908 -524 3.0.0 → 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 - // $this->ays_chart_black_friday_message($ays_chart_builder_flag);
763 893 // $this->ays_chart_christmas_message($ays_chart_builder_flag);
764 894 // $this->ays_chart_silver_bundle_message($ays_chart_builder_flag);
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,22 +2054,1458 @@
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 );
2063 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
2064 + }
2065 + }
2066 +
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){
2180 + if($ishmar == 0 ){
2181 + $content = array();
2182 +
2183 + $content[] = '<div id="ays-chart-christmas-top-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
2184 + $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
2185 +
2186 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
2187 +
2188 + $content[] = '<div id="ays-chart-countdown-main-container">';
2189 + $content[] = '<div class="ays-chart-countdown-container">';
2190 +
2191 + $content[] = '<div id="ays-chart-countdown">';
2192 +
2193 + $content[] = '<div>';
2194 + $content[] = __( "Offer ends in:", 'chart-builder' );
2195 + $content[] = '</div>';
2196 +
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>';
2202 + $content[] = '</ul>';
2203 + $content[] = '</div>';
2204 +
2205 + $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
2206 + $content[] = '<span>🚀</span>';
2207 + $content[] = '<span>⌛</span>';
2208 + $content[] = '<span>🔥</span>';
2209 + $content[] = '<span>💣</span>';
2210 + $content[] = '</div>';
2211 +
2212 + $content[] = '</div>';
2213 + $content[] = '</div>';
2214 +
2215 + $content[] = '</div>';
2216 +
2217 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
2218 + $content[] = '<div>';
2219 +
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 + );
2229 + $content[] = '</span>';
2230 +
2231 + $content[] = '</br>';
2232 +
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' );
2236 + $content[] = '</a>';
2237 + $content[] = '</span>';
2238 + $content[] = '</div>';
2239 +
2240 + $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
2241 +
2242 + $content[] = '<form action="" method="POST">';
2243 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
2244 + if( current_user_can( 'manage_options' ) ){
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>';
2246 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
2247 + }
2248 + $content[] = '</div>';
2249 + $content[] = '</form>';
2250 +
2251 + $content[] = '</div>';
2252 +
2253 + $content[] = '</div>';
2254 +
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>';
2262 + $content[] = '</div>';
2263 +
2264 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
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>';
2266 + $content[] = '<span class="ays-chart-dicount-one-time-text">';
2267 + $content[] = __( "One-time payment", 'chart-builder' );
2268 + $content[] = '</span>';
2269 + $content[] = '</div>';
2270 + $content[] = '</div>';
2271 + $content[] = '</div>';
2272 +
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 +
1221 3010 echo $content;
1222 3011 }
1223 3012 }
1224 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 +
1225 3500 public function ays_chart_update_banner_time(){
3501 + if (!current_user_can('manage_options')) {
3502 + return array('error' => 'Insufficient permissions');
3503 + }
1226 3504
1227 3505 $date = time() + ( 3 * 24 * 60 * 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1228 3506 // $date = time() + ( 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS); // for testing | 1 min
1229 - $next_3_days = date('M d, Y H:i:s', $date);
3507 + $next_3_days = gmdate('M d, Y H:i:s', $date);
1230 3508
1231 3509 $ays_chart_banner_time = get_option('ays_chart_20_bundle_banner_time');
1232 3510
1233 3511 if ( !$ays_chart_banner_time || is_null( $ays_chart_banner_time ) ) {
@@ -1250,11 +3528,26 @@
1250 3528
1251 3529 return $get_ays_chart_banner_time;
1252 3530 }
1253 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 +
1254 3547 public function author_user_search() {
1255 3548 check_ajax_referer( 'cbuilder-author-user-search', 'security' );
1256 - $params = $_REQUEST['params'];
3549 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1257 3550 $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null;
1258 3551 $checked = isset($params['val']) && $params['val'] !='' ? sanitize_text_field( $params['val'] ) : null;
1259 3552 $args = 'search=';
1260 3553 if ($search !== null) {
@@ -1371,10 +3664,11 @@
1371 3664 */
1372 3665 public function ays_chart_activate_plugin() {
1373 3666
1374 3667 // Run a security check.
1375 - 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' );
1376 3669
3670 +
1377 3671 // Check for permissions.
1378 3672 if ( ! current_user_can( 'activate_plugins' ) ) {
1379 3673 wp_send_json_error( esc_html__( 'Plugin activation is disabled for you on this site.', 'chart-builder' ) );
1380 3674 }
@@ -1414,10 +3708,11 @@
1414 3708 */
1415 3709 public function ays_chart_install_plugin() {
1416 3710
1417 3711 // Run a security check.
1418 - 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' );
1419 3713
3714 +
1420 3715 $generic_error = esc_html__( 'There was an error while performing your request.', 'chart-builder' );
1421 3716 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : '';
1422 3717
1423 3718 // Check if new installations are allowed.
@@ -1533,11 +3828,13 @@
1533 3828
1534 3829 $images_url = CHART_BUILDER_ADMIN_URL . '/images/icons/';
1535 3830
1536 3831 $plugin_slug = array(
3832 + 'fox-lms',
1537 3833 'quiz-maker',
1538 3834 'survey-maker',
1539 3835 'poll-maker',
3836 + 'chart-builder',
1540 3837 'ays-popup-box',
1541 3838 'secure-copy-content-protection',
1542 3839 'gallery-photo-gallery',
1543 3840 'ays-chatgpt-assistant',
@@ -1547,9 +3844,9 @@
1547 3844 $plugin_url_arr = array();
1548 3845 foreach ($plugin_slug as $key => $slug) {
1549 3846 if ( isset( $_SESSION['ays_chart_our_product_links'] ) && !empty( $_SESSION['ays_chart_our_product_links'] )
1550 3847 && isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && !empty( $_SESSION['ays_chart_our_product_links'][$slug] ) ) {
1551 - $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])) : "";
1552 3849 } else {
1553 3850 $latest_version = $this->ays_chart_get_latest_plugin_version($slug);
1554 3851 $plugin_url = 'https://downloads.wordpress.org/plugin/'. $slug .'.zip';
1555 3852 if ( $latest_version != '' ) {
@@ -1561,13 +3858,22 @@
1561 3858 $plugin_url_arr[$slug] = $plugin_url;
1562 3859 }
1563 3860
1564 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 + ),
1565 3871 'quiz-maker/quiz-maker.php' => array(
1566 3872 'icon' => $images_url . 'icon-quiz-128x128.png',
1567 - 'name' => __( 'Quiz Maker', "easy-form" ),
1568 - 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', "easy-form" ),
1569 - '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' ),
1570 3876 'wporg' => 'https://wordpress.org/plugins/quiz-maker/',
1571 3877 'buy_now' => 'https://ays-pro.com/wordpress/quiz-maker/',
1572 3878 'url' => $plugin_url_arr['quiz-maker'],
1573 3879 ),
@@ -1607,9 +3913,9 @@
1607 3913 'buy_now' => 'https://ays-pro.com/wordpress/secure-copy-content-protection/',
1608 3914 'url' => $plugin_url_arr['secure-copy-content-protection'],
1609 3915 ),
1610 3916 'gallery-photo-gallery/gallery-photo-gallery.php' => array(
1611 - 'icon' => $images_url . 'icon-gallery-128x128.jpg',
3917 + 'icon' => $images_url . 'icon-gallery-128x128.png',
1612 3918 'name' => __( 'Gallery Photo Gallery', 'chart-builder' ),
1613 3919 'desc' => __( 'Create unlimited galleries and include unlimited images in those galleries.', 'chart-builder' ),
1614 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' ),
1615 3921 'wporg' => 'https://wordpress.org/plugins/gallery-photo-gallery/',
@@ -1666,9 +3972,10 @@
1666 3972 if ( is_wp_error( $call_api ) ) {
1667 3973 $api_error = $call_api->get_error_message();
1668 3974 } else {
1669 3975
1670 - //echo $call_api; // everything ##
3976 + //echo $call_api;
3977 + // everything ##
1671 3978 if ( ! empty( $call_api->version ) ) {
1672 3979 $version_latest = $call_api->version;
1673 3980 }
1674 3981 }
@@ -1808,9 +4115,9 @@
1808 4115 <span aria-hidden="true" class="dashicons dashicons-external"></span>
1809 4116 </a>';
1810 4117 }
1811 4118 $content .='
1812 - <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>
1813 4120 </div>
1814 4121 </div>';
1815 4122 }
1816 4123 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
@@ -1816,9 +4123,9 @@
1816 4123 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
1817 4124 $content.= '<input type="hidden" id="ays_chart_ajax_install_plugin_nonce" name="ays_chart_ajax_install_plugin_nonce" value="'. $install_plugin_nonce .'">';
1818 4125 $content.= '</div>';
1819 4126
1820 - echo $content;
4127 + echo html_entity_decode($content);
1821 4128 }
1822 4129
1823 4130 /**
1824 4131 * Returns the data from Quiz maker.
@@ -1827,9 +4134,9 @@
1827 4134 */
1828 4135 public function fetch_quiz_maker_data(){
1829 4136 check_ajax_referer( 'cbuilder-fetch-quiz-maker-data', 'security' );
1830 4137
1831 - $params = $_POST['params'];
4138 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
1832 4139 if ( !isset($params) || empty($params) ) {
1833 4140 return array(
1834 4141 'success' => false,
1835 4142 'data' => array(
@@ -1951,9 +4258,9 @@
1951 4258 */
1952 4259 public function save_quiz_maker_data() {
1953 4260 check_ajax_referer( 'cbuilder-save-quiz-maker-data', 'security' );
1954 4261
1955 - $params = $_POST['params'];
4262 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
1956 4263 if ( !isset($params) || empty($params) ) {
1957 4264 return array(
1958 4265 'success' => false,
1959 4266 'data' => array(
@@ -2067,9 +4374,9 @@
2067 4374 'data' => array(
2068 4375 'msg' => __( 'Data was successfully saved.', "chart-builder" )
2069 4376 )
2070 4377 );
2071 - }
4378 + }
2072 4379
2073 4380 /**
2074 4381 * Chart page action hooks
2075 4382 */
@@ -2113,9 +4420,9 @@
2113 4420
2114 4421 $sources[] = $content;
2115 4422 }
2116 4423 $content_for_escape = implode('' , $sources );
2117 - echo html_entity_decode(esc_html( $content_for_escape ));
4424 + echo html_entity_decode( esc_html($content_for_escape) );
2118 4425 }
2119 4426
2120 4427 public function source_contents_import_from_csv_settings( $sources, $args ){
2121 4428 $html_class_prefix = $args['html_class_prefix'];
@@ -2127,25 +4434,25 @@
2127 4434 <div class="ays-pro-features-v2-big-buttons-box">
2128 4435 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2129 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>
2130 4437 <div class="ays-pro-features-v2-video-text">
2131 - <?php echo __("Watch Video" , "chart-builder"); ?>
4438 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2132 4439 </div>
2133 4440 </a>
2134 4441 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2135 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>
2136 4443 <div class="ays-pro-features-v2-upgrade-text">
2137 - <?php echo __("Upgrade" , "chart-builder"); ?>
4444 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2138 4445 </div>
2139 4446 </a>
2140 4447 </div>
2141 - <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">
2142 4449 <div class="<?php echo esc_attr($html_class_prefix) ?>file-import-form">
2143 - <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>
2144 4451 <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>import-files-file-type">
2145 4452 <option value="csv">CSV File</option>
2146 4453 </select>
2147 - <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>
2148 4455 <p class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example" style="font-size: 15px; font-style: italic;">Example:
2149 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>
2150 4457 </p>
2151 4458 <div>
@@ -2154,16 +4461,16 @@
2154 4461 <div class='ays-chart-file-import-success'></div>
2155 4462 <div class='ays-chart-file-import-error'></div>
2156 4463 <div class="ays-chart-buttons-group">
2157 4464 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-fetch">
2158 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4465 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2159 4466 </button>
2160 4467 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-show-on-chart">
2161 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>
2162 - <?php echo __( 'Preview', "chart-builder" ); ?>
4469 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2163 4470 </button>
2164 4471 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-save">
2165 - <?php echo __( 'Save data', "chart-builder" ); ?>
4472 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2166 4473 </button>
2167 4474 </div>
2168 4475 </div>
2169 4476 </div>
@@ -2193,38 +4500,38 @@
2193 4500 <div class="ays-pro-features-v2-big-buttons-box">
2194 4501 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2195 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>
2196 4503 <div class="ays-pro-features-v2-video-text">
2197 - <?php echo __("Watch Video" , "chart-builder"); ?>
4504 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2198 4505 </div>
2199 4506 </a>
2200 4507 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2201 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>
2202 4509 <div class="ays-pro-features-v2-upgrade-text">
2203 - <?php echo __("Upgrade" , "chart-builder"); ?>
4510 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2204 4511 </div>
2205 4512 </a>
2206 4513 </div>
2207 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2208 - <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">
2209 4516 <div id="ays-chart-db-query">
2210 - <div class="<?= $html_class_prefix ?>-db-query-form">
4517 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2211 4518 <div id="db-query-form">
2212 4519 <input type="hidden" name="chart_id" value="1">
2213 - <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>
2214 4521 <div class='db-wizard-success'></div>
2215 4522 <div class='db-wizard-error'></div>
2216 4523 </div>
2217 4524 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2218 4525 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-fetch">
2219 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4526 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2220 4527 </button>
2221 4528 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-show-on-chart">
2222 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>
2223 - <?php echo __( 'Preview', "chart-builder" ); ?>
4530 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2224 4531 </button>
2225 4532 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-save">
2226 - <?php echo __( 'Save data', "chart-builder" ); ?>
4533 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2227 4534 </button>
2228 4535 </div>
2229 4536 </div>
2230 4537 <div class="db-wizard-hints">
@@ -2229,9 +4536,18 @@
2229 4536 </div>
2230 4537 <div class="db-wizard-hints">
2231 4538 <ul>
2232 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> -->
2233 - <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>
2234 4550 </ul>
2235 4551 </div>
2236 4552 </div>
2237 4553 </div>
@@ -2239,9 +4555,9 @@
2239 4555 </div>
2240 4556 <?php
2241 4557 $content = ob_get_clean();
2242 4558
2243 - $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') . '">
2244 4560 <i class="ays_fa ays_fa_info_circle"></i>
2245 4561 </a>';
2246 4562
2247 4563 $sources['import_from_db'] = array(
@@ -2262,16 +4578,16 @@
2262 4578 <div class="ays-pro-features-v2-big-buttons-box">
2263 4579 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2264 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>
2265 4581 <div class="ays-pro-features-v2-upgrade-text">
2266 - <?php echo __("Upgrade" , "chart-builder"); ?>
4582 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2267 4583 </div>
2268 4584 </a>
2269 4585 </div>
2270 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2271 - <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">
2272 4588 <div class="form-group row mb-2">
2273 - <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">
2274 4590 <label class="form-label">
2275 4591 <?php echo esc_html(__('Use custom database settings for this chart', "chart-builder")); ?>
2276 4592 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __(".","chart-builder") ); ?>">
2277 4593 <i class="ays_fa ays_fa_info_circle"></i>
@@ -2277,9 +4593,9 @@
2277 4593 <i class="ays_fa ays_fa_info_circle"></i>
2278 4594 </a>
2279 4595 </label>
2280 4596 </div>
2281 - <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">
2282 4598 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
2283 4599 <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" type="checkbox" />
2284 4600 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
2285 4601 </label>
@@ -2285,25 +4601,25 @@
2285 4601 </label>
2286 4602 </div>
2287 4603 </div>
2288 4604 <div id="ays-chart-external-db-query">
2289 - <div class="<?= $html_class_prefix ?>-db-query-form">
4605 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2290 4606 <div id="external-db-query-form">
2291 4607 <input type="hidden" name="chart_id" value="1">
2292 - <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>
2293 4609 <div class='db-wizard-success'></div>
2294 4610 <div class='db-wizard-error'></div>
2295 4611 </div>
2296 4612 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2297 4613 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-fetch">
2298 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4614 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2299 4615 </button>
2300 4616 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-show-on-chart">
2301 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>
2302 - <?php echo __( 'Preview', "chart-builder" ); ?>
4618 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2303 4619 </button>
2304 4620 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-save">
2305 - <?php echo __( 'Save data', "chart-builder" ); ?>
4621 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2306 4622 </button>
2307 4623 </div>
2308 4624 </div>
2309 4625 <div class="db-wizard-hints">
@@ -2308,9 +4624,18 @@
2308 4624 </div>
2309 4625 <div class="db-wizard-hints">
2310 4626 <ul>
2311 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> -->
2312 - <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>
2313 4638 </ul>
2314 4639 </div>
2315 4640 </div>
2316 4641 </div>
@@ -2318,9 +4643,9 @@
2318 4643 </div>
2319 4644 <?php
2320 4645 $content = ob_get_clean();
2321 4646
2322 - $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') . '">
2323 4648 <i class="ays_fa ays_fa_info_circle"></i>
2324 4649 </a>';
2325 4650
2326 4651 $sources['import_from_external_db'] = array(
@@ -2342,9 +4667,9 @@
2342 4667 $quiz_query_tooltips = $args['quiz_query_tooltips'];
2343 4668 $quiz_id = $args['quiz_id'];
2344 4669 $quiz_query = $args['quiz_query'];
2345 4670
2346 - 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') ) {
2347 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") . '">
2348 4673 // <i class="ays_fa ays_fa_info_circle"></i>
2349 4674 // </a>', '<br>', '<b>', '</b>');
2350 4675 // $content = $this->blockquote_content_quiz;
@@ -2354,35 +4679,42 @@
2354 4679 // );
2355 4680
2356 4681 return $sources;
2357 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 +
2358 4693
2359 - $sql = "SELECT `title`, `id` FROM " . $wpdb->prefix . "aysquiz_quizes WHERE `published` = 1 AND `question_ids` <> ''";
2360 - $quizes = $wpdb->get_results($sql, "ARRAY_A");
2361 -
2362 4694 ob_start();
2363 4695 ?>
2364 4696 <div class="ays-accordion-data-main-wrap">
2365 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">
2366 4698 <div id="<?php echo esc_attr($html_class_prefix) ?>quiz-maker-form">
2367 - <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?= $chart_id ?>">
2368 - <div class="<?= $html_class_prefix ?>select-quiz-maker-data-query-container" id="<?= $html_class_prefix ?>quiz-queries">
2369 - <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' ) ?>">
2370 4702 <i class="ays_fa ays_fa_info_circle"></i>
2371 4703 </a>
2372 - <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">
2373 - <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>
2374 4706 <?php foreach ( $quiz_queries as $id => $q):
2375 4707 $disabled = preg_replace('/[^0-9]/', '', $id) <= 6 ? "false" : "true" ; ?>
2376 - <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>
2377 4709 <?php endforeach; ?>
2378 4710 </select>
2379 4711 </div>
2380 4712 <div class="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz-container">
2381 - <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">
2382 - <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>
2383 4715 <?php foreach ( $quizes as $quiz): ?>
2384 - <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>
2385 4717 <?php endforeach; ?>
2386 4718 </select>
2387 4719 </div>
2388 4720 <div id="ays-chart-quiz-maker-success"></div>
@@ -2388,21 +4720,21 @@
2388 4720 <div id="ays-chart-quiz-maker-success"></div>
2389 4721 <div id="ays-chart-quiz-maker-error"></div>
2390 4722 <div class="ays-chart-buttons-group">
2391 4723 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-fetch">
2392 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4724 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2393 4725 </button>
2394 4726 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-show-on-chart">
2395 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>
2396 - <?php echo __( 'Preview', "chart-builder" ); ?>
4728 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2397 4729 </button>
2398 4730 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-save">
2399 - <?php echo __( 'Save data', "chart-builder" ); ?>
4731 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2400 4732 </button>
2401 4733 </div>
2402 4734 </div>
2403 4735 <div>
2404 - <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>
2405 4737 </div>
2406 4738 </div>
2407 4739 </div>
2408 4740 <?php
@@ -2407,11 +4739,18 @@
2407 4739 </div>
2408 4740 <?php
2409 4741 $content = ob_get_clean();
2410 4742
2411 - $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) . '">
2412 - <i class="ays_fa ays_fa_info_circle"></i>
2413 - </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 + );
2414 4753 $sources['quiz_maker'] = array(
2415 4754 'content' => $content,
2416 4755 'title' => $title
2417 4756 );
@@ -2434,23 +4773,23 @@
2434 4773 <div class="ays-pro-features-v2-video-button"></div>
2435 4774 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2436 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>
2437 4776 <div class="ays-pro-features-v2-upgrade-text">
2438 - <?php echo __("Upgrade" , "chart-builder"); ?>
4777 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2439 4778 </div>
2440 4779 </a>
2441 4780 </div>
2442 - <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 ">
2443 4782 <div id="ays-chart-woocommerce-datas">
2444 - <div class="<?= $html_class_prefix ?>woocommerce-datas-form">
4783 + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-form">
2445 4784 <div id="woocommerce-datas-form">
2446 - <input type="hidden" name="chart_id" value="<?= $chart_id ?>">
2447 - <div class="<?= $html_class_prefix ?>woocommerce-datas-query-container" id="<?= $html_class_prefix ?>woocommerce-datas-container-id" >
2448 - <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' ) ?>">
2449 4788 <i class="ays_fa ays_fa_info_circle"></i>
2450 4789 </a>
2451 - <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]">
2452 - <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>
2453 4792 </select>
2454 4793 </div>
2455 4794 <div class='ays-chart-woocommerce-datas-success'></div>
2456 4795 <div class='ays-chart-woocommerce-datas-error'></div>
@@ -2456,16 +4795,16 @@
2456 4795 <div class='ays-chart-woocommerce-datas-error'></div>
2457 4796 </div>
2458 4797 <div class="ays-chart-buttons-group">
2459 4798 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-fetch">
2460 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4799 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2461 4800 </button>
2462 4801 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-show-on-chart">
2463 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>
2464 - <?php echo __( 'Preview', "chart-builder" ); ?>
4803 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2465 4804 </button>
2466 4805 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-save">
2467 - <?php echo __( 'Save data', "chart-builder" ); ?>
4806 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2468 4807 </button>
2469 4808 </div>
2470 4809 </div>
2471 4810 </div>
@@ -2472,12 +4811,19 @@
2472 4811 </div>
2473 4812 </div>
2474 4813 <?php
2475 4814 $content = ob_get_clean();
2476 -
2477 - $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) . '">
2478 - <i class="ays_fa ays_fa_info_circle"></i>
2479 - </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 + );
2480 4826 $sources['woocommerce'] = array(
2481 4827 'content' => $content,
2482 4828 'title' => $title
2483 4829 );
@@ -2491,9 +4837,10 @@
2491 4837 $source = $args['source'];
2492 4838 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2493 4839 $settings = $args['settings'];
2494 4840 $source_chart_type = $args['source_chart_type'];
2495 - $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';
2496 4843
2497 4844 if (isset($source) && !empty($source)) {
2498 4845 if ( !isset( $source[0] ) ) {
2499 4846 if (count($source[1]) > 2) {
@@ -2498,15 +4845,15 @@
2498 4845 if ( !isset( $source[0] ) ) {
2499 4846 if (count($source[1]) > 2) {
2500 4847 $titles = array();
2501 4848 for ($i = 0; $i < count($source[1]); $i++) {
2502 - array_push($titles, __("Title", $this->plugin_name).$i);
4849 + array_push($titles, __("Title", 'chart-builder').$i);
2503 4850 }
2504 4851 $source[0] = $titles;
2505 4852 } else {
2506 4853 $source[0] = array(
2507 - __("Country", $this->plugin_name),
2508 - __("Population", $this->plugin_name),
4854 + __("Country", 'chart-builder'),
4855 + __("Population", 'chart-builder'),
2509 4856 );
2510 4857 }
2511 4858
2512 4859 ksort($source);
@@ -2528,9 +4875,9 @@
2528 4875 ?>
2529 4876 <div class="ays-accordion-data-main-wrap">
2530 4877 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2531 4878 <?php if($source_chart_type != 'org_chart'): ?>
2532 - <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">
2533 4880 <!-- <div class="<//?= $html_class_prefix ?>icons-box">
2534 4881 <img class="<//?= $html_class_prefix ?>add-new-row" src="<//?php echo CHART_BUILDER_ADMIN_URL; ?>/images/icons/add-circle-outline.svg">
2535 4882 </div> -->
2536 4883 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
@@ -2541,14 +4888,14 @@
2541 4888 if ($source_id == 0): ?>
2542 4889 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2543 4890 <div class="ays-chart-empty-data-table-cell"></div>
2544 4891 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2545 - <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); ?>">
2546 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">
2547 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;" />
2548 4895 </svg>
2549 4896 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2550 - <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'" : "" ?>>
2551 4898 <?php if ($each_source_id !== 0): ?>
2552 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">
2553 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;" />
2554 4901 </svg>
@@ -2570,14 +4917,14 @@
2570 4917 </svg>
2571 4918 </div>
2572 4919 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2573 4920 <?php if ($each_source_id == 0): ?>
2574 - <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); ?>">
2575 - <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)); ?>">
2576 4923 </div>
2577 4924 <?php else: ?>
2578 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); ?>">
2579 - <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">
2580 4927 </div>
2581 4928 <?php endif; ?>
2582 4929 <?php endforeach; ?>
2583 4930 </div>
@@ -2584,16 +4931,16 @@
2584 4931 <?php endif; ?>
2585 4932 <?php endif; ?>
2586 4933 <?php endforeach; ?>
2587 4934 <?php else:?>
2588 - <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">
2589 4936 <div style="height: 63.11px; padding: 0 15px;"></div>
2590 - <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">
2591 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">
2592 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;" />
2593 4940 </svg>
2594 4941 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2595 - <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'>
2596 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">
2597 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;" />
2598 4945 </svg>
2599 4946 </div>
@@ -2620,30 +4967,30 @@
2620 4967 <?php endif; ?>
2621 4968 </div>
2622 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">
2623 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">
2624 - <?php echo __( 'Add column', "chart-builder" ); ?>
4971 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2625 4972 </div>
2626 4973 </div>
2627 4974 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2628 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">
2629 - <?php echo __( 'Add row', "chart-builder" ); ?>
4976 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2630 4977 </div>
2631 4978 <br>
2632 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">
2633 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>
2634 - <?php echo __( 'Preview', "chart-builder" ); ?>
4981 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2635 4982 </button>
2636 4983 </div>
2637 4984 <?php endif; ?>
2638 - <div class="<?= $html_class_prefix ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
2639 - <div class="<?= $html_class_prefix ?>chart-source-data-content-org-type">
2640 - <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">
2641 4988 </ul>
2642 4989 </div>
2643 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">
2644 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>
2645 - <?php echo __( 'Preview', "chart-builder" ); ?>
4992 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2646 4993 </button>
2647 4994 </div>
2648 4995 </div>
2649 4996 </div>
@@ -2668,15 +5015,16 @@
2668 5015 $source = $args['source'];
2669 5016 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2670 5017 $settings = $args['settings'];
2671 5018 $source_chart_type = $args['source_chart_type'];
2672 - $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';
2673 5021
2674 5022 ob_start();
2675 5023 ?>
2676 5024 <div class="ays-accordion-data-main-wrap">
2677 5025 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2678 - <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">
2679 5027 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
2680 5028 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content">
2681 5029 <?php if(!empty($source)):
2682 5030 foreach($source as $source_id => $source_value):
@@ -2684,14 +5032,14 @@
2684 5032 if ($source_id == 0): ?>
2685 5033 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2686 5034 <div class="ays-chart-empty-data-table-cell"></div>
2687 5035 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2688 - <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); ?>">
2689 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">
2690 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;" />
2691 5039 </svg>
2692 5040 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2693 - <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'" : "" ?>>
2694 5042 <?php if ($each_source_id !== 0): ?>
2695 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">
2696 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;" />
2697 5045 </svg>
@@ -2713,14 +5061,14 @@
2713 5061 </svg>
2714 5062 </div>
2715 5063 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2716 5064 <?php if ($each_source_id == 0): ?>
2717 - <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); ?>">
2718 - <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)); ?>">
2719 5067 </div>
2720 5068 <?php else: ?>
2721 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); ?>">
2722 - <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">
2723 5071 </div>
2724 5072 <?php endif; ?>
2725 5073 <?php endforeach; ?>
2726 5074 </div>
@@ -2727,16 +5075,16 @@
2727 5075 <?php endif; ?>
2728 5076 <?php endif; ?>
2729 5077 <?php endforeach; ?>
2730 5078 <?php else:?>
2731 - <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">
2732 5080 <div style="height: 63.11px; padding: 0 15px;"></div>
2733 - <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">
2734 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">
2735 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;" />
2736 5084 </svg>
2737 5085 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2738 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[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'>
2739 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">
2740 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;" />
2741 5089 </svg>
2742 5090 </div>
@@ -2763,19 +5111,19 @@
2763 5111 <?php endif; ?>
2764 5112 </div>
2765 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">
2766 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">
2767 - <?php echo __( 'Add column', "chart-builder" ); ?>
5115 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2768 5116 </div>
2769 5117 </div>
2770 5118 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2771 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">
2772 - <?php echo __( 'Add row', "chart-builder" ); ?>
5120 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2773 5121 </div>
2774 5122 <br>
2775 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">
2776 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>
2777 - <?php echo __( 'Preview', "chart-builder" ); ?>
5125 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2778 5126 </button>
2779 5127 </div>
2780 5128 </div>
2781 5129 </div>
@@ -2831,9 +5179,9 @@
2831 5179
2832 5180 $sources[] = $content;
2833 5181 }
2834 5182 $content_for_escape = implode('' , $sources );
2835 - echo html_entity_decode(esc_html( $content_for_escape ));
5183 + echo html_entity_decode( $content_for_escape );
2836 5184 }
2837 5185
2838 5186 public function settings_contents_general_settings( $sources, $args ){
2839 5187 $html_class_prefix = $args['html_class_prefix'];
@@ -2987,8 +5335,9 @@
2987 5335 $settings = $args['settings'];
2988 5336
2989 5337 $show_title = $settings['show_title'];
2990 5338 $show_description = $settings['show_description'];
5339 + $enable_interactivity = $settings['enable_interactivity'];
2991 5340
2992 5341 ob_start();
2993 5342 ?>
2994 5343 <div class="ays-accordion-data-main-wrap">
@@ -3071,8 +5420,24 @@
3071 5420 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
3072 5421 </label>
3073 5422 </div>
3074 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 -->
3075 5440 </div>
3076 5441 </div>
3077 5442 <?php
3078 5443 $content = ob_get_clean();
@@ -3108,9 +5473,9 @@
3108 5473 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3109 5474 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3110 5475 <label for="ays-chart-option-tooltip-trigger">
3111 5476 <?php echo esc_html(__( "Trigger", "chart-builder" )); ?>
3112 - <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") )); ?>">
3113 5478 <i class="ays_fa ays_fa_info_circle"></i>
3114 5479 </a>
3115 5480 </label>
3116 5481 </div>
@@ -3159,9 +5524,9 @@
3159 5524 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3160 5525 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3161 5526 <label for="ays-chart-option-tooltip-font-size" class="form-label">
3162 5527 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3163 - <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") )); ?>">
3164 5529 <i class="ays_fa ays_fa_info_circle"></i>
3165 5530 </a>
3166 5531 </label>
3167 5532 </div>
@@ -3189,9 +5554,9 @@
3189 5554 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3190 5555 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3191 5556 <label for="ays-chart-option-tooltip-bold">
3192 5557 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
3193 - <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") )); ?>">
3194 5559 <i class="ays_fa ays_fa_info_circle"></i>
3195 5560 </a>
3196 5561 </label>
3197 5562 </div>
@@ -3222,8 +5587,120 @@
3222 5587
3223 5588 return $sources;
3224 5589 }
3225 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 +
3226 5703 public function settings_contents_legend_settings( $sources, $args ){
3227 5704 $html_class_prefix = $args['html_class_prefix'];
3228 5705 $html_name_prefix = $args['html_name_prefix'];
3229 5706 $settings = $args['settings'];
@@ -3243,9 +5720,9 @@
3243 5720 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3244 5721 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3245 5722 <label for="ays-chart-option-legend-position">
3246 5723 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3247 - <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") )); ?>">
3248 5725 <i class="ays_fa ays_fa_info_circle"></i>
3249 5726 </a>
3250 5727 </label>
3251 5728 </div>
@@ -3276,9 +5753,9 @@
3276 5753 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3277 5754 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3278 5755 <label for="ays-chart-option-legend-alignment">
3279 5756 <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
3280 - <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") )); ?>">
3281 5758 <i class="ays_fa ays_fa_info_circle"></i>
3282 5759 </a>
3283 5760 </label>
3284 5761 </div>
@@ -3298,9 +5775,9 @@
3298 5775 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3299 5776 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3300 5777 <label for="ays-chart-option-legend-font-color">
3301 5778 <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
3302 - <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") )); ?>">
3303 5780 <i class="ays_fa ays_fa_info_circle"></i>
3304 5781 </a>
3305 5782 </label>
3306 5783 </div>
@@ -3311,9 +5788,9 @@
3311 5788 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3312 5789 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3313 5790 <label for="ays-chart-option-legend-font-size" class="form-label">
3314 5791 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3315 - <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") )); ?>">
3316 5793 <i class="ays_fa ays_fa_info_circle"></i>
3317 5794 </a>
3318 5795 </label>
3319 5796 </div>
@@ -3368,8 +5845,159 @@
3368 5845
3369 5846 return $sources;
3370 5847 }
3371 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 +
3372 6000 public function settings_contents_horizontal_axis_settings( $sources, $args ){
3373 6001 $html_class_prefix = $args['html_class_prefix'];
3374 6002 $html_name_prefix = $args['html_name_prefix'];
3375 6003 $settings = $args['settings'];
@@ -3385,8 +6013,9 @@
3385 6013 $haxis_slanted_text_angle = $settings['haxis_slanted_text_angle'];
3386 6014 $haxis_show_text_every = $settings['haxis_show_text_every'];
3387 6015 $haxis_format_options = $settings['axes_format_options'];
3388 6016 $haxis_format = $settings['haxis_format'];
6017 + $haxis_enable_divide_percent = $settings['haxis_enable_divide_percent'];
3389 6018 $haxis_label_font_size = $settings['haxis_label_font_size'];
3390 6019 $haxis_max_value = $settings['haxis_max_value'];
3391 6020 $haxis_min_value = $settings['haxis_min_value'];
3392 6021 $haxis_text_font_size = $settings['haxis_text_font_size'];
@@ -3400,9 +6029,9 @@
3400 6029 $haxis_minor_gridlines_color = $settings['haxis_minor_gridlines_color'];
3401 6030
3402 6031 ob_start();
3403 6032 ?>
3404 - <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">
3405 6034 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3406 6035 <h6>Label</h6>
3407 6036 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3408 6037 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3407,9 +6036,9 @@
3407 6036 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3408 6037 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3409 6038 <label for="ays-chart-option-haxis-title" class="form-label">
3410 6039 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3411 - <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") ); ?>">
3412 6041 <i class="ays_fa ays_fa_info_circle"></i>
3413 6042 </a>
3414 6043 </label>
3415 6044 </div>
@@ -3494,9 +6123,9 @@
3494 6123 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3495 6124 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3496 6125 <label for="ays-chart-option-haxis-text-position" class="form-label">
3497 6126 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3498 - <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") ); ?>">
3499 6128 <i class="ays_fa ays_fa_info_circle"></i>
3500 6129 </a>
3501 6130 </label>
3502 6131 </div>
@@ -3677,32 +6306,40 @@
3677 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) ?>">
3678 6307 </div>
3679 6308 </div> <!-- Horizontal axis baseline color -->
3680 6309
3681 - <br>
3682 - <h6>Format</h6>
3683 - <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 " >
3684 6313 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3685 6314 <label for="ays-chart-option-haxis-format" class="form-label">
3686 6315 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
3687 6316 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
3688 - echo htmlspecialchars( sprintf (
3689 - "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
3690 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
3691 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
3692 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
3693 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
3694 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
3695 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
3696 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
3697 - '<em>', '</em>',
3698 - '<em>', '</em>',
3699 - '<em>', '</em>',
3700 - '<em>', '</em>',
3701 - '<em>', '</em>',
3702 - '<em>', '</em>',
3703 - '<em>', '</em>'
3704 - ) );
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 + ));
3705 6342 ?>">
3706 6343 <i class="ays_fa ays_fa_info_circle"></i>
3707 6344 </a>
3708 6345 </label>
@@ -3719,10 +6356,26 @@
3719 6356 ?>
3720 6357 </select>
3721 6358 </div>
3722 6359 </div> <!-- Horizontal axis format -->
3723 - <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;'; ?>">
3724 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">
3725 6378 <label for="ays-chart-option-haxis-max-value" class="form-label">
3726 6379 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
3727 6380 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
3728 6381 <i class="ays_fa ays_fa_info_circle"></i>
@@ -3732,9 +6385,9 @@
3732 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">
3733 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) ?>">
3734 6387 </div>
3735 6388 </div> <!-- Horizontal axis max value -->
3736 - <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" >
3737 6390 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3738 6391 <label for="ays-chart-option-haxis-min-value" class="form-label">
3739 6392 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
3740 6393 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -3773,8 +6426,9 @@
3773 6426 $vaxis_text_color = $settings['vaxis_text_color'];
3774 6427 $vaxis_baseline_color = $settings['vaxis_baseline_color'];
3775 6428 $vaxis_format_options = $settings['axes_format_options'];
3776 6429 $vaxis_format = $settings['vaxis_format'];
6430 + $vaxis_enable_divide_percent = $settings['vaxis_enable_divide_percent'];
3777 6431 $vaxis_label_font_size = $settings['vaxis_label_font_size'];
3778 6432 $vaxis_max_value = $settings['vaxis_max_value'];
3779 6433 $vaxis_min_value = $settings['vaxis_min_value'];
3780 6434 $vaxis_text_font_size = $settings['vaxis_text_font_size'];
@@ -3788,9 +6442,9 @@
3788 6442 $vaxis_minor_gridlines_color = $settings['vaxis_minor_gridlines_color'];
3789 6443
3790 6444 ob_start();
3791 6445 ?>
3792 - <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">
3793 6447 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3794 6448 <h6>Label</h6>
3795 6449 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3796 6450 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3795,9 +6449,9 @@
3795 6449 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3796 6450 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3797 6451 <label for="ays-chart-option-vaxis-title" class="form-label">
3798 6452 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3799 - <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") ); ?>">
3800 6454 <i class="ays_fa ays_fa_info_circle"></i>
3801 6455 </a>
3802 6456 </label>
3803 6457 </div>
@@ -3869,9 +6523,9 @@
3869 6523 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3870 6524 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3871 6525 <label for="ays-chart-option-vaxis-text-position" class="form-label">
3872 6526 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3873 - <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") ); ?>">
3874 6528 <i class="ays_fa ays_fa_info_circle"></i>
3875 6529 </a>
3876 6530 </label>
3877 6531 </div>
@@ -4017,24 +6671,32 @@
4017 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) ?>">
4018 6672 </div>
4019 6673 </div> <!-- Vertical axis baseline color -->
4020 6674
4021 - <br>
4022 - <h6>Format</h6>
4023 - <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">
4024 6678 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4025 6679 <label for="ays-chart-option-vaxis-format" class="form-label">
4026 6680 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
4027 6681 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4028 - echo htmlspecialchars( sprintf (
6682 + echo esc_attr( sprintf(
6683 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4029 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>" .
4030 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
4031 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
4032 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
4033 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
4034 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
4035 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
4036 - __('%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>",
4037 6699 '<em>', '</em>',
4038 6700 '<em>', '</em>',
4039 6701 '<em>', '</em>',
4040 6702 '<em>', '</em>',
@@ -4040,9 +6702,9 @@
4040 6702 '<em>', '</em>',
4041 6703 '<em>', '</em>',
4042 6704 '<em>', '</em>',
4043 6705 '<em>', '</em>'
4044 - ) );
6706 + ));
4045 6707 ?>">
4046 6708 <i class="ays_fa ays_fa_info_circle"></i>
4047 6709 </a>
4048 6710 </label>
@@ -4059,10 +6721,26 @@
4059 6721 ?>
4060 6722 </select>
4061 6723 </div>
4062 6724 </div> <!-- Vertical axis format -->
4063 - <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;'; ?>">
4064 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">
4065 6743 <label for="ays-chart-option-vaxis-max-value" class="form-label">
4066 6744 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
4067 6745 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
4068 6746 <i class="ays_fa ays_fa_info_circle"></i>
@@ -4072,9 +6750,9 @@
4072 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">
4073 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) ?>">
4074 6752 </div>
4075 6753 </div> <!-- Vertical axis max value -->
4076 - <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">
4077 6755 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4078 6756 <label for="ays-chart-option-vaxis-min-value" class="form-label">
4079 6757 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
4080 6758 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -4113,9 +6791,9 @@
4113 6791 $animation_easing = $settings['animation_easing'];
4114 6792
4115 6793 ob_start();
4116 6794 ?>
4117 - <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">
4118 6796 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4119 6797 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4120 6798 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4121 6799 <label for="ays-chart-option-enable-animation">
@@ -4166,23 +6844,24 @@
4166 6844 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4167 6845 <label for="ays-chart-option-animation-easing" class="form-label">
4168 6846 <?php echo esc_html(__( "Easing", "chart-builder" )); ?>
4169 6847 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4170 - echo htmlspecialchars( sprintf(
6848 + echo esc_attr( sprintf(
6849 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4171 6850 "<p>" . __('The easing function applied to the chart animation. The following options are available:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4172 - __('%sLinear:%s Constant speed.', "chart-builder") . "</li><li>" .
4173 - __('%sEase in:%s Start slow and speed up.', "chart-builder") . "</li><li>" .
4174 - __('%sEase out:%s Start fast and slow down.', "chart-builder") . "</li><li>" .
4175 - __('%sEase in and out:%s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
4176 - '<em>',
4177 - '</em>',
4178 - '<em>',
4179 - '</em>',
4180 - '<em>',
4181 - '</em>',
4182 - '<em>',
4183 - '</em>'
4184 - ) );
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 + ));
4185 6864 ?>">
4186 6865 <i class="ays_fa ays_fa_info_circle"></i>
4187 6866 </a>
4188 6867 </label>
@@ -4221,9 +6900,9 @@
4221 6900 $html_name_prefix = $args['html_name_prefix'];
4222 6901
4223 6902 ob_start();
4224 6903 ?>
4225 - <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">
4226 6905 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4227 6906 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4228 6907 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4229 6908 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4228,15 +6907,15 @@
4228 6907 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4229 6908 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4230 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>
4231 6910 <div class="ays-pro-features-v2-video-text">
4232 - <?php echo __("Watch Video" , "chart-builder"); ?>
6911 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4233 6912 </div>
4234 6913 </a>
4235 6914 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4236 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>
4237 6916 <div class="ays-pro-features-v2-upgrade-text">
4238 - <?php echo __("Upgrade" , "chart-builder"); ?>
6917 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4239 6918 </div>
4240 6919 </a>
4241 6920 </div>
4242 6921 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4258,15 +6937,15 @@
4258 6937 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4259 6938 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4260 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>
4261 6940 <div class="ays-pro-features-v2-video-text">
4262 - <?php echo __("Watch Video" , "chart-builder"); ?>
6941 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4263 6942 </div>
4264 6943 </a>
4265 6944 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4266 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>
4267 6946 <div class="ays-pro-features-v2-upgrade-text">
4268 - <?php echo __("Upgrade" , "chart-builder"); ?>
6947 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4269 6948 </div>
4270 6949 </a>
4271 6950 </div>
4272 6951 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4306,9 +6985,9 @@
4306 6985 $enable_img = $settings['enable_img'];
4307 6986
4308 6987 ob_start();
4309 6988 ?>
4310 - <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">
4311 6990 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4312 6991 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4313 6992 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4314 6993 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4313,15 +6992,15 @@
4313 6992 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4314 6993 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4315 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>
4316 6995 <div class="ays-pro-features-v2-video-text">
4317 - <?php echo __("Watch Video" , "chart-builder"); ?>
6996 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4318 6997 </div>
4319 6998 </a>
4320 6999 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4321 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>
4322 7001 <div class="ays-pro-features-v2-upgrade-text">
4323 - <?php echo __("Upgrade" , "chart-builder"); ?>
7002 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4324 7003 </div>
4325 7004 </a>
4326 7005 </div>
4327 7006 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4343,15 +7022,15 @@
4343 7022 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4344 7023 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4345 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>
4346 7025 <div class="ays-pro-features-v2-video-text">
4347 - <?php echo __("Watch Video" , "chart-builder"); ?>
7026 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4348 7027 </div>
4349 7028 </a>
4350 7029 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4351 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>
4352 7031 <div class="ays-pro-features-v2-upgrade-text">
4353 - <?php echo __("Upgrade" , "chart-builder"); ?>
7032 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4354 7033 </div>
4355 7034 </a>
4356 7035 </div>
4357 7036 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4373,15 +7052,15 @@
4373 7052 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4374 7053 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4375 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>
4376 7055 <div class="ays-pro-features-v2-video-text">
4377 - <?php echo __("Watch Video" , "chart-builder"); ?>
7056 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4378 7057 </div>
4379 7058 </a>
4380 7059 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4381 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>
4382 7061 <div class="ays-pro-features-v2-upgrade-text">
4383 - <?php echo __("Upgrade" , "chart-builder"); ?>
7062 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4384 7063 </div>
4385 7064 </a>
4386 7065 </div>
4387 7066 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4403,15 +7082,15 @@
4403 7082 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4404 7083 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4405 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>
4406 7085 <div class="ays-pro-features-v2-video-text">
4407 - <?php echo __("Watch Video" , "chart-builder"); ?>
7086 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4408 7087 </div>
4409 7088 </a>
4410 7089 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4411 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>
4412 7091 <div class="ays-pro-features-v2-upgrade-text">
4413 - <?php echo __("Upgrade" , "chart-builder"); ?>
7092 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4414 7093 </div>
4415 7094 </a>
4416 7095 </div>
4417 7096 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4439,9 +7118,9 @@
4439 7118 </label>
4440 7119 </div>
4441 7120 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4442 7121 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
4443 - <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)?> >
4444 7123 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4445 7124 </label>
4446 7125 </div>
4447 7126 </div> <!-- IMG option end -->
@@ -4498,9 +7177,9 @@
4498 7177
4499 7178 $sources[] = $content;
4500 7179 }
4501 7180 $content_for_escape = implode('' , $sources );
4502 - echo html_entity_decode(esc_html( $content_for_escape ));
7181 + echo html_entity_decode( esc_html($content_for_escape) );
4503 7182 }
4504 7183
4505 7184 public function settings_contents_chart_styles_settings( $sources, $args ){
4506 7185 $html_class_prefix = $args['html_class_prefix'];
@@ -4520,12 +7199,19 @@
4520 7199 $org_chart_font_size = $settings['org_chart_font_size'];
4521 7200 $background_color = $settings['background_color'];
4522 7201 $transparent_background = $settings['transparent_background'];
4523 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'];
4524 7209 $border_radius = $settings['border_radius'];
4525 7210 $border_color = $settings['border_color'];
4526 7211 $box_shadow = $settings['box_shadow'];
4527 7212 $box_shadow_color = $settings['box_shadow_color'];
7213 + $padding_outer = $settings['padding_outer'];
4528 7214 ob_start();
4529 7215 ?>
4530 7216 <div class="ays-accordion-data-main-wrap">
4531 7217 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -4532,9 +7218,9 @@
4532 7218 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4533 7219 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4534 7220 <label for="ays-chart-option-width" class="form-label">
4535 7221 <?php echo esc_html(__( "Width", "chart-builder" )); ?>
4536 - <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") ); ?>">
4537 7223 <i class="ays_fa ays_fa_info_circle"></i>
4538 7224 </a>
4539 7225 </label>
4540 7226 </div>
@@ -4555,9 +7241,9 @@
4555 7241 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4556 7242 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4557 7243 <label for="ays-chart-option-responsive-width" class="form-label">
4558 7244 <?php echo esc_html(__( "Responsive Width", "chart-builder" )); ?>
4559 - <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") ); ?>">
4560 7246 <i class="ays_fa ays_fa_info_circle"></i>
4561 7247 </a>
4562 7248 </label>
4563 7249 </div>
@@ -4571,9 +7257,9 @@
4571 7257 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4572 7258 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4573 7259 <label for="ays-chart-option-position">
4574 7260 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4575 - <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") ); ?>">
4576 7262 <i class="ays_fa ays_fa_info_circle"></i>
4577 7263 </a>
4578 7264 </label>
4579 7265 </div>
@@ -4588,14 +7274,14 @@
4588 7274 endforeach;
4589 7275 ?>
4590 7276 </select>
4591 7277 </div>
4592 - </div> <!-- Title position -->
7278 + </div> <!-- Position -->
4593 7279 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4594 7280 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4595 7281 <label for="ays-chart-option-height" class="form-label">
4596 7282 <?php echo esc_html(__( "Height", "chart-builder" )); ?>
4597 - <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") ); ?>">
4598 7284 <i class="ays_fa ays_fa_info_circle"></i>
4599 7285 </a>
4600 7286 </label>
4601 7287 </div>
@@ -4616,9 +7302,9 @@
4616 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">
4617 7303 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4618 7304 <label for="ays-chart-option-font-size" class="form-label">
4619 7305 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
4620 - <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") ); ?>">
4621 7307 <i class="ays_fa ays_fa_info_circle"></i>
4622 7308 </a>
4623 7309 </label>
4624 7310 </div>
@@ -4626,24 +7312,24 @@
4626 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) ?>">
4627 7313 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
4628 7314 </div>
4629 7315 </div> <!-- Font size -->
4630 - <div class="form-group row mb-2 <?= $html_class_prefix ?>options-section cb-changable-opt cb-org_chart-opt display_none">
4631 - <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">
4632 7318 <label for="ays-chart-option-org-chart-font-size" class="form-label">
4633 - <?php echo __( "Element size", $this->plugin_name ); ?>
4634 - <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") ); ?>">
4635 7321 <i class="ays_fa ays_fa_info_circle"></i>
4636 7322 </a>
4637 7323 </label>
4638 7324 </div>
4639 7325 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
4640 - <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]">
4641 7327 <?php
4642 7328 foreach ( $org_chart_font_size_options as $option_slug => $option ):
4643 7329 $selected = ( $org_chart_font_size == $option_slug ) ? 'selected' : '';
4644 7330 ?>
4645 - <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>
4646 7332 <?php
4647 7333 endforeach;
4648 7334 ?>
4649 7335 </select>
@@ -4652,9 +7338,9 @@
4652 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">
4653 7339 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4654 7340 <label for="ays-chart-option-background-color">
4655 7341 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4656 - <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") ); ?>">
4657 7343 <i class="ays_fa ays_fa_info_circle"></i>
4658 7344 </a>
4659 7345 </label>
4660 7346 </div>
@@ -4665,9 +7351,9 @@
4665 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">
4666 7352 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4667 7353 <label for="ays-chart-option-transparent-background" class="form-label">
4668 7354 <?php echo esc_html(__( "Transparent background", "chart-builder" )); ?>
4669 - <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") ); ?>">
4670 7356 <i class="ays_fa ays_fa_info_circle"></i>
4671 7357 </a>
4672 7358 </label>
4673 7359 </div>
@@ -4681,9 +7367,9 @@
4681 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">
4682 7368 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4683 7369 <label for="ays-chart-option-border-width">
4684 7370 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4685 - <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") ); ?>">
4686 7372 <i class="ays_fa ays_fa_info_circle"></i>
4687 7373 </a>
4688 7374 </label>
4689 7375 </div>
@@ -4694,9 +7380,9 @@
4694 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">
4695 7381 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4696 7382 <label for="ays-chart-option-border-color">
4697 7383 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4698 - <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") ); ?>">
4699 7385 <i class="ays_fa ays_fa_info_circle"></i>
4700 7386 </a>
4701 7387 </label>
4702 7388 </div>
@@ -4707,9 +7393,9 @@
4707 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">
4708 7394 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4709 7395 <label for="ays-chart-option-border-radius">
4710 7396 <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
4711 - <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") ); ?>">
4712 7398 <i class="ays_fa ays_fa_info_circle"></i>
4713 7399 </a>
4714 7400 </label>
4715 7401 </div>
@@ -4718,11 +7404,33 @@
4718 7404 </div>
4719 7405 </div> <!-- Border radius -->
4720 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">
4721 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">
4722 7430 <label for="ays-chart-option-box-shadow" class="form-label">
4723 7431 <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
4724 - <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") ); ?>">
4725 7433 <i class="ays_fa ays_fa_info_circle"></i>
4726 7434 </a>
4727 7435 </label>
4728 7436 </div>
@@ -4736,9 +7444,9 @@
4736 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">
4737 7445 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4738 7446 <label for="ays-chart-option-box-shadow-color" class="form-label">
4739 7447 <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
4740 - <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") ); ?>">
4741 7449 <i class="ays_fa ays_fa_info_circle"></i>
4742 7450 </a>
4743 7451 </label>
4744 7452 </div>
@@ -4745,8 +7453,82 @@
4745 7453 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4746 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) ?>">
4747 7455 </div>
4748 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 -->
4749 7531 </div>
4750 7532 </div>
4751 7533 <?php
4752 7534 $content = ob_get_clean();
@@ -4760,8 +7542,273 @@
4760 7542
4761 7543 return $sources;
4762 7544 }
4763 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 +
4764 7811 public function settings_contents_chart_area_styles_settings( $sources, $args ){
4765 7812 $html_class_prefix = $args['html_class_prefix'];
4766 7813 $html_name_prefix = $args['html_name_prefix'];
4767 7814 $settings = $args['settings'];
@@ -4780,9 +7827,9 @@
4780 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">
4781 7828 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4782 7829 <label for="ays-chart-option-chart-background-color">
4783 7830 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4784 - <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") ); ?>">
4785 7832 <i class="ays_fa ays_fa_info_circle"></i>
4786 7833 </a>
4787 7834 </label>
4788 7835 </div>
@@ -4793,9 +7840,9 @@
4793 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">
4794 7841 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4795 7842 <label for="ays-chart-option-chart-border-width">
4796 7843 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4797 - <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") ); ?>">
4798 7845 <i class="ays_fa ays_fa_info_circle"></i>
4799 7846 </a>
4800 7847 </label>
4801 7848 </div>
@@ -4806,9 +7853,9 @@
4806 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">
4807 7854 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4808 7855 <label for="ays-chart-option-chart-border-color">
4809 7856 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4810 - <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") ); ?>">
4811 7858 <i class="ays_fa ays_fa_info_circle"></i>
4812 7859 </a>
4813 7860 </label>
4814 7861 </div>
@@ -4819,9 +7866,9 @@
4819 7866 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4820 7867 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4821 7868 <label for="ays-chart-option-chart-left-margin">
4822 7869 <?php echo esc_html(__( "Left Margin", "chart-builder" )); ?>
4823 - <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") ); ?>">
4824 7871 <i class="ays_fa ays_fa_info_circle"></i>
4825 7872 </a>
4826 7873 </label>
4827 7874 </div>
@@ -4832,9 +7879,9 @@
4832 7879 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4833 7880 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4834 7881 <label for="ays-chart-option-chart-right-margin">
4835 7882 <?php echo esc_html(__( "Right Margin", "chart-builder" )); ?>
4836 - <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") ); ?>">
4837 7884 <i class="ays_fa ays_fa_info_circle"></i>
4838 7885 </a>
4839 7886 </label>
4840 7887 </div>
@@ -4845,9 +7892,9 @@
4845 7892 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4846 7893 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4847 7894 <label for="ays-chart-option-chart-top-margin">
4848 7895 <?php echo esc_html(__( "Top Margin", "chart-builder" )); ?>
4849 - <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") ); ?>">
4850 7897 <i class="ays_fa ays_fa_info_circle"></i>
4851 7898 </a>
4852 7899 </label>
4853 7900 </div>
@@ -4858,9 +7905,9 @@
4858 7905 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4859 7906 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4860 7907 <label for="ays-chart-option-chart-bottom-margin">
4861 7908 <?php echo esc_html(__( "Bottom Margin", "chart-builder" )); ?>
4862 - <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") ); ?>">
4863 7910 <i class="ays_fa ays_fa_info_circle"></i>
4864 7911 </a>
4865 7912 </label>
4866 7913 </div>
@@ -4910,9 +7957,9 @@
4910 7957 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4911 7958 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4912 7959 <label for="ays-chart-option-title-color">
4913 7960 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
4914 - <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") ); ?>">
4915 7962 <i class="ays_fa ays_fa_info_circle"></i>
4916 7963 </a>
4917 7964 </label>
4918 7965 </div>
@@ -4923,9 +7970,9 @@
4923 7970 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4924 7971 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4925 7972 <label for="ays-chart-option-title-font-size" class="form-label">
4926 7973 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
4927 - <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") ); ?>">
4928 7975 <i class="ays_fa ays_fa_info_circle"></i>
4929 7976 </a>
4930 7977 </label>
4931 7978 </div>
@@ -4937,9 +7984,9 @@
4937 7984 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4938 7985 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4939 7986 <label for="ays-chart-option-title-bold" class="form-label">
4940 7987 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
4941 - <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") ); ?>">
4942 7989 <i class="ays_fa ays_fa_info_circle"></i>
4943 7990 </a>
4944 7991 </label>
4945 7992 </div>
@@ -4953,9 +8000,9 @@
4953 8000 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4954 8001 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4955 8002 <label for="ays-chart-option-title-italic" class="form-label">
4956 8003 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
4957 - <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") ); ?>">
4958 8005 <i class="ays_fa ays_fa_info_circle"></i>
4959 8006 </a>
4960 8007 </label>
4961 8008 </div>
@@ -4969,9 +8016,9 @@
4969 8016 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4970 8017 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4971 8018 <label for="ays-chart-option-title-position">
4972 8019 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4973 - <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") ); ?>">
4974 8021 <i class="ays_fa ays_fa_info_circle"></i>
4975 8022 </a>
4976 8023 </label>
4977 8024 </div>
@@ -4991,9 +8038,9 @@
4991 8038 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4992 8039 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4993 8040 <label for="ays-chart-option-title-gap" class="form-label">
4994 8041 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
4995 - <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") ); ?>">
4996 8043 <i class="ays_fa ays_fa_info_circle"></i>
4997 8044 </a>
4998 8045 </label>
4999 8046 </div>
@@ -5005,9 +8052,9 @@
5005 8052 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5006 8053 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5007 8054 <label for="ays-chart-option-title-gap-description" class="form-label">
5008 8055 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5009 - <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") ); ?>">
5010 8057 <i class="ays_fa ays_fa_info_circle"></i>
5011 8058 </a>
5012 8059 </label>
5013 8060 </div>
@@ -5019,9 +8066,9 @@
5019 8066 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5020 8067 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5021 8068 <label for="ays-chart-option-title-text-transform">
5022 8069 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5023 - <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") ); ?>">
5024 8071 <i class="ays_fa ays_fa_info_circle"></i>
5025 8072 </a>
5026 8073 </label>
5027 8074 </div>
@@ -5041,9 +8088,9 @@
5041 8088 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5042 8089 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5043 8090 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5044 8091 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5045 - <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") ); ?>">
5046 8093 <i class="ays_fa ays_fa_info_circle"></i>
5047 8094 </a>
5048 8095 </label>
5049 8096 </div>
@@ -5055,9 +8102,9 @@
5055 8102 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5056 8103 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5057 8104 <label for="ays-chart-option-title-text-decoration">
5058 8105 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5059 - <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") ); ?>">
5060 8107 <i class="ays_fa ays_fa_info_circle"></i>
5061 8108 </a>
5062 8109 </label>
5063 8110 </div>
@@ -5077,9 +8124,9 @@
5077 8124 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5078 8125 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5079 8126 <label for="ays-chart-option-title-text-shadow" class="form-label">
5080 8127 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5081 - <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") ); ?>">
5082 8129 <i class="ays_fa ays_fa_info_circle"></i>
5083 8130 </a>
5084 8131 </label>
5085 8132 </div>
@@ -5093,9 +8140,9 @@
5093 8140 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5094 8141 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5095 8142 <label for="ays-chart-option-title-shadow-color">
5096 8143 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5097 - <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") ); ?>">
5098 8145 <i class="ays_fa ays_fa_info_circle"></i>
5099 8146 </a>
5100 8147 </label>
5101 8148 </div>
@@ -5145,9 +8192,9 @@
5145 8192 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5146 8193 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5147 8194 <label for="ays-chart-option-title-color">
5148 8195 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5149 - <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") ); ?>">
5150 8197 <i class="ays_fa ays_fa_info_circle"></i>
5151 8198 </a>
5152 8199 </label>
5153 8200 </div>
@@ -5158,9 +8205,9 @@
5158 8205 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5159 8206 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5160 8207 <label for="ays-chart-option-title-font-size" class="form-label">
5161 8208 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5162 - <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") ); ?>">
5163 8210 <i class="ays_fa ays_fa_info_circle"></i>
5164 8211 </a>
5165 8212 </label>
5166 8213 </div>
@@ -5172,9 +8219,9 @@
5172 8219 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5173 8220 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5174 8221 <label for="ays-chart-option-title-bold" class="form-label">
5175 8222 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5176 - <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") ); ?>">
5177 8224 <i class="ays_fa ays_fa_info_circle"></i>
5178 8225 </a>
5179 8226 </label>
5180 8227 </div>
@@ -5188,9 +8235,9 @@
5188 8235 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5189 8236 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5190 8237 <label for="ays-chart-option-title-italic" class="form-label">
5191 8238 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5192 - <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") ); ?>">
5193 8240 <i class="ays_fa ays_fa_info_circle"></i>
5194 8241 </a>
5195 8242 </label>
5196 8243 </div>
@@ -5204,9 +8251,9 @@
5204 8251 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5205 8252 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5206 8253 <label for="ays-chart-option-title-position">
5207 8254 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5208 - <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") ); ?>">
5209 8256 <i class="ays_fa ays_fa_info_circle"></i>
5210 8257 </a>
5211 8258 </label>
5212 8259 </div>
@@ -5226,9 +8273,9 @@
5226 8273 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5227 8274 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5228 8275 <label for="ays-chart-option-title-gap" class="form-label">
5229 8276 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5230 - <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") ); ?>">
5231 8278 <i class="ays_fa ays_fa_info_circle"></i>
5232 8279 </a>
5233 8280 </label>
5234 8281 </div>
@@ -5240,9 +8287,9 @@
5240 8287 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5241 8288 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5242 8289 <label for="ays-chart-option-title-gap-description" class="form-label">
5243 8290 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5244 - <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") ); ?>">
5245 8292 <i class="ays_fa ays_fa_info_circle"></i>
5246 8293 </a>
5247 8294 </label>
5248 8295 </div>
@@ -5254,9 +8301,9 @@
5254 8301 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5255 8302 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5256 8303 <label for="ays-chart-option-title-text-transform">
5257 8304 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5258 - <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") ); ?>">
5259 8306 <i class="ays_fa ays_fa_info_circle"></i>
5260 8307 </a>
5261 8308 </label>
5262 8309 </div>
@@ -5276,9 +8323,9 @@
5276 8323 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5277 8324 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5278 8325 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5279 8326 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5280 - <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") ); ?>">
5281 8328 <i class="ays_fa ays_fa_info_circle"></i>
5282 8329 </a>
5283 8330 </label>
5284 8331 </div>
@@ -5290,9 +8337,9 @@
5290 8337 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5291 8338 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5292 8339 <label for="ays-chart-option-title-text-decoration">
5293 8340 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5294 - <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") ); ?>">
5295 8342 <i class="ays_fa ays_fa_info_circle"></i>
5296 8343 </a>
5297 8344 </label>
5298 8345 </div>
@@ -5312,9 +8359,9 @@
5312 8359 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5313 8360 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5314 8361 <label for="ays-chart-option-title-text-shadow" class="form-label">
5315 8362 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5316 - <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") ); ?>">
5317 8364 <i class="ays_fa ays_fa_info_circle"></i>
5318 8365 </a>
5319 8366 </label>
5320 8367 </div>
@@ -5328,9 +8375,9 @@
5328 8375 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5329 8376 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5330 8377 <label for="ays-chart-option-title-shadow-color">
5331 8378 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5332 - <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") ); ?>">
5333 8380 <i class="ays_fa ays_fa_info_circle"></i>
5334 8381 </a>
5335 8382 </label>
5336 8383 </div>
@@ -5379,9 +8426,9 @@
5379 8426 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5380 8427 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5381 8428 <label for="ays-chart-option-description-color">
5382 8429 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5383 - <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") ); ?>">
5384 8431 <i class="ays_fa ays_fa_info_circle"></i>
5385 8432 </a>
5386 8433 </label>
5387 8434 </div>
@@ -5392,9 +8439,9 @@
5392 8439 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5393 8440 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5394 8441 <label for="ays-chart-option-description-font-size" class="form-label">
5395 8442 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5396 - <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") ); ?>">
5397 8444 <i class="ays_fa ays_fa_info_circle"></i>
5398 8445 </a>
5399 8446 </label>
5400 8447 </div>
@@ -5406,9 +8453,9 @@
5406 8453 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5407 8454 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5408 8455 <label for="ays-chart-option-description-bold" class="form-label">
5409 8456 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5410 - <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") ); ?>">
5411 8458 <i class="ays_fa ays_fa_info_circle"></i>
5412 8459 </a>
5413 8460 </label>
5414 8461 </div>
@@ -5422,9 +8469,9 @@
5422 8469 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5423 8470 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5424 8471 <label for="ays-chart-option-description-italic" class="form-label">
5425 8472 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5426 - <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") ); ?>">
5427 8474 <i class="ays_fa ays_fa_info_circle"></i>
5428 8475 </a>
5429 8476 </label>
5430 8477 </div>
@@ -5438,9 +8485,9 @@
5438 8485 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5439 8486 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5440 8487 <label for="ays-chart-option-description-position">
5441 8488 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5442 - <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") ); ?>">
5443 8490 <i class="ays_fa ays_fa_info_circle"></i>
5444 8491 </a>
5445 8492 </label>
5446 8493 </div>
@@ -5460,9 +8507,9 @@
5460 8507 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5461 8508 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5462 8509 <label for="ays-chart-option-description-text-transform">
5463 8510 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5464 - <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") ); ?>">
5465 8512 <i class="ays_fa ays_fa_info_circle"></i>
5466 8513 </a>
5467 8514 </label>
5468 8515 </div>
@@ -5482,9 +8529,9 @@
5482 8529 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5483 8530 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5484 8531 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5485 8532 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5486 - <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") ); ?>">
5487 8534 <i class="ays_fa ays_fa_info_circle"></i>
5488 8535 </a>
5489 8536 </label>
5490 8537 </div>
@@ -5496,9 +8543,9 @@
5496 8543 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5497 8544 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5498 8545 <label for="ays-chart-option-description-text-decoration">
5499 8546 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5500 - <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") ); ?>">
5501 8548 <i class="ays_fa ays_fa_info_circle"></i>
5502 8549 </a>
5503 8550 </label>
5504 8551 </div>
@@ -5518,9 +8565,9 @@
5518 8565 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5519 8566 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5520 8567 <label for="ays-chart-option-description-text-shadow" class="form-label">
5521 8568 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5522 - <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") ); ?>">
5523 8570 <i class="ays_fa ays_fa_info_circle"></i>
5524 8571 </a>
5525 8572 </label>
5526 8573 </div>
@@ -5534,9 +8581,9 @@
5534 8581 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5535 8582 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5536 8583 <label for="ays-chart-option-description-shadow-color">
5537 8584 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5538 - <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") ); ?>">
5539 8586 <i class="ays_fa ays_fa_info_circle"></i>
5540 8587 </a>
5541 8588 </label>
5542 8589 </div>
@@ -5585,9 +8632,9 @@
5585 8632 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5586 8633 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5587 8634 <label for="ays-chart-option-description-color">
5588 8635 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5589 - <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") ); ?>">
5590 8637 <i class="ays_fa ays_fa_info_circle"></i>
5591 8638 </a>
5592 8639 </label>
5593 8640 </div>
@@ -5598,9 +8645,9 @@
5598 8645 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5599 8646 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5600 8647 <label for="ays-chart-option-description-font-size" class="form-label">
5601 8648 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5602 - <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") ); ?>">
5603 8650 <i class="ays_fa ays_fa_info_circle"></i>
5604 8651 </a>
5605 8652 </label>
5606 8653 </div>
@@ -5612,9 +8659,9 @@
5612 8659 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5613 8660 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5614 8661 <label for="ays-chart-option-description-bold" class="form-label">
5615 8662 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5616 - <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") ); ?>">
5617 8664 <i class="ays_fa ays_fa_info_circle"></i>
5618 8665 </a>
5619 8666 </label>
5620 8667 </div>
@@ -5628,9 +8675,9 @@
5628 8675 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5629 8676 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5630 8677 <label for="ays-chart-option-description-italic" class="form-label">
5631 8678 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5632 - <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") ); ?>">
5633 8680 <i class="ays_fa ays_fa_info_circle"></i>
5634 8681 </a>
5635 8682 </label>
5636 8683 </div>
@@ -5644,9 +8691,9 @@
5644 8691 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5645 8692 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5646 8693 <label for="ays-chart-option-description-position">
5647 8694 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5648 - <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") ); ?>">
5649 8696 <i class="ays_fa ays_fa_info_circle"></i>
5650 8697 </a>
5651 8698 </label>
5652 8699 </div>
@@ -5666,9 +8713,9 @@
5666 8713 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5667 8714 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5668 8715 <label for="ays-chart-option-description-text-transform">
5669 8716 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5670 - <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") ); ?>">
5671 8718 <i class="ays_fa ays_fa_info_circle"></i>
5672 8719 </a>
5673 8720 </label>
5674 8721 </div>
@@ -5688,9 +8735,9 @@
5688 8735 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5689 8736 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5690 8737 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5691 8738 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5692 - <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") ); ?>">
5693 8740 <i class="ays_fa ays_fa_info_circle"></i>
5694 8741 </a>
5695 8742 </label>
5696 8743 </div>
@@ -5702,9 +8749,9 @@
5702 8749 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5703 8750 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5704 8751 <label for="ays-chart-option-description-text-decoration">
5705 8752 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5706 - <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") ); ?>">
5707 8754 <i class="ays_fa ays_fa_info_circle"></i>
5708 8755 </a>
5709 8756 </label>
5710 8757 </div>
@@ -5724,9 +8771,9 @@
5724 8771 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5725 8772 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5726 8773 <label for="ays-chart-option-description-text-shadow" class="form-label">
5727 8774 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5728 - <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") ); ?>">
5729 8776 <i class="ays_fa ays_fa_info_circle"></i>
5730 8777 </a>
5731 8778 </label>
5732 8779 </div>
@@ -5740,9 +8787,9 @@
5740 8787 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5741 8788 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5742 8789 <label for="ays-chart-option-description-shadow-color">
5743 8790 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5744 - <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") ); ?>">
5745 8792 <i class="ays_fa ays_fa_info_circle"></i>
5746 8793 </a>
5747 8794 </label>
5748 8795 </div>
@@ -5803,9 +8850,9 @@
5803 8850
5804 8851 $sources[] = $content;
5805 8852 }
5806 8853 $content_for_escape = implode('' , $sources );
5807 - echo html_entity_decode(esc_html( $content_for_escape ));
8854 + echo html_entity_decode( esc_html($content_for_escape) );
5808 8855 }
5809 8856
5810 8857 public function settings_contents_advanced_settings( $sources, $args ){
5811 8858 $html_class_prefix = $args['html_class_prefix'];
@@ -5910,9 +8957,9 @@
5910 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">
5911 8958 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5912 8959 <label for="ays-chart-option-slice-text">
5913 8960 <?php echo esc_html(__( "Slice text", "chart-builder" )); ?>
5914 - <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") ); ?>">
5915 8962 <i class="ays_fa ays_fa_info_circle"></i>
5916 8963 </a>
5917 8964 </label>
5918 8965 </div>
@@ -5932,9 +8979,9 @@
5932 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">
5933 8980 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5934 8981 <label for="ays-chart-option-tooltip-text">
5935 8982 <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?>
5936 - <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") ); ?>">
5937 8984 <i class="ays_fa ays_fa_info_circle"></i>
5938 8985 </a>
5939 8986 </label>
5940 8987 </div>
@@ -5967,9 +9014,9 @@
5967 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">
5968 9015 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5969 9016 <label for="ays-chart-option-data-grouping-label" class="form-label">
5970 9017 <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?>
5971 - <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") ); ?>">
5972 9019 <i class="ays_fa ays_fa_info_circle"></i>
5973 9020 </a>
5974 9021 </label>
5975 9022 </div>
@@ -6010,17 +9057,18 @@
6010 9057 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6011 9058 <label for="ays-chart-option-focus-target">
6012 9059 <?php echo esc_html(__( "Focus target", "chart-builder" )); ?>
6013 9060 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6014 - echo htmlspecialchars( sprintf(
9061 + echo esc_html( sprintf(
9062 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6015 9063 "<p>" . __('There are two ways to focus the data table elements.', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6016 - __('%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>" .
6017 - __('%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>",
6018 - '<em>',
6019 - '</em>',
6020 - '<em>',
6021 - '</em>'
6022 - ) );
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 + ));
6023 9071 ?>">
6024 9072 <i class="ays_fa ays_fa_info_circle"></i>
6025 9073 </a>
6026 9074 </label>
@@ -6055,17 +9103,18 @@
6055 9103 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6056 9104 <label for="ays-chart-option-group-width">
6057 9105 <?php echo esc_html(__( "Bar width", "chart-builder" )); ?>
6058 9106 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6059 - echo htmlspecialchars( sprintf(
9107 + echo esc_html( sprintf(
9108 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6060 9109 "<p>" . __('The width of the bars, specified in either of these formats:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6061 - __('%sPixels:%s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
6062 - __('%sPercentage:%s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
6063 - '<em>',
6064 - '</em>',
6065 - '<em>',
6066 - '</em>'
6067 - ) );
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 + ));
6068 9117 ?>">
6069 9118 <i class="ays_fa ays_fa_info_circle"></i>
6070 9119 </a>
6071 9120 </label>
@@ -6117,23 +9166,24 @@
6117 9166 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6118 9167 <label for="ays-chart-option-multiple-data-format">
6119 9168 <?php echo esc_html(__( "Multiple data format", "chart-builder" )); ?>
6120 9169 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6121 - echo htmlspecialchars( sprintf(
9170 + echo esc_html( sprintf(
9171 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6122 9172 "<p>" . __('How multiple data selections are rolled up into tooltips:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6123 - __('%sCategory:%s Group selected data by row titles.', "chart-builder") . "</li><li>" .
6124 - __('%sSeries:%s Group selected data by column titles.', "chart-builder") . "</li><li>" .
6125 - __('%sAuto:%s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
6126 - __('%sNone:%s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
6127 - '<em>',
6128 - '</em>',
6129 - '<em>',
6130 - '</em>',
6131 - '<em>',
6132 - '</em>',
6133 - '<em>',
6134 - '</em>'
6135 - ) );
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 + ));
6136 9186 ?>">
6137 9187 <i class="ays_fa ays_fa_info_circle"></i>
6138 9188 </a>
6139 9189 </label>
@@ -6288,15 +9338,15 @@
6288 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) ?>">
6289 9339 </div>
6290 9340 </div> <!-- Line dash pattern -->
6291 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">
6292 - <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">
6293 9343 <label for="ays-chart-option-donut-hole-size">
6294 - <?php echo __( "Hole size", $this->plugin_name ); ?>
9344 + <?php echo esc_html(__( "Hole size", 'chart-builder' )); ?>
6295 9345 </label>
6296 9346 </div>
6297 - <div class="col-sm-7 <?= $html_class_prefix ?>input-align-right <?= $html_class_prefix ?>option-input">
6298 - <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) ?>">
6299 9349 </div>
6300 9350 </div> <!-- Donut hole size -->
6301 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">
6302 9352 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
@@ -6303,20 +9353,20 @@
6303 9353 <div class="ays-pro-features-v2-video-button"></div>
6304 9354 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
6305 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>
6306 9356 <div class="ays-pro-features-v2-upgrade-text">
6307 - <?php echo __("Upgrade" , "chart-builder"); ?>
9357 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
6308 9358 </div>
6309 9359 </a>
6310 9360 </div>
6311 - <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">
6312 9362 <label for="ays-chart-option-curve-type">
6313 - <?php echo __( "Line curve type", "chart-builder" ); ?>
9363 + <?php echo esc_html(__( "Line curve type", "chart-builder" )); ?>
6314 9364 </label>
6315 9365 </div>
6316 9366 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
6317 - <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]">
6318 - <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>
6319 9369 </select>
6320 9370 </div>
6321 9371 </div> <!-- Line curve type -->
6322 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">
@@ -6364,9 +9414,9 @@
6364 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">
6365 9415 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6366 9416 <label for="ays-chart-option-org-classname" class="form-label">
6367 9417 <?php echo esc_html(__( "Custom CSS class", "chart-builder" )); ?>
6368 - <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") ); ?>">
6369 9419 <i class="ays_fa ays_fa_info_circle"></i>
6370 9420 </a>
6371 9421 </label>
6372 9422 </div>
@@ -6377,9 +9427,11 @@
6377 9427 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6378 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">
6379 9429 <br>
6380 9430 <blockquote>
6381 - <?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>'); ?>
6382 9434 </blockquote>
6383 9435 <br>
6384 9436 </div>
6385 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">
@@ -6477,9 +9529,9 @@
6477 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">
6478 9530 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6479 9531 <label for="ays-chart-option-org-selected-classname" class="form-label">
6480 9532 <?php echo esc_html(__( "Selected node custom CSS class", "chart-builder" )); ?>
6481 - <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") ); ?>">
6482 9534 <i class="ays_fa ays_fa_info_circle"></i>
6483 9535 </a>
6484 9536 </label>
6485 9537 </div>
@@ -6490,9 +9542,14 @@
6490 9542 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6491 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">
6492 9544 <br>
6493 9545 <blockquote>
6494 - <?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 + ); ?>
6495 9552 </blockquote>
6496 9553 <br>
6497 9554 </div>
6498 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">
@@ -6544,8 +9601,16 @@
6544 9601 $outer_radius = $settings['outer_radius'];
6545 9602 $slice_spacing = $settings['slice_spacing'];
6546 9603 $circumference = $settings['circumference'];
6547 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'];
6548 9613 // $index_axis = $settings['index_axis'];
6549 9614
6550 9615 ob_start();
6551 9616 ?>
@@ -6606,8 +9671,108 @@
6606 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) ?>">
6607 9672 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">°</div>
6608 9673 </div>
6609 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 -->
6610 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">
6611 9776 <div class="col-sm-5 d-flex align-items-center <?php // echo esc_attr($html_class_prefix) ?>option-title">
6612 9777 <label for="ays-chart-option-index-axis">
6613 9778 <?php // echo esc_html(__( "Horizontal ", "chart-builder" )); ?>
@@ -6650,15 +9815,15 @@
6650 9815 if ( !isset( $source[0] ) ) {
6651 9816 if (count($source[1]) > 2) {
6652 9817 $titles = array();
6653 9818 for ($i = 0; $i < count($source[1]); $i++) {
6654 - array_push($titles, __("Title", $this->plugin_name).$i);
9819 + array_push($titles, __("Title", 'chart-builder').$i);
6655 9820 }
6656 9821 $source[0] = $titles;
6657 9822 } else {
6658 9823 $source[0] = array(
6659 - __("Country", $this->plugin_name),
6660 - __("Population", $this->plugin_name),
9824 + __("Country", 'chart-builder'),
9825 + __("Population", 'chart-builder'),
6661 9826 );
6662 9827 }
6663 9828
6664 9829 ksort($source);
@@ -6691,9 +9856,9 @@
6691 9856 <g>
6692 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" />
6693 9858 </g>
6694 9859 </svg>
6695 - <span><?php echo $val[0]; ?></span>
9860 + <span><?php echo esc_html($val[0]); ?></span>
6696 9861 </legend>
6697 9862 <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
6698 9863 <div class="ays-slices-accordion-data-main-wrap">
6699 9864 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6700,9 +9865,9 @@
6700 9865 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6701 9866 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6702 9867 <label for="ays-chart-option-slice-color">
6703 9868 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
6704 - <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") ); ?>">
6705 9870 <i class="ays_fa ays_fa_info_circle"></i>
6706 9871 </a>
6707 9872 </label>
6708 9873 </div>
@@ -6707,13 +9872,13 @@
6707 9872 </label>
6708 9873 </div>
6709 9874 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6710 9875 <input type="color"
6711 - id="ays-chart-option-slice-color-<?php echo $key; ?>"
9876 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
6712 9877 class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6713 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo $key; ?>]"
6714 - value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : $slice_colors_default[$key]; ?>"
6715 - 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); ?>">
6716 9881 </div>
6717 9882 </div> <!-- Slice color -->
6718 9883 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6719 9884 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6725,13 +9890,13 @@
6725 9890 </label>
6726 9891 </div>
6727 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">
6728 9893 <input type="number"
6729 - id="ays-chart-option-slice-offset-<?php echo $key; ?>"
9894 + id="ays-chart-option-slice-offset-<?php echo esc_attr($key); ?>"
6730 9895 class="ays-chart-option-slice-offset ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
6731 - 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); ?>]"
6732 9897 value="<?php echo isset($slice_offset[$key]) ? esc_attr($slice_offset[$key]) : 0 ; ?>"
6733 - data-slice-id="<?php echo $key; ?>"
9898 + data-slice-id="<?php echo esc_attr($key); ?>"
6734 9899 step=".01" min="0.0" max="1.0">
6735 9900 </div>
6736 9901 </div> <!-- Slice offset -->
6737 9902 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
@@ -6737,9 +9902,9 @@
6737 9902 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6738 9903 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6739 9904 <label for="ays-chart-option-slice-text-color">
6740 9905 <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
6741 - <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") ); ?>">
6742 9907 <i class="ays_fa ays_fa_info_circle"></i>
6743 9908 </a>
6744 9909 </label>
6745 9910 </div>
@@ -6744,13 +9909,13 @@
6744 9909 </label>
6745 9910 </div>
6746 9911 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6747 9912 <input type="color"
6748 - id="ays-chart-option-slice-text-color-<?php echo $key; ?>"
9913 + id="ays-chart-option-slice-text-color-<?php echo esc_attr($key); ?>"
6749 9914 class="ays-chart-option-slice-text-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6750 - 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); ?>]"
6751 9916 value="<?php echo isset($slice_text_color[$key]) ? esc_attr($slice_text_color[$key]) : '#ffffff'; ?>"
6752 - data-slice-id="<?php echo $key; ?>">
9917 + data-slice-id="<?php echo esc_attr($key); ?>">
6753 9918 </div>
6754 9919 </div> <!-- Slice color -->
6755 9920 </div>
6756 9921 </div>
@@ -6762,9 +9927,9 @@
6762 9927 </div>
6763 9928 </div>
6764 9929 <br>
6765 9930 <blockquote>
6766 - <?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" )); ?>
6767 9932 </blockquote>
6768 9933 </div>
6769 9934 <?php
6770 9935
@@ -6775,9 +9940,9 @@
6775 9940 }
6776 9941
6777 9942 $content = ob_get_clean();
6778 9943
6779 - $title = __( 'Slices settings', "chart-builder" );
9944 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
6780 9945
6781 9946 $sources['slices_settings'] = array(
6782 9947 'content' => $content,
6783 9948 'title' => $title
@@ -6784,9 +9949,139 @@
6784 9949 );
6785 9950
6786 9951 return $sources;
6787 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);
6788 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 +
6789 10084 public function settings_contents_series_settings( $sources, $args ){
6790 10085 $html_class_prefix = $args['html_class_prefix'];
6791 10086 $html_name_prefix = $args['html_name_prefix'];
6792 10087 $settings = $args['settings'];
@@ -6803,15 +10098,15 @@
6803 10098 if ( !isset( $source[0] ) ) {
6804 10099 if (count($source[1]) > 2) {
6805 10100 $titles = array();
6806 10101 for ($i = 0; $i < count($source[1]); $i++) {
6807 - array_push($titles, __("Title", $this->plugin_name).$i);
10102 + array_push($titles, __("Title", "chart-builder").$i);
6808 10103 }
6809 10104 $source[0] = $titles;
6810 10105 } else {
6811 10106 $source[0] = array(
6812 - __("Country", $this->plugin_name),
6813 - __("Population", $this->plugin_name),
10107 + __("Country", "chart-builder"),
10108 + __("Population", "chart-builder"),
6814 10109 );
6815 10110 }
6816 10111
6817 10112 ksort($source);
@@ -6829,8 +10124,9 @@
6829 10124 $series_row = array_shift($source);
6830 10125 $title = array_shift($series_row);
6831 10126 $series_color = $settings['series_color'];
6832 10127 $series_colors_default = $settings['series_colors_default'];
10128 + $series_format = $settings['series_format'];
6833 10129 $series_visible_in_legend = $settings['series_visible_in_legend'];
6834 10130 $series_line_width = $settings['series_line_width'];
6835 10131 $series_point_size = $settings['series_point_size'];
6836 10132 $series_point_shape = $settings['series_point_shape'];
@@ -6848,9 +10144,9 @@
6848 10144 <g>
6849 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" />
6850 10146 </g>
6851 10147 </svg>
6852 - <span><?php echo $val; ?></span>
10148 + <span><?php echo esc_attr($val); ?></span>
6853 10149 </legend>
6854 10150 <div class="ays-series-accordion-options-content ays-series-accordion-options-content">
6855 10151 <div class="ays-series-accordion-data-main-wrap">
6856 10152 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6861,13 +10157,13 @@
6861 10157 </label>
6862 10158 </div>
6863 10159 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6864 10160 <input type="color"
6865 - id="ays-chart-option-series-color-<?php echo $key; ?>"
10161 + id="ays-chart-option-series-color-<?php echo esc_attr($key); ?>"
6866 10162 class="ays-chart-option-series-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6867 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo $key; ?>]"
6868 - value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : $series_colors_default[$key]; ?>"
6869 - 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); ?>">
6870 10166 </div>
6871 10167 </div> <!-- series color -->
6872 10168 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6873 10169 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6880,18 +10176,36 @@
6880 10176 </div>
6881 10177 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6882 10178 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
6883 10179 <input type="checkbox"
6884 - 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); ?>"
6885 10181 class="ays-chart-option-series-visible-in-legend <?php echo esc_attr($html_class_prefix) ?>toggle-switch"
6886 - 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); ?>]"
6887 10183 value="on"
6888 - data-series-id="<?php echo $key; ?>"
10184 + data-series-id="<?php echo esc_attr($key); ?>"
6889 10185 <?php echo isset($series_visible_in_legend[$key]) && $series_visible_in_legend[$key] == 'on' ? 'checked' : (!isset($series_color[$key]) ? 'checked' : ''); ?> >
6890 10186 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
6891 10187 </label>
6892 10188 </div>
6893 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 -->
6894 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">
6895 10209 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6896 10210 <label for="ays-chart-option-series-line-width">
6897 10211 <?php echo esc_html(__( "Line width", "chart-builder" )); ?>
@@ -6901,13 +10215,13 @@
6901 10215 </label>
6902 10216 </div>
6903 10217 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6904 10218 <input type="number"
6905 - id="ays-chart-option-series-line-width-<?php echo $key; ?>"
10219 + id="ays-chart-option-series-line-width-<?php echo esc_attr($key); ?>"
6906 10220 class="ays-chart-option-series-line-width ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
6907 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo $key; ?>]"
6908 - value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : $line_width; ?>"
6909 - 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); ?>">
6910 10224 </div>
6911 10225 </div> <!-- Line width -->
6912 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">
6913 10227 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6919,13 +10233,13 @@
6919 10233 </label>
6920 10234 </div>
6921 10235 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6922 10236 <input type="number"
6923 - id="ays-chart-option-series-point-size-<?php echo $key; ?>"
10237 + id="ays-chart-option-series-point-size-<?php echo esc_attr($key); ?>"
6924 10238 class="ays-chart-option-series-point-size ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
6925 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo $key; ?>]"
6926 - value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : $point_size; ?>"
6927 - 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); ?>">
6928 10242 </div>
6929 10243 </div> <!-- Point size -->
6930 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">
6931 10245 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6937,12 +10251,12 @@
6937 10251 </label>
6938 10252 </div>
6939 10253 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6940 10254 <select
6941 - id="ays-chart-option-series-point-shape-<?php echo $key; ?>"
10255 + id="ays-chart-option-series-point-shape-<?php echo esc_attr($key); ?>"
6942 10256 class="ays-chart-option-series-point-shape <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select"
6943 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo $key; ?>]"
6944 - 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); ?>">
6945 10259 >
6946 10260 <?php
6947 10261 $value = isset($series_point_shape[$key]) ? esc_attr($series_point_shape[$key]) : $point_shape;
6948 10262 foreach ( $point_shape_options as $option_slug => $option ):
@@ -6965,11 +10279,16 @@
6965 10279 </div>
6966 10280 </div>
6967 10281 <br>
6968 10282 <blockquote>
6969 - <?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' )); ?>
6970 10284 <br>
6971 - <?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 + ); ?>
6972 10291 </blockquote>
6973 10292 </div>
6974 10293 <?php
6975 10294
@@ -7003,15 +10322,15 @@
7003 10322 if ( !isset( $source[0] ) ) {
7004 10323 if (count($source[1]) > 2) {
7005 10324 $titles = array();
7006 10325 for ($i = 0; $i < count($source[1]); $i++) {
7007 - array_push($titles, __("Title", $this->plugin_name).$i);
10326 + array_push($titles, __("Title", 'chart-builder').$i);
7008 10327 }
7009 10328 $source[0] = $titles;
7010 10329 } else {
7011 10330 $source[0] = array(
7012 - __("Country", $this->plugin_name),
7013 - __("Population", $this->plugin_name),
10331 + __("Country", 'chart-builder'),
10332 + __("Population", 'chart-builder'),
7014 10333 );
7015 10334 }
7016 10335
7017 10336 ksort($source);
@@ -7057,9 +10376,9 @@
7057 10376 <g>
7058 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" />
7059 10378 </g>
7060 10379 </svg>
7061 - <span><?php echo $val; ?></span>
10380 + <span><?php echo esc_html($val); ?></span>
7062 10381 </legend>
7063 10382 <div class="ays-rows-accordion-options-content ays-rows-accordion-options-content">
7064 10383 <div class="ays-rows-accordion-data-main-wrap">
7065 10384 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7070,13 +10389,13 @@
7070 10389 </label>
7071 10390 </div>
7072 10391 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7073 10392 <input type="color"
7074 - id="ays-chart-option-rows-color-<?php echo $key; ?>"
10393 + id="ays-chart-option-rows-color-<?php echo esc_attr($key); ?>"
7075 10394 class="ays-chart-option-rows-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7076 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo $key; ?>]"
7077 - value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : $series_color; ?>"
7078 - 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); ?>">
7079 10398 </div>
7080 10399 </div> <!-- color -->
7081 10400 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7082 10401 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7085,13 +10404,13 @@
7085 10404 </label>
7086 10405 </div>
7087 10406 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7088 10407 <input type="number"
7089 - id="ays-chart-option-rows-opacity-<?php echo $key; ?>"
10408 + id="ays-chart-option-rows-opacity-<?php echo esc_attr($key); ?>"
7090 10409 class="ays-chart-option-rows-opacity ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7091 - 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); ?>]"
7092 10411 value="<?php echo isset($rows_opacity[$key]) && '' !== $rows_opacity[$key] ? esc_attr($rows_opacity[$key]) : 1.0; ?>"
7093 - data-rows-id="<?php echo $key; ?>"
10412 + data-rows-id="<?php echo esc_attr($key); ?>"
7094 10413 step=".1" min="0" max="1">
7095 10414 </div>
7096 10415 </div> <!-- opacity -->
7097 10416 </div>
@@ -7102,17 +10421,27 @@
7102 10421 endforeach;
7103 10422 ?>
7104 10423 <br>
7105 10424 <blockquote>
7106 - <?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' )); ?>
7107 10426 <br>
7108 - <?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 + ); ?>
7109 10433 </blockquote>
7110 10434 </div>
7111 10435 <div class="<?php echo esc_attr($html_class_prefix) ?>not-hidden-options-section <?php echo $enable_row_settings === 'checked' ? 'display_none' : ''; ?>">
7112 10436 <br>
7113 10437 <blockquote>
7114 - <?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 + ); ?>
7115 10444 </blockquote>
7116 10445 </div>
7117 10446 </div>
7118 10447 </div>
@@ -7127,5 +10456,60 @@
7127 10456 );
7128 10457
7129 10458 return $sources;
7130 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 +
7131 10515 }