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 +3747 -607 3.1.1 → 3.8.1 View file →
@@ -88,9 +88,9 @@
88 88 //
89 89 wp_enqueue_style( $this->plugin_name . '-normalize', plugin_dir_url( __FILE__ ) . 'css/normalize.css', array(), $this->version . time(), 'all' );
90 90 wp_enqueue_style( $this->plugin_name . '-admin-general', plugin_dir_url( __FILE__ ) . 'css/admin-general.css', array(), $this->version, 'all' );
91 91 wp_enqueue_style( $this->plugin_name . '-banner', plugin_dir_url( __FILE__ ) . 'css/banner.css', array(), $this->version, 'all' );
92 - wp_enqueue_style( $this->plugin_name . '-chart-builder-banner.css', plugin_dir_url(__FILE__) . 'css/chart-builder-banner.css', array(), $this->version, 'all');
92 + // wp_enqueue_style( $this->plugin_name . '-chart-builder-banner.css', plugin_dir_url(__FILE__) . 'css/chart-builder-banner.css', array(), $this->version, 'all');
93 93 wp_enqueue_style( $this->plugin_name . '-animate', plugin_dir_url(__FILE__) . 'css/animate.css', array(), $this->version, 'all');
94 94 wp_enqueue_style( $this->plugin_name . '-font-awesome', plugin_dir_url(__FILE__) . 'css/ays-font-awesome.min.css', array(), $this->version, 'all');
95 95 wp_enqueue_style( $this->plugin_name . '-font-awesome-icons', plugin_dir_url(__FILE__) . 'css/ays-font-awesome-icons.css', array(), $this->version, 'all');
96 96 wp_enqueue_style( $this->plugin_name . '-select2', plugin_dir_url(__FILE__) . 'css/ays-select2.min.css', array(), $this->version, 'all');
@@ -173,9 +173,9 @@
173 173 wp_enqueue_script( $this->plugin_name . '-chart-js', plugin_dir_url(__FILE__) . 'js/chart-js.js', array('jquery'), $this->version, true);
174 174
175 175 wp_enqueue_script( $this->plugin_name . '-functions', plugin_dir_url( __FILE__ ) . 'js/functions.js', array( 'jquery' ), $this->version, true );
176 176
177 - wp_register_script( $this->plugin_name . '-localized', '' );
177 + wp_register_script( $this->plugin_name . '-localized', '' , array('jquery'), $this->version, true);
178 178
179 179 wp_localize_script( $this->plugin_name . '-localized', 'aysChartBuilderAdmin', array(
180 180 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
181 181 'selectUser' => __( 'Select author', "chart-builder" ),
@@ -203,10 +203,13 @@
203 203 'minColNotice' => __( 'Sorry, minimum count of columns should be 1', "chart-builder"),
204 204 'activated' => __( "Activated", "chart-builder" ),
205 205 'errorMsg' => __( "Error", "chart-builder" ),
206 206 'loadResource' => __( "Can't load resource.", "chart-builder" ),
207 - 'somethingWentWrong' => __( "Maybe something went wrong.", "chart-builder" ),
208 - ) );
207 + 'somethingWentWrong' => __( "Maybe something went wrong.", "chart-builder" ),
208 + 'successCopyCoupon' => esc_html__( "Coupon code copied!", 'chart-builder' ),
209 + 'failedCopyCoupon' => esc_html__( "Failed to copy coupon code", 'chart-builder' ),
210 +
211 + ) );
209 212
210 213 wp_localize_script( $this->plugin_name . '-localized', 'aysChartBuilderChartSettings', array(
211 214 'types' => CBFunctions()->getAllowedTypes(),
212 215 'max_selected_options' => 2,
@@ -224,8 +227,9 @@
224 227 'filter_get_data' => wp_create_nonce( 'cbuilder-fetch-post-type-data' ),
225 228 'quiz_maker_get_data' => wp_create_nonce( 'cbuilder-fetch-quiz-maker-data' ),
226 229 'quiz_maker_save_data' => wp_create_nonce( 'cbuilder-save-quiz-maker-data' ),
227 230 'author_user_search' => wp_create_nonce( 'cbuilder-author-user-search' ),
231 +
228 232 ),
229 233 'actions' => array(
230 234 'filter_get_props' => 'fetch_post_type_props',
231 235 'filter_get_data' => 'fetch_post_type_data',
@@ -241,9 +245,9 @@
241 245
242 246 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
243 247 wp_enqueue_script( $this->plugin_name . '-google', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-google.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
244 248 wp_enqueue_script( $this->plugin_name . '-chartjs', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-chartjs.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
245 - wp_enqueue_script( $this->plugin_name . '-general-js', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-general.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version, true );
249 + wp_enqueue_script( $this->plugin_name . '-general-js', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-general.js', array( 'jquery', $this->plugin_name . '-localized' ), $this->version . time(), true );
246 250
247 251 if ( false !== strpos( $hook_suffix, 'settings' ) ) {
248 252 wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true );
249 253
@@ -248,20 +252,20 @@
248 252 wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true );
249 253
250 254 wp_localize_script( $this->plugin_name . '-settings', 'aysChartBuilderAdminSettings', array(
251 255 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
252 - 'selectUserRoles' => __( 'Select user roles', $this->plugin_name ),
253 - 'delete' => __( 'Delete', $this->plugin_name ),
254 - 'selectQuestionDefaultType' => __( 'Select question default type', $this->plugin_name ),
255 - 'yes' => __( 'Yes', $this->plugin_name ),
256 - 'cancel' => __( 'Cancel', $this->plugin_name ),
257 - 'somethingWentWrong' => __( "Maybe something went wrong.", $this->plugin_name ),
258 - 'failed' => __( 'Failed', $this->plugin_name ),
259 - 'selectPage' => __( 'Select page', $this->plugin_name ),
260 - 'selectPostType' => __( 'Select post type', $this->plugin_name ),
261 - 'copied' => __( 'Copied!', $this->plugin_name),
262 - 'clickForCopy' => __( 'Click to copy', $this->plugin_name),
263 - 'selectForm' => __( 'Select form', $this->plugin_name),
256 + 'selectUserRoles' => __( 'Select user roles', 'chart-builder' ),
257 + 'delete' => __( 'Delete', 'chart-builder' ),
258 + 'selectQuestionDefaultType' => __( 'Select question default type', 'chart-builder' ),
259 + 'yes' => __( 'Yes', 'chart-builder' ),
260 + 'cancel' => __( 'Cancel', 'chart-builder' ),
261 + 'somethingWentWrong' => __( "Maybe something went wrong.", 'chart-builder' ),
262 + 'failed' => __( 'Failed', 'chart-builder' ),
263 + 'selectPage' => __( 'Select page', 'chart-builder' ),
264 + 'selectPostType' => __( 'Select post type', 'chart-builder' ),
265 + 'copied' => __( 'Copied!', 'chart-builder'),
266 + 'clickForCopy' => __( 'Click to copy', 'chart-builder'),
267 + 'selectForm' => __( 'Select form', 'chart-builder'),
264 268 ) );
265 269 }
266 270 }
267 271
@@ -277,8 +281,38 @@
277 281 wp_deregister_script('mwai-vendor');
278 282 wp_dequeue_script('mwai');
279 283 wp_dequeue_script('mwai-vendor');
280 284 }
285 +
286 + if (is_plugin_active('html5-video-player/html5-video-player.php')) {
287 + wp_dequeue_style('h5vp-admin');
288 + wp_dequeue_style('fs_common');
289 + }
290 +
291 + if (is_plugin_active('panorama/panorama.php')) {
292 + wp_dequeue_style('bppiv_admin_custom_css');
293 + wp_dequeue_style('bppiv-custom-style');
294 + }
295 +
296 + if (is_plugin_active('wp-social/wp-social.php')) {
297 + wp_dequeue_style('wp_social_select2_css');
298 + wp_deregister_script('wp_social_select2_js');
299 + wp_dequeue_script('wp_social_select2_js');
300 + }
301 +
302 + if (is_plugin_active('real-media-library-lite/index.php')) {
303 + wp_dequeue_style('real-media-library-lite-rml');
304 + }
305 +
306 + // Theme | Phlox 2.17.6
307 + wp_dequeue_style('auxin-admin-style');
308 +
309 + // Theme | Pixel Ebook Store
310 + wp_dequeue_style('pixel-ebook-store-free-demo-content-style');
311 +
312 + // Theme | Interactive Education
313 + wp_dequeue_style('interactive-education-free-demo-content-style');
314 +
281 315 }
282 316 }
283 317
284 318 /**
@@ -306,9 +340,9 @@
306 340 $this->capability,
307 341 $this->plugin_name,
308 342 array($this, 'display_plugin_charts_page'),
309 343 CHART_BUILDER_ADMIN_URL . '/images/icons/ays_chart_logo_icon_bw.svg',
310 - '6.22'
344 + '26'
311 345 );
312 346
313 347 }
314 348
@@ -314,10 +348,10 @@
314 348
315 349 public function add_plugin_charts_submenu(){
316 350 $hook_page_view = add_submenu_page(
317 351 $this->plugin_name,
318 - __('All Charts', $this->plugin_name),
319 - __('All Charts', $this->plugin_name),
352 + __('All Charts', 'chart-builder'),
353 + __('All Charts', 'chart-builder'),
320 354 'manage_options',
321 355 $this->plugin_name,
322 356 array($this, 'display_plugin_charts_page')
323 357 );
@@ -327,10 +361,10 @@
327 361
328 362 public function add_plugin_add_new_submenu(){
329 363 $hook_charts = add_submenu_page(
330 364 $this->plugin_name,
331 - __('Add New', $this->plugin_name),
332 - __('Add New', $this->plugin_name),
365 + __('Add New', 'chart-builder'),
366 + __('Add New', 'chart-builder'),
333 367 'manage_options',
334 368 $this->plugin_name."&action=add",
335 369 array($this, 'display_plugin_addnew_page')
336 370 );
@@ -339,10 +373,10 @@
339 373
340 374 public function add_plugin_dashboard_submenu(){
341 375 $hook_charts = add_submenu_page(
342 376 $this->plugin_name,
343 - __('How to use', $this->plugin_name),
344 - __('How to use', $this->plugin_name),
377 + __('How to use', 'chart-builder'),
378 + __('How to use', 'chart-builder'),
345 379 'manage_options',
346 380 $this->plugin_name . '-dashboard',
347 381 array($this, 'display_plugin_setup_page')
348 382 );
@@ -350,10 +384,10 @@
350 384 }
351 385
352 386 public function add_plugin_general_settings_submenu(){
353 387 $hook_settings = add_submenu_page( $this->plugin_name,
354 - __('General Settings', $this->plugin_name),
355 - __('General Settings', $this->plugin_name),
388 + __('General Settings', 'chart-builder'),
389 + __('General Settings', 'chart-builder'),
356 390 'manage_options',
357 391 $this->plugin_name . '-settings',
358 392 array($this, 'display_plugin_settings_page')
359 393 );
@@ -361,10 +395,10 @@
361 395 }
362 396
363 397 public function add_plugin_featured_plugins_submenu(){
364 398 $hook_our_products = add_submenu_page( $this->plugin_name,
365 - __('Our products', $this->plugin_name),
366 - __('Our products', $this->plugin_name),
399 + __('Our products', 'chart-builder'),
400 + __('Our products', 'chart-builder'),
367 401 'manage_options',
368 402 $this->plugin_name . '-featured-plugins',
369 403 array($this, 'display_plugin_featured_plugins_page')
370 404 );
@@ -374,10 +408,10 @@
374 408
375 409 public function add_plugin_chart_features_submenu(){
376 410 $hook_pro_features = add_submenu_page(
377 411 $this->plugin_name,
378 - __('PRO Features', $this->plugin_name),
379 - __('PRO Features', $this->plugin_name),
412 + __('PRO Features', 'chart-builder'),
413 + __('PRO Features', 'chart-builder'),
380 414 'manage_options',
381 415 $this->plugin_name . '-chart-features',
382 416 array($this, 'display_plugin_chart_features_page')
383 417 );
@@ -392,8 +426,9 @@
392 426 'default' => 5,
393 427 'option' => 'cb_charts_per_page'
394 428 );
395 429
430 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
396 431 if( ! ( isset( $_GET['action'] ) && ( $_GET['action'] == 'add' || $_GET['action'] == 'edit' ) ) ){
397 432 add_screen_option( $option, $args );
398 433 }
399 434
@@ -411,17 +446,29 @@
411 446 return;
412 447 }
413 448 }
414 449
450 + private function check_permissions_and_nonce($nonce_action) {
451 + if (!is_user_logged_in() || !current_user_can('manage_options')) {
452 + wp_die(__('Access denied.', 'chart-builder'));
453 + }
454 +
455 + if (!isset($_REQUEST['_wpnonce']) || !wp_verify_nonce($_REQUEST['_wpnonce'], $this->plugin_name . '-' . $nonce_action)) {
456 + wp_die(__('Security check failed. Invalid or missing nonce.', 'chart-builder'));
457 + }
458 + }
415 459 public function display_plugin_charts_page(){
416 460 global $ays_chart_db_actions;
417 461
418 - $action = (isset($_GET['action'])) ? sanitize_text_field( $_GET['action'] ) : '';
419 - $id = (isset($_GET['id'])) ? absint( esc_attr($_GET['id']) ) : 0;
420 -
421 - if (isset($_POST['bulk_delete_confirm'])) {
462 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
463 + $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : '';
464 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
465 + $id = (isset($_GET['id'])) ? absint( wp_unslash( $_GET['id'] ) ) : 0;
466 + if (isset($_POST['bulk_delete_confirm'])) {
467 + $this->check_permissions_and_nonce('bulk-delete');
422 468 if (isset($_POST['bulk-delete']) && !empty($_POST['bulk-delete'])) {
423 - $ids = $_POST['bulk-delete'];
469 + $ids = wp_unslash( $_POST['bulk-delete'] );
470 + $ids = array_map( 'absint', (array) $ids );
424 471 foreach ($ids as $id) {
425 472 if ($id > 0) {
426 473 $this->db_obj->delete_item( $id );
427 474 }
@@ -436,9 +483,10 @@
436 483 }
437 484
438 485 switch ($action) {
439 486 case 'trash':
440 - if( $id > 0 ){
487 + $this->check_permissions_and_nonce('trash-item');
488 + if ($id > 0){
441 489 $this->db_obj->trash_item( $id );
442 490 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
443 491 $url = esc_url_raw( add_query_arg( array(
444 492 "status" => 'trashed'
@@ -447,9 +495,10 @@
447 495 exit;
448 496 }
449 497 break;
450 498 case 'restore':
451 - if( $id > 0 ){
499 + $this->check_permissions_and_nonce('delete-item');
500 + if ($id > 0 ) {
452 501 $this->db_obj->restore_item( $id );
453 502 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
454 503 $url = esc_url_raw( add_query_arg( array(
455 504 "status" => 'restored'
@@ -458,9 +507,10 @@
458 507 exit;
459 508 }
460 509 break;
461 510 case 'delete':
462 - if( $id > 0 ){
511 + $this->check_permissions_and_nonce('delete-item');
512 + if ($id > 0) {
463 513 $this->db_obj->delete_item( $id );
464 514 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
465 515 $url = esc_url_raw( add_query_arg( array(
466 516 "status" => 'deleted'
@@ -469,9 +519,10 @@
469 519 exit;
470 520 }
471 521 break;
472 522 case 'publish':
473 - if( $id > 0 ){
523 + $this->check_permissions_and_nonce('publish-item');
524 + if ($id > 0) {
474 525 $this->db_obj->publish_item( $id );
475 526 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
476 527 $url = esc_url_raw( add_query_arg( array(
477 528 "status" => 'published'
@@ -480,9 +531,10 @@
480 531 exit;
481 532 }
482 533 break;
483 534 case 'unpublish':
484 - if( $id > 0 ){
535 + $this->check_permissions_and_nonce('unpublish-item');
536 + if ($id > 0) {
485 537 $this->db_obj->restore_item( $id );
486 538 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
487 539 $url = esc_url_raw( add_query_arg( array(
488 540 "status" => 'unpublished'
@@ -491,9 +543,10 @@
491 543 exit;
492 544 }
493 545 break;
494 546 case 'duplicate':
495 - if( $id > 0 ){
547 + $this->check_permissions_and_nonce('duplicate-item');
548 + if ($id > 0) {
496 549 $this->db_obj->duplicate_item( $id );
497 550 $url = remove_query_arg( array('action', 'id', '_wpnonce') );
498 551 $url = esc_url_raw( add_query_arg( array(
499 552 "status" => 'duplicated'
@@ -511,9 +564,66 @@
511 564 default:
512 565 include_once('partials/charts/chart-builder-charts-display.php');
513 566 }
514 567 }
568 + public static function chart_builder_svg_sanitize_allowed_properties(){
515 569
570 + $allowed_properties = array(
571 + 'div' => array(
572 + 'id' => true,
573 + 'class' => true,
574 + 'style' => true,
575 + ),
576 + 'svg' => array(
577 + 'class' => true,
578 + 'version' => true,
579 + 'overflow' => true,
580 + 'preserveAspectRatio' => true,
581 + 'preserveaspectratio' => true,
582 + 'fill' => true,
583 + 'viewBox' => true,
584 + 'viewbox' => true,
585 + 'height' => true,
586 + 'width' => true,
587 + 'xmlns' => true,
588 + 'xmlns:xlink' => true,
589 + 'id' => true,
590 + 'title' => true,
591 + ),
592 + 'g' => array(
593 + 'id' => true,
594 + 'class' => true,
595 + 'stroke-width' => true,
596 + 'stroke-linecap' => true,
597 + 'stroke-linejoin' => true,
598 + ),
599 + 'path' => array(
600 + 'id' => true,
601 + 'class' => true,
602 + 'd' => true,
603 + 'fill' => true,
604 + 'vector-effect' => true,
605 + 'xmlns:default' => true,
606 + ),
607 + 'span' => array(
608 + 'class' => true,
609 + ),
610 + 'img' => array(
611 + 'src' => true,
612 + 'alt' => true,
613 + ),
614 + );
615 +
616 + return $allowed_properties;
617 + }
618 +
619 + public static function get_allowed_tags_for_loader() {
620 + return array(
621 + 'span' => array('class' => array()),
622 + 'img' => array('src' => array(), 'alt' => array()),
623 + );
624 + }
625 +
516 626 public function display_plugin_setup_page(){
517 627 include_once('partials/chart-builder-admin-display.php');
518 628 }
519 629
@@ -571,15 +681,28 @@
571 681
572 682 $response = array(
573 683 "status" => false
574 684 );
685 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
686 + $function = isset( $_REQUEST['function'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['function'] ) ) : null;
575 687
576 - $function = isset($_REQUEST['function']) ? sanitize_text_field( $_REQUEST['function'] ) : null;
577 -
578 688 if($function !== null){
579 689 $response = array();
580 690 if( is_callable( array( $this, $function ) ) ){
581 - $response = $this->$function();
691 + $allowed_functions = array(
692 + "deactivate_plugin_option",
693 + "ays_chart_dismiss_button",
694 + "author_user_search",
695 + "ays_chart_activate_plugin",
696 + "ays_chart_install_plugin",
697 + "fetch_quiz_maker_data",
698 + "save_quiz_maker_data",
699 + "fetch_post_type_props",
700 + "fetch_post_type_data",
701 + );
702 + if (in_array($function, $allowed_functions, true)) {
703 + $response = $this->$function();
704 + }
582 705
583 706 ob_end_clean();
584 707 $ob_get_clean = ob_get_clean();
585 708 echo json_encode( $response );
@@ -595,10 +718,14 @@
595 718 }
596 719
597 720 public function deactivate_plugin_option(){
598 721 // Run a security check.
599 - check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
600 -
722 + if ( isset( $_REQUEST['_ajax_nonce'] ) ) {
723 + check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
724 + } else {
725 + wp_die();
726 + }
727 +
601 728 // Check for permissions.
602 729 if ( ! current_user_can( 'manage_options' ) ) {
603 730 ob_end_clean();
604 731 $ob_get_clean = ob_get_clean();
@@ -608,9 +735,9 @@
608 735 wp_die();
609 736 }
610 737
611 738 if( is_user_logged_in() ) {
612 - $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( $_REQUEST['upgrade_plugin'] ) : '';
739 + $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['upgrade_plugin'] ) ) : '';
613 740 $upgrade_option = get_option( 'ays_chart_builder_upgrade_plugin', '' );
614 741
615 742 if ( $upgrade_option === '' ) {
616 743 add_option( 'ays_chart_builder_upgrade_plugin', $request_value );
@@ -633,17 +760,17 @@
633 760 }
634 761 }
635 762
636 763 public function chart_builder_admin_footer($a){
637 - if(isset($_REQUEST['page'])){
638 - if(false !== strpos( sanitize_text_field( $_REQUEST['page'] ), $this->plugin_name)){
764 + if(isset($_REQUEST['page'])){// phpcs:ignore WordPress.Security.NonceVerification.Recommended
765 + if(false !== strpos( sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ), $this->plugin_name)){// phpcs:ignore WordPress.Security.NonceVerification.Recommended
639 766 ?>
640 767 <div class="ays-chart-footer-support-box">
641 - <span class="ays-chart-footer-link-row"><a href="https://wordpress.org/support/plugin/chart-builder" target="_blank"><?php echo __( "Support", "chart-builder"); ?></a></span>
768 + <span class="ays-chart-footer-link-row"><a href="https://wordpress.org/support/plugin/chart-builder" target="_blank"><?php echo esc_html__( "Support", "chart-builder"); ?></a></span>
642 769 <span class="ays-chart-footer-slash-row">/</span>
643 - <span class="ays-chart-footer-link-row"><a href="https://ays-pro.com/wordpress-chart-builder-plugin-user-manual" target="_blank"><?php echo __( "Docs", "chart-builder"); ?></a></span>
770 + <span class="ays-chart-footer-link-row"><a href="https://ays-pro.com/wordpress-chart-builder-plugin-user-manual" target="_blank"><?php echo esc_html__( "Docs", "chart-builder"); ?></a></span>
644 771 <span class="ays-chart-footer-slash-row">/</span>
645 - <span class="ays-chart-footer-link-row"><a href="https://ays-demo.com/chart-builder-plugin-suggestion-box" target="_blank"><?php echo __( "Suggest a Feature", "chart-builder"); ?></a></span>
772 + <span class="ays-chart-footer-link-row"><a href="https://ays-demo.com/chart-builder-plugin-suggestion-box" target="_blank"><?php echo esc_html__( "Suggest a Feature", "chart-builder"); ?></a></span>
646 773 </div>
647 774 <p style="font-size:13px;text-align:center;font-style:italic;">
648 775 <span style="margin-left:0px;margin-right:10px;" class="ays_heart_beat"><i class="ays_fa ays_fa_heart_o animated"></i></span>
649 776 <span><?php echo esc_html(__( "If you love our plugin, please do big favor and rate us on", "chart-builder")); ?></span>
@@ -683,11 +810,12 @@
683 810 }
684 811 }
685 812
686 813 public function fetch_post_type_props(){
687 - $nonce = isset( $_POST['nonce'] ) ? wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'cbuilder-fetch-post-type-props' ) : '';
688 - if ( $nonce ) {
689 - $results = CBFunctions()->get_post_type_properties( sanitize_text_field( $_POST['post_type'] ) );
814 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
815 + $nonce = isset( $_POST['nonce'] ) ? wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'cbuilder-fetch-post-type-props' ) : '';
816 + if ( $nonce ) {// phpcs:ignore WordPress.Security.NonceVerification.Recommended
817 + $results = isset($_POST['post_type']) ? CBFunctions()->get_post_type_properties( sanitize_text_field( wp_unslash($_POST['post_type']) ) ) : '';
690 818
691 819 return array(
692 820 'success' => true,
693 821 'fields' => $results,
@@ -753,22 +881,439 @@
753 881 }
754 882
755 883 $ays_chart_builder_flag = intval(get_option('ays_chart_sale_btn'));
756 884 if( $ays_chart_builder_flag == 0 ){
757 - if (isset($_GET['page']) && strpos($_GET['page'], CHART_BUILDER_NAME) !== false) {
758 - if( !(Chart_Builder_Admin::get_max_id('charts') <= 1) ){
759 - // $this->ays_chart_sale_message_30_emma($ays_chart_builder_flag);
885 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
886 + if ( isset( $_GET['page'] ) && strpos( sanitize_text_field( wp_unslash( $_GET['page'] ) ), CHART_BUILDER_NAME ) !== false ) {
887 + // if( !(Chart_Builder_Admin::get_max_id('charts') <= 2) ){
760 888 // $this->ays_chart_sale_message20($ays_chart_builder_flag);
889 + // $this->ays_chart_discounted_licenses_banner_message();
890 + // $this->ays_chart_new_silver_bundle_message_2025($ays_chart_builder_flag);
891 + // $this->ays_chart_footer_sale_banner_2026($ays_chart_builder_flag);
761 892 // $this->ays_chart_helloween_message($ays_chart_builder_flag);
762 893 // $this->ays_chart_christmas_message($ays_chart_builder_flag);
763 894 // $this->ays_chart_silver_bundle_message($ays_chart_builder_flag);
764 895 // $this->ays_chart_black_friday_message_2024($ays_chart_builder_flag);
765 - $this->ays_chart_christmas_message_2024($ays_chart_builder_flag);
896 + // $this->ays_chart_christmas_message_2024($ays_chart_builder_flag);
897 + // $this->ays_chart_new_halloween_bundle_message_2025($ays_chart_builder_flag);
898 + // $this->ays_chart_black_friday_message($ays_chart_builder_flag);
899 + // $this->ays_chart_christmas_banner_message_2025($ays_chart_builder_flag);
900 + $this->ays_chart_back_to_school_banner_2026($ays_chart_builder_flag);
901 + // }
902 + }
903 + }
904 + }
905 +
906 + // Back to School top banner
907 + public function ays_chart_back_to_school_banner_2026($ishmar){
908 + if($ishmar == 0 ){
909 + $content = array();
910 + $chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-builder-free&utm_campaign=back-to-school-sale-banner-' . CHART_BUILDER_VERSION);
911 + $content[] = '<div id="ays-chart-back-to-school-banner-2026" class="ays-chart-back-to-school-banner-2026 ays-chart-admin-notice notice notice-success is-dismissible ays_chart_dicount_info">';
912 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-plane" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 2 11 13"></path><path d="M22 2 15 22l-4-9-9-4Z"></path></svg>';
913 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-ruler" viewBox="0 0 36 20" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><rect x="1" y="6" width="34" height="9" rx="2"></rect><path d="M8 6v3M14 6v4M20 6v3M26 6v4"></path></svg>';
914 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-star" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m12 2 2.6 6.6L21.5 9l-5 4.6 1.4 7-5.9-3.5L6.1 20.6l1.4-7L2.5 9l6.9-.4Z"></path></svg>';
915 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-pencil" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"></path><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg>';
916 + $content[] = '<svg class="ays-chart-bts-decoration ays-chart-bts-wave" viewBox="0 0 96 12" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="M2 8c8-8 16 8 24 0s16 8 24 0 16 8 24 0 16 8 20 2"></path></svg>';
917 + $content[] = '<div class="ays-chart-bts-content">';
918 + $content[] = '<div class="ays-chart-bts-offer">';
919 + $content[] = '<img class="ays-chart-bts-handwritten" src="'. esc_url(CHART_BUILDER_ADMIN_URL . '/images/ays-chart-back-to-school-handwritten.svg') .'" alt="Back to School Sale">';
920 + $content[] = '<span class="ays-chart-bts-dot" aria-hidden="true"></span>';
921 + $content[] = '<span class="ays-chart-bts-discount">'. esc_html__('20% OFF', 'chart-builder') .'</span>';
922 + $content[] = '</div>';
923 + $content[] = '<div class="ays-chart-bts-actions">';
924 + $content[] = '<span class="ays-chart-bts-use-code">'. esc_html__('Use code', 'chart-builder') .'</span>';
925 + $content[] = '<button type="button" class="ays-chart-bts-coupon" data-coupon="SCHOOL20" aria-label="'. esc_attr__('Copy coupon code SCHOOL20', 'chart-builder') .'"><span>SCHOOL20</span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button>';
926 + $content[] = '<a href="'. esc_url($chart_cta_button_link) .'" class="ays-chart-bts-cta" target="_blank" rel="noopener noreferrer">'. esc_html__('Upgrade Now', 'chart-builder') .'</a>';
927 + $content[] = '</div>';
928 + $content[] = '</div>';
929 + $content[] = '<div class="ays-chart-bts-dismiss"><form action="" method="POST"><div id="ays-chart-dismiss-buttons-content">';
930 + if( current_user_can( 'manage_options' ) ){
931 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn">'. esc_html__('Dismiss ad', 'chart-builder') .'</button>';
932 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner', CHART_BUILDER_NAME . '-sale-banner', true, false );
933 + }
934 + $content[] = '</div></form></div>';
935 + $content[] = '</div>';
936 + $content[] = '<style id="ays-chart-back-to-school-banner-2026-inline-css">';
937 + $content[] = '#ays-chart-back-to-school-banner-2026{box-sizing:border-box;position:relative;isolation:isolate;width:calc(100% - 20px);max-width:none;min-height:112px;margin:20px 20px 16px 0;padding:0 38px;overflow:hidden;border:1px solid #e8dcc9;border-left-width:1px;border-radius:12px;background-color:#fffdf8;background-image:radial-gradient(circle at 1px 1px,rgba(91,72,45,.09) 1px,transparent 1px),radial-gradient(120% 140% at 0 0,rgba(20,75,220,.07),transparent 55%),radial-gradient(120% 140% at 100% 100%,rgba(126,34,206,.09),transparent 55%);background-size:6px 6px,100% 100%,100% 100%;box-shadow:0 10px 30px -18px rgba(76,45,140,.55);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.ays-chart-bts-content{position:relative;z-index:2;display:flex;min-height:110px;align-items:center;justify-content:space-between;gap:28px}.ays-chart-bts-offer,.ays-chart-bts-actions{display:flex;align-items:center}.ays-chart-bts-offer{min-width:0;gap:9px}.ays-chart-bts-handwritten{width:280px;max-width:23vw;height:auto;color:#0755df;overflow:visible;flex:0 1 auto}.ays-chart-bts-dot{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:#ffc51b;align-self:flex-start;margin-top:27px}.ays-chart-bts-discount{color:#8127df;font-size:38px;font-weight:800;line-height:1;letter-spacing:-1.2px;white-space:nowrap}.ays-chart-bts-actions{flex:0 0 auto;gap:12px}.ays-chart-bts-use-code{color:#5f5b69;font-size:11px;font-weight:600;line-height:1;text-transform:uppercase;letter-spacing:.14em;white-space:nowrap}.ays-chart-bts-coupon{box-sizing:border-box;display:flex;min-height:50px;align-items:center;gap:12px;padding:8px 14px;border:2px dashed rgba(129,39,223,.5);border-radius:10px;background:#fff;color:#1147c8;cursor:pointer;box-shadow:none}.ays-chart-bts-coupon:hover,.ays-chart-bts-coupon:focus{border-color:#8127df;background:rgba(129,39,223,.05);color:#1147c8}.ays-chart-bts-coupon span{font-size:19px;font-weight:700;letter-spacing:.04em}.ays-chart-bts-coupon svg{width:16px;height:16px;color:#8127df}.ays-chart-bts-cta{display:inline-flex;min-height:48px;align-items:center;justify-content:center;padding:0 27px;border-radius:9px;background:linear-gradient(90deg,#1249e7,#8127df);color:#fff!important;font-size:16px;font-weight:700;text-decoration:none!important;white-space:nowrap;box-shadow:0 8px 18px -8px rgba(91,37,194,.9);transition:transform .15s,box-shadow .15s}.ays-chart-bts-cta:hover,.ays-chart-bts-cta:focus{color:#fff;transform:translateY(-1px);box-shadow:0 10px 20px -8px rgba(91,37,194,.95)}.ays-chart-bts-decoration{position:absolute;z-index:1;pointer-events:none}.ays-chart-bts-plane{top:8px;left:12px;width:24px;color:rgba(129,39,223,.55)}.ays-chart-bts-ruler{bottom:7px;left:24px;width:36px;color:rgba(20,73,230,.35)}.ays-chart-bts-star{top:8px;right:14px;width:19px;color:#ffc51b}.ays-chart-bts-pencil{right:31px;bottom:7px;width:21px;color:rgba(129,39,223,.5);transform:rotate(-12deg)}.ays-chart-bts-wave{bottom:3px;left:50%;width:96px;color:rgba(20,73,230,.22);transform:translateX(-50%)}#ays-chart-back-to-school-banner-2026 .notice-dismiss{top:1px;right:1px;color:#756b82}#ays-chart-back-to-school-banner-2026 .notice-dismiss:before{font-size:18px}.ays-chart-bts-dismiss{position:absolute;right:39px;bottom:0;z-index:3}.ays-chart-bts-dismiss form{margin:0}.ays-chart-bts-dismiss #ays-chart-dismiss-buttons-content .ays-button{height:22px!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;color:#777!important;font-size:10px!important;line-height:22px!important;text-decoration:underline;box-shadow:none!important}.ays-chart-bts-copy-notification{position:fixed;top:50%;left:50%;z-index:10000;transform:translate(-50%,-50%);padding:12px 24px;border-radius:8px;background:rgba(0,0,0,.82);color:#fff;font-size:14px;opacity:0;transition:opacity .25s}.ays-chart-bts-copy-notification.ays-chart-bts-show{opacity:1}@media screen and (max-width:1200px){.ays-chart-bts-content{gap:18px}.ays-chart-bts-handwritten{width:225px}.ays-chart-bts-discount{font-size:31px}.ays-chart-bts-actions{gap:8px}.ays-chart-bts-coupon{min-height:44px;padding:7px 10px}.ays-chart-bts-cta{min-height:44px;padding:0 18px;font-size:14px}}@media screen and (max-width:960px){#ays-chart-back-to-school-banner-2026{padding:15px 38px 20px}.ays-chart-bts-content{min-height:90px;flex-wrap:wrap;justify-content:center;gap:12px 24px}.ays-chart-bts-handwritten{max-width:none}.ays-chart-bts-actions{justify-content:center}.ays-chart-bts-dismiss{right:38px}}@media screen and (max-width:600px){#ays-chart-back-to-school-banner-2026{width:calc(100% - 20px);margin-right:10px;padding:18px 30px 23px 18px}.ays-chart-bts-content{flex-direction:column}.ays-chart-bts-offer{flex-wrap:wrap;justify-content:center}.ays-chart-bts-handwritten{width:210px}.ays-chart-bts-discount{font-size:28px}.ays-chart-bts-actions{flex-wrap:wrap}.ays-chart-bts-use-code{width:100%;text-align:center}.ays-chart-bts-coupon{min-height:40px}.ays-chart-bts-coupon span{font-size:16px}.ays-chart-bts-cta{min-height:40px}.ays-chart-bts-plane,.ays-chart-bts-ruler,.ays-chart-bts-pencil,.ays-chart-bts-wave{display:none}.ays-chart-bts-dismiss{right:30px}}';
938 + $content[] = '</style>';
939 + $content[] = '<script>
940 + (function() {
941 + "use strict";
942 + function initBackToSchoolBanner() {
943 + var banner = document.getElementById("ays-chart-back-to-school-banner-2026");
944 + if (!banner) {
945 + return;
946 + }
947 + var couponButton = banner.querySelector(".ays-chart-bts-coupon");
948 + if (!couponButton) {
949 + return;
950 + }
951 + couponButton.addEventListener("click", function() {
952 + var couponCode = couponButton.getAttribute("data-coupon");
953 + var textarea = document.createElement("textarea");
954 + textarea.value = couponCode;
955 + textarea.style.position = "fixed";
956 + textarea.style.opacity = "0";
957 + document.body.appendChild(textarea);
958 + textarea.focus();
959 + textarea.select();
960 + try {
961 + document.execCommand("copy");
962 + showCopyNotification();
963 + } catch (error) {
964 + // Keep the banner usable when clipboard access is unavailable.
965 + }
966 + document.body.removeChild(textarea);
967 + });
968 + }
969 + function showCopyNotification() {
970 + var notification = document.createElement("div");
971 + notification.className = "ays-chart-bts-copy-notification";
972 + notification.textContent = "'. esc_js(__('Coupon code copied', 'chart-builder')) .'";
973 + document.body.appendChild(notification);
974 + setTimeout(function() {
975 + notification.classList.add("ays-chart-bts-show");
976 + }, 10);
977 + setTimeout(function() {
978 + notification.classList.remove("ays-chart-bts-show");
979 + setTimeout(function() {
980 + if (notification.parentNode) {
981 + notification.parentNode.removeChild(notification);
982 + }
983 + }, 250);
984 + }, 2000);
985 + }
986 + if (document.readyState === "loading") {
987 + document.addEventListener("DOMContentLoaded", initBackToSchoolBanner);
988 + } else {
989 + initBackToSchoolBanner();
990 + }
991 + })();
992 + </script>';
993 + echo implode('', $content); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Static banner markup; dynamic values are escaped above.
994 + }
995 + }
996 +
997 +
998 + public function ays_chart_footer_sale_banner_2026($ishmar){
999 + if($ishmar == 0 ){
1000 + $content = array();
1001 +
1002 + $chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-builder-free&utm_campaign=private-offer-20-off-' . CHART_BUILDER_VERSION);
1003 +
1004 + $content[] = '
1005 + <div class="ays-chart-footer-banner-bottom-banner-wrapper" style="display: none;">
1006 + <div class="ays-chart-footer-banner-bottom-banner-container">
1007 + <div class="ays-chart-footer-banner-bottom-banner-content">
1008 + <div class="ays-chart-footer-banner-bottom-banner-inner">
1009 + <div class="ays-chart-footer-banner-bottom-banner-left">
1010 + <div class="ays-chart-footer-banner-bottom-banner-icon">
1011 + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
1012 + <path d="M12 7v14"></path>
1013 + <path d="M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8"></path>
1014 + <path d="M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5"></path>
1015 + <rect x="3" y="7" width="18" height="4" rx="1"></rect>
1016 + </svg>
1017 + </div>
1018 + <span class="ays-chart-footer-banner-bottom-banner-title">'. esc_html__('Chart Builder by AYS', 'ays-chart-builder') .'</span>
1019 + </div>
1020 + <span class="ays-chart-footer-banner-bottom-banner-separator"></span>
1021 + <span class="ays-chart-footer-banner-bottom-banner-discount">'. esc_html__('20% Off', 'ays-chart-builder') .'</span>
1022 + <div class="ays-chart-footer-banner-bottom-banner-code" onclick="aysChartFooterBannerCopyToClipboard()" title="'. esc_html__('Copy Coupon Code', 'ays-chart-builder') .'">
1023 + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
1024 + <path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"></path>
1025 + <path d="M13 5v2"></path>
1026 + <path d="M13 17v2"></path>
1027 + <path d="M13 11v2"></path>
1028 + </svg>
1029 + <span>CHARTPRO20</span>
1030 + <button type="button" class="ays-chart-footer-banner-bottom-banner-copy" aria-label="'. esc_html__('Copy Coupon Code', 'ays-chart-builder') .'">
1031 + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
1032 + <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
1033 + <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>
1034 + </svg>
1035 + </button>
1036 + </div>
1037 + <button type="button" class="ays-chart-footer-banner-bottom-banner-cta">
1038 + '. esc_html__('Get Deal', 'ays-chart-builder') .'
1039 + </button>
1040 + <button type="button" class="ays-chart-footer-banner-bottom-banner-close" aria-label="'. esc_html__('Close popup', 'ays-chart-builder') .'">
1041 + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
1042 + <path d="M18 6 6 18"></path>
1043 + <path d="m6 6 12 12"></path>
1044 + </svg>
1045 + </button>
1046 + </div>
1047 + </div>
1048 + </div>
1049 + </div>';
1050 +
1051 + $content[] = '<style id="ays-chart-footer-banner-styles-inline-css">';
1052 +
1053 + $content[] = '@keyframes ays-pro-slide-up{0%{opacity:0;transform:translateY(24px)}100%{opacity:1;transform:translateY(0)}}@keyframes ays-pro-slide-down{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(24px)}}.ays-chart-footer-banner-bottom-banner-wrapper{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:0 16px 28px;text-align:center;animation:.45s cubic-bezier(.16,1,.3,1) forwards ays-pro-slide-up}.ays-chart-footer-banner-bottom-banner-wrapper.ays-pro-banner-closing{animation:.32s cubic-bezier(.16,1,.3,1) forwards ays-pro-slide-down}.ays-chart-footer-banner-bottom-banner-container{display:inline-block;max-width:100%;border-radius:16px;background:linear-gradient(90deg,#2f6bff 0,#3e7bff 100%);box-shadow:0 20px 40px -15px rgba(47,107,255,.55),0 8px 20px -10px rgba(47,107,255,.35);overflow:hidden}.ays-chart-footer-banner-bottom-banner-code,.ays-chart-footer-banner-bottom-banner-content,.ays-chart-footer-banner-bottom-banner-inner,.ays-chart-footer-banner-bottom-banner-left{display:flex;align-items:center}.ays-chart-footer-banner-bottom-banner-inner{gap:16px;padding:8px 14px 8px 10px;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}.ays-chart-footer-banner-bottom-banner-left{gap:14px}.ays-chart-footer-banner-bottom-banner-icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:48px;height:48px;border-radius:50%;background:rgba(255,255,255,.15);color:#fff}.ays-chart-footer-banner-bottom-banner-icon svg{width:24px;height:24px}.ays-chart-footer-banner-bottom-banner-discount,.ays-chart-footer-banner-bottom-banner-title{font-size:17px;font-weight:600;line-height:1.25;letter-spacing:0;white-space:nowrap;color:#fff}.ays-chart-footer-banner-bottom-banner-separator{display:block;width:1px;height:24px;background:rgba(255,255,255,.4)}.ays-chart-footer-banner-bottom-banner-code{gap:6px;border:1px dashed rgba(255,255,255,.7);border-radius:999px;padding:6px 9px;color:#fff;cursor:pointer;transition:background-color .15s,border-color .15s;display:flex;align-items:center}.ays-chart-footer-banner-bottom-banner-code:hover{background:rgba(255,255,255,.1);border-color:#fff}.ays-chart-footer-banner-bottom-banner-code button svg,.ays-chart-footer-banner-bottom-banner-code>svg{width:16px;height:16px}.ays-chart-footer-banner-bottom-banner-code span{font-size:14px;font-weight:600;line-height:1;letter-spacing:.05em;color:#fff}.ays-chart-footer-banner-bottom-banner-close{display:flex;align-items:center;justify-content:center;margin:0;padding:0;background:none;border:none;color:#fff;cursor:pointer;transition:opacity .15s}.ays-chart-footer-banner-bottom-banner-close:hover{opacity:.8}.ays-chart-footer-banner-bottom-banner-copy{display:flex;align-items:center;justify-content:center;margin:0;padding:0;background:none;border:none;color:#fff;cursor:pointer;transition:opacity .15s}.ays-chart-footer-banner-bottom-banner-copy:hover{opacity:.8}.ays-chart-footer-banner-bottom-banner-cta{display:flex;align-items:center;justify-content:center;padding:8px 16px;background:#fff;color:#2f6bff;border:none;border-radius:6px;font-weight:600;font-size:14px;cursor:pointer;transition:all .15s;margin-left:12px}.ays-chart-footer-banner-bottom-banner-cta:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(47,107,255,.3)}';
1054 + $content[] = '</style>';
1055 +
1056 + $content[] = '<style id="ays-chart-footer-banner-notification-css">';
1057 + $content[] = '.ays-chart-footer-banner-copy-notification{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.9);color:#fff;padding:12px 24px;border-radius:8px;font-size:14px;z-index:10001;opacity:0;transition:opacity .3s ease;pointer-events:none}.ays-chart-footer-banner-copy-notification.show{opacity:1}';
1058 + $content[] = '</style>';
1059 +
1060 + $content[] = '<script>';
1061 +
1062 + $content[] = "
1063 + /**
1064 + * Footer Banner JavaScript - ES5 Compatible
1065 + * With delayed popup and visit tracking
1066 + */
1067 +
1068 + (function() {
1069 + 'use strict';
1070 +
1071 + // Configuration
1072 + var STORAGE_KEY = 'ays_chart_footer_banner_data';
1073 + var POPUP_RULES = [
1074 + { visit: 1, delay: 10000 }, // 1st visit: 10 seconds
1075 + { visit: 2, delay: 10000 }, // 2nd visit: 10 seconds
1076 + { visit: 3, delay: 15000 }, // 3th visit: 15 seconds
1077 + { visit: 4, delay: 15000 }, // 4th visit: 15 seconds
1078 + { visit: 5, delay: 20000 }, // 5th visit: 20 seconds
1079 + { visit: 7, delay: 20000 }, // 7th visit: 20 seconds
1080 + { visit: 10, delay: 30000 } // 10th visit: 30 seconds
1081 + ];
1082 + var MAX_SHOWS_PER_DAY = 7;
1083 +
1084 + // Wait for DOM to be ready
1085 + if (document.readyState === 'loading') {
1086 + document.addEventListener('DOMContentLoaded', initBanner);
1087 + } else {
1088 + initBanner();
1089 + }
1090 +
1091 + function initBanner() {
1092 + var banner = document.querySelector('.ays-chart-footer-banner-bottom-banner-wrapper');
1093 + var closeButton = document.querySelector('.ays-chart-footer-banner-bottom-banner-close');
1094 + var ctaButton = document.querySelector('.ays-chart-footer-banner-bottom-banner-cta');
1095 +
1096 + if (!banner) {
1097 + return;
766 1098 }
1099 +
1100 + // Hide banner initially
1101 + banner.style.display = 'none';
1102 +
1103 + // Get or initialize banner data
1104 + var bannerData = getBannerData();
1105 +
1106 + // Check if we need to reset daily data
1107 + if (shouldResetData(bannerData.lastResetDate)) {
1108 + bannerData = resetDailyData();
1109 + }
1110 +
1111 + // Increment visit count
1112 + bannerData.visitCount++;
1113 + saveBannerData(bannerData);
1114 +
1115 + // Check if banner should be shown
1116 + var shouldShow = shouldShowBanner(bannerData);
1117 +
1118 + if (shouldShow.show) {
1119 + // Show banner after delay
1120 + setTimeout(function() {
1121 + banner.style.display = 'block';
1122 +
1123 + // Increment show count
1124 + bannerData.showCount++;
1125 + saveBannerData(bannerData);
1126 + }, shouldShow.delay);
1127 + }
1128 +
1129 + // Close button handler
1130 + if (closeButton) {
1131 + closeButton.addEventListener('click', function() {
1132 + closeBanner(banner);
1133 + });
1134 + }
1135 +
1136 + // CTA button handler
1137 + if (ctaButton) {
1138 + ctaButton.addEventListener('click', function() {
1139 + window.open('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-builder-free&utm_campaign=private-offer-20-off-". CHART_BUILDER_VERSION ."', '_blank');
1140 + // Optionally close banner after click
1141 + closeBanner(banner);
1142 + });
1143 + }
1144 + }
1145 +
1146 + /**
1147 + * Get banner data from localStorage
1148 + */
1149 + function getBannerData() {
1150 + try {
1151 + var data = localStorage.getItem(STORAGE_KEY);
1152 + if (data) {
1153 + return JSON.parse(data);
1154 + }
1155 + } catch (e) {
1156 + // localStorage not available or parsing error
1157 + }
1158 +
1159 + // Return default data
1160 + return {
1161 + visitCount: 0,
1162 + showCount: 0,
1163 + lastResetDate: getTodayDate()
1164 + };
1165 + }
1166 +
1167 + /**
1168 + * Save banner data to localStorage
1169 + */
1170 + function saveBannerData(data) {
1171 + try {
1172 + localStorage.setItem(STORAGE_KEY, JSON.stringify(data));
1173 + } catch (e) {
1174 + // localStorage not available
1175 + }
1176 + }
1177 +
1178 + /**
1179 + * Check if data should be reset (new day)
1180 + */
1181 + function shouldResetData(lastResetDate) {
1182 + var today = getTodayDate();
1183 + return lastResetDate !== today;
1184 + }
1185 +
1186 + /**
1187 + * Reset daily data
1188 + */
1189 + function resetDailyData() {
1190 + var newData = {
1191 + visitCount: 0,
1192 + showCount: 0,
1193 + lastResetDate: getTodayDate()
1194 + };
1195 + saveBannerData(newData);
1196 + return newData;
1197 + }
1198 +
1199 + /**
1200 + * Get today's date as string (YYYY-MM-DD)
1201 + */
1202 + function getTodayDate() {
1203 + var date = new Date();
1204 + var year = date.getFullYear();
1205 + var month = String(date.getMonth() + 1).padStart(2, '0');
1206 + var day = String(date.getDate()).padStart(2, '0');
1207 + return year + '-' + month + '-' + day;
1208 + }
1209 +
1210 + /**
1211 + * Check if banner should be shown based on rules
1212 + */
1213 + function shouldShowBanner(bannerData) {
1214 + // Check if already shown max times today
1215 + if (bannerData.showCount >= MAX_SHOWS_PER_DAY) {
1216 + return { show: false, delay: 0 };
1217 + }
1218 +
1219 + // Check visit count against rules
1220 + for (var i = 0; i < POPUP_RULES.length; i++) {
1221 + var rule = POPUP_RULES[i];
1222 + if (bannerData.visitCount === rule.visit) {
1223 + return { show: true, delay: rule.delay };
1224 + }
1225 + }
1226 +
1227 + return { show: false, delay: 0 };
1228 + }
1229 +
1230 + /**
1231 + * Close banner with animation
1232 + */
1233 + function closeBanner(banner) {
1234 + if (!banner) {
1235 + return;
1236 + }
1237 +
1238 + // Add closing animation class
1239 + banner.classList.add('ays-pro-banner-closing');
1240 +
1241 + // Wait for animation to complete
1242 + setTimeout(function() {
1243 + banner.style.display = 'none';
1244 + }, 400);
1245 + }
1246 +
1247 + // Polyfill for String.padStart (for older browsers)
1248 + if (!String.prototype.padStart) {
1249 + String.prototype.padStart = function(targetLength, padString) {
1250 + targetLength = targetLength >> 0;
1251 + padString = String(typeof padString !== 'undefined' ? padString : ' ');
1252 + if (this.length >= targetLength) {
1253 + return String(this);
1254 + } else {
1255 + targetLength = targetLength - this.length;
1256 + if (targetLength > padString.length) {
1257 + padString += padString.repeat(targetLength / padString.length);
1258 + }
1259 + return padString.slice(0, targetLength) + String(this);
1260 + }
1261 + };
1262 + }
1263 + })();
1264 +
1265 + function aysChartFooterBannerCopyToClipboard() {
1266 + var textarea = document.createElement('textarea');
1267 + textarea.value = 'CHARTPRO20';
1268 + textarea.style.position = 'fixed';
1269 + textarea.style.opacity = '0';
1270 + document.body.appendChild(textarea);
1271 +
1272 + textarea.select();
1273 + textarea.setSelectionRange(0, 99999);
1274 +
1275 + try {
1276 + document.execCommand('copy');
1277 + aysChartFooterBannerShowCopyNotification('". esc_html__('Coupon code copied', 'ays-chart-builder') ."');
1278 + } catch (err) {
1279 + console.error('Failed to copy text: ', err);
1280 + }
1281 +
1282 + document.body.removeChild(textarea);
767 1283 }
1284 +
1285 + function aysChartFooterBannerShowCopyNotification(message) {
1286 + var existingNotification = document.querySelector('.ays-chart-footer-banner-copy-notification');
1287 + if (existingNotification) {
1288 + document.body.removeChild(existingNotification);
1289 + }
1290 +
1291 + var notification = document.createElement('div');
1292 + notification.className = 'ays-chart-footer-banner-copy-notification';
1293 + notification.textContent = message;
1294 + document.body.appendChild(notification);
1295 +
1296 + setTimeout(function() {
1297 + notification.classList.add('show');
1298 + }, 10);
1299 +
1300 + setTimeout(function() {
1301 + notification.classList.remove('show');
1302 + setTimeout(function() {
1303 + if (notification.parentNode) {
1304 + document.body.removeChild(notification);
1305 + }
1306 + }, 300);
1307 + }, 2000);
1308 + }";
1309 +
1310 + $content[] = '</script>';
1311 +
1312 + $content = implode( '', $content );
1313 + echo ($content);
768 1314 }
769 1315 }
770 -
771 1316 public function ays_chart_dismiss_button(){
772 1317
773 1318 $data = array(
774 1319 'status' => false,
@@ -774,9 +1319,9 @@
774 1319 'status' => false,
775 1320 );
776 1321
777 1322 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'ays_chart_dismiss_button') {
778 - if( (isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( $_REQUEST['_ajax_nonce'], $this->plugin_name . '-sale-banner' )) && current_user_can( 'manage_options' )){
1323 + if ( isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_ajax_nonce'] ) ), $this->plugin_name . '-sale-banner' ) && current_user_can( 'manage_options' ) ) {
779 1324 update_option('ays_chart_sale_btn', 1);
780 1325 update_option('ays_chart_sale_date', current_time( 'mysql' ));
781 1326 $data['status'] = true;
782 1327 }
@@ -788,8 +1333,357 @@
788 1333 wp_die();
789 1334
790 1335 }
791 1336
1337 + public function ays_chart_discounted_licenses_banner_message(){
1338 +
1339 + $content = array();
1340 +
1341 + $date = time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1342 + $now_date = date('M d, Y H:i:s', $date);
1343 +
1344 + $start_date = strtotime('2025-09-24');
1345 + $end_date = strtotime('2025-10-25');
1346 + $diff_end = $end_date - $date;
1347 +
1348 + $style_attr = '';
1349 + if( $diff_end < 0 ){
1350 + $style_attr = 'style="display:none;"';
1351 + }
1352 +
1353 + $total_licenses = 50;
1354 + $progression_pattern = array(3, 2, 1, 4, 2, 3, 1, 2, 4, 3, 2, 1, 3, 2, 4, 1, 3, 2, 2, 3, 1, 2);
1355 + $days_passed = floor(($date - $start_date) / (24 * 60 * 60));
1356 + $used_licenses = 0;
1357 +
1358 + for ($i = 0; $i < min($days_passed, count($progression_pattern)); $i++) {
1359 + $used_licenses += $progression_pattern[$i];
1360 + }
1361 + $used_licenses = min($used_licenses, $total_licenses);
1362 + $remaining_licenses = $total_licenses - $used_licenses;
1363 + $progress_percentage = ($used_licenses / $total_licenses) * 100;
1364 +
1365 + $ays_chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=chart-maker-license-banner-' . CHART_BUILDER_VERSION);
1366 +
1367 + $content[] = '<div id="ays-chart-progress-banner-main" class="ays-chart-progress-banner-main ays-chart-admin-notice notice notice-success is-dismissible" ' . $style_attr . '>';
1368 + $content[] = '<div class="ays-chart-progress-banner-content">';
1369 + $content[] = '<div class="ays-chart-progress-banner-left">';
1370 + $content[] = '<div class="ays-chart-progress-banner-icon">';
1371 + $content[] = '<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
1372 + <path d="M1.33325 22.6668L11.9999 13.3335L33.3333 14.6668L34.6666 36.0002L25.3333 46.6668C25.3333 46.6668 25.3346 38.6682 17.3333 30.6668C9.33192 22.6655 1.33325 22.6668 1.33325 22.6668Z" fill="#A0041E"/>
1373 + <path d="M1.29739 46.6665C1.29739 46.6665 1.24939 36.0278 5.27739 31.9998C9.30539 27.9718 20.0001 28.2492 20.0001 28.2492C20.0001 28.2492 19.9987 38.6665 15.9987 42.6665C11.9987 46.6665 1.29739 46.6665 1.29739 46.6665Z" fill="#FFAC33"/>
1374 + <path d="M11.9986 41.3332C14.9441 41.3332 17.3319 38.9454 17.3319 35.9998C17.3319 33.0543 14.9441 30.6665 11.9986 30.6665C9.0531 30.6665 6.66528 33.0543 6.66528 35.9998C6.66528 38.9454 9.0531 41.3332 11.9986 41.3332Z" fill="#FFCC4D"/>
1375 + <path d="M47.9986 0C47.9986 0 34.6653 0 18.6653 13.3333C10.6653 20 10.6653 32 13.3319 34.6667C15.9986 37.3333 27.9986 37.3333 34.6653 29.3333C47.9986 13.3333 47.9986 0 47.9986 0Z" fill="#55ACEE"/>
1376 + <path d="M35.9987 6.6665C33.8347 6.6665 31.9814 7.96117 31.144 9.81317C31.8134 9.5105 32.5507 9.33317 33.332 9.33317C36.2774 9.33317 38.6654 11.7212 38.6654 14.6665C38.6654 15.4478 38.488 16.1852 38.1867 16.8532C40.0387 16.0172 41.332 14.1638 41.332 11.9998C41.332 9.0545 38.944 6.6665 35.9987 6.6665Z" fill="black"/>
1377 + <path d="M10.6667 37.3332C10.6667 37.3332 10.6667 31.9998 12.0001 30.6665C13.3334 29.3332 29.3347 16.0012 30.6667 17.3332C31.9987 18.6652 18.6654 34.6665 17.3321 35.9998C15.9987 37.3332 10.6667 37.3332 10.6667 37.3332Z" fill="#A0041E"/>
1378 + </svg>';
1379 + $content[] = '</div>';
1380 + $content[] = '<div class="ays-chart-progress-banner-text">';
1381 + $content[] = '<h2 class="ays-chart-progress-banner-title">' . sprintf( __('Get the Pro Version of %s Chart Builder%s – 20%% OFF', 'chart-builder'), '<a href="'. $ays_chart_cta_button_link .'" target="_blank">', '</a>' ) . '</h2>';
1382 + $content[] = '<p class="ays-chart-progress-banner-subtitle">' . __('Unlock advanced features + 30 day Money Back Guarantee', 'chart-builder') . '</p>';
1383 + $content[] = '</div>';
1384 + $content[] = '</div>';
1385 +
1386 + $content[] = '<div class="ays-chart-progress-banner-center">';
1387 + $content[] = '<div class="ays-chart-progress-banner-coupon">';
1388 + $content[] = '<div class="ays-chart-progress-banner-coupon-box" onclick="chartCopyToClipboard(\'FREE2PRO20\')" title="' . __('Click to copy', 'chart-builder') . '">';
1389 + $content[] = '<span class="ays-chart-progress-banner-coupon-text">FREE2PRO20</span>';
1390 + $content[] = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="ays-chart-progress-banner-copy-icon">';
1391 + $content[] = '<path d="M13.5 2.5H6.5C5.67 2.5 5 3.17 5 4V10C5 10.83 5.67 11.5 6.5 11.5H13.5C14.33 11.5 15 10.83 15 10V4C15 3.17 14.33 2.5 13.5 2.5ZM13.5 10H6.5V4H13.5V10ZM2.5 6.5V12.5C2.5 13.33 3.17 14 4 14H10V12.5H4V6.5H2.5Z" fill="white"/>';
1392 + $content[] = '</svg>';
1393 + $content[] = '</div>';
1394 + $content[] = '</div>';
1395 +
1396 + $content[] = '<div class="ays-chart-progress-banner-progress">';
1397 + $content[] = '<p class="ays-chart-progress-banner-progress-text">' . __('Only', 'chart-builder') . ' <span id="remaining-licenses">' . $remaining_licenses . '</span> ' . __('of 50 discounted licenses left', 'chart-builder') . '</p>';
1398 + $content[] = '<div class="ays-chart-progress-banner-progress-bar">';
1399 + $content[] = '<div class="ays-chart-progress-banner-progress-fill" id="progress-fill" style="width: ' . $progress_percentage . '%;"></div>';
1400 + $content[] = '</div>';
1401 + $content[] = '</div>';
1402 + $content[] = '</div>';
1403 +
1404 + $content[] = '<div class="ays-chart-progress-banner-right">';
1405 + $content[] = '<a href="'. $ays_chart_cta_button_link .'" class="ays-chart-progress-banner-upgrade" target="_blank">';
1406 + $content[] = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">';
1407 + $content[] = '<path d="M14.6392 6.956C14.5743 6.78222 14.4081 6.66667 14.2223 6.66667H8.85565L11.9512 0.648C12.0485 0.458667 11.9983 0.227111 11.8308 0.0955556C11.7499 0.0315556 11.6525 0 11.5556 0C11.4521 0 11.3485 0.0364444 11.2654 0.108L8.00009 2.928L1.48765 8.55244C1.3472 8.67378 1.29653 8.86978 1.36142 9.04356C1.42631 9.21733 1.59209 9.33333 1.77787 9.33333H7.14454L4.04898 15.352C3.95165 15.5413 4.00187 15.7729 4.16942 15.9044C4.25031 15.9684 4.34765 16 4.44453 16C4.54809 16 4.65165 15.9636 4.73476 15.892L8.00009 13.072L14.5125 7.44756C14.6534 7.32622 14.7036 7.13022 14.6392 6.956Z" fill="white"/>';
1408 + $content[] = '</svg>';
1409 + $content[] = ' ' . __('Upgrade Now', 'chart-builder');
1410 + $content[] = '</a>';
1411 + $content[] = '</div>';
1412 + $content[] = '</div>';
1413 +
1414 + if( current_user_can( 'manage_options' ) ){
1415 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1416 + $content[] = '<form action="" method="POST" style="position: absolute; bottom: 0; right: 0; color: #fff;">';
1417 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="color: darkgrey; font-size: 11px;">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
1418 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1419 + $content[] = '</form>';
1420 + $content[] = '</div>';
1421 + }
1422 + $content[] = '</div>';
1423 +
1424 + // Fox LMS Pro Banner Styles
1425 + $content[] = '<style id="ays-chart-progress-banner-styles-inline-css">';
1426 + $content[] = '
1427 + .ays-chart-progress-banner-main {
1428 + background: linear-gradient(135deg, #6344ED 0%, #8C2ABE 100%);
1429 + padding: 20px 30px;
1430 + border-radius: 16px;
1431 + color: white;
1432 + position: relative;
1433 + margin: 20px 0;
1434 + box-shadow: 0 8px 32px rgba(99, 68, 237, 0.3);
1435 + border: 0;
1436 + }
1437 +
1438 + .ays-chart-progress-banner-main .ays-chart-progress-banner-content {
1439 + display: flex;
1440 + align-items: center;
1441 + justify-content: space-between;
1442 + gap: 30px;
1443 + }
1444 +
1445 + .ays-chart-progress-banner-main .ays-chart-progress-banner-left {
1446 + display: flex;
1447 + align-items: center;
1448 + gap: 20px;
1449 + flex: 1;
1450 + }
1451 +
1452 + .ays-chart-progress-banner-main .ays-chart-progress-banner-center {
1453 + display: flex;
1454 + align-items: center;
1455 + gap: 15px;
1456 + flex: 1;
1457 + }
1458 +
1459 + .ays-chart-progress-banner-main .ays-chart-progress-banner-right {
1460 + display: flex;
1461 + align-items: center;
1462 + gap: 20px;
1463 + flex-shrink: 0;
1464 + }
1465 +
1466 + .ays-chart-progress-banner-main .ays-chart-progress-banner-icon {
1467 + font-size: 32px;
1468 + filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
1469 + }
1470 +
1471 + .ays-chart-progress-banner-main .ays-chart-progress-banner-title {
1472 + font-size: 21px;
1473 + font-weight: 700;
1474 + margin: 0 0 8px 0;
1475 + line-height: 1.2;
1476 + color: #fff;
1477 + }
1478 +
1479 + .ays-chart-progress-banner-main .ays-chart-progress-banner-title a {
1480 + text-decoration: underline;
1481 + color: #fff;
1482 + }
1483 +
1484 + .ays-chart-progress-banner-main .ays-chart-progress-banner-subtitle {
1485 + font-size: 16px;
1486 + margin: 0;
1487 + opacity: 0.9;
1488 + font-weight: 400;
1489 + }
1490 +
1491 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon {
1492 + margin-bottom: 5px;
1493 + }
1494 +
1495 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-box {
1496 + border: 2px dotted rgba(255, 255, 255, 0.6);
1497 + padding: 8px 16px;
1498 + border-radius: 8px;
1499 + background: rgba(255, 255, 255, 0.1);
1500 + cursor: pointer;
1501 + transition: all 0.3s ease;
1502 + display: flex;
1503 + align-items: center;
1504 + gap: 8px;
1505 + backdrop-filter: blur(10px);
1506 + }
1507 +
1508 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-box:hover {
1509 + background: rgba(255, 255, 255, 0.2);
1510 + border-color: rgba(255, 255, 255, 0.8);
1511 + transform: translateY(-1px);
1512 + }
1513 +
1514 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-text {
1515 + font-size: 16px;
1516 + font-weight: 700;
1517 + letter-spacing: 1px;
1518 + color: #fff;
1519 + font-family: monospace;
1520 + }
1521 +
1522 + .ays-chart-progress-banner-main .ays-chart-progress-banner-copy-icon {
1523 + opacity: 0.8;
1524 + transition: opacity 0.3s ease;
1525 + }
1526 +
1527 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-box:hover .ays-chart-progress-banner-copy-icon {
1528 + opacity: 1;
1529 + }
1530 +
1531 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress {
1532 + text-align: center;
1533 + width: 100%;
1534 + }
1535 +
1536 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-text {
1537 + font-size: 14px;
1538 + margin: 0 0 10px 0;
1539 + opacity: 0.9;
1540 + }
1541 +
1542 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-bar {
1543 + width: 300px;
1544 + height: 10px;
1545 + background: rgba(255, 255, 255, 0.2);
1546 + border-radius: 4px;
1547 + overflow: hidden;
1548 + margin: 0 auto;
1549 + }
1550 +
1551 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-fill {
1552 + height: 100%;
1553 + background: linear-gradient(90deg, #4ADE80 0%, #22C55E 100%);
1554 + border-radius: 4px;
1555 + transition: width 0.8s ease;
1556 + width: 70%;
1557 + }
1558 +
1559 + .ays-chart-progress-banner-main .ays-chart-progress-banner-upgrade {
1560 + background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
1561 + color: white;
1562 + border: none;
1563 + padding: 12px 24px;
1564 + border-radius: 8px;
1565 + font-size: 16px;
1566 + font-weight: 600;
1567 + cursor: pointer;
1568 + transition: all 0.3s ease;
1569 + box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
1570 + text-decoration: none;
1571 + display: inline-flex;
1572 + align-items: center;
1573 + gap: 8px;
1574 + }
1575 +
1576 + .ays-chart-progress-banner-main .ays-chart-progress-banner-upgrade:hover {
1577 + transform: translateY(-2px);
1578 + box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
1579 + text-decoration: none;
1580 + color: white;
1581 + }
1582 +
1583 + .ays-chart-progress-banner-main .notice-dismiss:before {
1584 + color: #fff;
1585 + }
1586 +
1587 + /* Copy notification */
1588 + .ays-chart-copy-notification {
1589 + position: fixed;
1590 + top: 50%;
1591 + left: 50%;
1592 + transform: translate(-50%, -50%);
1593 + background: rgba(0, 0, 0, 0.8);
1594 + color: white;
1595 + padding: 12px 24px;
1596 + border-radius: 8px;
1597 + font-size: 14px;
1598 + z-index: 10000;
1599 + opacity: 0;
1600 + transition: opacity 0.3s ease;
1601 + }
1602 +
1603 + .ays-chart-copy-notification.show {
1604 + opacity: 1;
1605 + }
1606 +
1607 + @media (max-width: 1400px) {
1608 + .ays-chart-progress-banner-main .ays-chart-progress-banner-center {
1609 + flex-direction: column;
1610 + }
1611 + }
1612 +
1613 + @media (max-width: 1200px) {
1614 + .ays-chart-progress-banner-main .ays-chart-progress-banner-content {
1615 + flex-direction: column;
1616 + gap: 20px;
1617 + }
1618 +
1619 + .ays-chart-progress-banner-main .ays-chart-progress-banner-left {
1620 + width: 100%;
1621 + justify-content: center;
1622 + text-align: center;
1623 + flex-direction: column;
1624 + }
1625 +
1626 + .ays-chart-progress-banner-main .ays-chart-progress-banner-center {
1627 + width: 100%;
1628 + }
1629 +
1630 + .ays-chart-progress-banner-main .ays-chart-progress-banner-right {
1631 + width: 100%;
1632 + justify-content: center;
1633 + }
1634 + }
1635 +
1636 + @media (max-width: 768px) {
1637 + #ays-chart-progress-banner-main {
1638 + display: none !important;
1639 + }
1640 +
1641 + .ays-chart-progress-banner-main {
1642 + padding: 15px 20px;
1643 + margin: 15px 0;
1644 + }
1645 +
1646 + .ays-chart-progress-banner-main .ays-chart-progress-banner-title {
1647 + font-size: 18px;
1648 + }
1649 +
1650 + .ays-chart-progress-banner-main .ays-chart-progress-banner-subtitle {
1651 + font-size: 14px;
1652 + }
1653 +
1654 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-bar {
1655 + width: 100%;
1656 + max-width: 280px;
1657 + }
1658 +
1659 + .ays-chart-progress-banner-main .ays-chart-progress-banner-upgrade {
1660 + padding: 10px 20px;
1661 + font-size: 14px;
1662 + }
1663 + }
1664 +
1665 + @media (max-width: 480px) {
1666 + .ays-chart-progress-banner-main {
1667 + padding: 12px 15px;
1668 + }
1669 +
1670 + .ays-chart-progress-banner-main .ays-chart-progress-banner-coupon-text {
1671 + font-size: 14px;
1672 + }
1673 +
1674 + .ays-chart-progress-banner-main .ays-chart-progress-banner-progress-bar {
1675 + max-width: 250px;
1676 + }
1677 + }
1678 + ';
1679 +
1680 + $content[] = '</style>';
1681 +
1682 + $content = implode( '', $content );
1683 + echo ($content);
1684 + }
1685 +
792 1686 // 30% Sale Emma
793 1687 public function ays_chart_sale_message_30_emma($ishmar){
794 1688 if($ishmar == 0 ){
795 1689 $content = array();
@@ -806,9 +1700,9 @@
806 1700 </div>';
807 1701 $content[] = '</div>';
808 1702
809 1703 $content[] = '<div style="font-size: 17px;">';
810 - $content[] = '<img style="width: 24px;height: 24px;" src="' . esc_attr(CHART_BUILDER_ADMIN_URL) . '/images/icons/guarantee-new.png">';
1704 + $content[] = '<img style="width: 24px; height: 24px;" src="' . esc_url(plugins_url('admin/images/icons/guarantee-new.png', dirname(__FILE__))) . '">';// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
811 1705 $content[] = '<span style="padding-left: 4px; font-size: 14px; font-weight: 600;"> 30 Day Money Back Guarantee</span>';
812 1706
813 1707 $content[] = '</div>';
814 1708
@@ -868,9 +1762,10 @@
868 1762 $content[] = '</div>';
869 1763 $content[] = '</div>';
870 1764
871 1765 $content = implode( '', $content );
872 - echo html_entity_decode(esc_html( $content ));
1766 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1767 +
873 1768 }
874 1769 }
875 1770
876 1771 // Self 20% sale
@@ -885,18 +1780,26 @@
885 1780 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
886 1781
887 1782 $content[] = '<div class="ays-chart-dicount-sale-name-discount-box">';
888 1783 $content[] = '<span class="ays-chart-new-chart-pro-title">';
889 - $content[] = __( "<span><a href='https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-plugin-name' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>", CHART_BUILDER_NAME );
1784 + // Translators: %s is the URL to the Chart Builder plugin page.
1785 + $content[] = sprintf(
1786 + /* translators: %s is the Chart Builder plugin URL. */
1787 + __(
1788 + "<span><a href='%s' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>",
1789 + 'chart-builder'
1790 + ),
1791 + "https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-plugin-name" . CHART_BUILDER_VERSION
1792 + );
890 1793 $content[] = '</span>';
891 1794 $content[] = '<div>';
892 - $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-sale-30.svg" style="width: 70px;">';
1795 + $content[] = '<img src="' . esc_url(plugins_url('admin/images/ays-chart-banner-sale-30.svg', dirname(__FILE__))) . '" style="width: 70px;">';// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
893 1796 $content[] = '</div>';
894 1797 $content[] = '</div>';
895 1798
896 1799 $content[] = '<span class="ays-chart-new-chart-pro-desc">';
897 - $content[] = '<img class="ays-chart-new-chart-pro-guaranteeicon" src="' . CHART_BUILDER_ADMIN_URL . '/images/chart-builder-guaranteeicon.webp" style="width: 30px;">';
898 - $content[] = __( "30 Days Money Back Guarantee", CHART_BUILDER_NAME );
1800 + $content[] = '<img class="ays-chart-new-chart-pro-guaranteeicon" src="' . esc_url(plugins_url('admin/images/chart-builder-guaranteeicon.webp', dirname(__FILE__))) . '" style="width: 30px;">'; // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
1801 + $content[] = esc_html__( "30 Days Money Back Guarantee", 'chart-builder' );
899 1802 $content[] = '</span>';
900 1803
901 1804 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-chart">';
902 1805 $content[] = '<form method="POST">';
@@ -915,15 +1818,15 @@
915 1818
916 1819 $content[] = '<div id="ays-chart-countdown-main-container">';
917 1820 $content[] = '<div class="ays-chart-countdown-container">';
918 1821 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
919 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1822 + $content[] = esc_html__( "Offer ends in:", 'chart-builder' );
920 1823
921 1824 $content[] = '<ul style="padding: 0">';
922 - $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
923 - $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
924 - $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
925 - $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . __( 'Seconds', CHART_BUILDER_NAME ) . '</li>';
1825 + $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . esc_html__( 'Days', 'chart-builder' ) . '</li>';
1826 + $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . esc_html__( 'Hours', 'chart-builder' ) . '</li>';
1827 + $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . esc_html__( 'Minutes', 'chart-builder' ) . '</li>';
1828 + $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . esc_html__( 'Seconds', 'chart-builder' ) . '</li>';
926 1829 $content[] = '</ul>';
927 1830 $content[] = '</div>';
928 1831
929 1832 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
@@ -937,11 +1840,11 @@
937 1840
938 1841 $content[] = '</div>';
939 1842
940 1843 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
941 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-button" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . __( 'Buy Now', CHART_BUILDER_NAME ) . '</a>';
1844 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-button'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . esc_html__( 'Buy Now', 'chart-builder' ) . '</a>';
942 1845 $content[] = '<span class="ays-chart-dicount-one-time-text">';
943 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1846 + $content[] = esc_html__( "One-time payment", 'chart-builder' );
944 1847 $content[] = '</span>';
945 1848 $content[] = '</div>';
946 1849
947 1850 $content[] = '</div>';
@@ -948,9 +1851,9 @@
948 1851
949 1852 $content[] = '</div>';
950 1853
951 1854 $content = implode( '', $content );
952 - echo $content;
1855 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
953 1856 }
954 1857 }
955 1858
956 1859 // Helloween banner
@@ -972,15 +1875,15 @@
972 1875 <span style='' class='ays-chart-helloween-bundle'>
973 1876 <a href='https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner' target='_blank' class='ays-chart-dicount-wrap-color-helloween ays-chart-dicount-wrap-text-decoration-helloween' style='display:block; color:#b2ff00;margin-right:6px;'>
974 1877 Chart Builder
975 1878 </a>
976 - </span>", CHART_BUILDER_NAME );
1879 + </span>", 'chart-builder' );
977 1880 $content[] = '</p>';
978 1881 $content[] = '<p>';
979 1882 $content[] = __( "Hurry up!
980 1883 <a href='https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner' target='_blank' style='color:#ffc700;'>
981 1884 Check it out!
982 - </a>", CHART_BUILDER_NAME );
1885 + </a>", 'chart-builder' );
983 1886 $content[] = '</p>';
984 1887
985 1888 $content[] = '</div>';
986 1889
@@ -1010,9 +1913,9 @@
1010 1913 $content[] = '</div>';
1011 1914
1012 1915 $content[] = '</div>';
1013 1916 $content[] = '<div class="ays-chart-dicount-wrap-box ays-buy-now-button-box-helloween">';
1014 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner" class="button button-primary ays-buy-now-button-helloween" id="ays-button-top-buy-now-helloween" target="_blank" style="" >' . __( 'Buy Now !', CHART_BUILDER_NAME ) . '</a>';
1917 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=helloween-sale-banner" class="button button-primary ays-buy-now-button-helloween" id="ays-button-top-buy-now-helloween" target="_blank" style="" >' . __( 'Buy Now !', 'chart-builder' ) . '</a>';
1015 1918 $content[] = '</div>';
1016 1919 $content[] = '</div>';
1017 1920
1018 1921 $content[] = '</div>';
@@ -1033,74 +1936,12 @@
1033 1936 $content[] = '</div>';
1034 1937
1035 1938 $content = implode( '', $content );
1036 1939
1037 - echo $content;
1940 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1038 1941 }
1039 1942 }
1040 1943
1041 - // Black Friday banner
1042 - public static function ays_chart_black_friday_message($ishmar){
1043 - if($ishmar == 0 ){
1044 - $content = array();
1045 -
1046 - $content[] = '<div id="ays-chart-dicount-black-friday-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1047 - $content[] = '<div id="ays-chart-dicount-black-friday-month" class="ays_chart_dicount_month">';
1048 - $content[] = '<div class="ays-chart-dicount-black-friday-box">';
1049 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-box-80" style="width: 70%;">';
1050 - $content[] = '<div class="ays-chart-dicount-black-friday-title-row">' . __( 'Limited Time', "chart-builder" ) .' '. '<a href="https://ays-pro.com/wordpress/chart-builder?utm_medium=chart-free&utm_campaign=black-friday-sale-banner" class="ays-chart-dicount-black-friday-button-sale" target="_blank">' . __( 'Sale', "chart-builder" ) . '</a>' . '</div>';
1051 - $content[] = '<div class="ays-chart-dicount-black-friday-title-row">' . __( 'Chart Builder plugin', "chart-builder" ) . '</div>';
1052 - $content[] = '</div>';
1053 -
1054 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box ays-chart-dicount-black-friday-wrap-text-box">';
1055 - $content[] = '<div class="ays-chart-dicount-black-friday-text-row">' . __( '20% off', "chart-builder" ) . '</div>';
1056 - $content[] = '</div>';
1057 -
1058 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
1059 - $content[] = '<div id="ays-chart-countdown-main-container">';
1060 - $content[] = '<div class="ays-chart-countdown-container">';
1061 - $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1062 - $content[] = '<ul>';
1063 - $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . __( 'Days', "chart-builder" ) . '</li>';
1064 - $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . __( 'Hours', "chart-builder" ) . '</li>';
1065 - $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . __( 'Minutes', "chart-builder" ) . '</li>';
1066 - $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . __( 'Seconds', "chart-builder" ) . '</li>';
1067 - $content[] = '</ul>';
1068 - $content[] = '</div>';
1069 - $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1070 - $content[] = '<span>🚀</span>';
1071 - $content[] = '<span>⌛</span>';
1072 - $content[] = '<span>🔥</span>';
1073 - $content[] = '<span>💣</span>';
1074 - $content[] = '</div>';
1075 - $content[] = '</div>';
1076 - $content[] = '</div>';
1077 - $content[] = '</div>';
1078 -
1079 - $content[] = '<div class="ays-chart-dicount-black-friday-wrap-box" style="width: 25%;">';
1080 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_medium=chart-free&utm_campaign=black-friday-sale-banner" class="ays-chart-dicount-black-friday-button-buy-now" target="_blank">' . __( 'Get Your Deal', "chart-builder" ) . '</a>';
1081 - $content[] = '</div>';
1082 - $content[] = '</div>';
1083 - $content[] = '</div>';
1084 -
1085 - $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-black-friday">';
1086 - $content[] = '<form method="POST">';
1087 - $content[] = '<div id="ays-chart-dismiss-buttons-content-black-friday">';
1088 - if( current_user_can( 'manage_options' ) ){
1089 - $content[] = '<button class="btn btn-link ays-button-black-friday" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', "chart-builder" ) . '</button>';
1090 - $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1091 - }
1092 - $content[] = '</div>';
1093 - $content[] = '</form>';
1094 - $content[] = '</div>';
1095 - $content[] = '</div>';
1096 -
1097 - $content = implode( '', $content );
1098 -
1099 - echo $content;
1100 - }
1101 - }
1102 -
1103 1944 // Christmas banner
1104 1945 public static function ays_chart_christmas_message($ishmar){
1105 1946 if($ishmar == 0 ){
1106 1947 $content = array();
@@ -1108,10 +1949,10 @@
1108 1949 $content[] = '<div id="ays-chart-dicount-christmas-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1109 1950 $content[] = '<div id="ays-chart-dicount-christmas-month" class="ays_chart_dicount_month">';
1110 1951 $content[] = '<div class="ays-chart-dicount-christmas-box">';
1111 1952 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box ays-chart-dicount-christmas-wrap-box-80">';
1112 - $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Limited Time', CHART_BUILDER_NAME ) .' '. '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-sale" target="_blank">' . __( '40%', CHART_BUILDER_NAME ) . '</a>' . ' SALE</div>';
1113 - $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', CHART_BUILDER_NAME ) . '</div>';
1953 + $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Limited Time', 'chart-builder' ) .' '. '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-sale" target="_blank">' . __( '40%', 'chart-builder' ) . '</a>' . ' SALE</div>';
1954 + $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', 'chart-builder' ) . '</div>';
1114 1955 $content[] = '</div>';
1115 1956
1116 1957 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1117 1958 $content[] = '<div id="ays-chart-countdown-main-container">';
@@ -1117,12 +1958,12 @@
1117 1958 $content[] = '<div id="ays-chart-countdown-main-container">';
1118 1959 $content[] = '<div class="ays-chart-countdown-container">';
1119 1960 $content[] = '<div id="ays-chart-countdown" style="display: block;">';
1120 1961 $content[] = '<ul>';
1121 - $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', CHART_BUILDER_NAME ) . '</li>';
1122 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', CHART_BUILDER_NAME ) . '</li>';
1123 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', CHART_BUILDER_NAME ) . '</li>';
1124 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', CHART_BUILDER_NAME ) . '</li>';
1962 + $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', 'chart-builder' ) . '</li>';
1963 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', 'chart-builder' ) . '</li>';
1964 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', 'chart-builder' ) . '</li>';
1965 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', 'chart-builder' ) . '</li>';
1125 1966 $content[] = '</ul>';
1126 1967 $content[] = '</div>';
1127 1968 $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">';
1128 1969 $content[] = '<span>🚀</span>';
@@ -1134,9 +1975,9 @@
1134 1975 $content[] = '</div>';
1135 1976 $content[] = '</div>';
1136 1977
1137 1978 $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">';
1138 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-buy-now" target="_blank">' . __( 'BUY NOW!', CHART_BUILDER_NAME ) . '</a>';
1979 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder" class="ays-chart-dicount-christmas-button-buy-now" target="_blank">' . __( 'BUY NOW!', 'chart-builder' ) . '</a>';
1139 1980 $content[] = '</div>';
1140 1981 $content[] = '</div>';
1141 1982 $content[] = '</div>';
1142 1983
@@ -1142,9 +1983,9 @@
1142 1983
1143 1984 $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-christmas">';
1144 1985 $content[] = '<form method="POST">';
1145 1986 $content[] = '<div id="ays-chart-dismiss-buttons-content-christmas">';
1146 - $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', CHART_BUILDER_NAME ) . '</button>';
1987 + $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', 'chart-builder' ) . '</button>';
1147 1988 $content[] = '</div>';
1148 1989 $content[] = '</form>';
1149 1990 $content[] = '</div>';
1150 1991 $content[] = '</div>';
@@ -1150,9 +1991,9 @@
1150 1991 $content[] = '</div>';
1151 1992
1152 1993 $content = implode( '', $content );
1153 1994
1154 - echo $content;
1995 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1155 1996 }
1156 1997 }
1157 1998
1158 1999 // Silver Bundle
@@ -1161,20 +2002,20 @@
1161 2002 $content = array();
1162 2003
1163 2004 $content[] = '<div id="ays-chart-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1164 2005 $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1165 - $content[] = '<a href="https://ays-pro.com/silver-bundle" target="_blank" class="ays-chart-sale-banner-link"><img src="' . CHART_BUILDER_ADMIN_URL . '/images/silver_bundle_logo_box.png"></a>';
2006 + $content[] = '<a href="https://ays-pro.com/silver-bundle" target="_blank" class="ays-chart-sale-banner-link"><img src="' . esc_url(plugins_url('/images/silver_bundle_logo_box.png', dirname(__FILE__))) . '"></a>';// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage
1166 2007
1167 2008 $content[] = '<div class="ays-chart-dicount-wrap-box">';
1168 2009
1169 2010 $content[] = '<strong style="font-weight: bold;">';
1170 - $content[] = __( "Limited Time <span style='color:#E85011;'>50%</span> SALE on <br><span><a href='https://ays-pro.com/silver-bundle' target='_blank' style='color:#E85011; text-decoration: underline;'>Silver Bundle</a></span> (Quiz + Chart + Form)!", CHART_BUILDER_NAME );
2011 + $content[] = __( "Limited Time <span style='color:#E85011;'>50%</span> SALE on <br><span><a href='https://ays-pro.com/silver-bundle' target='_blank' style='color:#E85011; text-decoration: underline;'>Silver Bundle</a></span> (Quiz + Chart + Form)!", 'chart-builder' );
1171 2012 $content[] = '</strong>';
1172 2013
1173 2014 $content[] = '<br>';
1174 2015
1175 2016 $content[] = '<strong>';
1176 - $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", CHART_BUILDER_NAME );
2017 + $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", 'chart-builder' );
1177 2018 $content[] = '</strong>';
1178 2019
1179 2020 $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
1180 2021
@@ -1213,23 +2054,134 @@
1213 2054 $content[] = '</div>';
1214 2055
1215 2056 $content[] = '</div>';
1216 2057
1217 - $content[] = '<a href="https://ays-pro.com/silver-bundle" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="height: 32px; display: flex; align-items: center; font-weight: 500; " >' . __( 'Buy Now !', CHART_BUILDER_NAME ) . '</a>';
2058 + $content[] = '<a href="https://ays-pro.com/silver-bundle" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="height: 32px; display: flex; align-items: center; font-weight: 500; " >' . __( 'Buy Now !', 'chart-builder' ) . '</a>';
1218 2059 $content[] = '</div>';
1219 2060 $content[] = '</div>';
1220 2061
1221 2062 $content = implode( '', $content );
1222 - echo $content;
2063 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1223 2064 }
1224 2065 }
1225 2066
1226 - // Black Friday 2024
1227 - public function ays_chart_black_friday_message_2024($ishmar){
2067 + //silver bundle
2068 + public function ays_chart_new_silver_bundle_message_2025($ishmar){
2069 + $content = array();
2070 +
2071 + $date = time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
2072 + $now_date = date('M d, Y H:i:s', $date);
2073 +
2074 + $chart_banner_date = strtotime( $this->ays_chart_update_banner_time() );
2075 +
2076 + $diff = $chart_banner_date - $date;
2077 +
2078 + $style_attr = '';
2079 + if( $diff < 0 ){
2080 + $style_attr = 'style="display:none;"';
2081 + }
2082 +
2083 + $chart_cta_button_link = esc_url( 'https://ays-pro.com/silver-bundle?utm_source=dashboard&utm_medium=chart-free&utm_campaign=silver-bundle-sale-banner-' . CHART_BUILDER_VERSION );
2084 +
2085 + $content[] = '<div id="ays-chart-new-silver-bundle-dicount-month-main" class="ays-chart-admin-notice notice notice-success is-dismissible ays_chart_dicount_info">';
2086 + $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
2087 +
2088 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
2089 + $content[] = '<div>';
2090 + $content[] = '<div class="ays-chart-dicount-logo-box">';
2091 + $content[] = '<a href="' . $chart_cta_button_link . '" target="_blank" class="ays-chart-sale-banner-link"><img src="' . CHART_BUILDER_ADMIN_URL . '/images/mega_bundle_logo_box.webp"></a>';
2092 +
2093 + $content[] = '<div>';
2094 + $content[] = '<span class="ays-chart-new-silver-bundle-title">';
2095 + $content[] = sprintf(
2096 + /* translators: 1: opening link wrapper with <a> tag, 2: closing </a> tag */
2097 + __( '%1$s Silver Bundle %2$s (Quiz + Form + Chart)', 'chart-builder' ),
2098 + '<span style="display:inline-block; margin-right:5px;"><a href="' . esc_url( $chart_cta_button_link ) . '" target="_blank" rel="noopener noreferrer" style="color:#ffffff !important; text-decoration: underline;">',
2099 + '</a></span>'
2100 + );
2101 + $content[] = '</span>';
2102 + $content[] = '</br>';
2103 + $content[] = '<span class="ays-chart-new-silver-bundle-desc">';
2104 + $content[] = __( "30 Day Money Back Guarantee", 'chart-builder' );
2105 + $content[] = '</span>';
2106 + $content[] = '</div>';
2107 +
2108 + $content[] = '<div class="ays-chart-new-silver-bundle-title-icon-row" style="display: inline-block;">';
2109 + $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-50.svg" class="ays-chart-new-silver-bundle-mobile-image-display-none" style="width: 70px;">';
2110 + $content[] = '</div>';
2111 +
2112 + $content[] = '</div>';
2113 +
2114 + $content[] = '<div class="ays-chart-new-silver-bundle-mobile-image-display-block display_none">';
2115 + $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-50.svg" style="width: 70px;">';
2116 + $content[] = '</div>';
2117 + $content[] = '</div>';
2118 +
2119 + $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
2120 +
2121 + $content[] = '<form action="" method="POST">';
2122 + $content[] = '<div id="ays-chart-dismiss-buttons-content">';
2123 + if( current_user_can( 'manage_options' ) ){
2124 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
2125 + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
2126 + }
2127 + $content[] = '</div>';
2128 + $content[] = '</form>';
2129 +
2130 + $content[] = '</div>';
2131 +
2132 + $content[] = '</div>';
2133 +
2134 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
2135 +
2136 + $content[] = '<div id="ays-chart-maker-countdown-main-container">';
2137 + $content[] = '<div class="ays-chart-maker-countdown-container">';
2138 +
2139 + $content[] = '<div ' . $style_attr . ' id="ays-chart-countdown">';
2140 +
2141 + $content[] = '<ul>';
2142 +
2143 + $content[] = '<li><span id="ays-chart-countdown-days"></span></li>';
2144 + $content[] = '<li><span id="ays-chart-countdown-hours"></span></li>';
2145 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span></li>';
2146 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span></li>';
2147 + $content[] = '</ul>';
2148 + $content[] = '</div>';
2149 +
2150 + $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
2151 + $content[] = '</div>';
2152 +
2153 + $content[] = '</div>';
2154 + $content[] = '</div>';
2155 +
2156 + $content[] = '</div>';
2157 +
2158 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
2159 + $content[] = '<a href="'. $chart_cta_button_link .'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Buy Now', 'chart-builder' ) . '</a>';
2160 + $content[] = '<span class="ays-chart-dicount-one-time-text">';
2161 + $content[] = __( "One-time payment", 'chart-builder' );
2162 + $content[] = '</span>';
2163 + $content[] = '</div>';
2164 + $content[] = '</div>';
2165 + $content[] = '</div>';
2166 +
2167 + // /* New Mega Bundle Banner Quiz | Start */
2168 + $content[] = '<style id="ays-chart-mega-bundle-styles-inline-css">';
2169 + $content[] = '
2170 + div#ays-chart-new-silver-bundle-dicount-month-main{border:0;background:#fff;border-radius:20px;box-shadow:unset;position:relative;z-index:1;min-height:80px}div#ays-chart-new-silver-bundle-dicount-month-main.ays_chart_dicount_info button{display:flex;align-items:center}div#ays-chart-new-silver-bundle-dicount-month-main div#ays-chart-dicount-month a.ays-chart-sale-banner-link:focus{outline:0;box-shadow:0}div#ays-chart-new-silver-bundle-dicount-month-main .btn-link{color:#007bff;background-color:transparent;display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem}div#ays-chart-new-silver-bundle-dicount-month-main.ays_chart_dicount_info{background-image:url("'. CHART_BUILDER_ADMIN_URL .'/images/chart-builder-banner-background-50.svg");background-position:center right;background-repeat:no-repeat;background-size:cover;background-color:#5551ff;padding:1px 38px 1px 12px}#ays-chart-new-silver-bundle-dicount-month-main .ays_chart_dicount_month{display:flex;align-items:center;justify-content:space-between;color:#fff}#ays-chart-new-silver-bundle-dicount-month-main .ays_chart_dicount_month img{width:60px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-sale-banner-link{display:flex;justify-content:center;align-items:center;width:60px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box{font-size:14px;padding:12px;text-align:center}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{text-align:left;width:auto;display:flex;justify-content:space-around;align-items:flex-start}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:30%;display:flex;justify-content:center;align-items:center}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-button-box{width:20%;display:flex;justify-content:center;align-items:center;flex-direction:column}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-chart-dicount-logo-box{display:flex;justify-content:flex-start;align-items:center;gap:20px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-title{color:#fdfdfd;font-size:19px;font-style:normal;font-weight:600;line-height:normal}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-title-icon-row{display:inline-block}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-desc{display:inline-block;color:#fff;font-size:15px;font-style:normal;font-weight:400;line-height:normal;margin-top:10px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box strong{font-size:17px;font-weight:700;letter-spacing:.8px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-color{color:#971821}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-text-decoration{text-decoration:underline}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-buy-now-button-box{display:flex;justify-content:flex-end;align-items:center;width:30%}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-button,#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-buy-now-button{align-items:center;font-weight:500}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-buy-now-button{background:#971821;border-color:#fff;display:flex;justify-content:center;align-items:center;padding:5px 15px;font-size:16px;border-radius:5px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-buy-now-button:hover{background:#7d161d;border-color:#971821}#ays-chart-new-silver-bundle-dicount-month-main #ays-chart-dismiss-buttons-content{display:flex;justify-content:center}#ays-chart-new-silver-bundle-dicount-month-main #ays-chart-dismiss-buttons-content .ays-button{margin:0!important;font-size:13px;color:#fff}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-opacity-box{width:19%}#ays-chart-new-silver-bundle-dicount-month-main .ays-buy-now-opacity-button{padding:40px 15px;display:flex;justify-content:center;align-items:center;opacity:0}#ays-chart-maker-countdown-main-container .ays-chart-maker-countdown-container{margin:0 auto;text-align:center}#ays-chart-maker-countdown-main-container #ays-chart-countdown-headline{letter-spacing:.125rem;text-transform:uppercase;font-size:18px;font-weight:400;margin:0;padding:9px 0 4px;line-height:1.3}#ays-chart-maker-countdown-main-container li,#ays-chart-maker-countdown-main-container ul{margin:0}#ays-chart-maker-countdown-main-container li{display:inline-block;font-size:14px;list-style-type:none;padding:14px;text-transform:lowercase}#ays-chart-maker-countdown-main-container li span{display:flex;justify-content:center;align-items:center;font-size:22px;min-height:40px;min-width:40px;border-radius:4.273px;border:.534px solid #f4f4f4;background:#9896ed;color:#fff}#ays-chart-maker-countdown-main-container .emoji{display:none;padding:1rem}#ays-chart-maker-countdown-main-container .emoji span{font-size:30px;padding:0 .5rem}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box li{position:relative}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box li span:after{content:":";color:#fff;position:absolute;top:0;right:-5px;font-size:40px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box li span#ays-chart-countdown-seconds:after{content:unset}#ays-chart-new-silver-bundle-dicount-month-main #ays-button-top-buy-now{display:flex;align-items:center;border-radius:6.409px;background:#f66123;padding:12px 32px;color:#fff;font-size:15px;font-style:normal;line-height:normal;margin:0!important}div#ays-chart-new-silver-bundle-dicount-month-main button.notice-dismiss:before{color:#fff;content:"\f00d";font-family:fontawesome;font-size:22px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-new-silver-bundle-guaranteeicon{width:30px;margin-right:5px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-one-time-text{color:#fff;font-size:12px;font-style:normal;font-weight:600;line-height:normal}@media all and (max-width:768px){div#ays-chart-new-silver-bundle-dicount-month-main.ays_chart_dicount_info.notice{display:none!important;background-position:bottom right;background-repeat:no-repeat;background-size:cover;border-radius:32px}div#ays-chart-new-silver-bundle-dicount-month-main{padding-right:0}div#ays-chart-new-silver-bundle-dicount-month-main .ays_chart_dicount_month{display:flex;align-items:center;justify-content:space-between;align-content:center;flex-wrap:wrap;flex-direction:column;padding:10px 0}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box{width:100%!important;text-align:center}#ays-chart-maker-countdown-main-container #ays-chart-countdown-headline{font-size:15px;font-weight:600}#ays-chart-maker-countdown-main-container ul{font-weight:500}div#ays-chart-maker-countdown-main-container li{padding:10px}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-new-silver-bundle-mobile-image-display-none{display:none!important}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-new-silver-bundle-mobile-image-display-block{display:block!important;margin-top:5px}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{width:100%!important;text-align:center;flex-direction:column;margin-top:20px;justify-content:center;align-items:center}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box li span:after{top:unset}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:100%;display:flex;justify-content:center;align-items:center}#ays-chart-new-silver-bundle-dicount-month-main .ays-button{margin:0 auto!important}#ays-chart-new-silver-bundle-dicount-month-main #ays-chart-dismiss-buttons-content .ays-button{padding-left:unset!important}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-buy-now-button-box{justify-content:center}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box .ays-buy-now-button{font-size:14px;padding:5px 10px}div#ays-chart-new-silver-bundle-dicount-month-main .ays-buy-now-opacity-button{display:none}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dismiss-buttons-container-for-form{position:static!important}.comparison .product img{width:70px}.ays-chart-features-wrap .comparison a.price-buy{padding:8px 5px;font-size:11px}}@media screen and (max-width:1350px) and (min-width:768px){div#ays-chart-new-silver-bundle-dicount-month-main.ays_chart_dicount_info.notice{background-position:bottom right;background-repeat:no-repeat;background-size:cover}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box strong{font-size:15px}#ays-chart-maker-countdown-main-container li{font-size:11px}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-opacity-box{display:none}}@media screen and (max-width:1680px) and (min-width:1551px){div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{width:29%}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:30%}}@media screen and (max-width:1410px){#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-coupon-row{width:150px}}@media screen and (max-width:1550px) and (min-width:1400px){div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:35%}}@media screen and (max-width:1400px) and (min-width:1250px){div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:35%}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{width:40%}}@media screen and (max-width:1274px){#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-title{font-size:15px}}@media screen and (max-width:1200px){#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-button-box{margin-bottom:16px}#ays-chart-maker-countdown-main-container ul{padding-left:0}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-coupon-row{width:120px;font-size:18px}#ays-chart-new-silver-bundle-dicount-month-main #ays-button-top-buy-now{padding:12px 20px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box{font-size:12px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box .ays-chart-new-silver-bundle-desc{font-size:13px}}@media screen and (max-width:1076px) and (min-width:769px){#ays-chart-maker-countdown-main-container li{padding:10px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-coupon-row{width:100px;font-size:16px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-button-box{margin-bottom:16px}#ays-chart-new-silver-bundle-dicount-month-main #ays-button-top-buy-now{padding:12px 15px}#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box{font-size:11px;padding:12px 0}}@media screen and (max-width:1250px) and (min-width:769px){div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-countdown-box{width:45%}div#ays-chart-new-silver-bundle-dicount-month-main .ays-chart-dicount-wrap-box.ays-chart-dicount-wrap-text-box{width:35%}}';
2171 + $content[] = '</style>';
2172 + // /* New Mega Bundle Banner Quiz | End */
2173 +
2174 + $content = implode( '', $content );
2175 + echo ($content);
2176 + }
2177 +
2178 + // Christmas Top Banner 2024
2179 + public function ays_chart_christmas_message_2024($ishmar){
1228 2180 if($ishmar == 0 ){
1229 2181 $content = array();
1230 2182
1231 - $content[] = '<div id="ays-chart-black-friday-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
2183 + $content[] = '<div id="ays-chart-christmas-top-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1232 2184 $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
1233 2185
1234 2186 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
1235 2187
@@ -1238,16 +2190,16 @@
1238 2190
1239 2191 $content[] = '<div id="ays-chart-countdown">';
1240 2192
1241 2193 $content[] = '<div>';
1242 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
2194 + $content[] = __( "Offer ends in:", 'chart-builder' );
1243 2195 $content[] = '</div>';
1244 2196
1245 - $content[] = '<ul>';
1246 - $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", CHART_BUILDER_NAME ) .'</li>';
1247 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", CHART_BUILDER_NAME ) .'</li>';
1248 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", CHART_BUILDER_NAME ) .'</li>';
1249 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", CHART_BUILDER_NAME ) .'</li>';
2197 + $content[] = '<ul style="padding-left: 0;">';
2198 + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>';
2199 + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>';
2200 + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>';
2201 + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>';
1250 2202 $content[] = '</ul>';
1251 2203 $content[] = '</div>';
1252 2204
1253 2205 $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
@@ -1264,17 +2216,24 @@
1264 2216
1265 2217 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1266 2218 $content[] = '<div>';
1267 2219
1268 - $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1269 - $content[] = __( "<span><a href='https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner' class='ays-chart-black-friday-bundle-title-link' target='_blank'>Black Friday Sale</a></span>", CHART_BUILDER_NAME );
2220 + $content[] = '<span class="ays-chart-christmas-top-bundle-title">';
2221 + $content[] = sprintf(
2222 + /* translators: %s is the Chart Builder plugin URL with version parameter. */
2223 + __(
2224 + "<span><a href='%s' class='ays-chart-christmas-top-bundle-title-link' target='_blank'>Christmas Sale</a></span>",
2225 + 'chart-builder'
2226 + ),
2227 + "https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner" . CHART_BUILDER_VERSION
2228 + );
1270 2229 $content[] = '</span>';
1271 2230
1272 2231 $content[] = '</br>';
1273 2232
1274 - $content[] = '<span class="ays-chart-black-friday-bundle-desc">';
1275 - $content[] = '<a class="ays-chart-black-friday-bundle-desc" href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner" class="ays-chart-black-friday-bundle-title-link" target="_blank">';
1276 - $content[] = __( "50% OFF", CHART_BUILDER_NAME );
2233 + $content[] = '<span class="ays-chart-christmas-top-bundle-desc">';
2234 + $content[] = '<a class="ays-chart-christmas-top-bundle-desc" href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner'.CHART_BUILDER_VERSION.'" class="ays-chart-christmas-top-bundle-title-link" target="_blank">';
2235 + $content[] = __( "20% Extra OFF", 'chart-builder' );
1277 2236 $content[] = '</a>';
1278 2237 $content[] = '</span>';
1279 2238 $content[] = '</div>';
1280 2239
@@ -1282,9 +2241,9 @@
1282 2241
1283 2242 $content[] = '<form action="" method="POST">';
1284 2243 $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1285 2244 if( current_user_can( 'manage_options' ) ){
1286 - $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", CHART_BUILDER_NAME ) .'</button>';
2245 + $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", 'chart-builder' ) .'</button>';
1287 2246 $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
1288 2247 }
1289 2248 $content[] = '</div>';
1290 2249 $content[] = '</form>';
@@ -1292,20 +2251,21 @@
1292 2251 $content[] = '</div>';
1293 2252
1294 2253 $content[] = '</div>';
1295 2254
1296 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1297 - $content[] = '<span class="ays-chart-black-friday-bundle-title">';
1298 - $content[] = '<a class="ays-chart-black-friday-bundle-title-link" href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner" target="_blank">';
1299 - $content[] = __( 'Silver Bundle', "ays-popup-box" );
1300 - $content[] = '</a>';
1301 - $content[] = '</span>';
2255 + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-christmas-top-bundle-coupon-text-box">';
2256 + $content[] = '<div class="ays-chart-christmas-top-bundle-coupon-row">';
2257 + $content[] = 'xmas20off';
2258 + $content[] = '</div>';
2259 + $content[] = '<div class="ays-chart-christmas-top-bundle-text-row">';
2260 + $content[] = __( '20% Extra Discount Coupon', 'chart-builder' );
2261 + $content[] = '</div>';
1302 2262 $content[] = '</div>';
1303 2263
1304 2264 $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1305 - $content[] = '<a href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=black-friday-silver-bundle-sale-banner" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', CHART_BUILDER_NAME ) . '</a>';
2265 + $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', 'chart-builder' ) . '</a>';
1306 2266 $content[] = '<span class="ays-chart-dicount-one-time-text">';
1307 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
2267 + $content[] = __( "One-time payment", 'chart-builder' );
1308 2268 $content[] = '</span>';
1309 2269 $content[] = '</div>';
1310 2270 $content[] = '</div>';
1311 2271 $content[] = '</div>';
@@ -1310,111 +2270,1242 @@
1310 2270 $content[] = '</div>';
1311 2271 $content[] = '</div>';
1312 2272
1313 2273 $content = implode( '', $content );
1314 - echo $content;
2274 + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) );
1315 2275 }
1316 2276 }
1317 2277
1318 - // Christmas Top Banner 2024
1319 - public function ays_chart_christmas_message_2024($ishmar){
2278 + // Halloween Bundle 2025
2279 + public function ays_chart_new_halloween_bundle_message_2025($ishmar){
1320 2280 if($ishmar == 0 ){
1321 2281 $content = array();
1322 2282
1323 - $content[] = '<div id="ays-chart-christmas-top-bundle-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">';
1324 - $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">';
2283 + $date = time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
2284 + $now_date = date('M d, Y H:i:s', $date);
1325 2285
1326 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">';
2286 + $start_date = strtotime('2025-09-08');
2287 + $end_date = strtotime('2025-10-31');
2288 + $diff_end = $end_date - $date;
1327 2289
1328 - $content[] = '<div id="ays-chart-countdown-main-container">';
1329 - $content[] = '<div class="ays-chart-countdown-container">';
2290 + $style_attr = '';
2291 + if( $diff_end < 0 ){
2292 + $style_attr = 'style="display:none;"';
2293 + }
1330 2294
1331 - $content[] = '<div id="ays-chart-countdown">';
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);
1332 2296
1333 - $content[] = '<div>';
1334 - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME );
1335 - $content[] = '</div>';
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>
1336 2306
1337 - $content[] = '<ul style="padding-left: 0;">';
1338 - $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", CHART_BUILDER_NAME ) .'</li>';
1339 - $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", CHART_BUILDER_NAME ) .'</li>';
1340 - $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", CHART_BUILDER_NAME ) .'</li>';
1341 - $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", CHART_BUILDER_NAME ) .'</li>';
1342 - $content[] = '</ul>';
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>';
1343 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>';
1344 2332
1345 - $content[] = '<div id="ays-chart-countdown-content" class="emoji">';
1346 - $content[] = '<span>🚀</span>';
1347 - $content[] = '<span>⌛</span>';
1348 - $content[] = '<span>🔥</span>';
1349 - $content[] = '<span>💣</span>';
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>';
1350 2372 $content[] = '</div>';
2373 + }
1351 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> ';
1352 2899 $content[] = '</div>';
2900 +
1353 2901 $content[] = '</div>';
1354 -
1355 - $content[] = '</div>';
1356 2902
1357 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">';
1358 - $content[] = '<div>';
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>';
1359 2906
1360 - $content[] = '<span class="ays-chart-christmas-top-bundle-title">';
1361 - $content[] = __( "<span><a href='https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner".CHART_BUILDER_VERSION."' class='ays-chart-christmas-top-bundle-title-link' target='_blank'>Christmas Sale</a></span>", CHART_BUILDER_NAME );
1362 - $content[] = '</span>';
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>';
1363 2927
1364 - $content[] = '</br>';
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>';
1365 2933
1366 - $content[] = '<span class="ays-chart-christmas-top-bundle-desc">';
1367 - $content[] = '<a class="ays-chart-christmas-top-bundle-desc" href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner'.CHART_BUILDER_VERSION.'" class="ays-chart-christmas-top-bundle-title-link" target="_blank">';
1368 - $content[] = __( "20% Extra OFF", CHART_BUILDER_NAME );
1369 - $content[] = '</a>';
1370 - $content[] = '</span>';
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 + }
1371 2941 $content[] = '</div>';
2942 + $content[] = '</form>';
2943 + $content[] = '</div>';
2944 + $content[] = '</div>';
1372 2945
1373 - $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">';
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 + }
1374 2970
1375 - $content[] = '<form action="" method="POST">';
1376 - $content[] = '<div id="ays-chart-dismiss-buttons-content">';
1377 - if( current_user_can( 'manage_options' ) ){
1378 - $content[] = '<button class="btn btn-link ays-button" name="ays_chart_sale_btn" style="height: 32px; margin-left: 0;padding-left: 0">'. __( "Dismiss ad", CHART_BUILDER_NAME ) .'</button>';
1379 - $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' );
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);
1380 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 +
3010 + echo $content;
3011 + }
3012 + }
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>';
1381 3071 $content[] = '</div>';
1382 - $content[] = '</form>';
1383 -
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>';
1384 3083 $content[] = '</div>';
1385 3084
1386 - $content[] = '</div>';
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>';
1387 3089
1388 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-christmas-top-bundle-coupon-text-box">';
1389 - $content[] = '<div class="ays-chart-christmas-top-bundle-coupon-row">';
1390 - $content[] = 'xmas20off';
1391 - $content[] = '</div>';
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>';
1392 3097
1393 - $content[] = '<div class="ays-chart-christmas-top-bundle-text-row">';
1394 - $content[] = __( '20% Extra Discount Coupon', CHART_BUILDER_NAME );
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>';
1395 3101 $content[] = '</div>';
1396 3102 $content[] = '</div>';
1397 3103
1398 - $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">';
1399 - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Get Your Deal', CHART_BUILDER_NAME ) . '</a>';
1400 - $content[] = '<span class="ays-chart-dicount-one-time-text">';
1401 - $content[] = __( "One-time payment", CHART_BUILDER_NAME );
1402 - $content[] = '</span>';
1403 - $content[] = '</div>';
1404 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 +
1405 3115 $content[] = '</div>';
1406 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 +
1407 3494 $content = implode( '', $content );
3495 +
1408 3496 echo $content;
1409 3497 }
1410 3498 }
1411 3499
1412 3500 public function ays_chart_update_banner_time(){
3501 + if (!current_user_can('manage_options')) {
3502 + return array('error' => 'Insufficient permissions');
3503 + }
1413 3504
1414 3505 $date = time() + ( 3 * 24 * 60 * 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
1415 3506 // $date = time() + ( 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS); // for testing | 1 min
1416 - $next_3_days = date('M d, Y H:i:s', $date);
3507 + $next_3_days = gmdate('M d, Y H:i:s', $date);
1417 3508
1418 3509 $ays_chart_banner_time = get_option('ays_chart_20_bundle_banner_time');
1419 3510
1420 3511 if ( !$ays_chart_banner_time || is_null( $ays_chart_banner_time ) ) {
@@ -1437,11 +3528,26 @@
1437 3528
1438 3529 return $get_ays_chart_banner_time;
1439 3530 }
1440 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 +
1441 3547 public function author_user_search() {
1442 3548 check_ajax_referer( 'cbuilder-author-user-search', 'security' );
1443 - $params = $_REQUEST['params'];
3549 + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array();
1444 3550 $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null;
1445 3551 $checked = isset($params['val']) && $params['val'] !='' ? sanitize_text_field( $params['val'] ) : null;
1446 3552 $args = 'search=';
1447 3553 if ($search !== null) {
@@ -1558,10 +3664,11 @@
1558 3664 */
1559 3665 public function ays_chart_activate_plugin() {
1560 3666
1561 3667 // Run a security check.
1562 - 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' );
1563 3669
3670 +
1564 3671 // Check for permissions.
1565 3672 if ( ! current_user_can( 'activate_plugins' ) ) {
1566 3673 wp_send_json_error( esc_html__( 'Plugin activation is disabled for you on this site.', 'chart-builder' ) );
1567 3674 }
@@ -1601,10 +3708,11 @@
1601 3708 */
1602 3709 public function ays_chart_install_plugin() {
1603 3710
1604 3711 // Run a security check.
1605 - 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' );
1606 3713
3714 +
1607 3715 $generic_error = esc_html__( 'There was an error while performing your request.', 'chart-builder' );
1608 3716 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : '';
1609 3717
1610 3718 // Check if new installations are allowed.
@@ -1720,11 +3828,13 @@
1720 3828
1721 3829 $images_url = CHART_BUILDER_ADMIN_URL . '/images/icons/';
1722 3830
1723 3831 $plugin_slug = array(
3832 + 'fox-lms',
1724 3833 'quiz-maker',
1725 3834 'survey-maker',
1726 3835 'poll-maker',
3836 + 'chart-builder',
1727 3837 'ays-popup-box',
1728 3838 'secure-copy-content-protection',
1729 3839 'gallery-photo-gallery',
1730 3840 'ays-chatgpt-assistant',
@@ -1734,9 +3844,9 @@
1734 3844 $plugin_url_arr = array();
1735 3845 foreach ($plugin_slug as $key => $slug) {
1736 3846 if ( isset( $_SESSION['ays_chart_our_product_links'] ) && !empty( $_SESSION['ays_chart_our_product_links'] )
1737 3847 && isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && !empty( $_SESSION['ays_chart_our_product_links'][$slug] ) ) {
1738 - $plugin_url = (isset( $_SESSION['ays_chart_our_product_links'][$slug] ) && $_SESSION['ays_chart_our_product_links'][$slug] != "") ? esc_url( $_SESSION['ays_chart_our_product_links'][$slug] ) : "";
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])) : "";
1739 3849 } else {
1740 3850 $latest_version = $this->ays_chart_get_latest_plugin_version($slug);
1741 3851 $plugin_url = 'https://downloads.wordpress.org/plugin/'. $slug .'.zip';
1742 3852 if ( $latest_version != '' ) {
@@ -1748,13 +3858,22 @@
1748 3858 $plugin_url_arr[$slug] = $plugin_url;
1749 3859 }
1750 3860
1751 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 + ),
1752 3871 'quiz-maker/quiz-maker.php' => array(
1753 3872 'icon' => $images_url . 'icon-quiz-128x128.png',
1754 - 'name' => __( 'Quiz Maker', "easy-form" ),
1755 - 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', "easy-form" ),
1756 - 'desc_hidden' => __( 'Build an unlimited number of quizzes and questions.', "easy-form" ),
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' ),
1757 3876 'wporg' => 'https://wordpress.org/plugins/quiz-maker/',
1758 3877 'buy_now' => 'https://ays-pro.com/wordpress/quiz-maker/',
1759 3878 'url' => $plugin_url_arr['quiz-maker'],
1760 3879 ),
@@ -1794,9 +3913,9 @@
1794 3913 'buy_now' => 'https://ays-pro.com/wordpress/secure-copy-content-protection/',
1795 3914 'url' => $plugin_url_arr['secure-copy-content-protection'],
1796 3915 ),
1797 3916 'gallery-photo-gallery/gallery-photo-gallery.php' => array(
1798 - 'icon' => $images_url . 'icon-gallery-128x128.jpg',
3917 + 'icon' => $images_url . 'icon-gallery-128x128.png',
1799 3918 'name' => __( 'Gallery Photo Gallery', 'chart-builder' ),
1800 3919 'desc' => __( 'Create unlimited galleries and include unlimited images in those galleries.', 'chart-builder' ),
1801 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' ),
1802 3921 'wporg' => 'https://wordpress.org/plugins/gallery-photo-gallery/',
@@ -1996,9 +4115,9 @@
1996 4115 <span aria-hidden="true" class="dashicons dashicons-external"></span>
1997 4116 </a>';
1998 4117 }
1999 4118 $content .='
2000 - <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', $this->plugin_name) .'</a>
4119 + <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', 'chart-builder') .'</a>
2001 4120 </div>
2002 4121 </div>';
2003 4122 }
2004 4123 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
@@ -2004,9 +4123,9 @@
2004 4123 $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' );
2005 4124 $content.= '<input type="hidden" id="ays_chart_ajax_install_plugin_nonce" name="ays_chart_ajax_install_plugin_nonce" value="'. $install_plugin_nonce .'">';
2006 4125 $content.= '</div>';
2007 4126
2008 - echo $content;
4127 + echo html_entity_decode($content);
2009 4128 }
2010 4129
2011 4130 /**
2012 4131 * Returns the data from Quiz maker.
@@ -2015,9 +4134,9 @@
2015 4134 */
2016 4135 public function fetch_quiz_maker_data(){
2017 4136 check_ajax_referer( 'cbuilder-fetch-quiz-maker-data', 'security' );
2018 4137
2019 - $params = $_POST['params'];
4138 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
2020 4139 if ( !isset($params) || empty($params) ) {
2021 4140 return array(
2022 4141 'success' => false,
2023 4142 'data' => array(
@@ -2139,9 +4258,9 @@
2139 4258 */
2140 4259 public function save_quiz_maker_data() {
2141 4260 check_ajax_referer( 'cbuilder-save-quiz-maker-data', 'security' );
2142 4261
2143 - $params = $_POST['params'];
4262 + $params = isset($_REQUEST['params']) ? $_REQUEST['params'] : array();
2144 4263 if ( !isset($params) || empty($params) ) {
2145 4264 return array(
2146 4265 'success' => false,
2147 4266 'data' => array(
@@ -2255,9 +4374,9 @@
2255 4374 'data' => array(
2256 4375 'msg' => __( 'Data was successfully saved.', "chart-builder" )
2257 4376 )
2258 4377 );
2259 - }
4378 + }
2260 4379
2261 4380 /**
2262 4381 * Chart page action hooks
2263 4382 */
@@ -2301,9 +4420,9 @@
2301 4420
2302 4421 $sources[] = $content;
2303 4422 }
2304 4423 $content_for_escape = implode('' , $sources );
2305 - echo html_entity_decode(esc_html( $content_for_escape ));
4424 + echo html_entity_decode( esc_html($content_for_escape) );
2306 4425 }
2307 4426
2308 4427 public function source_contents_import_from_csv_settings( $sources, $args ){
2309 4428 $html_class_prefix = $args['html_class_prefix'];
@@ -2315,25 +4434,25 @@
2315 4434 <div class="ays-pro-features-v2-big-buttons-box">
2316 4435 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2317 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>
2318 4437 <div class="ays-pro-features-v2-video-text">
2319 - <?php echo __("Watch Video" , "chart-builder"); ?>
4438 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2320 4439 </div>
2321 4440 </a>
2322 4441 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2323 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>
2324 4443 <div class="ays-pro-features-v2-upgrade-text">
2325 - <?php echo __("Upgrade" , "chart-builder"); ?>
4444 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2326 4445 </div>
2327 4446 </a>
2328 4447 </div>
2329 - <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">
2330 4449 <div class="<?php echo esc_attr($html_class_prefix) ?>file-import-form">
2331 - <h6><?php echo __("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6>
4450 + <h6><?php echo esc_html__("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6>
2332 4451 <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>import-files-file-type">
2333 4452 <option value="csv">CSV File</option>
2334 4453 </select>
2335 - <span style="display: block; font-style: italic; color: gray; font-size: 12px; margin: 5px 0;" class="<?php echo esc_attr($html_class_prefix) ?>small-hint-text"><?php echo __("Choose the format of the file you are going to import.", "chart-builder"); ?></span>
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>
2336 4455 <p class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example" style="font-size: 15px; font-style: italic;">Example:
2337 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>
2338 4457 </p>
2339 4458 <div>
@@ -2342,16 +4461,16 @@
2342 4461 <div class='ays-chart-file-import-success'></div>
2343 4462 <div class='ays-chart-file-import-error'></div>
2344 4463 <div class="ays-chart-buttons-group">
2345 4464 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-fetch">
2346 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4465 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2347 4466 </button>
2348 4467 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-show-on-chart">
2349 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>
2350 - <?php echo __( 'Preview', "chart-builder" ); ?>
4469 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2351 4470 </button>
2352 4471 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-save">
2353 - <?php echo __( 'Save data', "chart-builder" ); ?>
4472 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2354 4473 </button>
2355 4474 </div>
2356 4475 </div>
2357 4476 </div>
@@ -2381,38 +4500,38 @@
2381 4500 <div class="ays-pro-features-v2-big-buttons-box">
2382 4501 <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button">
2383 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>
2384 4503 <div class="ays-pro-features-v2-video-text">
2385 - <?php echo __("Watch Video" , "chart-builder"); ?>
4504 + <?php echo esc_html__("Watch Video" , "chart-builder"); ?>
2386 4505 </div>
2387 4506 </a>
2388 4507 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2389 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>
2390 4509 <div class="ays-pro-features-v2-upgrade-text">
2391 - <?php echo __("Upgrade" , "chart-builder"); ?>
4510 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2392 4511 </div>
2393 4512 </a>
2394 4513 </div>
2395 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2396 - <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">
2397 4516 <div id="ays-chart-db-query">
2398 - <div class="<?= $html_class_prefix ?>-db-query-form">
4517 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2399 4518 <div id="db-query-form">
2400 4519 <input type="hidden" name="chart_id" value="1">
2401 - <textarea name="query" class="<?= $html_class_prefix ?>db-query" placeholder="<?php echo __( "Add your query here.", $this->plugin_name ); ?>"></textarea>
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>
2402 4521 <div class='db-wizard-success'></div>
2403 4522 <div class='db-wizard-error'></div>
2404 4523 </div>
2405 4524 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2406 4525 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-fetch">
2407 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4526 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2408 4527 </button>
2409 4528 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-show-on-chart">
2410 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>
2411 - <?php echo __( 'Preview', "chart-builder" ); ?>
4530 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2412 4531 </button>
2413 4532 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-save">
2414 - <?php echo __( 'Save data', "chart-builder" ); ?>
4533 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2415 4534 </button>
2416 4535 </div>
2417 4536 </div>
2418 4537 <div class="db-wizard-hints">
@@ -2417,9 +4536,18 @@
2417 4536 </div>
2418 4537 <div class="db-wizard-hints">
2419 4538 <ul>
2420 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> -->
2421 - <li><?php echo sprintf( __( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', $this->plugin_name ), '<span class="ays-chart-emboss">', '</span>' ); ?></li>
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>
2422 4550 </ul>
2423 4551 </div>
2424 4552 </div>
2425 4553 </div>
@@ -2427,9 +4555,9 @@
2427 4555 </div>
2428 4556 <?php
2429 4557 $content = ob_get_clean();
2430 4558
2431 - $title = __( 'Connect to Database', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" title="' . __("Insert the Database query and the appropriate information from your Database will be displayed in the chart.",$this->plugin_name) . '">
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') . '">
2432 4560 <i class="ays_fa ays_fa_info_circle"></i>
2433 4561 </a>';
2434 4562
2435 4563 $sources['import_from_db'] = array(
@@ -2450,16 +4578,16 @@
2450 4578 <div class="ays-pro-features-v2-big-buttons-box">
2451 4579 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2452 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>
2453 4581 <div class="ays-pro-features-v2-upgrade-text">
2454 - <?php echo __("Upgrade" , "chart-builder"); ?>
4582 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2455 4583 </div>
2456 4584 </a>
2457 4585 </div>
2458 - <div class="<?= $html_class_prefix ?>source-data-main-wrap">
2459 - <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">
2460 4588 <div class="form-group row mb-2">
2461 - <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">
2462 4590 <label class="form-label">
2463 4591 <?php echo esc_html(__('Use custom database settings for this chart', "chart-builder")); ?>
2464 4592 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __(".","chart-builder") ); ?>">
2465 4593 <i class="ays_fa ays_fa_info_circle"></i>
@@ -2465,9 +4593,9 @@
2465 4593 <i class="ays_fa ays_fa_info_circle"></i>
2466 4594 </a>
2467 4595 </label>
2468 4596 </div>
2469 - <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">
2470 4598 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
2471 4599 <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" type="checkbox" />
2472 4600 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
2473 4601 </label>
@@ -2473,25 +4601,25 @@
2473 4601 </label>
2474 4602 </div>
2475 4603 </div>
2476 4604 <div id="ays-chart-external-db-query">
2477 - <div class="<?= $html_class_prefix ?>-db-query-form">
4605 + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form">
2478 4606 <div id="external-db-query-form">
2479 4607 <input type="hidden" name="chart_id" value="1">
2480 - <textarea name="query" class="<?= $html_class_prefix ?>external-db-query" placeholder="<?php echo __( "Add your query here.", $this->plugin_name ); ?>"></textarea>
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>
2481 4609 <div class='db-wizard-success'></div>
2482 4610 <div class='db-wizard-error'></div>
2483 4611 </div>
2484 4612 <div class="ays-chart-db-query-form-button ays-chart-buttons-group">
2485 4613 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-fetch">
2486 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4614 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2487 4615 </button>
2488 4616 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-show-on-chart">
2489 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>
2490 - <?php echo __( 'Preview', "chart-builder" ); ?>
4618 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2491 4619 </button>
2492 4620 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-save">
2493 - <?php echo __( 'Save data', "chart-builder" ); ?>
4621 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2494 4622 </button>
2495 4623 </div>
2496 4624 </div>
2497 4625 <div class="db-wizard-hints">
@@ -2496,9 +4624,18 @@
2496 4624 </div>
2497 4625 <div class="db-wizard-hints">
2498 4626 <ul>
2499 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> -->
2500 - <li><?php echo sprintf( __( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', $this->plugin_name ), '<span class="ays-chart-emboss">', '</span>' ); ?></li>
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>
2501 4638 </ul>
2502 4639 </div>
2503 4640 </div>
2504 4641 </div>
@@ -2506,9 +4643,9 @@
2506 4643 </div>
2507 4644 <?php
2508 4645 $content = ob_get_clean();
2509 4646
2510 - $title = __( 'Connect to External Database', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" title="' . __("Insert the Database query and fetch data from an external database.", $this->plugin_name) . '">
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') . '">
2511 4648 <i class="ays_fa ays_fa_info_circle"></i>
2512 4649 </a>';
2513 4650
2514 4651 $sources['import_from_external_db'] = array(
@@ -2530,9 +4667,9 @@
2530 4667 $quiz_query_tooltips = $args['quiz_query_tooltips'];
2531 4668 $quiz_id = $args['quiz_id'];
2532 4669 $quiz_query = $args['quiz_query'];
2533 4670
2534 - 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') ) {
2535 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") . '">
2536 4673 // <i class="ays_fa ays_fa_info_circle"></i>
2537 4674 // </a>', '<br>', '<b>', '</b>');
2538 4675 // $content = $this->blockquote_content_quiz;
@@ -2542,35 +4679,42 @@
2542 4679 // );
2543 4680
2544 4681 return $sources;
2545 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 +
2546 4693
2547 - $sql = "SELECT `title`, `id` FROM " . $wpdb->prefix . "aysquiz_quizes WHERE `published` = 1 AND `question_ids` <> ''";
2548 - $quizes = $wpdb->get_results($sql, "ARRAY_A");
2549 -
2550 4694 ob_start();
2551 4695 ?>
2552 4696 <div class="ays-accordion-data-main-wrap">
2553 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">
2554 4698 <div id="<?php echo esc_attr($html_class_prefix) ?>quiz-maker-form">
2555 - <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?= $chart_id ?>">
2556 - <div class="<?= $html_class_prefix ?>select-quiz-maker-data-query-container" id="<?= $html_class_prefix ?>quiz-queries">
2557 - <a class="ays_help <?= $html_class_prefix ?>quiz-query-tooltip" data-bs-toggle="tooltip" data-bs-html="true" title="<?php echo isset($quiz_query) ? $quiz_query_tooltips[$quiz_query] : __( 'Select a query to display quiz data.', $this->plugin_name ) ?>">
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' ) ?>">
2558 4702 <i class="ays_fa ays_fa_info_circle"></i>
2559 4703 </a>
2560 - <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-data-query" name="<?= $html_name_prefix ?>quiz_query">
2561 - <option value=""><?= __( "Select query", "chart-builder" ) ?></option>
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>
2562 4706 <?php foreach ( $quiz_queries as $id => $q):
2563 4707 $disabled = preg_replace('/[^0-9]/', '', $id) <= 6 ? "false" : "true" ; ?>
2564 - <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>
2565 4709 <?php endforeach; ?>
2566 4710 </select>
2567 4711 </div>
2568 4712 <div class="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz-container">
2569 - <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>select-quiz-maker-quiz" name="<?= $html_name_prefix ?>quiz_id">
2570 - <option value="0"><?= __( "Select quiz", "chart-builder" ) ?></option>
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>
2571 4715 <?php foreach ( $quizes as $quiz): ?>
2572 - <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>
2573 4717 <?php endforeach; ?>
2574 4718 </select>
2575 4719 </div>
2576 4720 <div id="ays-chart-quiz-maker-success"></div>
@@ -2576,21 +4720,21 @@
2576 4720 <div id="ays-chart-quiz-maker-success"></div>
2577 4721 <div id="ays-chart-quiz-maker-error"></div>
2578 4722 <div class="ays-chart-buttons-group">
2579 4723 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-fetch">
2580 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4724 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2581 4725 </button>
2582 4726 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-show-on-chart">
2583 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>
2584 - <?php echo __( 'Preview', "chart-builder" ); ?>
4728 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2585 4729 </button>
2586 4730 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-save">
2587 - <?php echo __( 'Save data', "chart-builder" ); ?>
4731 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2588 4732 </button>
2589 4733 </div>
2590 4734 </div>
2591 4735 <div>
2592 - <a href="https://www.youtube.com/watch?v=vqx76dw6NC8" target="_blank" style="text-decoration:none;font-style:italic"><?php echo __('How to Connect Quizzes to Charts', 'chart-builder'); ?></a>
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>
2593 4737 </div>
2594 4738 </div>
2595 4739 </div>
2596 4740 <?php
@@ -2595,11 +4739,18 @@
2595 4739 </div>
2596 4740 <?php
2597 4741 $content = ob_get_clean();
2598 4742
2599 - $title = sprintf( __( 'Get Quiz Maker data', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' . __("By using this option, you can display the quiz statistics by charts.%s %sNote:%s The Quiz Maker plugin must be active.",$this->plugin_name) . '">
2600 - <i class="ays_fa ays_fa_info_circle"></i>
2601 - </a>', '<br>', '<b>', '</b>');
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 + );
2602 4753 $sources['quiz_maker'] = array(
2603 4754 'content' => $content,
2604 4755 'title' => $title
2605 4756 );
@@ -2622,23 +4773,23 @@
2622 4773 <div class="ays-pro-features-v2-video-button"></div>
2623 4774 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
2624 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>
2625 4776 <div class="ays-pro-features-v2-upgrade-text">
2626 - <?php echo __("Upgrade" , "chart-builder"); ?>
4777 + <?php echo esc_html__("Upgrade" , "chart-builder"); ?>
2627 4778 </div>
2628 4779 </a>
2629 4780 </div>
2630 - <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 ">
2631 4782 <div id="ays-chart-woocommerce-datas">
2632 - <div class="<?= $html_class_prefix ?>woocommerce-datas-form">
4783 + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-form">
2633 4784 <div id="woocommerce-datas-form">
2634 - <input type="hidden" name="chart_id" value="<?= $chart_id ?>">
2635 - <div class="<?= $html_class_prefix ?>woocommerce-datas-query-container" id="<?= $html_class_prefix ?>woocommerce-datas-container-id" >
2636 - <a class="ays_help <?= $html_class_prefix ?>woocommerce-datas-tooltip" data-bs-toggle="tooltip" data-bs-html="true" title="<?php echo __( 'Select a query to display data.', $this->plugin_name ) ?>">
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' ) ?>">
2637 4788 <i class="ays_fa ays_fa_info_circle"></i>
2638 4789 </a>
2639 - <select class="form-select" style="max-width: none;" id="<?= $html_class_prefix ?>woocommerce-datas-select" name="<?php echo esc_attr($html_name_prefix); ?>settings[woocommerce_data_id]">
2640 - <option value=""><?= __( 'Select query', $this->plugin_name ) ?></option>
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>
2641 4792 </select>
2642 4793 </div>
2643 4794 <div class='ays-chart-woocommerce-datas-success'></div>
2644 4795 <div class='ays-chart-woocommerce-datas-error'></div>
@@ -2644,16 +4795,16 @@
2644 4795 <div class='ays-chart-woocommerce-datas-error'></div>
2645 4796 </div>
2646 4797 <div class="ays-chart-buttons-group">
2647 4798 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-fetch">
2648 - <?php echo __( 'Show Results', "chart-builder" ); ?>
4799 + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?>
2649 4800 </button>
2650 4801 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-show-on-chart">
2651 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>
2652 - <?php echo __( 'Preview', "chart-builder" ); ?>
4803 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2653 4804 </button>
2654 4805 <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-save">
2655 - <?php echo __( 'Save data', "chart-builder" ); ?>
4806 + <?php echo esc_html__( 'Save data', "chart-builder" ); ?>
2656 4807 </button>
2657 4808 </div>
2658 4809 </div>
2659 4810 </div>
@@ -2660,12 +4811,19 @@
2660 4811 </div>
2661 4812 </div>
2662 4813 <?php
2663 4814 $content = ob_get_clean();
2664 -
2665 - $title = sprintf( __( 'Get WooCommerce data', $this->plugin_name ) . ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' . __("By using this option, you can display the WooCommerce statistics by charts.%s %sNote:%s The WooCommerce plugin must be active.",$this->plugin_name) . '">
2666 - <i class="ays_fa ays_fa_info_circle"></i>
2667 - </a>', '<br>', '<b>', '</b>');
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 + );
2668 4826 $sources['woocommerce'] = array(
2669 4827 'content' => $content,
2670 4828 'title' => $title
2671 4829 );
@@ -2679,9 +4837,10 @@
2679 4837 $source = $args['source'];
2680 4838 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2681 4839 $settings = $args['settings'];
2682 4840 $source_chart_type = $args['source_chart_type'];
2683 - $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';
2684 4843
2685 4844 if (isset($source) && !empty($source)) {
2686 4845 if ( !isset( $source[0] ) ) {
2687 4846 if (count($source[1]) > 2) {
@@ -2686,15 +4845,15 @@
2686 4845 if ( !isset( $source[0] ) ) {
2687 4846 if (count($source[1]) > 2) {
2688 4847 $titles = array();
2689 4848 for ($i = 0; $i < count($source[1]); $i++) {
2690 - array_push($titles, __("Title", $this->plugin_name).$i);
4849 + array_push($titles, __("Title", 'chart-builder').$i);
2691 4850 }
2692 4851 $source[0] = $titles;
2693 4852 } else {
2694 4853 $source[0] = array(
2695 - __("Country", $this->plugin_name),
2696 - __("Population", $this->plugin_name),
4854 + __("Country", 'chart-builder'),
4855 + __("Population", 'chart-builder'),
2697 4856 );
2698 4857 }
2699 4858
2700 4859 ksort($source);
@@ -2716,9 +4875,9 @@
2716 4875 ?>
2717 4876 <div class="ays-accordion-data-main-wrap">
2718 4877 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2719 4878 <?php if($source_chart_type != 'org_chart'): ?>
2720 - <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?= $html_class_prefix ?>chart-source-data-manual cb-changable-manual cb-pie_chart-manual cb-bar_chart-manual cb-column_chart-manual cb-line_chart-manual cb-donut_chart-manual display_none">
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">
2721 4880 <!-- <div class="<//?= $html_class_prefix ?>icons-box">
2722 4881 <img class="<//?= $html_class_prefix ?>add-new-row" src="<//?php echo CHART_BUILDER_ADMIN_URL; ?>/images/icons/add-circle-outline.svg">
2723 4882 </div> -->
2724 4883 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
@@ -2729,14 +4888,14 @@
2729 4888 if ($source_id == 0): ?>
2730 4889 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2731 4890 <div class="ays-chart-empty-data-table-cell"></div>
2732 4891 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2733 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
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); ?>">
2734 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">
2735 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;" />
2736 4895 </svg>
2737 4896 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2738 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" <?php echo $each_source_id == 0 ? "style='min-width:100px'" : "" ?>>
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'" : "" ?>>
2739 4898 <?php if ($each_source_id !== 0): ?>
2740 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">
2741 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;" />
2742 4901 </svg>
@@ -2758,14 +4917,14 @@
2758 4917 </svg>
2759 4918 </div>
2760 4919 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2761 4920 <?php if ($each_source_id == 0): ?>
2762 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-data-name-input-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2763 - <input type="text" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo htmlspecialchars(esc_attr($each_source_value)); ?>">
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)); ?>">
2764 4923 </div>
2765 4924 <?php else: ?>
2766 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); ?>">
2767 - <input type="number" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" step="any">
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">
2768 4927 </div>
2769 4928 <?php endif; ?>
2770 4929 <?php endforeach; ?>
2771 4930 </div>
@@ -2772,16 +4931,16 @@
2772 4931 <?php endif; ?>
2773 4932 <?php endif; ?>
2774 4933 <?php endforeach; ?>
2775 4934 <?php else:?>
2776 - <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">
2777 4936 <div style="height: 63.11px; padding: 0 15px;"></div>
2778 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box">
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">
2779 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">
2780 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;" />
2781 4940 </svg>
2782 4941 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2783 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[0][]" style='min-width:100px'>
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'>
2784 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">
2785 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;" />
2786 4945 </svg>
2787 4946 </div>
@@ -2808,30 +4967,30 @@
2808 4967 <?php endif; ?>
2809 4968 </div>
2810 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">
2811 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">
2812 - <?php echo __( 'Add column', "chart-builder" ); ?>
4971 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2813 4972 </div>
2814 4973 </div>
2815 4974 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2816 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">
2817 - <?php echo __( 'Add row', "chart-builder" ); ?>
4976 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2818 4977 </div>
2819 4978 <br>
2820 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">
2821 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>
2822 - <?php echo __( 'Preview', "chart-builder" ); ?>
4981 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2823 4982 </button>
2824 4983 </div>
2825 4984 <?php endif; ?>
2826 - <div class="<?= $html_class_prefix ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual">
2827 - <div class="<?= $html_class_prefix ?>chart-source-data-content-org-type">
2828 - <ul id="<?= $html_class_prefix ?>chart-source-data-edit-tree-content">
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">
2829 4988 </ul>
2830 4989 </div>
2831 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">
2832 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>
2833 - <?php echo __( 'Preview', "chart-builder" ); ?>
4992 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2834 4993 </button>
2835 4994 </div>
2836 4995 </div>
2837 4996 </div>
@@ -2856,15 +5015,16 @@
2856 5015 $source = $args['source'];
2857 5016 $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source;
2858 5017 $settings = $args['settings'];
2859 5018 $source_chart_type = $args['source_chart_type'];
2860 - $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';
2861 5021
2862 5022 ob_start();
2863 5023 ?>
2864 5024 <div class="ays-accordion-data-main-wrap">
2865 5025 <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap">
2866 - <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main <?= $html_class_prefix ?>chart-source-data-manual">
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">
2867 5027 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container">
2868 5028 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content">
2869 5029 <?php if(!empty($source)):
2870 5030 foreach($source as $source_id => $source_value):
@@ -2872,14 +5032,14 @@
2872 5032 if ($source_id == 0): ?>
2873 5033 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>">
2874 5034 <div class="ays-chart-empty-data-table-cell"></div>
2875 5035 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2876 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
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); ?>">
2877 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">
2878 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;" />
2879 5039 </svg>
2880 5040 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2881 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" <?php echo $each_source_id == 0 ? "style='min-width:100px'" : "" ?>>
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'" : "" ?>>
2882 5042 <?php if ($each_source_id !== 0): ?>
2883 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">
2884 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;" />
2885 5045 </svg>
@@ -2901,14 +5061,14 @@
2901 5061 </svg>
2902 5062 </div>
2903 5063 <?php foreach($source_value as $each_source_id => $each_source_value): ?>
2904 5064 <?php if ($each_source_id == 0): ?>
2905 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-data-name-input-box" data-cell-id = "<?php echo esc_attr($each_source_id); ?>">
2906 - <input type="text" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo htmlspecialchars(esc_attr($each_source_value)); ?>">
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)); ?>">
2907 5067 </div>
2908 5068 <?php else: ?>
2909 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); ?>">
2910 - <input type="number" class="ays-text-input form-control" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[<?php echo esc_attr($source_id); ?>][]" value="<?php echo stripslashes(esc_attr($each_source_value)); ?>" step="any">
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">
2911 5071 </div>
2912 5072 <?php endif; ?>
2913 5073 <?php endforeach; ?>
2914 5074 </div>
@@ -2915,16 +5075,16 @@
2915 5075 <?php endif; ?>
2916 5076 <?php endif; ?>
2917 5077 <?php endforeach; ?>
2918 5078 <?php else:?>
2919 - <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">
2920 5080 <div style="height: 63.11px; padding: 0 15px;"></div>
2921 - <div class="<?= $html_class_prefix ?>chart-source-data-input-box <?= $html_class_prefix ?>chart-source-title-box">
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">
2922 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">
2923 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;" />
2924 5084 </svg>
2925 5085 <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-titles-box-item">
2926 - <input type="text" class="ays-text-input form-control <?= $html_class_prefix ?>chart-source-title-input" name="<?php echo esc_attr($html_name_prefix); ?>chart_source_data[0][]" style='min-width:100px'>
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'>
2927 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">
2928 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;" />
2929 5089 </svg>
2930 5090 </div>
@@ -2951,19 +5111,19 @@
2951 5111 <?php endif; ?>
2952 5112 </div>
2953 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">
2954 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">
2955 - <?php echo __( 'Add column', "chart-builder" ); ?>
5115 + <?php echo esc_html__( 'Add column', "chart-builder" ); ?>
2956 5116 </div>
2957 5117 </div>
2958 5118 <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box">
2959 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">
2960 - <?php echo __( 'Add row', "chart-builder" ); ?>
5120 + <?php echo esc_html__( 'Add row', "chart-builder" ); ?>
2961 5121 </div>
2962 5122 <br>
2963 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">
2964 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>
2965 - <?php echo __( 'Preview', "chart-builder" ); ?>
5125 + <?php echo esc_html__( 'Preview', "chart-builder" ); ?>
2966 5126 </button>
2967 5127 </div>
2968 5128 </div>
2969 5129 </div>
@@ -3019,9 +5179,9 @@
3019 5179
3020 5180 $sources[] = $content;
3021 5181 }
3022 5182 $content_for_escape = implode('' , $sources );
3023 - echo html_entity_decode(esc_html( $content_for_escape ));
5183 + echo html_entity_decode( $content_for_escape );
3024 5184 }
3025 5185
3026 5186 public function settings_contents_general_settings( $sources, $args ){
3027 5187 $html_class_prefix = $args['html_class_prefix'];
@@ -3175,8 +5335,9 @@
3175 5335 $settings = $args['settings'];
3176 5336
3177 5337 $show_title = $settings['show_title'];
3178 5338 $show_description = $settings['show_description'];
5339 + $enable_interactivity = $settings['enable_interactivity'];
3179 5340
3180 5341 ob_start();
3181 5342 ?>
3182 5343 <div class="ays-accordion-data-main-wrap">
@@ -3259,8 +5420,24 @@
3259 5420 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
3260 5421 </label>
3261 5422 </div>
3262 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 -->
3263 5440 </div>
3264 5441 </div>
3265 5442 <?php
3266 5443 $content = ob_get_clean();
@@ -3296,9 +5473,9 @@
3296 5473 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3297 5474 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3298 5475 <label for="ays-chart-option-tooltip-trigger">
3299 5476 <?php echo esc_html(__( "Trigger", "chart-builder" )); ?>
3300 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") ); ?>">
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") )); ?>">
3301 5478 <i class="ays_fa ays_fa_info_circle"></i>
3302 5479 </a>
3303 5480 </label>
3304 5481 </div>
@@ -3347,9 +5524,9 @@
3347 5524 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3348 5525 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3349 5526 <label for="ays-chart-option-tooltip-font-size" class="form-label">
3350 5527 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3351 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size for all text within the chart tooltip, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") ); ?>">
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") )); ?>">
3352 5529 <i class="ays_fa ays_fa_info_circle"></i>
3353 5530 </a>
3354 5531 </label>
3355 5532 </div>
@@ -3377,9 +5554,9 @@
3377 5554 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3378 5555 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3379 5556 <label for="ays-chart-option-tooltip-bold">
3380 5557 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
3381 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") ); ?>">
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") )); ?>">
3382 5559 <i class="ays_fa ays_fa_info_circle"></i>
3383 5560 </a>
3384 5561 </label>
3385 5562 </div>
@@ -3410,8 +5587,120 @@
3410 5587
3411 5588 return $sources;
3412 5589 }
3413 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 +
3414 5703 public function settings_contents_legend_settings( $sources, $args ){
3415 5704 $html_class_prefix = $args['html_class_prefix'];
3416 5705 $html_name_prefix = $args['html_name_prefix'];
3417 5706 $settings = $args['settings'];
@@ -3431,9 +5720,9 @@
3431 5720 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3432 5721 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3433 5722 <label for="ays-chart-option-legend-position">
3434 5723 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3435 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") ); ?>">
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") )); ?>">
3436 5725 <i class="ays_fa ays_fa_info_circle"></i>
3437 5726 </a>
3438 5727 </label>
3439 5728 </div>
@@ -3464,9 +5753,9 @@
3464 5753 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3465 5754 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3466 5755 <label for="ays-chart-option-legend-alignment">
3467 5756 <?php echo esc_html(__( "Alignment", "chart-builder" )); ?>
3468 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") ); ?>">
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") )); ?>">
3469 5758 <i class="ays_fa ays_fa_info_circle"></i>
3470 5759 </a>
3471 5760 </label>
3472 5761 </div>
@@ -3486,9 +5775,9 @@
3486 5775 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3487 5776 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3488 5777 <label for="ays-chart-option-legend-font-color">
3489 5778 <?php echo esc_html(__( "Font Color", "chart-builder" )); ?>
3490 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") ); ?>">
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") )); ?>">
3491 5780 <i class="ays_fa ays_fa_info_circle"></i>
3492 5781 </a>
3493 5782 </label>
3494 5783 </div>
@@ -3499,9 +5788,9 @@
3499 5788 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3500 5789 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3501 5790 <label for="ays-chart-option-legend-font-size" class="form-label">
3502 5791 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
3503 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size for all text within the chart legend, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") ); ?>">
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") )); ?>">
3504 5793 <i class="ays_fa ays_fa_info_circle"></i>
3505 5794 </a>
3506 5795 </label>
3507 5796 </div>
@@ -3556,8 +5845,159 @@
3556 5845
3557 5846 return $sources;
3558 5847 }
3559 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 +
3560 6000 public function settings_contents_horizontal_axis_settings( $sources, $args ){
3561 6001 $html_class_prefix = $args['html_class_prefix'];
3562 6002 $html_name_prefix = $args['html_name_prefix'];
3563 6003 $settings = $args['settings'];
@@ -3573,8 +6013,9 @@
3573 6013 $haxis_slanted_text_angle = $settings['haxis_slanted_text_angle'];
3574 6014 $haxis_show_text_every = $settings['haxis_show_text_every'];
3575 6015 $haxis_format_options = $settings['axes_format_options'];
3576 6016 $haxis_format = $settings['haxis_format'];
6017 + $haxis_enable_divide_percent = $settings['haxis_enable_divide_percent'];
3577 6018 $haxis_label_font_size = $settings['haxis_label_font_size'];
3578 6019 $haxis_max_value = $settings['haxis_max_value'];
3579 6020 $haxis_min_value = $settings['haxis_min_value'];
3580 6021 $haxis_text_font_size = $settings['haxis_text_font_size'];
@@ -3588,9 +6029,9 @@
3588 6029 $haxis_minor_gridlines_color = $settings['haxis_minor_gridlines_color'];
3589 6030
3590 6031 ob_start();
3591 6032 ?>
3592 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-haxis-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
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">
3593 6034 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3594 6035 <h6>Label</h6>
3595 6036 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3596 6037 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3595,9 +6036,9 @@
3595 6036 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3596 6037 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3597 6038 <label for="ays-chart-option-haxis-title" class="form-label">
3598 6039 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3599 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The title of the horizontal axis","chart-builder") ); ?>">
6040 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the horizontal axis","chart-builder") ); ?>">
3600 6041 <i class="ays_fa ays_fa_info_circle"></i>
3601 6042 </a>
3602 6043 </label>
3603 6044 </div>
@@ -3682,9 +6123,9 @@
3682 6123 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3683 6124 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3684 6125 <label for="ays-chart-option-haxis-text-position" class="form-label">
3685 6126 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
3686 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Position of the horizontal axis text, relative to the chart area.","chart-builder") ); ?>">
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") ); ?>">
3687 6128 <i class="ays_fa ays_fa_info_circle"></i>
3688 6129 </a>
3689 6130 </label>
3690 6131 </div>
@@ -3865,32 +6306,40 @@
3865 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) ?>">
3866 6307 </div>
3867 6308 </div> <!-- Horizontal axis baseline color -->
3868 6309
3869 - <br>
3870 - <h6>Format</h6>
3871 - <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 " >
3872 6313 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3873 6314 <label for="ays-chart-option-haxis-format" class="form-label">
3874 6315 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
3875 6316 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
3876 - echo htmlspecialchars( sprintf (
3877 - "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
3878 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
3879 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
3880 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
3881 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
3882 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
3883 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
3884 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
3885 - '<em>', '</em>',
3886 - '<em>', '</em>',
3887 - '<em>', '</em>',
3888 - '<em>', '</em>',
3889 - '<em>', '</em>',
3890 - '<em>', '</em>',
3891 - '<em>', '</em>'
3892 - ) );
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 + ));
3893 6342 ?>">
3894 6343 <i class="ays_fa ays_fa_info_circle"></i>
3895 6344 </a>
3896 6345 </label>
@@ -3907,10 +6356,26 @@
3907 6356 ?>
3908 6357 </select>
3909 6358 </div>
3910 6359 </div> <!-- Horizontal axis format -->
3911 - <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;'; ?>">
3912 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">
3913 6378 <label for="ays-chart-option-haxis-max-value" class="form-label">
3914 6379 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
3915 6380 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
3916 6381 <i class="ays_fa ays_fa_info_circle"></i>
@@ -3920,9 +6385,9 @@
3920 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">
3921 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) ?>">
3922 6387 </div>
3923 6388 </div> <!-- Horizontal axis max value -->
3924 - <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" >
3925 6390 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3926 6391 <label for="ays-chart-option-haxis-min-value" class="form-label">
3927 6392 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
3928 6393 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -3961,8 +6426,9 @@
3961 6426 $vaxis_text_color = $settings['vaxis_text_color'];
3962 6427 $vaxis_baseline_color = $settings['vaxis_baseline_color'];
3963 6428 $vaxis_format_options = $settings['axes_format_options'];
3964 6429 $vaxis_format = $settings['vaxis_format'];
6430 + $vaxis_enable_divide_percent = $settings['vaxis_enable_divide_percent'];
3965 6431 $vaxis_label_font_size = $settings['vaxis_label_font_size'];
3966 6432 $vaxis_max_value = $settings['vaxis_max_value'];
3967 6433 $vaxis_min_value = $settings['vaxis_min_value'];
3968 6434 $vaxis_text_font_size = $settings['vaxis_text_font_size'];
@@ -3976,9 +6442,9 @@
3976 6442 $vaxis_minor_gridlines_color = $settings['vaxis_minor_gridlines_color'];
3977 6443
3978 6444 ob_start();
3979 6445 ?>
3980 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-vaxis-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
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">
3981 6447 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
3982 6448 <h6>Label</h6>
3983 6449 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3984 6450 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -3983,9 +6449,9 @@
3983 6449 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
3984 6450 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
3985 6451 <label for="ays-chart-option-vaxis-title" class="form-label">
3986 6452 <?php echo esc_html(__( "Label", "chart-builder" )); ?>
3987 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The title of the vertical axis","chart-builder") ); ?>">
6453 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the vertical axis","chart-builder") ); ?>">
3988 6454 <i class="ays_fa ays_fa_info_circle"></i>
3989 6455 </a>
3990 6456 </label>
3991 6457 </div>
@@ -4057,9 +6523,9 @@
4057 6523 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4058 6524 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4059 6525 <label for="ays-chart-option-vaxis-text-position" class="form-label">
4060 6526 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4061 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Position of the vertical axis text, relative to the chart area.","chart-builder") ); ?>">
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") ); ?>">
4062 6528 <i class="ays_fa ays_fa_info_circle"></i>
4063 6529 </a>
4064 6530 </label>
4065 6531 </div>
@@ -4205,24 +6671,32 @@
4205 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) ?>">
4206 6672 </div>
4207 6673 </div> <!-- Vertical axis baseline color -->
4208 6674
4209 - <br>
4210 - <h6>Format</h6>
4211 - <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">
4212 6678 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4213 6679 <label for="ays-chart-option-vaxis-format" class="form-label">
4214 6680 <?php echo esc_html(__( "Format", "chart-builder" )); ?>
4215 6681 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4216 - echo htmlspecialchars( sprintf (
6682 + echo esc_attr( sprintf(
6683 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4217 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>" .
4218 - __('%sNone:%s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" .
4219 - __('%sDecimal:%s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" .
4220 - __('%sScientific:%s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" .
4221 - __('%sCurrency:%s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" .
4222 - __('%sPercent:%s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" .
4223 - __('%sShort:%s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" .
4224 - __('%sLong:%s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>",
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>",
4225 6699 '<em>', '</em>',
4226 6700 '<em>', '</em>',
4227 6701 '<em>', '</em>',
4228 6702 '<em>', '</em>',
@@ -4228,9 +6702,9 @@
4228 6702 '<em>', '</em>',
4229 6703 '<em>', '</em>',
4230 6704 '<em>', '</em>',
4231 6705 '<em>', '</em>'
4232 - ) );
6706 + ));
4233 6707 ?>">
4234 6708 <i class="ays_fa ays_fa_info_circle"></i>
4235 6709 </a>
4236 6710 </label>
@@ -4247,10 +6721,26 @@
4247 6721 ?>
4248 6722 </select>
4249 6723 </div>
4250 6724 </div> <!-- Vertical axis format -->
4251 - <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;'; ?>">
4252 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">
4253 6743 <label for="ays-chart-option-vaxis-max-value" class="form-label">
4254 6744 <?php echo esc_html(__( "Max value", "chart-builder" )); ?>
4255 6745 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>">
4256 6746 <i class="ays_fa ays_fa_info_circle"></i>
@@ -4260,9 +6750,9 @@
4260 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">
4261 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) ?>">
4262 6752 </div>
4263 6753 </div> <!-- Vertical axis max value -->
4264 - <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">
4265 6755 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4266 6756 <label for="ays-chart-option-vaxis-min-value" class="form-label">
4267 6757 <?php echo esc_html(__( "Min value", "chart-builder" )); ?>
4268 6758 <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>">
@@ -4301,9 +6791,9 @@
4301 6791 $animation_easing = $settings['animation_easing'];
4302 6792
4303 6793 ob_start();
4304 6794 ?>
4305 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-animation-settings-tab cb-changable-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
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">
4306 6796 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4307 6797 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4308 6798 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4309 6799 <label for="ays-chart-option-enable-animation">
@@ -4354,23 +6844,24 @@
4354 6844 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4355 6845 <label for="ays-chart-option-animation-easing" class="form-label">
4356 6846 <?php echo esc_html(__( "Easing", "chart-builder" )); ?>
4357 6847 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
4358 - echo htmlspecialchars( sprintf(
6848 + echo esc_attr( sprintf(
6849 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
4359 6850 "<p>" . __('The easing function applied to the chart animation. The following options are available:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
4360 - __('%sLinear:%s Constant speed.', "chart-builder") . "</li><li>" .
4361 - __('%sEase in:%s Start slow and speed up.', "chart-builder") . "</li><li>" .
4362 - __('%sEase out:%s Start fast and slow down.', "chart-builder") . "</li><li>" .
4363 - __('%sEase in and out:%s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>",
4364 - '<em>',
4365 - '</em>',
4366 - '<em>',
4367 - '</em>',
4368 - '<em>',
4369 - '</em>',
4370 - '<em>',
4371 - '</em>'
4372 - ) );
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 + ));
4373 6864 ?>">
4374 6865 <i class="ays_fa ays_fa_info_circle"></i>
4375 6866 </a>
4376 6867 </label>
@@ -4409,9 +6900,9 @@
4409 6900 $html_name_prefix = $args['html_name_prefix'];
4410 6901
4411 6902 ob_start();
4412 6903 ?>
4413 - <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">
4414 6905 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4415 6906 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4416 6907 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4417 6908 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4416,15 +6907,15 @@
4416 6907 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4417 6908 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4418 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>
4419 6910 <div class="ays-pro-features-v2-video-text">
4420 - <?php echo __("Watch Video" , "chart-builder"); ?>
6911 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4421 6912 </div>
4422 6913 </a>
4423 6914 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4424 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>
4425 6916 <div class="ays-pro-features-v2-upgrade-text">
4426 - <?php echo __("Upgrade" , "chart-builder"); ?>
6917 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4427 6918 </div>
4428 6919 </a>
4429 6920 </div>
4430 6921 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4446,15 +6937,15 @@
4446 6937 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4447 6938 <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button">
4448 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>
4449 6940 <div class="ays-pro-features-v2-video-text">
4450 - <?php echo __("Watch Video" , "chart-builder"); ?>
6941 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4451 6942 </div>
4452 6943 </a>
4453 6944 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4454 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>
4455 6946 <div class="ays-pro-features-v2-upgrade-text">
4456 - <?php echo __("Upgrade" , "chart-builder"); ?>
6947 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4457 6948 </div>
4458 6949 </a>
4459 6950 </div>
4460 6951 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4494,9 +6985,9 @@
4494 6985 $enable_img = $settings['enable_img'];
4495 6986
4496 6987 ob_start();
4497 6988 ?>
4498 - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-export-tab cb-changable-tab cb-pie_chart-tab cb-donut_chart-tab cb-bar_chart-tab cb-column_chart-tab cb-line_chart-tab">
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">
4499 6990 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
4500 6991 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box">
4501 6992 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4502 6993 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
@@ -4501,15 +6992,15 @@
4501 6992 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4502 6993 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4503 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>
4504 6995 <div class="ays-pro-features-v2-video-text">
4505 - <?php echo __("Watch Video" , "chart-builder"); ?>
6996 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4506 6997 </div>
4507 6998 </a>
4508 6999 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4509 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>
4510 7001 <div class="ays-pro-features-v2-upgrade-text">
4511 - <?php echo __("Upgrade" , "chart-builder"); ?>
7002 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4512 7003 </div>
4513 7004 </a>
4514 7005 </div>
4515 7006 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4531,15 +7022,15 @@
4531 7022 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4532 7023 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4533 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>
4534 7025 <div class="ays-pro-features-v2-video-text">
4535 - <?php echo __("Watch Video" , "chart-builder"); ?>
7026 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4536 7027 </div>
4537 7028 </a>
4538 7029 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4539 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>
4540 7031 <div class="ays-pro-features-v2-upgrade-text">
4541 - <?php echo __("Upgrade" , "chart-builder"); ?>
7032 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4542 7033 </div>
4543 7034 </a>
4544 7035 </div>
4545 7036 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4561,15 +7052,15 @@
4561 7052 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4562 7053 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4563 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>
4564 7055 <div class="ays-pro-features-v2-video-text">
4565 - <?php echo __("Watch Video" , "chart-builder"); ?>
7056 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4566 7057 </div>
4567 7058 </a>
4568 7059 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4569 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>
4570 7061 <div class="ays-pro-features-v2-upgrade-text">
4571 - <?php echo __("Upgrade" , "chart-builder"); ?>
7062 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4572 7063 </div>
4573 7064 </a>
4574 7065 </div>
4575 7066 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4591,15 +7082,15 @@
4591 7082 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
4592 7083 <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button">
4593 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>
4594 7085 <div class="ays-pro-features-v2-video-text">
4595 - <?php echo __("Watch Video" , "chart-builder"); ?>
7086 + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?>
4596 7087 </div>
4597 7088 </a>
4598 7089 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
4599 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>
4600 7091 <div class="ays-pro-features-v2-upgrade-text">
4601 - <?php echo __("Upgrade" , "chart-builder"); ?>
7092 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
4602 7093 </div>
4603 7094 </a>
4604 7095 </div>
4605 7096 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -4627,9 +7118,9 @@
4627 7118 </label>
4628 7119 </div>
4629 7120 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
4630 7121 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
4631 - <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-export-img" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[enable_img]" value="on" <?php echo $enable_img?> >
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)?> >
4632 7123 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
4633 7124 </label>
4634 7125 </div>
4635 7126 </div> <!-- IMG option end -->
@@ -4686,9 +7177,9 @@
4686 7177
4687 7178 $sources[] = $content;
4688 7179 }
4689 7180 $content_for_escape = implode('' , $sources );
4690 - echo html_entity_decode(esc_html( $content_for_escape ));
7181 + echo html_entity_decode( esc_html($content_for_escape) );
4691 7182 }
4692 7183
4693 7184 public function settings_contents_chart_styles_settings( $sources, $args ){
4694 7185 $html_class_prefix = $args['html_class_prefix'];
@@ -4711,8 +7202,11 @@
4711 7202 $border_width = $settings['border_width'];
4712 7203 $border_width_with_title = $settings['border_width_with_title'];
4713 7204 $border_radius_with_title = $settings['border_radius_with_title'];
4714 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'];
4715 7209 $border_radius = $settings['border_radius'];
4716 7210 $border_color = $settings['border_color'];
4717 7211 $box_shadow = $settings['box_shadow'];
4718 7212 $box_shadow_color = $settings['box_shadow_color'];
@@ -4724,9 +7218,9 @@
4724 7218 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4725 7219 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4726 7220 <label for="ays-chart-option-width" class="form-label">
4727 7221 <?php echo esc_html(__( "Width", "chart-builder" )); ?>
4728 - <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") ); ?>">
4729 7223 <i class="ays_fa ays_fa_info_circle"></i>
4730 7224 </a>
4731 7225 </label>
4732 7226 </div>
@@ -4747,9 +7241,9 @@
4747 7241 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4748 7242 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4749 7243 <label for="ays-chart-option-responsive-width" class="form-label">
4750 7244 <?php echo esc_html(__( "Responsive Width", "chart-builder" )); ?>
4751 - <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") ); ?>">
4752 7246 <i class="ays_fa ays_fa_info_circle"></i>
4753 7247 </a>
4754 7248 </label>
4755 7249 </div>
@@ -4763,9 +7257,9 @@
4763 7257 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4764 7258 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4765 7259 <label for="ays-chart-option-position">
4766 7260 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
4767 - <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") ); ?>">
4768 7262 <i class="ays_fa ays_fa_info_circle"></i>
4769 7263 </a>
4770 7264 </label>
4771 7265 </div>
@@ -4780,14 +7274,14 @@
4780 7274 endforeach;
4781 7275 ?>
4782 7276 </select>
4783 7277 </div>
4784 - </div> <!-- Title position -->
7278 + </div> <!-- Position -->
4785 7279 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
4786 7280 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4787 7281 <label for="ays-chart-option-height" class="form-label">
4788 7282 <?php echo esc_html(__( "Height", "chart-builder" )); ?>
4789 - <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") ); ?>">
4790 7284 <i class="ays_fa ays_fa_info_circle"></i>
4791 7285 </a>
4792 7286 </label>
4793 7287 </div>
@@ -4808,9 +7302,9 @@
4808 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">
4809 7303 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4810 7304 <label for="ays-chart-option-font-size" class="form-label">
4811 7305 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
4812 - <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") ); ?>">
4813 7307 <i class="ays_fa ays_fa_info_circle"></i>
4814 7308 </a>
4815 7309 </label>
4816 7310 </div>
@@ -4818,24 +7312,24 @@
4818 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) ?>">
4819 7313 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div>
4820 7314 </div>
4821 7315 </div> <!-- Font size -->
4822 - <div class="form-group row mb-2 <?= $html_class_prefix ?>options-section cb-changable-opt cb-org_chart-opt display_none">
4823 - <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">
4824 7318 <label for="ays-chart-option-org-chart-font-size" class="form-label">
4825 - <?php echo __( "Element size", $this->plugin_name ); ?>
4826 - <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") ); ?>">
4827 7321 <i class="ays_fa ays_fa_info_circle"></i>
4828 7322 </a>
4829 7323 </label>
4830 7324 </div>
4831 7325 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
4832 - <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]">
4833 7327 <?php
4834 7328 foreach ( $org_chart_font_size_options as $option_slug => $option ):
4835 7329 $selected = ( $org_chart_font_size == $option_slug ) ? 'selected' : '';
4836 7330 ?>
4837 - <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>
4838 7332 <?php
4839 7333 endforeach;
4840 7334 ?>
4841 7335 </select>
@@ -4844,9 +7338,9 @@
4844 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">
4845 7339 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4846 7340 <label for="ays-chart-option-background-color">
4847 7341 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
4848 - <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") ); ?>">
4849 7343 <i class="ays_fa ays_fa_info_circle"></i>
4850 7344 </a>
4851 7345 </label>
4852 7346 </div>
@@ -4857,9 +7351,9 @@
4857 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">
4858 7352 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4859 7353 <label for="ays-chart-option-transparent-background" class="form-label">
4860 7354 <?php echo esc_html(__( "Transparent background", "chart-builder" )); ?>
4861 - <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") ); ?>">
4862 7356 <i class="ays_fa ays_fa_info_circle"></i>
4863 7357 </a>
4864 7358 </label>
4865 7359 </div>
@@ -4873,9 +7367,9 @@
4873 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">
4874 7368 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4875 7369 <label for="ays-chart-option-border-width">
4876 7370 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
4877 - <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") ); ?>">
4878 7372 <i class="ays_fa ays_fa_info_circle"></i>
4879 7373 </a>
4880 7374 </label>
4881 7375 </div>
@@ -4886,9 +7380,9 @@
4886 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">
4887 7381 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4888 7382 <label for="ays-chart-option-border-color">
4889 7383 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
4890 - <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") ); ?>">
4891 7385 <i class="ays_fa ays_fa_info_circle"></i>
4892 7386 </a>
4893 7387 </label>
4894 7388 </div>
@@ -4899,9 +7393,9 @@
4899 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">
4900 7394 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4901 7395 <label for="ays-chart-option-border-radius">
4902 7396 <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?>
4903 - <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") ); ?>">
4904 7398 <i class="ays_fa ays_fa_info_circle"></i>
4905 7399 </a>
4906 7400 </label>
4907 7401 </div>
@@ -4910,11 +7404,33 @@
4910 7404 </div>
4911 7405 </div> <!-- Border radius -->
4912 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">
4913 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">
4914 7430 <label for="ays-chart-option-box-shadow" class="form-label">
4915 7431 <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?>
4916 - <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") ); ?>">
4917 7433 <i class="ays_fa ays_fa_info_circle"></i>
4918 7434 </a>
4919 7435 </label>
4920 7436 </div>
@@ -4928,9 +7444,9 @@
4928 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">
4929 7445 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4930 7446 <label for="ays-chart-option-box-shadow-color" class="form-label">
4931 7447 <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?>
4932 - <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") ); ?>">
4933 7449 <i class="ays_fa ays_fa_info_circle"></i>
4934 7450 </a>
4935 7451 </label>
4936 7452 </div>
@@ -4941,9 +7457,9 @@
4941 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">
4942 7458 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4943 7459 <label for="ays-chart-option-border-width-with-title">
4944 7460 <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?>
4945 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container border including chart title and description.","chart-builder") ); ?>">
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") ); ?>">
4946 7462 <i class="ays_fa ays_fa_info_circle"></i>
4947 7463 </a>
4948 7464 </label>
4949 7465 </div>
@@ -4954,9 +7470,9 @@
4954 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">
4955 7471 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4956 7472 <label for="ays-chart-option-border-radius-with-title">
4957 7473 <?php echo esc_html(__( "Border radius (including title)", "chart-builder" )); ?>
4958 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The radius of the chart container border including chart title and description.","chart-builder") ); ?>">
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") ); ?>">
4959 7475 <i class="ays_fa ays_fa_info_circle"></i>
4960 7476 </a>
4961 7477 </label>
4962 7478 </div>
@@ -4967,9 +7483,9 @@
4967 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">
4968 7484 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
4969 7485 <label for="ays-chart-option-border-color-with-title">
4970 7486 <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?>
4971 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart container border including chart title and description.","chart-builder") ); ?>">
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") ); ?>">
4972 7488 <i class="ays_fa ays_fa_info_circle"></i>
4973 7489 </a>
4974 7490 </label>
4975 7491 </div>
@@ -4978,11 +7494,33 @@
4978 7494 </div>
4979 7495 </div> <!-- Border color with title -->
4980 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">
4981 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">
4982 7520 <label for="ays-chart-option-padding-outer">
4983 7521 <?php echo esc_html(__( "Padding", "chart-builder" )); ?>
4984 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The padding of the chart container.","chart-builder") ); ?>">
7522 + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The padding of the chart container.","chart-builder") ); ?>">
4985 7523 <i class="ays_fa ays_fa_info_circle"></i>
4986 7524 </a>
4987 7525 </label>
4988 7526 </div>
@@ -5004,8 +7542,273 @@
5004 7542
5005 7543 return $sources;
5006 7544 }
5007 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 +
5008 7811 public function settings_contents_chart_area_styles_settings( $sources, $args ){
5009 7812 $html_class_prefix = $args['html_class_prefix'];
5010 7813 $html_name_prefix = $args['html_name_prefix'];
5011 7814 $settings = $args['settings'];
@@ -5024,9 +7827,9 @@
5024 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">
5025 7828 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5026 7829 <label for="ays-chart-option-chart-background-color">
5027 7830 <?php echo esc_html(__( "Background Color", "chart-builder" )); ?>
5028 - <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") ); ?>">
5029 7832 <i class="ays_fa ays_fa_info_circle"></i>
5030 7833 </a>
5031 7834 </label>
5032 7835 </div>
@@ -5037,9 +7840,9 @@
5037 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">
5038 7841 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5039 7842 <label for="ays-chart-option-chart-border-width">
5040 7843 <?php echo esc_html(__( "Border Width", "chart-builder" )); ?>
5041 - <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") ); ?>">
5042 7845 <i class="ays_fa ays_fa_info_circle"></i>
5043 7846 </a>
5044 7847 </label>
5045 7848 </div>
@@ -5050,9 +7853,9 @@
5050 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">
5051 7854 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5052 7855 <label for="ays-chart-option-chart-border-color">
5053 7856 <?php echo esc_html(__( "Border Color", "chart-builder" )); ?>
5054 - <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") ); ?>">
5055 7858 <i class="ays_fa ays_fa_info_circle"></i>
5056 7859 </a>
5057 7860 </label>
5058 7861 </div>
@@ -5063,9 +7866,9 @@
5063 7866 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5064 7867 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5065 7868 <label for="ays-chart-option-chart-left-margin">
5066 7869 <?php echo esc_html(__( "Left Margin", "chart-builder" )); ?>
5067 - <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") ); ?>">
5068 7871 <i class="ays_fa ays_fa_info_circle"></i>
5069 7872 </a>
5070 7873 </label>
5071 7874 </div>
@@ -5076,9 +7879,9 @@
5076 7879 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5077 7880 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5078 7881 <label for="ays-chart-option-chart-right-margin">
5079 7882 <?php echo esc_html(__( "Right Margin", "chart-builder" )); ?>
5080 - <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") ); ?>">
5081 7884 <i class="ays_fa ays_fa_info_circle"></i>
5082 7885 </a>
5083 7886 </label>
5084 7887 </div>
@@ -5089,9 +7892,9 @@
5089 7892 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5090 7893 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5091 7894 <label for="ays-chart-option-chart-top-margin">
5092 7895 <?php echo esc_html(__( "Top Margin", "chart-builder" )); ?>
5093 - <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") ); ?>">
5094 7897 <i class="ays_fa ays_fa_info_circle"></i>
5095 7898 </a>
5096 7899 </label>
5097 7900 </div>
@@ -5102,9 +7905,9 @@
5102 7905 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5103 7906 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5104 7907 <label for="ays-chart-option-chart-bottom-margin">
5105 7908 <?php echo esc_html(__( "Bottom Margin", "chart-builder" )); ?>
5106 - <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") ); ?>">
5107 7910 <i class="ays_fa ays_fa_info_circle"></i>
5108 7911 </a>
5109 7912 </label>
5110 7913 </div>
@@ -5154,9 +7957,9 @@
5154 7957 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5155 7958 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5156 7959 <label for="ays-chart-option-title-color">
5157 7960 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5158 - <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") ); ?>">
5159 7962 <i class="ays_fa ays_fa_info_circle"></i>
5160 7963 </a>
5161 7964 </label>
5162 7965 </div>
@@ -5167,9 +7970,9 @@
5167 7970 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5168 7971 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5169 7972 <label for="ays-chart-option-title-font-size" class="form-label">
5170 7973 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5171 - <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") ); ?>">
5172 7975 <i class="ays_fa ays_fa_info_circle"></i>
5173 7976 </a>
5174 7977 </label>
5175 7978 </div>
@@ -5181,9 +7984,9 @@
5181 7984 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5182 7985 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5183 7986 <label for="ays-chart-option-title-bold" class="form-label">
5184 7987 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5185 - <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") ); ?>">
5186 7989 <i class="ays_fa ays_fa_info_circle"></i>
5187 7990 </a>
5188 7991 </label>
5189 7992 </div>
@@ -5197,9 +8000,9 @@
5197 8000 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5198 8001 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5199 8002 <label for="ays-chart-option-title-italic" class="form-label">
5200 8003 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5201 - <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") ); ?>">
5202 8005 <i class="ays_fa ays_fa_info_circle"></i>
5203 8006 </a>
5204 8007 </label>
5205 8008 </div>
@@ -5213,9 +8016,9 @@
5213 8016 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5214 8017 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5215 8018 <label for="ays-chart-option-title-position">
5216 8019 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5217 - <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") ); ?>">
5218 8021 <i class="ays_fa ays_fa_info_circle"></i>
5219 8022 </a>
5220 8023 </label>
5221 8024 </div>
@@ -5235,9 +8038,9 @@
5235 8038 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5236 8039 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5237 8040 <label for="ays-chart-option-title-gap" class="form-label">
5238 8041 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5239 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart 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") ); ?>">
5240 8043 <i class="ays_fa ays_fa_info_circle"></i>
5241 8044 </a>
5242 8045 </label>
5243 8046 </div>
@@ -5249,9 +8052,9 @@
5249 8052 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5250 8053 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5251 8054 <label for="ays-chart-option-title-gap-description" class="form-label">
5252 8055 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5253 - <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") ); ?>">
5254 8057 <i class="ays_fa ays_fa_info_circle"></i>
5255 8058 </a>
5256 8059 </label>
5257 8060 </div>
@@ -5263,9 +8066,9 @@
5263 8066 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5264 8067 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5265 8068 <label for="ays-chart-option-title-text-transform">
5266 8069 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5267 - <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") ); ?>">
5268 8071 <i class="ays_fa ays_fa_info_circle"></i>
5269 8072 </a>
5270 8073 </label>
5271 8074 </div>
@@ -5285,9 +8088,9 @@
5285 8088 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5286 8089 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5287 8090 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5288 8091 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5289 - <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") ); ?>">
5290 8093 <i class="ays_fa ays_fa_info_circle"></i>
5291 8094 </a>
5292 8095 </label>
5293 8096 </div>
@@ -5299,9 +8102,9 @@
5299 8102 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5300 8103 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5301 8104 <label for="ays-chart-option-title-text-decoration">
5302 8105 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5303 - <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") ); ?>">
5304 8107 <i class="ays_fa ays_fa_info_circle"></i>
5305 8108 </a>
5306 8109 </label>
5307 8110 </div>
@@ -5321,9 +8124,9 @@
5321 8124 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5322 8125 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5323 8126 <label for="ays-chart-option-title-text-shadow" class="form-label">
5324 8127 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5325 - <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") ); ?>">
5326 8129 <i class="ays_fa ays_fa_info_circle"></i>
5327 8130 </a>
5328 8131 </label>
5329 8132 </div>
@@ -5337,9 +8140,9 @@
5337 8140 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5338 8141 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5339 8142 <label for="ays-chart-option-title-shadow-color">
5340 8143 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5341 - <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") ); ?>">
5342 8145 <i class="ays_fa ays_fa_info_circle"></i>
5343 8146 </a>
5344 8147 </label>
5345 8148 </div>
@@ -5389,9 +8192,9 @@
5389 8192 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5390 8193 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5391 8194 <label for="ays-chart-option-title-color">
5392 8195 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5393 - <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") ); ?>">
5394 8197 <i class="ays_fa ays_fa_info_circle"></i>
5395 8198 </a>
5396 8199 </label>
5397 8200 </div>
@@ -5402,9 +8205,9 @@
5402 8205 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5403 8206 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5404 8207 <label for="ays-chart-option-title-font-size" class="form-label">
5405 8208 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5406 - <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") ); ?>">
5407 8210 <i class="ays_fa ays_fa_info_circle"></i>
5408 8211 </a>
5409 8212 </label>
5410 8213 </div>
@@ -5416,9 +8219,9 @@
5416 8219 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5417 8220 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5418 8221 <label for="ays-chart-option-title-bold" class="form-label">
5419 8222 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5420 - <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") ); ?>">
5421 8224 <i class="ays_fa ays_fa_info_circle"></i>
5422 8225 </a>
5423 8226 </label>
5424 8227 </div>
@@ -5432,9 +8235,9 @@
5432 8235 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5433 8236 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5434 8237 <label for="ays-chart-option-title-italic" class="form-label">
5435 8238 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5436 - <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") ); ?>">
5437 8240 <i class="ays_fa ays_fa_info_circle"></i>
5438 8241 </a>
5439 8242 </label>
5440 8243 </div>
@@ -5448,9 +8251,9 @@
5448 8251 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5449 8252 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5450 8253 <label for="ays-chart-option-title-position">
5451 8254 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5452 - <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") ); ?>">
5453 8256 <i class="ays_fa ays_fa_info_circle"></i>
5454 8257 </a>
5455 8258 </label>
5456 8259 </div>
@@ -5470,9 +8273,9 @@
5470 8273 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5471 8274 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5472 8275 <label for="ays-chart-option-title-gap" class="form-label">
5473 8276 <?php echo esc_html(__( "Gap", "chart-builder" )); ?>
5474 - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title and the chart 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") ); ?>">
5475 8278 <i class="ays_fa ays_fa_info_circle"></i>
5476 8279 </a>
5477 8280 </label>
5478 8281 </div>
@@ -5484,9 +8287,9 @@
5484 8287 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5485 8288 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5486 8289 <label for="ays-chart-option-title-gap-description" class="form-label">
5487 8290 <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?>
5488 - <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") ); ?>">
5489 8292 <i class="ays_fa ays_fa_info_circle"></i>
5490 8293 </a>
5491 8294 </label>
5492 8295 </div>
@@ -5498,9 +8301,9 @@
5498 8301 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5499 8302 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5500 8303 <label for="ays-chart-option-title-text-transform">
5501 8304 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5502 - <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") ); ?>">
5503 8306 <i class="ays_fa ays_fa_info_circle"></i>
5504 8307 </a>
5505 8308 </label>
5506 8309 </div>
@@ -5520,9 +8323,9 @@
5520 8323 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5521 8324 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5522 8325 <label for="ays-chart-option-title-letter-spacing" class="form-label">
5523 8326 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5524 - <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") ); ?>">
5525 8328 <i class="ays_fa ays_fa_info_circle"></i>
5526 8329 </a>
5527 8330 </label>
5528 8331 </div>
@@ -5534,9 +8337,9 @@
5534 8337 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5535 8338 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5536 8339 <label for="ays-chart-option-title-text-decoration">
5537 8340 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5538 - <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") ); ?>">
5539 8342 <i class="ays_fa ays_fa_info_circle"></i>
5540 8343 </a>
5541 8344 </label>
5542 8345 </div>
@@ -5556,9 +8359,9 @@
5556 8359 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5557 8360 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5558 8361 <label for="ays-chart-option-title-text-shadow" class="form-label">
5559 8362 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5560 - <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") ); ?>">
5561 8364 <i class="ays_fa ays_fa_info_circle"></i>
5562 8365 </a>
5563 8366 </label>
5564 8367 </div>
@@ -5572,9 +8375,9 @@
5572 8375 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5573 8376 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5574 8377 <label for="ays-chart-option-title-shadow-color">
5575 8378 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5576 - <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") ); ?>">
5577 8380 <i class="ays_fa ays_fa_info_circle"></i>
5578 8381 </a>
5579 8382 </label>
5580 8383 </div>
@@ -5623,9 +8426,9 @@
5623 8426 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5624 8427 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5625 8428 <label for="ays-chart-option-description-color">
5626 8429 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5627 - <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") ); ?>">
5628 8431 <i class="ays_fa ays_fa_info_circle"></i>
5629 8432 </a>
5630 8433 </label>
5631 8434 </div>
@@ -5636,9 +8439,9 @@
5636 8439 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5637 8440 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5638 8441 <label for="ays-chart-option-description-font-size" class="form-label">
5639 8442 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5640 - <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") ); ?>">
5641 8444 <i class="ays_fa ays_fa_info_circle"></i>
5642 8445 </a>
5643 8446 </label>
5644 8447 </div>
@@ -5650,9 +8453,9 @@
5650 8453 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5651 8454 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5652 8455 <label for="ays-chart-option-description-bold" class="form-label">
5653 8456 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5654 - <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") ); ?>">
5655 8458 <i class="ays_fa ays_fa_info_circle"></i>
5656 8459 </a>
5657 8460 </label>
5658 8461 </div>
@@ -5666,9 +8469,9 @@
5666 8469 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5667 8470 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5668 8471 <label for="ays-chart-option-description-italic" class="form-label">
5669 8472 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5670 - <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") ); ?>">
5671 8474 <i class="ays_fa ays_fa_info_circle"></i>
5672 8475 </a>
5673 8476 </label>
5674 8477 </div>
@@ -5682,9 +8485,9 @@
5682 8485 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5683 8486 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5684 8487 <label for="ays-chart-option-description-position">
5685 8488 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5686 - <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") ); ?>">
5687 8490 <i class="ays_fa ays_fa_info_circle"></i>
5688 8491 </a>
5689 8492 </label>
5690 8493 </div>
@@ -5704,9 +8507,9 @@
5704 8507 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5705 8508 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5706 8509 <label for="ays-chart-option-description-text-transform">
5707 8510 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5708 - <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") ); ?>">
5709 8512 <i class="ays_fa ays_fa_info_circle"></i>
5710 8513 </a>
5711 8514 </label>
5712 8515 </div>
@@ -5726,9 +8529,9 @@
5726 8529 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5727 8530 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5728 8531 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5729 8532 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5730 - <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") ); ?>">
5731 8534 <i class="ays_fa ays_fa_info_circle"></i>
5732 8535 </a>
5733 8536 </label>
5734 8537 </div>
@@ -5740,9 +8543,9 @@
5740 8543 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5741 8544 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5742 8545 <label for="ays-chart-option-description-text-decoration">
5743 8546 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5744 - <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") ); ?>">
5745 8548 <i class="ays_fa ays_fa_info_circle"></i>
5746 8549 </a>
5747 8550 </label>
5748 8551 </div>
@@ -5762,9 +8565,9 @@
5762 8565 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5763 8566 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5764 8567 <label for="ays-chart-option-description-text-shadow" class="form-label">
5765 8568 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5766 - <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") ); ?>">
5767 8570 <i class="ays_fa ays_fa_info_circle"></i>
5768 8571 </a>
5769 8572 </label>
5770 8573 </div>
@@ -5778,9 +8581,9 @@
5778 8581 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5779 8582 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5780 8583 <label for="ays-chart-option-description-shadow-color">
5781 8584 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5782 - <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") ); ?>">
5783 8586 <i class="ays_fa ays_fa_info_circle"></i>
5784 8587 </a>
5785 8588 </label>
5786 8589 </div>
@@ -5829,9 +8632,9 @@
5829 8632 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5830 8633 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5831 8634 <label for="ays-chart-option-description-color">
5832 8635 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
5833 - <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") ); ?>">
5834 8637 <i class="ays_fa ays_fa_info_circle"></i>
5835 8638 </a>
5836 8639 </label>
5837 8640 </div>
@@ -5842,9 +8645,9 @@
5842 8645 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5843 8646 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5844 8647 <label for="ays-chart-option-description-font-size" class="form-label">
5845 8648 <?php echo esc_html(__( "Font size", "chart-builder" )); ?>
5846 - <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") ); ?>">
5847 8650 <i class="ays_fa ays_fa_info_circle"></i>
5848 8651 </a>
5849 8652 </label>
5850 8653 </div>
@@ -5856,9 +8659,9 @@
5856 8659 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5857 8660 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5858 8661 <label for="ays-chart-option-description-bold" class="form-label">
5859 8662 <?php echo esc_html(__( "Bold text", "chart-builder" )); ?>
5860 - <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") ); ?>">
5861 8664 <i class="ays_fa ays_fa_info_circle"></i>
5862 8665 </a>
5863 8666 </label>
5864 8667 </div>
@@ -5872,9 +8675,9 @@
5872 8675 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5873 8676 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5874 8677 <label for="ays-chart-option-description-italic" class="form-label">
5875 8678 <?php echo esc_html(__( "Italic text", "chart-builder" )); ?>
5876 - <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") ); ?>">
5877 8680 <i class="ays_fa ays_fa_info_circle"></i>
5878 8681 </a>
5879 8682 </label>
5880 8683 </div>
@@ -5888,9 +8691,9 @@
5888 8691 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5889 8692 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5890 8693 <label for="ays-chart-option-description-position">
5891 8694 <?php echo esc_html(__( "Position", "chart-builder" )); ?>
5892 - <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") ); ?>">
5893 8696 <i class="ays_fa ays_fa_info_circle"></i>
5894 8697 </a>
5895 8698 </label>
5896 8699 </div>
@@ -5910,9 +8713,9 @@
5910 8713 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5911 8714 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5912 8715 <label for="ays-chart-option-description-text-transform">
5913 8716 <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?>
5914 - <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") ); ?>">
5915 8718 <i class="ays_fa ays_fa_info_circle"></i>
5916 8719 </a>
5917 8720 </label>
5918 8721 </div>
@@ -5932,9 +8735,9 @@
5932 8735 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5933 8736 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5934 8737 <label for="ays-chart-option-description-letter-spacing" class="form-label">
5935 8738 <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?>
5936 - <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") ); ?>">
5937 8740 <i class="ays_fa ays_fa_info_circle"></i>
5938 8741 </a>
5939 8742 </label>
5940 8743 </div>
@@ -5946,9 +8749,9 @@
5946 8749 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5947 8750 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5948 8751 <label for="ays-chart-option-description-text-decoration">
5949 8752 <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?>
5950 - <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") ); ?>">
5951 8754 <i class="ays_fa ays_fa_info_circle"></i>
5952 8755 </a>
5953 8756 </label>
5954 8757 </div>
@@ -5968,9 +8771,9 @@
5968 8771 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5969 8772 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5970 8773 <label for="ays-chart-option-description-text-shadow" class="form-label">
5971 8774 <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?>
5972 - <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") ); ?>">
5973 8776 <i class="ays_fa ays_fa_info_circle"></i>
5974 8777 </a>
5975 8778 </label>
5976 8779 </div>
@@ -5984,9 +8787,9 @@
5984 8787 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
5985 8788 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
5986 8789 <label for="ays-chart-option-description-shadow-color">
5987 8790 <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?>
5988 - <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") ); ?>">
5989 8792 <i class="ays_fa ays_fa_info_circle"></i>
5990 8793 </a>
5991 8794 </label>
5992 8795 </div>
@@ -6047,9 +8850,9 @@
6047 8850
6048 8851 $sources[] = $content;
6049 8852 }
6050 8853 $content_for_escape = implode('' , $sources );
6051 - echo html_entity_decode(esc_html( $content_for_escape ));
8854 + echo html_entity_decode( esc_html($content_for_escape) );
6052 8855 }
6053 8856
6054 8857 public function settings_contents_advanced_settings( $sources, $args ){
6055 8858 $html_class_prefix = $args['html_class_prefix'];
@@ -6154,9 +8957,9 @@
6154 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">
6155 8958 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6156 8959 <label for="ays-chart-option-slice-text">
6157 8960 <?php echo esc_html(__( "Slice text", "chart-builder" )); ?>
6158 - <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") ); ?>">
6159 8962 <i class="ays_fa ays_fa_info_circle"></i>
6160 8963 </a>
6161 8964 </label>
6162 8965 </div>
@@ -6176,9 +8979,9 @@
6176 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">
6177 8980 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6178 8981 <label for="ays-chart-option-tooltip-text">
6179 8982 <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?>
6180 - <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") ); ?>">
6181 8984 <i class="ays_fa ays_fa_info_circle"></i>
6182 8985 </a>
6183 8986 </label>
6184 8987 </div>
@@ -6211,9 +9014,9 @@
6211 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">
6212 9015 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6213 9016 <label for="ays-chart-option-data-grouping-label" class="form-label">
6214 9017 <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?>
6215 - <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") ); ?>">
6216 9019 <i class="ays_fa ays_fa_info_circle"></i>
6217 9020 </a>
6218 9021 </label>
6219 9022 </div>
@@ -6254,17 +9057,18 @@
6254 9057 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6255 9058 <label for="ays-chart-option-focus-target">
6256 9059 <?php echo esc_html(__( "Focus target", "chart-builder" )); ?>
6257 9060 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6258 - echo htmlspecialchars( sprintf(
9061 + echo esc_html( sprintf(
9062 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6259 9063 "<p>" . __('There are two ways to focus the data table elements.', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6260 - __('%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>" .
6261 - __('%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>",
6262 - '<em>',
6263 - '</em>',
6264 - '<em>',
6265 - '</em>'
6266 - ) );
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 + ));
6267 9071 ?>">
6268 9072 <i class="ays_fa ays_fa_info_circle"></i>
6269 9073 </a>
6270 9074 </label>
@@ -6299,17 +9103,18 @@
6299 9103 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6300 9104 <label for="ays-chart-option-group-width">
6301 9105 <?php echo esc_html(__( "Bar width", "chart-builder" )); ?>
6302 9106 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6303 - echo htmlspecialchars( sprintf(
9107 + echo esc_html( sprintf(
9108 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6304 9109 "<p>" . __('The width of the bars, specified in either of these formats:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6305 - __('%sPixels:%s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" .
6306 - __('%sPercentage:%s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>",
6307 - '<em>',
6308 - '</em>',
6309 - '<em>',
6310 - '</em>'
6311 - ) );
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 + ));
6312 9117 ?>">
6313 9118 <i class="ays_fa ays_fa_info_circle"></i>
6314 9119 </a>
6315 9120 </label>
@@ -6361,23 +9166,24 @@
6361 9166 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6362 9167 <label for="ays-chart-option-multiple-data-format">
6363 9168 <?php echo esc_html(__( "Multiple data format", "chart-builder" )); ?>
6364 9169 <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php
6365 - echo htmlspecialchars( sprintf(
9170 + echo esc_html( sprintf(
9171 + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */
6366 9172 "<p>" . __('How multiple data selections are rolled up into tooltips:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" .
6367 - __('%sCategory:%s Group selected data by row titles.', "chart-builder") . "</li><li>" .
6368 - __('%sSeries:%s Group selected data by column titles.', "chart-builder") . "</li><li>" .
6369 - __('%sAuto:%s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" .
6370 - __('%sNone:%s Show only one tooltip per selection.', "chart-builder") . "</li></ul>",
6371 - '<em>',
6372 - '</em>',
6373 - '<em>',
6374 - '</em>',
6375 - '<em>',
6376 - '</em>',
6377 - '<em>',
6378 - '</em>'
6379 - ) );
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 + ));
6380 9186 ?>">
6381 9187 <i class="ays_fa ays_fa_info_circle"></i>
6382 9188 </a>
6383 9189 </label>
@@ -6532,15 +9338,15 @@
6532 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) ?>">
6533 9339 </div>
6534 9340 </div> <!-- Line dash pattern -->
6535 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">
6536 - <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">
6537 9343 <label for="ays-chart-option-donut-hole-size">
6538 - <?php echo __( "Hole size", $this->plugin_name ); ?>
9344 + <?php echo esc_html(__( "Hole size", 'chart-builder' )); ?>
6539 9345 </label>
6540 9346 </div>
6541 - <div class="col-sm-7 <?= $html_class_prefix ?>input-align-right <?= $html_class_prefix ?>option-input">
6542 - <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) ?>">
6543 9349 </div>
6544 9350 </div> <!-- Donut hole size -->
6545 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">
6546 9352 <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box">
@@ -6547,20 +9353,20 @@
6547 9353 <div class="ays-pro-features-v2-video-button"></div>
6548 9354 <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button">
6549 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>
6550 9356 <div class="ays-pro-features-v2-upgrade-text">
6551 - <?php echo __("Upgrade" , "chart-builder"); ?>
9357 + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?>
6552 9358 </div>
6553 9359 </a>
6554 9360 </div>
6555 - <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">
6556 9362 <label for="ays-chart-option-curve-type">
6557 - <?php echo __( "Line curve type", "chart-builder" ); ?>
9363 + <?php echo esc_html(__( "Line curve type", "chart-builder" )); ?>
6558 9364 </label>
6559 9365 </div>
6560 9366 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input">
6561 - <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]">
6562 - <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>
6563 9369 </select>
6564 9370 </div>
6565 9371 </div> <!-- Line curve type -->
6566 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">
@@ -6608,9 +9414,9 @@
6608 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">
6609 9415 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6610 9416 <label for="ays-chart-option-org-classname" class="form-label">
6611 9417 <?php echo esc_html(__( "Custom CSS class", "chart-builder" )); ?>
6612 - <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") ); ?>">
6613 9419 <i class="ays_fa ays_fa_info_circle"></i>
6614 9420 </a>
6615 9421 </label>
6616 9422 </div>
@@ -6621,9 +9427,11 @@
6621 9427 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6622 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">
6623 9429 <br>
6624 9430 <blockquote>
6625 - <?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>'); ?>
6626 9434 </blockquote>
6627 9435 <br>
6628 9436 </div>
6629 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">
@@ -6721,9 +9529,9 @@
6721 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">
6722 9530 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6723 9531 <label for="ays-chart-option-org-selected-classname" class="form-label">
6724 9532 <?php echo esc_html(__( "Selected node custom CSS class", "chart-builder" )); ?>
6725 - <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") ); ?>">
6726 9534 <i class="ays_fa ays_fa_info_circle"></i>
6727 9535 </a>
6728 9536 </label>
6729 9537 </div>
@@ -6734,9 +9542,14 @@
6734 9542 <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none">
6735 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">
6736 9544 <br>
6737 9545 <blockquote>
6738 - <?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 + ); ?>
6739 9552 </blockquote>
6740 9553 <br>
6741 9554 </div>
6742 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">
@@ -6788,8 +9601,16 @@
6788 9601 $outer_radius = $settings['outer_radius'];
6789 9602 $slice_spacing = $settings['slice_spacing'];
6790 9603 $circumference = $settings['circumference'];
6791 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'];
6792 9613 // $index_axis = $settings['index_axis'];
6793 9614
6794 9615 ob_start();
6795 9616 ?>
@@ -6850,8 +9671,108 @@
6850 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) ?>">
6851 9672 <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">°</div>
6852 9673 </div>
6853 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 -->
6854 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">
6855 9776 <div class="col-sm-5 d-flex align-items-center <?php // echo esc_attr($html_class_prefix) ?>option-title">
6856 9777 <label for="ays-chart-option-index-axis">
6857 9778 <?php // echo esc_html(__( "Horizontal ", "chart-builder" )); ?>
@@ -6894,15 +9815,15 @@
6894 9815 if ( !isset( $source[0] ) ) {
6895 9816 if (count($source[1]) > 2) {
6896 9817 $titles = array();
6897 9818 for ($i = 0; $i < count($source[1]); $i++) {
6898 - array_push($titles, __("Title", $this->plugin_name).$i);
9819 + array_push($titles, __("Title", 'chart-builder').$i);
6899 9820 }
6900 9821 $source[0] = $titles;
6901 9822 } else {
6902 9823 $source[0] = array(
6903 - __("Country", $this->plugin_name),
6904 - __("Population", $this->plugin_name),
9824 + __("Country", 'chart-builder'),
9825 + __("Population", 'chart-builder'),
6905 9826 );
6906 9827 }
6907 9828
6908 9829 ksort($source);
@@ -6935,9 +9856,9 @@
6935 9856 <g>
6936 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" />
6937 9858 </g>
6938 9859 </svg>
6939 - <span><?php echo $val[0]; ?></span>
9860 + <span><?php echo esc_html($val[0]); ?></span>
6940 9861 </legend>
6941 9862 <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content">
6942 9863 <div class="ays-slices-accordion-data-main-wrap">
6943 9864 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -6944,9 +9865,9 @@
6944 9865 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6945 9866 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6946 9867 <label for="ays-chart-option-slice-color">
6947 9868 <?php echo esc_html(__( "Color", "chart-builder" )); ?>
6948 - <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") ); ?>">
6949 9870 <i class="ays_fa ays_fa_info_circle"></i>
6950 9871 </a>
6951 9872 </label>
6952 9873 </div>
@@ -6951,13 +9872,13 @@
6951 9872 </label>
6952 9873 </div>
6953 9874 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6954 9875 <input type="color"
6955 - id="ays-chart-option-slice-color-<?php echo $key; ?>"
9876 + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>"
6956 9877 class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6957 - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo $key; ?>]"
6958 - value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : $slice_colors_default[$key]; ?>"
6959 - 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); ?>">
6960 9881 </div>
6961 9882 </div> <!-- Slice color -->
6962 9883 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6963 9884 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -6969,13 +9890,13 @@
6969 9890 </label>
6970 9891 </div>
6971 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">
6972 9893 <input type="number"
6973 - id="ays-chart-option-slice-offset-<?php echo $key; ?>"
9894 + id="ays-chart-option-slice-offset-<?php echo esc_attr($key); ?>"
6974 9895 class="ays-chart-option-slice-offset ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
6975 - 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); ?>]"
6976 9897 value="<?php echo isset($slice_offset[$key]) ? esc_attr($slice_offset[$key]) : 0 ; ?>"
6977 - data-slice-id="<?php echo $key; ?>"
9898 + data-slice-id="<?php echo esc_attr($key); ?>"
6978 9899 step=".01" min="0.0" max="1.0">
6979 9900 </div>
6980 9901 </div> <!-- Slice offset -->
6981 9902 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
@@ -6981,9 +9902,9 @@
6981 9902 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
6982 9903 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
6983 9904 <label for="ays-chart-option-slice-text-color">
6984 9905 <?php echo esc_html(__( "Text color", "chart-builder" )); ?>
6985 - <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") ); ?>">
6986 9907 <i class="ays_fa ays_fa_info_circle"></i>
6987 9908 </a>
6988 9909 </label>
6989 9910 </div>
@@ -6988,13 +9909,13 @@
6988 9909 </label>
6989 9910 </div>
6990 9911 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
6991 9912 <input type="color"
6992 - id="ays-chart-option-slice-text-color-<?php echo $key; ?>"
9913 + id="ays-chart-option-slice-text-color-<?php echo esc_attr($key); ?>"
6993 9914 class="ays-chart-option-slice-text-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
6994 - 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); ?>]"
6995 9916 value="<?php echo isset($slice_text_color[$key]) ? esc_attr($slice_text_color[$key]) : '#ffffff'; ?>"
6996 - data-slice-id="<?php echo $key; ?>">
9917 + data-slice-id="<?php echo esc_attr($key); ?>">
6997 9918 </div>
6998 9919 </div> <!-- Slice color -->
6999 9920 </div>
7000 9921 </div>
@@ -7006,9 +9927,9 @@
7006 9927 </div>
7007 9928 </div>
7008 9929 <br>
7009 9930 <blockquote>
7010 - <?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" )); ?>
7011 9932 </blockquote>
7012 9933 </div>
7013 9934 <?php
7014 9935
@@ -7019,9 +9940,9 @@
7019 9940 }
7020 9941
7021 9942 $content = ob_get_clean();
7022 9943
7023 - $title = __( 'Slices settings', "chart-builder" );
9944 + $title = esc_html(__( 'Slices settings', 'chart-builder' ));
7024 9945
7025 9946 $sources['slices_settings'] = array(
7026 9947 'content' => $content,
7027 9948 'title' => $title
@@ -7028,9 +9949,139 @@
7028 9949 );
7029 9950
7030 9951 return $sources;
7031 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);
7032 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 +
7033 10084 public function settings_contents_series_settings( $sources, $args ){
7034 10085 $html_class_prefix = $args['html_class_prefix'];
7035 10086 $html_name_prefix = $args['html_name_prefix'];
7036 10087 $settings = $args['settings'];
@@ -7047,15 +10098,15 @@
7047 10098 if ( !isset( $source[0] ) ) {
7048 10099 if (count($source[1]) > 2) {
7049 10100 $titles = array();
7050 10101 for ($i = 0; $i < count($source[1]); $i++) {
7051 - array_push($titles, __("Title", $this->plugin_name).$i);
10102 + array_push($titles, __("Title", "chart-builder").$i);
7052 10103 }
7053 10104 $source[0] = $titles;
7054 10105 } else {
7055 10106 $source[0] = array(
7056 - __("Country", $this->plugin_name),
7057 - __("Population", $this->plugin_name),
10107 + __("Country", "chart-builder"),
10108 + __("Population", "chart-builder"),
7058 10109 );
7059 10110 }
7060 10111
7061 10112 ksort($source);
@@ -7073,8 +10124,9 @@
7073 10124 $series_row = array_shift($source);
7074 10125 $title = array_shift($series_row);
7075 10126 $series_color = $settings['series_color'];
7076 10127 $series_colors_default = $settings['series_colors_default'];
10128 + $series_format = $settings['series_format'];
7077 10129 $series_visible_in_legend = $settings['series_visible_in_legend'];
7078 10130 $series_line_width = $settings['series_line_width'];
7079 10131 $series_point_size = $settings['series_point_size'];
7080 10132 $series_point_shape = $settings['series_point_shape'];
@@ -7092,9 +10144,9 @@
7092 10144 <g>
7093 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" />
7094 10146 </g>
7095 10147 </svg>
7096 - <span><?php echo $val; ?></span>
10148 + <span><?php echo esc_attr($val); ?></span>
7097 10149 </legend>
7098 10150 <div class="ays-series-accordion-options-content ays-series-accordion-options-content">
7099 10151 <div class="ays-series-accordion-data-main-wrap">
7100 10152 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7105,13 +10157,13 @@
7105 10157 </label>
7106 10158 </div>
7107 10159 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7108 10160 <input type="color"
7109 - id="ays-chart-option-series-color-<?php echo $key; ?>"
10161 + id="ays-chart-option-series-color-<?php echo esc_attr($key); ?>"
7110 10162 class="ays-chart-option-series-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7111 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo $key; ?>]"
7112 - value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : $series_colors_default[$key]; ?>"
7113 - 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); ?>">
7114 10166 </div>
7115 10167 </div> <!-- series color -->
7116 10168 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7117 10169 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7124,18 +10176,36 @@
7124 10176 </div>
7125 10177 <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7126 10178 <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch">
7127 10179 <input type="checkbox"
7128 - 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); ?>"
7129 10181 class="ays-chart-option-series-visible-in-legend <?php echo esc_attr($html_class_prefix) ?>toggle-switch"
7130 - 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); ?>]"
7131 10183 value="on"
7132 - data-series-id="<?php echo $key; ?>"
10184 + data-series-id="<?php echo esc_attr($key); ?>"
7133 10185 <?php echo isset($series_visible_in_legend[$key]) && $series_visible_in_legend[$key] == 'on' ? 'checked' : (!isset($series_color[$key]) ? 'checked' : ''); ?> >
7134 10186 <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span>
7135 10187 </label>
7136 10188 </div>
7137 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 -->
7138 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">
7139 10209 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
7140 10210 <label for="ays-chart-option-series-line-width">
7141 10211 <?php echo esc_html(__( "Line width", "chart-builder" )); ?>
@@ -7145,13 +10215,13 @@
7145 10215 </label>
7146 10216 </div>
7147 10217 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7148 10218 <input type="number"
7149 - id="ays-chart-option-series-line-width-<?php echo $key; ?>"
10219 + id="ays-chart-option-series-line-width-<?php echo esc_attr($key); ?>"
7150 10220 class="ays-chart-option-series-line-width ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7151 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo $key; ?>]"
7152 - value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : $line_width; ?>"
7153 - 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); ?>">
7154 10224 </div>
7155 10225 </div> <!-- Line width -->
7156 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">
7157 10227 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7163,13 +10233,13 @@
7163 10233 </label>
7164 10234 </div>
7165 10235 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7166 10236 <input type="number"
7167 - id="ays-chart-option-series-point-size-<?php echo $key; ?>"
10237 + id="ays-chart-option-series-point-size-<?php echo esc_attr($key); ?>"
7168 10238 class="ays-chart-option-series-point-size ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7169 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo $key; ?>]"
7170 - value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : $point_size; ?>"
7171 - 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); ?>">
7172 10242 </div>
7173 10243 </div> <!-- Point size -->
7174 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">
7175 10245 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7181,12 +10251,12 @@
7181 10251 </label>
7182 10252 </div>
7183 10253 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7184 10254 <select
7185 - id="ays-chart-option-series-point-shape-<?php echo $key; ?>"
10255 + id="ays-chart-option-series-point-shape-<?php echo esc_attr($key); ?>"
7186 10256 class="ays-chart-option-series-point-shape <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select"
7187 - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo $key; ?>]"
7188 - 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); ?>">
7189 10259 >
7190 10260 <?php
7191 10261 $value = isset($series_point_shape[$key]) ? esc_attr($series_point_shape[$key]) : $point_shape;
7192 10262 foreach ( $point_shape_options as $option_slug => $option ):
@@ -7209,11 +10279,16 @@
7209 10279 </div>
7210 10280 </div>
7211 10281 <br>
7212 10282 <blockquote>
7213 - <?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' )); ?>
7214 10284 <br>
7215 - <?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 + ); ?>
7216 10291 </blockquote>
7217 10292 </div>
7218 10293 <?php
7219 10294
@@ -7247,15 +10322,15 @@
7247 10322 if ( !isset( $source[0] ) ) {
7248 10323 if (count($source[1]) > 2) {
7249 10324 $titles = array();
7250 10325 for ($i = 0; $i < count($source[1]); $i++) {
7251 - array_push($titles, __("Title", $this->plugin_name).$i);
10326 + array_push($titles, __("Title", 'chart-builder').$i);
7252 10327 }
7253 10328 $source[0] = $titles;
7254 10329 } else {
7255 10330 $source[0] = array(
7256 - __("Country", $this->plugin_name),
7257 - __("Population", $this->plugin_name),
10331 + __("Country", 'chart-builder'),
10332 + __("Population", 'chart-builder'),
7258 10333 );
7259 10334 }
7260 10335
7261 10336 ksort($source);
@@ -7301,9 +10376,9 @@
7301 10376 <g>
7302 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" />
7303 10378 </g>
7304 10379 </svg>
7305 - <span><?php echo $val; ?></span>
10380 + <span><?php echo esc_html($val); ?></span>
7306 10381 </legend>
7307 10382 <div class="ays-rows-accordion-options-content ays-rows-accordion-options-content">
7308 10383 <div class="ays-rows-accordion-data-main-wrap">
7309 10384 <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap">
@@ -7314,13 +10389,13 @@
7314 10389 </label>
7315 10390 </div>
7316 10391 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7317 10392 <input type="color"
7318 - id="ays-chart-option-rows-color-<?php echo $key; ?>"
10393 + id="ays-chart-option-rows-color-<?php echo esc_attr($key); ?>"
7319 10394 class="ays-chart-option-rows-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker"
7320 - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo $key; ?>]"
7321 - value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : $series_color; ?>"
7322 - 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); ?>">
7323 10398 </div>
7324 10399 </div> <!-- color -->
7325 10400 <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section">
7326 10401 <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title">
@@ -7329,13 +10404,13 @@
7329 10404 </label>
7330 10405 </div>
7331 10406 <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right">
7332 10407 <input type="number"
7333 - id="ays-chart-option-rows-opacity-<?php echo $key; ?>"
10408 + id="ays-chart-option-rows-opacity-<?php echo esc_attr($key); ?>"
7334 10409 class="ays-chart-option-rows-opacity ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input"
7335 - 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); ?>]"
7336 10411 value="<?php echo isset($rows_opacity[$key]) && '' !== $rows_opacity[$key] ? esc_attr($rows_opacity[$key]) : 1.0; ?>"
7337 - data-rows-id="<?php echo $key; ?>"
10412 + data-rows-id="<?php echo esc_attr($key); ?>"
7338 10413 step=".1" min="0" max="1">
7339 10414 </div>
7340 10415 </div> <!-- opacity -->
7341 10416 </div>
@@ -7346,17 +10421,27 @@
7346 10421 endforeach;
7347 10422 ?>
7348 10423 <br>
7349 10424 <blockquote>
7350 - <?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' )); ?>
7351 10426 <br>
7352 - <?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 + ); ?>
7353 10433 </blockquote>
7354 10434 </div>
7355 10435 <div class="<?php echo esc_attr($html_class_prefix) ?>not-hidden-options-section <?php echo $enable_row_settings === 'checked' ? 'display_none' : ''; ?>">
7356 10436 <br>
7357 10437 <blockquote>
7358 - <?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 + ); ?>
7359 10444 </blockquote>
7360 10445 </div>
7361 10446 </div>
7362 10447 </div>
@@ -7371,5 +10456,60 @@
7371 10456 );
7372 10457
7373 10458 return $sources;
7374 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 +
7375 10515 }