| @@ -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" ), |
| @@ -204,9 +204,9 @@ | ||
| 204 | 204 | 'activated' => __( "Activated", "chart-builder" ), |
| 205 | 205 | 'errorMsg' => __( "Error", "chart-builder" ), |
| 206 | 206 | 'loadResource' => __( "Can't load resource.", "chart-builder" ), |
| 207 | 207 | 'somethingWentWrong' => __( "Maybe something went wrong.", "chart-builder" ), |
| 208 | - ) ); | |
| 208 | + ) ); | |
| 209 | 209 | |
| 210 | 210 | wp_localize_script( $this->plugin_name . '-localized', 'aysChartBuilderChartSettings', array( |
| 211 | 211 | 'types' => CBFunctions()->getAllowedTypes(), |
| 212 | 212 | 'max_selected_options' => 2, |
| @@ -224,8 +224,9 @@ | ||
| 224 | 224 | 'filter_get_data' => wp_create_nonce( 'cbuilder-fetch-post-type-data' ), |
| 225 | 225 | 'quiz_maker_get_data' => wp_create_nonce( 'cbuilder-fetch-quiz-maker-data' ), |
| 226 | 226 | 'quiz_maker_save_data' => wp_create_nonce( 'cbuilder-save-quiz-maker-data' ), |
| 227 | 227 | 'author_user_search' => wp_create_nonce( 'cbuilder-author-user-search' ), |
| 228 | + | |
| 228 | 229 | ), |
| 229 | 230 | 'actions' => array( |
| 230 | 231 | 'filter_get_props' => 'fetch_post_type_props', |
| 231 | 232 | 'filter_get_data' => 'fetch_post_type_data', |
| @@ -241,9 +242,9 @@ | ||
| 241 | 242 | |
| 242 | 243 | 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 | 244 | 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 | 245 | 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 ); | |
| 246 | + 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 | 247 | |
| 247 | 248 | if ( false !== strpos( $hook_suffix, 'settings' ) ) { |
| 248 | 249 | wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true ); |
| 249 | 250 | |
| @@ -248,20 +249,20 @@ | ||
| 248 | 249 | wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'js/chart-builder-admin-settings.js', array( 'jquery' ), $this->version, true ); |
| 249 | 250 | |
| 250 | 251 | wp_localize_script( $this->plugin_name . '-settings', 'aysChartBuilderAdminSettings', array( |
| 251 | 252 | '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), | |
| 253 | + 'selectUserRoles' => __( 'Select user roles', 'chart-builder' ), | |
| 254 | + 'delete' => __( 'Delete', 'chart-builder' ), | |
| 255 | + 'selectQuestionDefaultType' => __( 'Select question default type', 'chart-builder' ), | |
| 256 | + 'yes' => __( 'Yes', 'chart-builder' ), | |
| 257 | + 'cancel' => __( 'Cancel', 'chart-builder' ), | |
| 258 | + 'somethingWentWrong' => __( "Maybe something went wrong.", 'chart-builder' ), | |
| 259 | + 'failed' => __( 'Failed', 'chart-builder' ), | |
| 260 | + 'selectPage' => __( 'Select page', 'chart-builder' ), | |
| 261 | + 'selectPostType' => __( 'Select post type', 'chart-builder' ), | |
| 262 | + 'copied' => __( 'Copied!', 'chart-builder'), | |
| 263 | + 'clickForCopy' => __( 'Click to copy', 'chart-builder'), | |
| 264 | + 'selectForm' => __( 'Select form', 'chart-builder'), | |
| 264 | 265 | ) ); |
| 265 | 266 | } |
| 266 | 267 | } |
| 267 | 268 | |
| @@ -277,8 +278,38 @@ | ||
| 277 | 278 | wp_deregister_script('mwai-vendor'); |
| 278 | 279 | wp_dequeue_script('mwai'); |
| 279 | 280 | wp_dequeue_script('mwai-vendor'); |
| 280 | 281 | } |
| 282 | + | |
| 283 | + if (is_plugin_active('html5-video-player/html5-video-player.php')) { | |
| 284 | + wp_dequeue_style('h5vp-admin'); | |
| 285 | + wp_dequeue_style('fs_common'); | |
| 286 | + } | |
| 287 | + | |
| 288 | + if (is_plugin_active('panorama/panorama.php')) { | |
| 289 | + wp_dequeue_style('bppiv_admin_custom_css'); | |
| 290 | + wp_dequeue_style('bppiv-custom-style'); | |
| 291 | + } | |
| 292 | + | |
| 293 | + if (is_plugin_active('wp-social/wp-social.php')) { | |
| 294 | + wp_dequeue_style('wp_social_select2_css'); | |
| 295 | + wp_deregister_script('wp_social_select2_js'); | |
| 296 | + wp_dequeue_script('wp_social_select2_js'); | |
| 297 | + } | |
| 298 | + | |
| 299 | + if (is_plugin_active('real-media-library-lite/index.php')) { | |
| 300 | + wp_dequeue_style('real-media-library-lite-rml'); | |
| 301 | + } | |
| 302 | + | |
| 303 | + // Theme | Phlox 2.17.6 | |
| 304 | + wp_dequeue_style('auxin-admin-style'); | |
| 305 | + | |
| 306 | + // Theme | Pixel Ebook Store | |
| 307 | + wp_dequeue_style('pixel-ebook-store-free-demo-content-style'); | |
| 308 | + | |
| 309 | + // Theme | Interactive Education | |
| 310 | + wp_dequeue_style('interactive-education-free-demo-content-style'); | |
| 311 | + | |
| 281 | 312 | } |
| 282 | 313 | } |
| 283 | 314 | |
| 284 | 315 | /** |
| @@ -314,10 +345,10 @@ | ||
| 314 | 345 | |
| 315 | 346 | public function add_plugin_charts_submenu(){ |
| 316 | 347 | $hook_page_view = add_submenu_page( |
| 317 | 348 | $this->plugin_name, |
| 318 | - __('All Charts', $this->plugin_name), | |
| 319 | - __('All Charts', $this->plugin_name), | |
| 349 | + __('All Charts', 'chart-builder'), | |
| 350 | + __('All Charts', 'chart-builder'), | |
| 320 | 351 | 'manage_options', |
| 321 | 352 | $this->plugin_name, |
| 322 | 353 | array($this, 'display_plugin_charts_page') |
| 323 | 354 | ); |
| @@ -327,10 +358,10 @@ | ||
| 327 | 358 | |
| 328 | 359 | public function add_plugin_add_new_submenu(){ |
| 329 | 360 | $hook_charts = add_submenu_page( |
| 330 | 361 | $this->plugin_name, |
| 331 | - __('Add New', $this->plugin_name), | |
| 332 | - __('Add New', $this->plugin_name), | |
| 362 | + __('Add New', 'chart-builder'), | |
| 363 | + __('Add New', 'chart-builder'), | |
| 333 | 364 | 'manage_options', |
| 334 | 365 | $this->plugin_name."&action=add", |
| 335 | 366 | array($this, 'display_plugin_addnew_page') |
| 336 | 367 | ); |
| @@ -339,10 +370,10 @@ | ||
| 339 | 370 | |
| 340 | 371 | public function add_plugin_dashboard_submenu(){ |
| 341 | 372 | $hook_charts = add_submenu_page( |
| 342 | 373 | $this->plugin_name, |
| 343 | - __('How to use', $this->plugin_name), | |
| 344 | - __('How to use', $this->plugin_name), | |
| 374 | + __('How to use', 'chart-builder'), | |
| 375 | + __('How to use', 'chart-builder'), | |
| 345 | 376 | 'manage_options', |
| 346 | 377 | $this->plugin_name . '-dashboard', |
| 347 | 378 | array($this, 'display_plugin_setup_page') |
| 348 | 379 | ); |
| @@ -350,10 +381,10 @@ | ||
| 350 | 381 | } |
| 351 | 382 | |
| 352 | 383 | public function add_plugin_general_settings_submenu(){ |
| 353 | 384 | $hook_settings = add_submenu_page( $this->plugin_name, |
| 354 | - __('General Settings', $this->plugin_name), | |
| 355 | - __('General Settings', $this->plugin_name), | |
| 385 | + __('General Settings', 'chart-builder'), | |
| 386 | + __('General Settings', 'chart-builder'), | |
| 356 | 387 | 'manage_options', |
| 357 | 388 | $this->plugin_name . '-settings', |
| 358 | 389 | array($this, 'display_plugin_settings_page') |
| 359 | 390 | ); |
| @@ -361,10 +392,10 @@ | ||
| 361 | 392 | } |
| 362 | 393 | |
| 363 | 394 | public function add_plugin_featured_plugins_submenu(){ |
| 364 | 395 | $hook_our_products = add_submenu_page( $this->plugin_name, |
| 365 | - __('Our products', $this->plugin_name), | |
| 366 | - __('Our products', $this->plugin_name), | |
| 396 | + __('Our products', 'chart-builder'), | |
| 397 | + __('Our products', 'chart-builder'), | |
| 367 | 398 | 'manage_options', |
| 368 | 399 | $this->plugin_name . '-featured-plugins', |
| 369 | 400 | array($this, 'display_plugin_featured_plugins_page') |
| 370 | 401 | ); |
| @@ -374,10 +405,10 @@ | ||
| 374 | 405 | |
| 375 | 406 | public function add_plugin_chart_features_submenu(){ |
| 376 | 407 | $hook_pro_features = add_submenu_page( |
| 377 | 408 | $this->plugin_name, |
| 378 | - __('PRO Features', $this->plugin_name), | |
| 379 | - __('PRO Features', $this->plugin_name), | |
| 409 | + __('PRO Features', 'chart-builder'), | |
| 410 | + __('PRO Features', 'chart-builder'), | |
| 380 | 411 | 'manage_options', |
| 381 | 412 | $this->plugin_name . '-chart-features', |
| 382 | 413 | array($this, 'display_plugin_chart_features_page') |
| 383 | 414 | ); |
| @@ -392,8 +423,9 @@ | ||
| 392 | 423 | 'default' => 5, |
| 393 | 424 | 'option' => 'cb_charts_per_page' |
| 394 | 425 | ); |
| 395 | 426 | |
| 427 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 396 | 428 | if( ! ( isset( $_GET['action'] ) && ( $_GET['action'] == 'add' || $_GET['action'] == 'edit' ) ) ){ |
| 397 | 429 | add_screen_option( $option, $args ); |
| 398 | 430 | } |
| 399 | 431 | |
| @@ -411,17 +443,28 @@ | ||
| 411 | 443 | return; |
| 412 | 444 | } |
| 413 | 445 | } |
| 414 | 446 | |
| 447 | + private function check_permissions_and_nonce($nonce_action) { | |
| 448 | + if (!is_user_logged_in() || !current_user_can('manage_options')) { | |
| 449 | + wp_die(__('Access denied.', 'chart-builder')); | |
| 450 | + } | |
| 451 | + | |
| 452 | + if (!isset($_GET['_wpnonce']) || !wp_verify_nonce($_GET['_wpnonce'], $this->plugin_name . '-' . $nonce_action)) { | |
| 453 | + wp_die(__('Security check failed. Invalid or missing nonce.', 'chart-builder')); | |
| 454 | + } | |
| 455 | + } | |
| 415 | 456 | public function display_plugin_charts_page(){ |
| 416 | 457 | global $ays_chart_db_actions; |
| 417 | 458 | |
| 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'])) { | |
| 459 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 460 | + $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; | |
| 461 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 462 | + $id = (isset($_GET['id'])) ? absint( wp_unslash( $_GET['id'] ) ) : 0; | |
| 463 | + if (isset($_POST['bulk_delete_confirm'])) { | |
| 422 | 464 | if (isset($_POST['bulk-delete']) && !empty($_POST['bulk-delete'])) { |
| 423 | - $ids = $_POST['bulk-delete']; | |
| 465 | + $ids = wp_unslash( $_POST['bulk-delete'] ); | |
| 466 | + $ids = array_map( 'absint', (array) $ids ); | |
| 424 | 467 | foreach ($ids as $id) { |
| 425 | 468 | if ($id > 0) { |
| 426 | 469 | $this->db_obj->delete_item( $id ); |
| 427 | 470 | } |
| @@ -436,9 +479,10 @@ | ||
| 436 | 479 | } |
| 437 | 480 | |
| 438 | 481 | switch ($action) { |
| 439 | 482 | case 'trash': |
| 440 | - if( $id > 0 ){ | |
| 483 | + $this->check_permissions_and_nonce('trash-item'); | |
| 484 | + if ($id > 0){ | |
| 441 | 485 | $this->db_obj->trash_item( $id ); |
| 442 | 486 | $url = remove_query_arg( array('action', 'id', '_wpnonce') ); |
| 443 | 487 | $url = esc_url_raw( add_query_arg( array( |
| 444 | 488 | "status" => 'trashed' |
| @@ -447,9 +491,10 @@ | ||
| 447 | 491 | exit; |
| 448 | 492 | } |
| 449 | 493 | break; |
| 450 | 494 | case 'restore': |
| 451 | - if( $id > 0 ){ | |
| 495 | + $this->check_permissions_and_nonce('delete-item'); | |
| 496 | + if ($id > 0 ) { | |
| 452 | 497 | $this->db_obj->restore_item( $id ); |
| 453 | 498 | $url = remove_query_arg( array('action', 'id', '_wpnonce') ); |
| 454 | 499 | $url = esc_url_raw( add_query_arg( array( |
| 455 | 500 | "status" => 'restored' |
| @@ -458,9 +503,10 @@ | ||
| 458 | 503 | exit; |
| 459 | 504 | } |
| 460 | 505 | break; |
| 461 | 506 | case 'delete': |
| 462 | - if( $id > 0 ){ | |
| 507 | + $this->check_permissions_and_nonce('delete-item'); | |
| 508 | + if ($id > 0) { | |
| 463 | 509 | $this->db_obj->delete_item( $id ); |
| 464 | 510 | $url = remove_query_arg( array('action', 'id', '_wpnonce') ); |
| 465 | 511 | $url = esc_url_raw( add_query_arg( array( |
| 466 | 512 | "status" => 'deleted' |
| @@ -469,9 +515,10 @@ | ||
| 469 | 515 | exit; |
| 470 | 516 | } |
| 471 | 517 | break; |
| 472 | 518 | case 'publish': |
| 473 | - if( $id > 0 ){ | |
| 519 | + $this->check_permissions_and_nonce('publish-item'); | |
| 520 | + if ($id > 0) { | |
| 474 | 521 | $this->db_obj->publish_item( $id ); |
| 475 | 522 | $url = remove_query_arg( array('action', 'id', '_wpnonce') ); |
| 476 | 523 | $url = esc_url_raw( add_query_arg( array( |
| 477 | 524 | "status" => 'published' |
| @@ -480,9 +527,10 @@ | ||
| 480 | 527 | exit; |
| 481 | 528 | } |
| 482 | 529 | break; |
| 483 | 530 | case 'unpublish': |
| 484 | - if( $id > 0 ){ | |
| 531 | + $this->check_permissions_and_nonce('unpublish-item'); | |
| 532 | + if ($id > 0) { | |
| 485 | 533 | $this->db_obj->restore_item( $id ); |
| 486 | 534 | $url = remove_query_arg( array('action', 'id', '_wpnonce') ); |
| 487 | 535 | $url = esc_url_raw( add_query_arg( array( |
| 488 | 536 | "status" => 'unpublished' |
| @@ -491,9 +539,10 @@ | ||
| 491 | 539 | exit; |
| 492 | 540 | } |
| 493 | 541 | break; |
| 494 | 542 | case 'duplicate': |
| 495 | - if( $id > 0 ){ | |
| 543 | + $this->check_permissions_and_nonce('duplicate-item'); | |
| 544 | + if ($id > 0) { | |
| 496 | 545 | $this->db_obj->duplicate_item( $id ); |
| 497 | 546 | $url = remove_query_arg( array('action', 'id', '_wpnonce') ); |
| 498 | 547 | $url = esc_url_raw( add_query_arg( array( |
| 499 | 548 | "status" => 'duplicated' |
| @@ -511,9 +560,66 @@ | ||
| 511 | 560 | default: |
| 512 | 561 | include_once('partials/charts/chart-builder-charts-display.php'); |
| 513 | 562 | } |
| 514 | 563 | } |
| 564 | + public static function chart_builder_svg_sanitize_allowed_properties(){ | |
| 515 | 565 | |
| 566 | + $allowed_properties = array( | |
| 567 | + 'div' => array( | |
| 568 | + 'id' => true, | |
| 569 | + 'class' => true, | |
| 570 | + 'style' => true, | |
| 571 | + ), | |
| 572 | + 'svg' => array( | |
| 573 | + 'class' => true, | |
| 574 | + 'version' => true, | |
| 575 | + 'overflow' => true, | |
| 576 | + 'preserveAspectRatio' => true, | |
| 577 | + 'preserveaspectratio' => true, | |
| 578 | + 'fill' => true, | |
| 579 | + 'viewBox' => true, | |
| 580 | + 'viewbox' => true, | |
| 581 | + 'height' => true, | |
| 582 | + 'width' => true, | |
| 583 | + 'xmlns' => true, | |
| 584 | + 'xmlns:xlink' => true, | |
| 585 | + 'id' => true, | |
| 586 | + 'title' => true, | |
| 587 | + ), | |
| 588 | + 'g' => array( | |
| 589 | + 'id' => true, | |
| 590 | + 'class' => true, | |
| 591 | + 'stroke-width' => true, | |
| 592 | + 'stroke-linecap' => true, | |
| 593 | + 'stroke-linejoin' => true, | |
| 594 | + ), | |
| 595 | + 'path' => array( | |
| 596 | + 'id' => true, | |
| 597 | + 'class' => true, | |
| 598 | + 'd' => true, | |
| 599 | + 'fill' => true, | |
| 600 | + 'vector-effect' => true, | |
| 601 | + 'xmlns:default' => true, | |
| 602 | + ), | |
| 603 | + 'span' => array( | |
| 604 | + 'class' => true, | |
| 605 | + ), | |
| 606 | + 'img' => array( | |
| 607 | + 'src' => true, | |
| 608 | + 'alt' => true, | |
| 609 | + ), | |
| 610 | + ); | |
| 611 | + | |
| 612 | + return $allowed_properties; | |
| 613 | + } | |
| 614 | + | |
| 615 | + public static function get_allowed_tags_for_loader() { | |
| 616 | + return array( | |
| 617 | + 'span' => array('class' => array()), | |
| 618 | + 'img' => array('src' => array(), 'alt' => array()), | |
| 619 | + ); | |
| 620 | + } | |
| 621 | + | |
| 516 | 622 | public function display_plugin_setup_page(){ |
| 517 | 623 | include_once('partials/chart-builder-admin-display.php'); |
| 518 | 624 | } |
| 519 | 625 | |
| @@ -571,11 +677,11 @@ | ||
| 571 | 677 | |
| 572 | 678 | $response = array( |
| 573 | 679 | "status" => false |
| 574 | 680 | ); |
| 681 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 682 | + $function = isset( $_REQUEST['function'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['function'] ) ) : null; | |
| 575 | 683 | |
| 576 | - $function = isset($_REQUEST['function']) ? sanitize_text_field( $_REQUEST['function'] ) : null; | |
| 577 | - | |
| 578 | 684 | if($function !== null){ |
| 579 | 685 | $response = array(); |
| 580 | 686 | if( is_callable( array( $this, $function ) ) ){ |
| 581 | 687 | $response = $this->$function(); |
| @@ -595,10 +701,14 @@ | ||
| 595 | 701 | } |
| 596 | 702 | |
| 597 | 703 | public function deactivate_plugin_option(){ |
| 598 | 704 | // Run a security check. |
| 599 | - check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) ); | |
| 600 | - | |
| 705 | + if ( isset( $_REQUEST['_ajax_nonce'] ) ) { | |
| 706 | + check_ajax_referer( 'chart-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) ); | |
| 707 | + } else { | |
| 708 | + wp_die(); | |
| 709 | + } | |
| 710 | + | |
| 601 | 711 | // Check for permissions. |
| 602 | 712 | if ( ! current_user_can( 'manage_options' ) ) { |
| 603 | 713 | ob_end_clean(); |
| 604 | 714 | $ob_get_clean = ob_get_clean(); |
| @@ -608,9 +718,9 @@ | ||
| 608 | 718 | wp_die(); |
| 609 | 719 | } |
| 610 | 720 | |
| 611 | 721 | if( is_user_logged_in() ) { |
| 612 | - $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( $_REQUEST['upgrade_plugin'] ) : ''; | |
| 722 | + $request_value = isset( $_REQUEST['upgrade_plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['upgrade_plugin'] ) ) : ''; | |
| 613 | 723 | $upgrade_option = get_option( 'ays_chart_builder_upgrade_plugin', '' ); |
| 614 | 724 | |
| 615 | 725 | if ( $upgrade_option === '' ) { |
| 616 | 726 | add_option( 'ays_chart_builder_upgrade_plugin', $request_value ); |
| @@ -633,17 +743,17 @@ | ||
| 633 | 743 | } |
| 634 | 744 | } |
| 635 | 745 | |
| 636 | 746 | public function chart_builder_admin_footer($a){ |
| 637 | - if(isset($_REQUEST['page'])){ | |
| 638 | - if(false !== strpos( sanitize_text_field( $_REQUEST['page'] ), $this->plugin_name)){ | |
| 747 | + if(isset($_REQUEST['page'])){// phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 748 | + if(false !== strpos( sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ), $this->plugin_name)){// phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 639 | 749 | ?> |
| 640 | 750 | <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> | |
| 751 | + <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 | 752 | <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> | |
| 753 | + <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 | 754 | <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> | |
| 755 | + <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 | 756 | </div> |
| 647 | 757 | <p style="font-size:13px;text-align:center;font-style:italic;"> |
| 648 | 758 | <span style="margin-left:0px;margin-right:10px;" class="ays_heart_beat"><i class="ays_fa ays_fa_heart_o animated"></i></span> |
| 649 | 759 | <span><?php echo esc_html(__( "If you love our plugin, please do big favor and rate us on", "chart-builder")); ?></span> |
| @@ -683,11 +793,12 @@ | ||
| 683 | 793 | } |
| 684 | 794 | } |
| 685 | 795 | |
| 686 | 796 | 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'] ) ); | |
| 797 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 798 | + $nonce = isset( $_POST['nonce'] ) ? wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'cbuilder-fetch-post-type-props' ) : ''; | |
| 799 | + if ( $nonce ) {// phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 800 | + $results = isset($_POST['post_type']) ? CBFunctions()->get_post_type_properties( sanitize_text_field( wp_unslash($_POST['post_type']) ) ) : ''; | |
| 690 | 801 | |
| 691 | 802 | return array( |
| 692 | 803 | 'success' => true, |
| 693 | 804 | 'fields' => $results, |
| @@ -753,12 +864,13 @@ | ||
| 753 | 864 | } |
| 754 | 865 | |
| 755 | 866 | $ays_chart_builder_flag = intval(get_option('ays_chart_sale_btn')); |
| 756 | 867 | if( $ays_chart_builder_flag == 0 ){ |
| 757 | - if (isset($_GET['page']) && strpos($_GET['page'], CHART_BUILDER_NAME) !== false) { | |
| 868 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 869 | + if ( isset( $_GET['page'] ) && strpos( sanitize_text_field( wp_unslash( $_GET['page'] ) ), CHART_BUILDER_NAME ) !== false ) { | |
| 758 | 870 | if( !(Chart_Builder_Admin::get_max_id('charts') <= 1) ){ |
| 759 | 871 | // $this->ays_chart_sale_message_30_emma($ays_chart_builder_flag); |
| 760 | - $this->ays_chart_sale_message20($ays_chart_builder_flag); | |
| 872 | + $this->ays_chart_new_silver_bundle_message_2025($ays_chart_builder_flag); | |
| 761 | 873 | // $this->ays_chart_helloween_message($ays_chart_builder_flag); |
| 762 | 874 | // $this->ays_chart_christmas_message($ays_chart_builder_flag); |
| 763 | 875 | // $this->ays_chart_silver_bundle_message($ays_chart_builder_flag); |
| 764 | 876 | // $this->ays_chart_black_friday_message_2024($ays_chart_builder_flag); |
| @@ -774,9 +886,9 @@ | ||
| 774 | 886 | 'status' => false, |
| 775 | 887 | ); |
| 776 | 888 | |
| 777 | 889 | 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' )){ | |
| 890 | + 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 | 891 | update_option('ays_chart_sale_btn', 1); |
| 780 | 892 | update_option('ays_chart_sale_date', current_time( 'mysql' )); |
| 781 | 893 | $data['status'] = true; |
| 782 | 894 | } |
| @@ -806,9 +918,9 @@ | ||
| 806 | 918 | </div>'; |
| 807 | 919 | $content[] = '</div>'; |
| 808 | 920 | |
| 809 | 921 | $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">'; | |
| 922 | + $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 | 923 | $content[] = '<span style="padding-left: 4px; font-size: 14px; font-weight: 600;"> 30 Day Money Back Guarantee</span>'; |
| 812 | 924 | |
| 813 | 925 | $content[] = '</div>'; |
| 814 | 926 | |
| @@ -868,9 +980,10 @@ | ||
| 868 | 980 | $content[] = '</div>'; |
| 869 | 981 | $content[] = '</div>'; |
| 870 | 982 | |
| 871 | 983 | $content = implode( '', $content ); |
| 872 | - echo html_entity_decode(esc_html( $content )); | |
| 984 | + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) ); | |
| 985 | + | |
| 873 | 986 | } |
| 874 | 987 | } |
| 875 | 988 | |
| 876 | 989 | // Self 20% sale |
| @@ -885,18 +998,26 @@ | ||
| 885 | 998 | $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">'; |
| 886 | 999 | |
| 887 | 1000 | $content[] = '<div class="ays-chart-dicount-sale-name-discount-box">'; |
| 888 | 1001 | $content[] = '<span class="ays-chart-new-chart-pro-title">'; |
| 889 | - $content[] = __( "<span><a href='https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-plugin-name".CHART_BUILDER_VERSION."' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>", CHART_BUILDER_NAME ); | |
| 1002 | + // Translators: %s is the URL to the Chart Builder plugin page. | |
| 1003 | + $content[] = sprintf( | |
| 1004 | + /* translators: %s is the Chart Builder plugin URL. */ | |
| 1005 | + __( | |
| 1006 | + "<span><a href='%s' target='_blank' style='color:#ffffff; text-decoration: underline;'>Chart Builder</a></span>", | |
| 1007 | + 'chart-builder' | |
| 1008 | + ), | |
| 1009 | + "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 | |
| 1010 | + ); | |
| 890 | 1011 | $content[] = '</span>'; |
| 891 | 1012 | $content[] = '<div>'; |
| 892 | - $content[] = '<img src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-sale-30.svg" style="width: 70px;">'; | |
| 1013 | + $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 | 1014 | $content[] = '</div>'; |
| 894 | 1015 | $content[] = '</div>'; |
| 895 | 1016 | |
| 896 | 1017 | $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 ); | |
| 1018 | + $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 | |
| 1019 | + $content[] = esc_html__( "30 Days Money Back Guarantee", 'chart-builder' ); | |
| 899 | 1020 | $content[] = '</span>'; |
| 900 | 1021 | |
| 901 | 1022 | $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-chart">'; |
| 902 | 1023 | $content[] = '<form method="POST">'; |
| @@ -915,15 +1036,15 @@ | ||
| 915 | 1036 | |
| 916 | 1037 | $content[] = '<div id="ays-chart-countdown-main-container">'; |
| 917 | 1038 | $content[] = '<div class="ays-chart-countdown-container">'; |
| 918 | 1039 | $content[] = '<div id="ays-chart-countdown" style="display: block;">'; |
| 919 | - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME ); | |
| 1040 | + $content[] = esc_html__( "Offer ends in:", 'chart-builder' ); | |
| 920 | 1041 | |
| 921 | 1042 | $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>'; | |
| 1043 | + $content[] = '<li><span id="ays-chart-countdown-days">0</span>' . esc_html__( 'Days', 'chart-builder' ) . '</li>'; | |
| 1044 | + $content[] = '<li><span id="ays-chart-countdown-hours">0</span>' . esc_html__( 'Hours', 'chart-builder' ) . '</li>'; | |
| 1045 | + $content[] = '<li><span id="ays-chart-countdown-minutes">0</span>' . esc_html__( 'Minutes', 'chart-builder' ) . '</li>'; | |
| 1046 | + $content[] = '<li><span id="ays-chart-countdown-seconds">0</span>' . esc_html__( 'Seconds', 'chart-builder' ) . '</li>'; | |
| 926 | 1047 | $content[] = '</ul>'; |
| 927 | 1048 | $content[] = '</div>'; |
| 928 | 1049 | |
| 929 | 1050 | $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">'; |
| @@ -937,11 +1058,11 @@ | ||
| 937 | 1058 | |
| 938 | 1059 | $content[] = '</div>'; |
| 939 | 1060 | |
| 940 | 1061 | $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">'; |
| 941 | - $content[] = '<a href="https://ays-pro.com/wordpress/chart-builder?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=chart-sale-button'.CHART_BUILDER_VERSION.'" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank" style="" >' . __( 'Buy Now', CHART_BUILDER_NAME ) . '</a>'; | |
| 1062 | + $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 | 1063 | $content[] = '<span class="ays-chart-dicount-one-time-text">'; |
| 943 | - $content[] = __( "One-time payment", CHART_BUILDER_NAME ); | |
| 1064 | + $content[] = esc_html__( "One-time payment", 'chart-builder' ); | |
| 944 | 1065 | $content[] = '</span>'; |
| 945 | 1066 | $content[] = '</div>'; |
| 946 | 1067 | |
| 947 | 1068 | $content[] = '</div>'; |
| @@ -948,9 +1069,9 @@ | ||
| 948 | 1069 | |
| 949 | 1070 | $content[] = '</div>'; |
| 950 | 1071 | |
| 951 | 1072 | $content = implode( '', $content ); |
| 952 | - echo $content; | |
| 1073 | + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) ); | |
| 953 | 1074 | } |
| 954 | 1075 | } |
| 955 | 1076 | |
| 956 | 1077 | // Helloween banner |
| @@ -972,15 +1093,15 @@ | ||
| 972 | 1093 | <span style='' class='ays-chart-helloween-bundle'> |
| 973 | 1094 | <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 | 1095 | Chart Builder |
| 975 | 1096 | </a> |
| 976 | - </span>", CHART_BUILDER_NAME ); | |
| 1097 | + </span>", 'chart-builder' ); | |
| 977 | 1098 | $content[] = '</p>'; |
| 978 | 1099 | $content[] = '<p>'; |
| 979 | 1100 | $content[] = __( "Hurry up! |
| 980 | 1101 | <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 | 1102 | Check it out! |
| 982 | - </a>", CHART_BUILDER_NAME ); | |
| 1103 | + </a>", 'chart-builder' ); | |
| 983 | 1104 | $content[] = '</p>'; |
| 984 | 1105 | |
| 985 | 1106 | $content[] = '</div>'; |
| 986 | 1107 | |
| @@ -1010,9 +1131,9 @@ | ||
| 1010 | 1131 | $content[] = '</div>'; |
| 1011 | 1132 | |
| 1012 | 1133 | $content[] = '</div>'; |
| 1013 | 1134 | $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>'; | |
| 1135 | + $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 | 1136 | $content[] = '</div>'; |
| 1016 | 1137 | $content[] = '</div>'; |
| 1017 | 1138 | |
| 1018 | 1139 | $content[] = '</div>'; |
| @@ -1033,9 +1154,9 @@ | ||
| 1033 | 1154 | $content[] = '</div>'; |
| 1034 | 1155 | |
| 1035 | 1156 | $content = implode( '', $content ); |
| 1036 | 1157 | |
| 1037 | - echo $content; | |
| 1158 | + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) ); | |
| 1038 | 1159 | } |
| 1039 | 1160 | } |
| 1040 | 1161 | |
| 1041 | 1162 | // Black Friday banner |
| @@ -1095,9 +1216,9 @@ | ||
| 1095 | 1216 | $content[] = '</div>'; |
| 1096 | 1217 | |
| 1097 | 1218 | $content = implode( '', $content ); |
| 1098 | 1219 | |
| 1099 | - echo $content; | |
| 1220 | + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) ); | |
| 1100 | 1221 | } |
| 1101 | 1222 | } |
| 1102 | 1223 | |
| 1103 | 1224 | // Christmas banner |
| @@ -1108,10 +1229,10 @@ | ||
| 1108 | 1229 | $content[] = '<div id="ays-chart-dicount-christmas-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">'; |
| 1109 | 1230 | $content[] = '<div id="ays-chart-dicount-christmas-month" class="ays_chart_dicount_month">'; |
| 1110 | 1231 | $content[] = '<div class="ays-chart-dicount-christmas-box">'; |
| 1111 | 1232 | $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>'; | |
| 1233 | + $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>'; | |
| 1234 | + $content[] = '<div class="ays-chart-dicount-christmas-title-row">' . __( 'Chart Builder Plugin', 'chart-builder' ) . '</div>'; | |
| 1114 | 1235 | $content[] = '</div>'; |
| 1115 | 1236 | |
| 1116 | 1237 | $content[] = '<div class="ays-chart-dicount-christmas-wrap-box" style="width: 25%;">'; |
| 1117 | 1238 | $content[] = '<div id="ays-chart-countdown-main-container">'; |
| @@ -1117,12 +1238,12 @@ | ||
| 1117 | 1238 | $content[] = '<div id="ays-chart-countdown-main-container">'; |
| 1118 | 1239 | $content[] = '<div class="ays-chart-countdown-container">'; |
| 1119 | 1240 | $content[] = '<div id="ays-chart-countdown" style="display: block;">'; |
| 1120 | 1241 | $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>'; | |
| 1242 | + $content[] = '<li><span id="ays-chart-countdown-days"></span>' . __( 'Days', 'chart-builder' ) . '</li>'; | |
| 1243 | + $content[] = '<li><span id="ays-chart-countdown-hours"></span>' . __( 'Hours', 'chart-builder' ) . '</li>'; | |
| 1244 | + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>' . __( 'Minutes', 'chart-builder' ) . '</li>'; | |
| 1245 | + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>' . __( 'Seconds', 'chart-builder' ) . '</li>'; | |
| 1125 | 1246 | $content[] = '</ul>'; |
| 1126 | 1247 | $content[] = '</div>'; |
| 1127 | 1248 | $content[] = '<div id="ays-chart-countdown-content" class="emoji" style="display: none;">'; |
| 1128 | 1249 | $content[] = '<span>🚀</span>'; |
| @@ -1134,9 +1255,9 @@ | ||
| 1134 | 1255 | $content[] = '</div>'; |
| 1135 | 1256 | $content[] = '</div>'; |
| 1136 | 1257 | |
| 1137 | 1258 | $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>'; | |
| 1259 | + $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 | 1260 | $content[] = '</div>'; |
| 1140 | 1261 | $content[] = '</div>'; |
| 1141 | 1262 | $content[] = '</div>'; |
| 1142 | 1263 | |
| @@ -1142,9 +1263,9 @@ | ||
| 1142 | 1263 | |
| 1143 | 1264 | $content[] = '<div style="position: absolute;right: 0;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form-christmas">'; |
| 1144 | 1265 | $content[] = '<form method="POST">'; |
| 1145 | 1266 | $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>'; | |
| 1267 | + $content[] = '<button class="btn btn-link ays-button-christmas" name="ays_chart_sale_btn" style="">' . __( 'Dismiss ad', 'chart-builder' ) . '</button>'; | |
| 1147 | 1268 | $content[] = '</div>'; |
| 1148 | 1269 | $content[] = '</form>'; |
| 1149 | 1270 | $content[] = '</div>'; |
| 1150 | 1271 | $content[] = '</div>'; |
| @@ -1150,9 +1271,9 @@ | ||
| 1150 | 1271 | $content[] = '</div>'; |
| 1151 | 1272 | |
| 1152 | 1273 | $content = implode( '', $content ); |
| 1153 | 1274 | |
| 1154 | - echo $content; | |
| 1275 | + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) ); | |
| 1155 | 1276 | } |
| 1156 | 1277 | } |
| 1157 | 1278 | |
| 1158 | 1279 | // Silver Bundle |
| @@ -1161,20 +1282,20 @@ | ||
| 1161 | 1282 | $content = array(); |
| 1162 | 1283 | |
| 1163 | 1284 | $content[] = '<div id="ays-chart-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">'; |
| 1164 | 1285 | $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>'; | |
| 1286 | + $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 | 1287 | |
| 1167 | 1288 | $content[] = '<div class="ays-chart-dicount-wrap-box">'; |
| 1168 | 1289 | |
| 1169 | 1290 | $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 ); | |
| 1291 | + $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 | 1292 | $content[] = '</strong>'; |
| 1172 | 1293 | |
| 1173 | 1294 | $content[] = '<br>'; |
| 1174 | 1295 | |
| 1175 | 1296 | $content[] = '<strong>'; |
| 1176 | - $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", CHART_BUILDER_NAME ); | |
| 1297 | + $content[] = __( "Hurry up! <a href='https://ays-pro.com/silver-bundle' target='_blank'>Check it out!</a>", 'chart-builder' ); | |
| 1177 | 1298 | $content[] = '</strong>'; |
| 1178 | 1299 | |
| 1179 | 1300 | $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">'; |
| 1180 | 1301 | |
| @@ -1213,14 +1334,14 @@ | ||
| 1213 | 1334 | $content[] = '</div>'; |
| 1214 | 1335 | |
| 1215 | 1336 | $content[] = '</div>'; |
| 1216 | 1337 | |
| 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>'; | |
| 1338 | + $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 | 1339 | $content[] = '</div>'; |
| 1219 | 1340 | $content[] = '</div>'; |
| 1220 | 1341 | |
| 1221 | 1342 | $content = implode( '', $content ); |
| 1222 | - echo $content; | |
| 1343 | + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) ); | |
| 1223 | 1344 | } |
| 1224 | 1345 | } |
| 1225 | 1346 | |
| 1226 | 1347 | // Black Friday 2024 |
| @@ -1238,16 +1359,16 @@ | ||
| 1238 | 1359 | |
| 1239 | 1360 | $content[] = '<div id="ays-chart-countdown">'; |
| 1240 | 1361 | |
| 1241 | 1362 | $content[] = '<div>'; |
| 1242 | - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME ); | |
| 1363 | + $content[] = __( "Offer ends in:", 'chart-builder' ); | |
| 1243 | 1364 | $content[] = '</div>'; |
| 1244 | 1365 | |
| 1245 | 1366 | $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>'; | |
| 1367 | + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>'; | |
| 1368 | + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>'; | |
| 1369 | + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>'; | |
| 1370 | + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>'; | |
| 1250 | 1371 | $content[] = '</ul>'; |
| 1251 | 1372 | $content[] = '</div>'; |
| 1252 | 1373 | |
| 1253 | 1374 | $content[] = '<div id="ays-chart-countdown-content" class="emoji">'; |
| @@ -1265,9 +1386,9 @@ | ||
| 1265 | 1386 | $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">'; |
| 1266 | 1387 | $content[] = '<div>'; |
| 1267 | 1388 | |
| 1268 | 1389 | $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 ); | |
| 1390 | + $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' ); | |
| 1270 | 1391 | $content[] = '</span>'; |
| 1271 | 1392 | |
| 1272 | 1393 | $content[] = '</br>'; |
| 1273 | 1394 | |
| @@ -1272,9 +1393,9 @@ | ||
| 1272 | 1393 | $content[] = '</br>'; |
| 1273 | 1394 | |
| 1274 | 1395 | $content[] = '<span class="ays-chart-black-friday-bundle-desc">'; |
| 1275 | 1396 | $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 ); | |
| 1397 | + $content[] = __( "50% OFF", 'chart-builder' ); | |
| 1277 | 1398 | $content[] = '</a>'; |
| 1278 | 1399 | $content[] = '</span>'; |
| 1279 | 1400 | $content[] = '</div>'; |
| 1280 | 1401 | |
| @@ -1282,9 +1403,9 @@ | ||
| 1282 | 1403 | |
| 1283 | 1404 | $content[] = '<form action="" method="POST">'; |
| 1284 | 1405 | $content[] = '<div id="ays-chart-dismiss-buttons-content">'; |
| 1285 | 1406 | 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>'; | |
| 1407 | + $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 | 1408 | $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' ); |
| 1288 | 1409 | } |
| 1289 | 1410 | $content[] = '</div>'; |
| 1290 | 1411 | $content[] = '</form>'; |
| @@ -1295,17 +1416,17 @@ | ||
| 1295 | 1416 | |
| 1296 | 1417 | $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">'; |
| 1297 | 1418 | $content[] = '<span class="ays-chart-black-friday-bundle-title">'; |
| 1298 | 1419 | $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" ); | |
| 1420 | + $content[] = __( 'Silver Bundle', 'chart-builder' ); | |
| 1300 | 1421 | $content[] = '</a>'; |
| 1301 | 1422 | $content[] = '</span>'; |
| 1302 | 1423 | $content[] = '</div>'; |
| 1303 | 1424 | |
| 1304 | 1425 | $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>'; | |
| 1426 | + $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' ) . '</a>'; | |
| 1306 | 1427 | $content[] = '<span class="ays-chart-dicount-one-time-text">'; |
| 1307 | - $content[] = __( "One-time payment", CHART_BUILDER_NAME ); | |
| 1428 | + $content[] = __( "One-time payment", 'chart-builder' ); | |
| 1308 | 1429 | $content[] = '</span>'; |
| 1309 | 1430 | $content[] = '</div>'; |
| 1310 | 1431 | $content[] = '</div>'; |
| 1311 | 1432 | $content[] = '</div>'; |
| @@ -1310,12 +1431,98 @@ | ||
| 1310 | 1431 | $content[] = '</div>'; |
| 1311 | 1432 | $content[] = '</div>'; |
| 1312 | 1433 | |
| 1313 | 1434 | $content = implode( '', $content ); |
| 1314 | - echo $content; | |
| 1435 | + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) ); | |
| 1315 | 1436 | } |
| 1316 | 1437 | } |
| 1317 | 1438 | |
| 1439 | + //silver bundle | |
| 1440 | + public function ays_chart_new_silver_bundle_message_2025($ishmar){ | |
| 1441 | + if($ishmar == 0 ){ | |
| 1442 | + $content = array(); | |
| 1443 | + | |
| 1444 | + $content[] = '<div id="ays-chart-new-silver-bundle-2025-dicount-month-main" class="notice notice-success is-dismissible ays_chart_dicount_info">'; | |
| 1445 | + $content[] = '<div id="ays-chart-dicount-month" class="ays_chart_dicount_month">'; | |
| 1446 | + | |
| 1447 | + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">'; | |
| 1448 | + $content[] = '<div>'; | |
| 1449 | + | |
| 1450 | + $content[] = '<span class="ays-chart-new-silver-bundle-2025-title">'; | |
| 1451 | + $content[] = __( "<span><a href='https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=new_silver_bundle_message_2025' style='color:#ffffff; text-decoration: underline;'>Silver Bundle</a></span> (Quiz + Form + Chart)", 'quiz-maker' ); | |
| 1452 | + $content[] = '<span>'; | |
| 1453 | + $content[] = '<img class="ays-chart-new-silver-bundle-discount" src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-banner-50.svg" style="width: 60px;">'; | |
| 1454 | + $content[] = '</span>'; | |
| 1455 | + | |
| 1456 | + $content[] = '</span>'; | |
| 1457 | + | |
| 1458 | + $content[] = '</br>'; | |
| 1459 | + | |
| 1460 | + $content[] = '<span class="ays-chart-new-silver-bundle-2025-desc">'; | |
| 1461 | + $content[] = '<span>'; | |
| 1462 | + $content[] = '<img class="ays-chart-new-silver-bundle-guaranteeicon" src="' . CHART_BUILDER_ADMIN_URL . '/images/ays-chart-guaranteeicon.svg" style="width: 30px;">'; | |
| 1463 | + $content[] = '</span>'; | |
| 1464 | + $content[] = __( "30 Day Money Back Guarantee", 'chart-builder' ); | |
| 1465 | + $content[] = '</span>'; | |
| 1466 | + $content[] = '</div>'; | |
| 1467 | + | |
| 1468 | + $content[] = '<div style="position: absolute;right: 10px;bottom: 1px;" class="ays-chart-dismiss-buttons-container-for-form">'; | |
| 1469 | + | |
| 1470 | + $content[] = '<form action="" method="POST">'; | |
| 1471 | + $content[] = '<div id="ays-chart-dismiss-buttons-content">'; | |
| 1472 | + if( current_user_can( 'manage_options' ) ){ | |
| 1473 | + $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>'; | |
| 1474 | + $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' ); | |
| 1475 | + } | |
| 1476 | + $content[] = '</div>'; | |
| 1477 | + $content[] = '</form>'; | |
| 1478 | + | |
| 1479 | + $content[] = '</div>'; | |
| 1480 | + | |
| 1481 | + $content[] = '</div>'; | |
| 1482 | + | |
| 1483 | + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-countdown-box">'; | |
| 1484 | + | |
| 1485 | + $content[] = '<div id="ays-chart-countdown-main-container">'; | |
| 1486 | + $content[] = '<div class="ays-chart-countdown-container">'; | |
| 1487 | + | |
| 1488 | + $content[] = '<div id="ays-chart-countdown">'; | |
| 1489 | + | |
| 1490 | + $content[] = '<ul>'; | |
| 1491 | + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>'; | |
| 1492 | + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>'; | |
| 1493 | + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>'; | |
| 1494 | + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>'; | |
| 1495 | + $content[] = '</ul>'; | |
| 1496 | + $content[] = '</div>'; | |
| 1497 | + | |
| 1498 | + $content[] = '<div id="ays-chart-countdown-content" class="emoji">'; | |
| 1499 | + $content[] = '<span></span>'; | |
| 1500 | + $content[] = '<span></span>'; | |
| 1501 | + $content[] = '<span></span>'; | |
| 1502 | + $content[] = '<span></span>'; | |
| 1503 | + $content[] = '</div>'; | |
| 1504 | + | |
| 1505 | + $content[] = '</div>'; | |
| 1506 | + $content[] = '</div>'; | |
| 1507 | + | |
| 1508 | + $content[] = '</div>'; | |
| 1509 | + | |
| 1510 | + $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-button-box">'; | |
| 1511 | + $content[] = '<a href="https://ays-pro.com/silver-bundle?utm_source=chart-free-dashboard&utm_medium=chart-sale-banner&utm_campaign=new-silver-bundle-message-2025" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">' . __( 'Buy Now', 'chart-builder' ) . '</a>'; | |
| 1512 | + $content[] = '<span class="ays-chart-dicount-one-time-text">'; | |
| 1513 | + $content[] = __( "One-time payment", 'chart-builder' ); | |
| 1514 | + $content[] = '</span>'; | |
| 1515 | + $content[] = '</div>'; | |
| 1516 | + $content[] = '</div>'; | |
| 1517 | + $content[] = '</div>'; | |
| 1518 | + | |
| 1519 | + $content = implode( '', $content ); | |
| 1520 | + echo wp_kses_post($content); | |
| 1521 | + } | |
| 1522 | + } | |
| 1523 | + | |
| 1524 | + | |
| 1318 | 1525 | // Christmas Top Banner 2024 |
| 1319 | 1526 | public function ays_chart_christmas_message_2024($ishmar){ |
| 1320 | 1527 | if($ishmar == 0 ){ |
| 1321 | 1528 | $content = array(); |
| @@ -1330,16 +1537,16 @@ | ||
| 1330 | 1537 | |
| 1331 | 1538 | $content[] = '<div id="ays-chart-countdown">'; |
| 1332 | 1539 | |
| 1333 | 1540 | $content[] = '<div>'; |
| 1334 | - $content[] = __( "Offer ends in:", CHART_BUILDER_NAME ); | |
| 1541 | + $content[] = __( "Offer ends in:", 'chart-builder' ); | |
| 1335 | 1542 | $content[] = '</div>'; |
| 1336 | 1543 | |
| 1337 | 1544 | $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>'; | |
| 1545 | + $content[] = '<li><span id="ays-chart-countdown-days"></span>'. __( "Days", 'chart-builder' ) .'</li>'; | |
| 1546 | + $content[] = '<li><span id="ays-chart-countdown-hours"></span>'. __( "Hours", 'chart-builder' ) .'</li>'; | |
| 1547 | + $content[] = '<li><span id="ays-chart-countdown-minutes"></span>'. __( "Minutes", 'chart-builder' ) .'</li>'; | |
| 1548 | + $content[] = '<li><span id="ays-chart-countdown-seconds"></span>'. __( "Seconds", 'chart-builder' ) .'</li>'; | |
| 1342 | 1549 | $content[] = '</ul>'; |
| 1343 | 1550 | $content[] = '</div>'; |
| 1344 | 1551 | |
| 1345 | 1552 | $content[] = '<div id="ays-chart-countdown-content" class="emoji">'; |
| @@ -1357,9 +1564,16 @@ | ||
| 1357 | 1564 | $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-dicount-wrap-text-box">'; |
| 1358 | 1565 | $content[] = '<div>'; |
| 1359 | 1566 | |
| 1360 | 1567 | $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 ); | |
| 1568 | + $content[] = sprintf( | |
| 1569 | + /* translators: %s is the Chart Builder plugin URL with version parameter. */ | |
| 1570 | + __( | |
| 1571 | + "<span><a href='%s' class='ays-chart-christmas-top-bundle-title-link' target='_blank'>Christmas Sale</a></span>", | |
| 1572 | + 'chart-builder' | |
| 1573 | + ), | |
| 1574 | + "https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-free&utm_campaign=christmas-sale-banner" . CHART_BUILDER_VERSION | |
| 1575 | + ); | |
| 1362 | 1576 | $content[] = '</span>'; |
| 1363 | 1577 | |
| 1364 | 1578 | $content[] = '</br>'; |
| 1365 | 1579 | |
| @@ -1364,9 +1578,9 @@ | ||
| 1364 | 1578 | $content[] = '</br>'; |
| 1365 | 1579 | |
| 1366 | 1580 | $content[] = '<span class="ays-chart-christmas-top-bundle-desc">'; |
| 1367 | 1581 | $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 ); | |
| 1582 | + $content[] = __( "20% Extra OFF", 'chart-builder' ); | |
| 1369 | 1583 | $content[] = '</a>'; |
| 1370 | 1584 | $content[] = '</span>'; |
| 1371 | 1585 | $content[] = '</div>'; |
| 1372 | 1586 | |
| @@ -1374,9 +1588,9 @@ | ||
| 1374 | 1588 | |
| 1375 | 1589 | $content[] = '<form action="" method="POST">'; |
| 1376 | 1590 | $content[] = '<div id="ays-chart-dismiss-buttons-content">'; |
| 1377 | 1591 | 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>'; | |
| 1592 | + $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>'; | |
| 1379 | 1593 | $content[] = wp_nonce_field( CHART_BUILDER_NAME . '-sale-banner' , CHART_BUILDER_NAME . '-sale-banner' ); |
| 1380 | 1594 | } |
| 1381 | 1595 | $content[] = '</div>'; |
| 1382 | 1596 | $content[] = '</form>'; |
| @@ -1388,18 +1602,17 @@ | ||
| 1388 | 1602 | $content[] = '<div class="ays-chart-dicount-wrap-box ays-chart-christmas-top-bundle-coupon-text-box">'; |
| 1389 | 1603 | $content[] = '<div class="ays-chart-christmas-top-bundle-coupon-row">'; |
| 1390 | 1604 | $content[] = 'xmas20off'; |
| 1391 | 1605 | $content[] = '</div>'; |
| 1392 | - | |
| 1393 | 1606 | $content[] = '<div class="ays-chart-christmas-top-bundle-text-row">'; |
| 1394 | - $content[] = __( '20% Extra Discount Coupon', CHART_BUILDER_NAME ); | |
| 1607 | + $content[] = __( '20% Extra Discount Coupon', 'chart-builder' ); | |
| 1395 | 1608 | $content[] = '</div>'; |
| 1396 | 1609 | $content[] = '</div>'; |
| 1397 | 1610 | |
| 1398 | 1611 | $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>'; | |
| 1612 | + $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>'; | |
| 1400 | 1613 | $content[] = '<span class="ays-chart-dicount-one-time-text">'; |
| 1401 | - $content[] = __( "One-time payment", CHART_BUILDER_NAME ); | |
| 1614 | + $content[] = __( "One-time payment", 'chart-builder' ); | |
| 1402 | 1615 | $content[] = '</span>'; |
| 1403 | 1616 | $content[] = '</div>'; |
| 1404 | 1617 | $content[] = '</div>'; |
| 1405 | 1618 | $content[] = '</div>'; |
| @@ -1404,9 +1617,9 @@ | ||
| 1404 | 1617 | $content[] = '</div>'; |
| 1405 | 1618 | $content[] = '</div>'; |
| 1406 | 1619 | |
| 1407 | 1620 | $content = implode( '', $content ); |
| 1408 | - echo $content; | |
| 1621 | + echo wp_kses_post( html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ) ); | |
| 1409 | 1622 | } |
| 1410 | 1623 | } |
| 1411 | 1624 | |
| 1412 | 1625 | public function ays_chart_update_banner_time(){ |
| @@ -1412,9 +1625,9 @@ | ||
| 1412 | 1625 | public function ays_chart_update_banner_time(){ |
| 1413 | 1626 | |
| 1414 | 1627 | $date = time() + ( 3 * 24 * 60 * 60 ) + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS); |
| 1415 | 1628 | // $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); | |
| 1629 | + $next_3_days = gmdate('M d, Y H:i:s', $date); | |
| 1417 | 1630 | |
| 1418 | 1631 | $ays_chart_banner_time = get_option('ays_chart_20_bundle_banner_time'); |
| 1419 | 1632 | |
| 1420 | 1633 | if ( !$ays_chart_banner_time || is_null( $ays_chart_banner_time ) ) { |
| @@ -1439,9 +1652,9 @@ | ||
| 1439 | 1652 | } |
| 1440 | 1653 | |
| 1441 | 1654 | public function author_user_search() { |
| 1442 | 1655 | check_ajax_referer( 'cbuilder-author-user-search', 'security' ); |
| 1443 | - $params = $_REQUEST['params']; | |
| 1656 | + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array(); | |
| 1444 | 1657 | $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null; |
| 1445 | 1658 | $checked = isset($params['val']) && $params['val'] !='' ? sanitize_text_field( $params['val'] ) : null; |
| 1446 | 1659 | $args = 'search='; |
| 1447 | 1660 | if ($search !== null) { |
| @@ -1558,9 +1771,11 @@ | ||
| 1558 | 1771 | */ |
| 1559 | 1772 | public function ays_chart_activate_plugin() { |
| 1560 | 1773 | |
| 1561 | 1774 | // Run a security check. |
| 1562 | - check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) ); | |
| 1775 | + if ( isset( $_REQUEST['_ajax_nonce'] ) ) { | |
| 1776 | + check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) ); | |
| 1777 | + } | |
| 1563 | 1778 | |
| 1564 | 1779 | // Check for permissions. |
| 1565 | 1780 | if ( ! current_user_can( 'activate_plugins' ) ) { |
| 1566 | 1781 | wp_send_json_error( esc_html__( 'Plugin activation is disabled for you on this site.', 'chart-builder' ) ); |
| @@ -1601,9 +1816,11 @@ | ||
| 1601 | 1816 | */ |
| 1602 | 1817 | public function ays_chart_install_plugin() { |
| 1603 | 1818 | |
| 1604 | 1819 | // Run a security check. |
| 1605 | - check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) ); | |
| 1820 | + if ( isset( $_REQUEST['_ajax_nonce'] ) ) { | |
| 1821 | + check_ajax_referer( $this->plugin_name . '-install-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) ); | |
| 1822 | + } | |
| 1606 | 1823 | |
| 1607 | 1824 | $generic_error = esc_html__( 'There was an error while performing your request.', 'chart-builder' ); |
| 1608 | 1825 | $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : ''; |
| 1609 | 1826 | |
| @@ -1720,8 +1937,9 @@ | ||
| 1720 | 1937 | |
| 1721 | 1938 | $images_url = CHART_BUILDER_ADMIN_URL . '/images/icons/'; |
| 1722 | 1939 | |
| 1723 | 1940 | $plugin_slug = array( |
| 1941 | + 'fox-lms', | |
| 1724 | 1942 | 'quiz-maker', |
| 1725 | 1943 | 'survey-maker', |
| 1726 | 1944 | 'poll-maker', |
| 1727 | 1945 | 'ays-popup-box', |
| @@ -1734,9 +1952,9 @@ | ||
| 1734 | 1952 | $plugin_url_arr = array(); |
| 1735 | 1953 | foreach ($plugin_slug as $key => $slug) { |
| 1736 | 1954 | if ( isset( $_SESSION['ays_chart_our_product_links'] ) && !empty( $_SESSION['ays_chart_our_product_links'] ) |
| 1737 | 1955 | && 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] ) : ""; | |
| 1956 | + $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 | 1957 | } else { |
| 1740 | 1958 | $latest_version = $this->ays_chart_get_latest_plugin_version($slug); |
| 1741 | 1959 | $plugin_url = 'https://downloads.wordpress.org/plugin/'. $slug .'.zip'; |
| 1742 | 1960 | if ( $latest_version != '' ) { |
| @@ -1748,13 +1966,22 @@ | ||
| 1748 | 1966 | $plugin_url_arr[$slug] = $plugin_url; |
| 1749 | 1967 | } |
| 1750 | 1968 | |
| 1751 | 1969 | $plugins_array = array( |
| 1970 | + 'fox-lms/fox-lms.php' => array( | |
| 1971 | + 'icon' => $images_url . 'icon-fox-lms-128x128.png', | |
| 1972 | + 'name' => __( 'Fox LMS', 'chart-builder' ), | |
| 1973 | + 'desc' => __( 'Build and manage online courses directly on your WordPress site.', 'chart-builder' ), | |
| 1974 | + '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' ), | |
| 1975 | + 'wporg' => 'https://wordpress.org/plugins/fox-lms/', | |
| 1976 | + 'buy_now' => 'https://foxlms.com/pricing/?utm_source=dashboard&utm_medium=chart-free&utm_campaign=fox-lms-our-products-page', | |
| 1977 | + 'url' => $plugin_url_arr['fox-lms'], | |
| 1978 | + ), | |
| 1752 | 1979 | 'quiz-maker/quiz-maker.php' => array( |
| 1753 | 1980 | '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" ), | |
| 1981 | + 'name' => __( 'Quiz Maker', 'chart-builder' ), | |
| 1982 | + 'desc' => __( 'Create powerful and engaging quizzes, tests, and exams in minutes.', 'chart-builder' ), | |
| 1983 | + 'desc_hidden' => __( 'Build an unlimited number of quizzes and questions.', 'chart-builder' ), | |
| 1757 | 1984 | 'wporg' => 'https://wordpress.org/plugins/quiz-maker/', |
| 1758 | 1985 | 'buy_now' => 'https://ays-pro.com/wordpress/quiz-maker/', |
| 1759 | 1986 | 'url' => $plugin_url_arr['quiz-maker'], |
| 1760 | 1987 | ), |
| @@ -1794,9 +2021,9 @@ | ||
| 1794 | 2021 | 'buy_now' => 'https://ays-pro.com/wordpress/secure-copy-content-protection/', |
| 1795 | 2022 | 'url' => $plugin_url_arr['secure-copy-content-protection'], |
| 1796 | 2023 | ), |
| 1797 | 2024 | 'gallery-photo-gallery/gallery-photo-gallery.php' => array( |
| 1798 | - 'icon' => $images_url . 'icon-gallery-128x128.jpg', | |
| 2025 | + 'icon' => $images_url . 'icon-gallery-128x128.png', | |
| 1799 | 2026 | 'name' => __( 'Gallery Photo Gallery', 'chart-builder' ), |
| 1800 | 2027 | 'desc' => __( 'Create unlimited galleries and include unlimited images in those galleries.', 'chart-builder' ), |
| 1801 | 2028 | '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 | 2029 | 'wporg' => 'https://wordpress.org/plugins/gallery-photo-gallery/', |
| @@ -1996,9 +2223,9 @@ | ||
| 1996 | 2223 | <span aria-hidden="true" class="dashicons dashicons-external"></span> |
| 1997 | 2224 | </a>'; |
| 1998 | 2225 | } |
| 1999 | 2226 | $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> | |
| 2227 | + <a target="_blank" href="'. esc_url( $plugin_data['details']['buy_now'] ) .'" class="ays-chart-card__btn-primary">'. __('Buy Now', 'chart-builder') .'</a> | |
| 2001 | 2228 | </div> |
| 2002 | 2229 | </div>'; |
| 2003 | 2230 | } |
| 2004 | 2231 | $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' ); |
| @@ -2004,9 +2231,9 @@ | ||
| 2004 | 2231 | $install_plugin_nonce = wp_create_nonce( $this->plugin_name . '-install-plugin-nonce' ); |
| 2005 | 2232 | $content.= '<input type="hidden" id="ays_chart_ajax_install_plugin_nonce" name="ays_chart_ajax_install_plugin_nonce" value="'. $install_plugin_nonce .'">'; |
| 2006 | 2233 | $content.= '</div>'; |
| 2007 | 2234 | |
| 2008 | - echo $content; | |
| 2235 | + echo html_entity_decode($content); | |
| 2009 | 2236 | } |
| 2010 | 2237 | |
| 2011 | 2238 | /** |
| 2012 | 2239 | * Returns the data from Quiz maker. |
| @@ -2015,9 +2242,9 @@ | ||
| 2015 | 2242 | */ |
| 2016 | 2243 | public function fetch_quiz_maker_data(){ |
| 2017 | 2244 | check_ajax_referer( 'cbuilder-fetch-quiz-maker-data', 'security' ); |
| 2018 | 2245 | |
| 2019 | - $params = $_POST['params']; | |
| 2246 | + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array(); | |
| 2020 | 2247 | if ( !isset($params) || empty($params) ) { |
| 2021 | 2248 | return array( |
| 2022 | 2249 | 'success' => false, |
| 2023 | 2250 | 'data' => array( |
| @@ -2139,9 +2366,9 @@ | ||
| 2139 | 2366 | */ |
| 2140 | 2367 | public function save_quiz_maker_data() { |
| 2141 | 2368 | check_ajax_referer( 'cbuilder-save-quiz-maker-data', 'security' ); |
| 2142 | 2369 | |
| 2143 | - $params = $_POST['params']; | |
| 2370 | + $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array(); | |
| 2144 | 2371 | if ( !isset($params) || empty($params) ) { |
| 2145 | 2372 | return array( |
| 2146 | 2373 | 'success' => false, |
| 2147 | 2374 | 'data' => array( |
| @@ -2255,9 +2482,9 @@ | ||
| 2255 | 2482 | 'data' => array( |
| 2256 | 2483 | 'msg' => __( 'Data was successfully saved.', "chart-builder" ) |
| 2257 | 2484 | ) |
| 2258 | 2485 | ); |
| 2259 | - } | |
| 2486 | + } | |
| 2260 | 2487 | |
| 2261 | 2488 | /** |
| 2262 | 2489 | * Chart page action hooks |
| 2263 | 2490 | */ |
| @@ -2301,9 +2528,9 @@ | ||
| 2301 | 2528 | |
| 2302 | 2529 | $sources[] = $content; |
| 2303 | 2530 | } |
| 2304 | 2531 | $content_for_escape = implode('' , $sources ); |
| 2305 | - echo html_entity_decode(esc_html( $content_for_escape )); | |
| 2532 | + echo html_entity_decode( esc_html($content_for_escape) ); | |
| 2306 | 2533 | } |
| 2307 | 2534 | |
| 2308 | 2535 | public function source_contents_import_from_csv_settings( $sources, $args ){ |
| 2309 | 2536 | $html_class_prefix = $args['html_class_prefix']; |
| @@ -2315,25 +2542,25 @@ | ||
| 2315 | 2542 | <div class="ays-pro-features-v2-big-buttons-box"> |
| 2316 | 2543 | <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button"> |
| 2317 | 2544 | <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 | 2545 | <div class="ays-pro-features-v2-video-text"> |
| 2319 | - <?php echo __("Watch Video" , "chart-builder"); ?> | |
| 2546 | + <?php echo esc_html__("Watch Video" , "chart-builder"); ?> | |
| 2320 | 2547 | </div> |
| 2321 | 2548 | </a> |
| 2322 | 2549 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 2323 | 2550 | <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 | 2551 | <div class="ays-pro-features-v2-upgrade-text"> |
| 2325 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 2552 | + <?php echo esc_html__("Upgrade" , "chart-builder"); ?> | |
| 2326 | 2553 | </div> |
| 2327 | 2554 | </a> |
| 2328 | 2555 | </div> |
| 2329 | 2556 | <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main ays-accordion-data-main-wrap"> |
| 2330 | 2557 | <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> | |
| 2558 | + <h6><?php echo esc_html__("Choose what kind of data would you like to upload.", "chart-builder"); ?></h6> | |
| 2332 | 2559 | <select class="form-select" style="max-width: none;" id="<?php echo esc_attr($html_class_prefix) ?>import-files-file-type"> |
| 2333 | 2560 | <option value="csv">CSV File</option> |
| 2334 | 2561 | </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> | |
| 2562 | + <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 | 2563 | <p class="<?php echo esc_attr($html_class_prefix) ?>csv-export-example" style="font-size: 15px; font-style: italic;">Example: |
| 2337 | 2564 | <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 | 2565 | </p> |
| 2339 | 2566 | <div> |
| @@ -2342,16 +2569,16 @@ | ||
| 2342 | 2569 | <div class='ays-chart-file-import-success'></div> |
| 2343 | 2570 | <div class='ays-chart-file-import-error'></div> |
| 2344 | 2571 | <div class="ays-chart-buttons-group"> |
| 2345 | 2572 | <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" ); ?> | |
| 2573 | + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?> | |
| 2347 | 2574 | </button> |
| 2348 | 2575 | <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-file-import-show-on-chart"> |
| 2349 | 2576 | <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" ); ?> | |
| 2577 | + <?php echo esc_html__( 'Preview', "chart-builder" ); ?> | |
| 2351 | 2578 | </button> |
| 2352 | 2579 | <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" ); ?> | |
| 2580 | + <?php echo esc_html__( 'Save data', "chart-builder" ); ?> | |
| 2354 | 2581 | </button> |
| 2355 | 2582 | </div> |
| 2356 | 2583 | </div> |
| 2357 | 2584 | </div> |
| @@ -2381,38 +2608,38 @@ | ||
| 2381 | 2608 | <div class="ays-pro-features-v2-big-buttons-box"> |
| 2382 | 2609 | <a href="https://www.youtube.com/watch?v=tZ8K3y0qOEY" target="_blank" class="ays-pro-features-v2-video-button"> |
| 2383 | 2610 | <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 | 2611 | <div class="ays-pro-features-v2-video-text"> |
| 2385 | - <?php echo __("Watch Video" , "chart-builder"); ?> | |
| 2612 | + <?php echo esc_html__("Watch Video" , "chart-builder"); ?> | |
| 2386 | 2613 | </div> |
| 2387 | 2614 | </a> |
| 2388 | 2615 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 2389 | 2616 | <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 | 2617 | <div class="ays-pro-features-v2-upgrade-text"> |
| 2391 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 2618 | + <?php echo esc_html__("Upgrade" , "chart-builder"); ?> | |
| 2392 | 2619 | </div> |
| 2393 | 2620 | </a> |
| 2394 | 2621 | </div> |
| 2395 | - <div class="<?= $html_class_prefix ?>source-data-main-wrap ays-accordion-data-main-wrap "> | |
| 2396 | - <div class="<?= $html_class_prefix ?>chart-source-data-main"> | |
| 2622 | + <div class="<?php echo esc_attr( $html_class_prefix ) ?>source-data-main-wrap ays-accordion-data-main-wrap "> | |
| 2623 | + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main"> | |
| 2397 | 2624 | <div id="ays-chart-db-query"> |
| 2398 | - <div class="<?= $html_class_prefix ?>-db-query-form"> | |
| 2625 | + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form"> | |
| 2399 | 2626 | <div id="db-query-form"> |
| 2400 | 2627 | <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> | |
| 2628 | + <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 | 2629 | <div class='db-wizard-success'></div> |
| 2403 | 2630 | <div class='db-wizard-error'></div> |
| 2404 | 2631 | </div> |
| 2405 | 2632 | <div class="ays-chart-db-query-form-button ays-chart-buttons-group"> |
| 2406 | 2633 | <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" ); ?> | |
| 2634 | + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?> | |
| 2408 | 2635 | </button> |
| 2409 | 2636 | <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-query-show-on-chart"> |
| 2410 | 2637 | <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" ); ?> | |
| 2638 | + <?php echo esc_html__( 'Preview', "chart-builder" ); ?> | |
| 2412 | 2639 | </button> |
| 2413 | 2640 | <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" ); ?> | |
| 2641 | + <?php echo esc_html__( 'Save data', "chart-builder" ); ?> | |
| 2415 | 2642 | </button> |
| 2416 | 2643 | </div> |
| 2417 | 2644 | </div> |
| 2418 | 2645 | <div class="db-wizard-hints"> |
| @@ -2417,9 +2644,18 @@ | ||
| 2417 | 2644 | </div> |
| 2418 | 2645 | <div class="db-wizard-hints"> |
| 2419 | 2646 | <ul> |
| 2420 | 2647 | <!-- <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> | |
| 2648 | + <li> | |
| 2649 | + <?php | |
| 2650 | + echo sprintf( | |
| 2651 | + /* translators: %1$s and %2$s are HTML span tags for styling. */ | |
| 2652 | + esc_html__( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', 'chart-builder' ), | |
| 2653 | + '<span class="ays-chart-emboss">', | |
| 2654 | + '</span>' | |
| 2655 | + ); | |
| 2656 | + ?> | |
| 2657 | + </li> | |
| 2422 | 2658 | </ul> |
| 2423 | 2659 | </div> |
| 2424 | 2660 | </div> |
| 2425 | 2661 | </div> |
| @@ -2427,9 +2663,9 @@ | ||
| 2427 | 2663 | </div> |
| 2428 | 2664 | <?php |
| 2429 | 2665 | $content = ob_get_clean(); |
| 2430 | 2666 | |
| 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) . '"> | |
| 2667 | + $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 | 2668 | <i class="ays_fa ays_fa_info_circle"></i> |
| 2433 | 2669 | </a>'; |
| 2434 | 2670 | |
| 2435 | 2671 | $sources['import_from_db'] = array( |
| @@ -2450,14 +2686,14 @@ | ||
| 2450 | 2686 | <div class="ays-pro-features-v2-big-buttons-box"> |
| 2451 | 2687 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 2452 | 2688 | <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 | 2689 | <div class="ays-pro-features-v2-upgrade-text"> |
| 2454 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 2690 | + <?php echo esc_html__("Upgrade" , "chart-builder"); ?> | |
| 2455 | 2691 | </div> |
| 2456 | 2692 | </a> |
| 2457 | 2693 | </div> |
| 2458 | - <div class="<?= $html_class_prefix ?>source-data-main-wrap ays-accordion-data-main-wrap "> | |
| 2459 | - <div class="<?= $html_class_prefix ?>chart-source-data-main"> | |
| 2694 | + <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap ays-accordion-data-main-wrap "> | |
| 2695 | + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main"> | |
| 2460 | 2696 | <div class="form-group row mb-2"> |
| 2461 | 2697 | <div class="col-sm-8 <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 2462 | 2698 | <label class="form-label"> |
| 2463 | 2699 | <?php echo esc_html(__('Use custom database settings for this chart', "chart-builder")); ?> |
| @@ -2473,25 +2709,25 @@ | ||
| 2473 | 2709 | </label> |
| 2474 | 2710 | </div> |
| 2475 | 2711 | </div> |
| 2476 | 2712 | <div id="ays-chart-external-db-query"> |
| 2477 | - <div class="<?= $html_class_prefix ?>-db-query-form"> | |
| 2713 | + <div class="<?php echo esc_attr($html_class_prefix) ?>-db-query-form"> | |
| 2478 | 2714 | <div id="external-db-query-form"> |
| 2479 | 2715 | <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> | |
| 2716 | + <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 | 2717 | <div class='db-wizard-success'></div> |
| 2482 | 2718 | <div class='db-wizard-error'></div> |
| 2483 | 2719 | </div> |
| 2484 | 2720 | <div class="ays-chart-db-query-form-button ays-chart-buttons-group"> |
| 2485 | 2721 | <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" ); ?> | |
| 2722 | + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?> | |
| 2487 | 2723 | </button> |
| 2488 | 2724 | <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-external-query-show-on-chart"> |
| 2489 | 2725 | <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" ); ?> | |
| 2726 | + <?php echo esc_html__( 'Preview', "chart-builder" ); ?> | |
| 2491 | 2727 | </button> |
| 2492 | 2728 | <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" ); ?> | |
| 2729 | + <?php echo esc_html__( 'Save data', "chart-builder" ); ?> | |
| 2494 | 2730 | </button> |
| 2495 | 2731 | </div> |
| 2496 | 2732 | </div> |
| 2497 | 2733 | <div class="db-wizard-hints"> |
| @@ -2496,9 +2732,18 @@ | ||
| 2496 | 2732 | </div> |
| 2497 | 2733 | <div class="db-wizard-hints"> |
| 2498 | 2734 | <ul> |
| 2499 | 2735 | <!-- <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> | |
| 2736 | + <li> | |
| 2737 | + <?php | |
| 2738 | + echo sprintf( | |
| 2739 | + /* translators: %1$s and %2$s are HTML span tags for styling. */ | |
| 2740 | + esc_html__( 'Use %1$sControl+Space%2$s for autocompleting keywords or table names.', 'chart-builder' ), | |
| 2741 | + '<span class="ays-chart-emboss">', | |
| 2742 | + '</span>' | |
| 2743 | + ); | |
| 2744 | + ?> | |
| 2745 | + </li> | |
| 2501 | 2746 | </ul> |
| 2502 | 2747 | </div> |
| 2503 | 2748 | </div> |
| 2504 | 2749 | </div> |
| @@ -2506,9 +2751,9 @@ | ||
| 2506 | 2751 | </div> |
| 2507 | 2752 | <?php |
| 2508 | 2753 | $content = ob_get_clean(); |
| 2509 | 2754 | |
| 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) . '"> | |
| 2755 | + $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 | 2756 | <i class="ays_fa ays_fa_info_circle"></i> |
| 2512 | 2757 | </a>'; |
| 2513 | 2758 | |
| 2514 | 2759 | $sources['import_from_external_db'] = array( |
| @@ -2542,35 +2787,42 @@ | ||
| 2542 | 2787 | // ); |
| 2543 | 2788 | |
| 2544 | 2789 | return $sources; |
| 2545 | 2790 | } |
| 2791 | + $quizes = $wpdb->get_results( // phpcs:ignore | |
| 2792 | + $wpdb->prepare( | |
| 2793 | + "SELECT `title`, `id` FROM {$wpdb->prefix}aysquiz_quizes | |
| 2794 | + WHERE `published` = %d AND `question_ids` <> %s", | |
| 2795 | + 1, | |
| 2796 | + '' | |
| 2797 | + ), | |
| 2798 | + ARRAY_A | |
| 2799 | + ); | |
| 2800 | + | |
| 2546 | 2801 | |
| 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 | 2802 | ob_start(); |
| 2551 | 2803 | ?> |
| 2552 | 2804 | <div class="ays-accordion-data-main-wrap"> |
| 2553 | 2805 | <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 | 2806 | <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 ) ?>"> | |
| 2807 | + <input type="hidden" class="<?php echo esc_attr($html_class_prefix) ?>chart-id" value="<?php echo esc_attr($chart_id) ?>"> | |
| 2808 | + <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"> | |
| 2809 | + <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 | 2810 | <i class="ays_fa ays_fa_info_circle"></i> |
| 2559 | 2811 | </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> | |
| 2812 | + <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"> | |
| 2813 | + <option value=""><?php echo esc_html__( "Select query", "chart-builder" ) ?></option> | |
| 2562 | 2814 | <?php foreach ( $quiz_queries as $id => $q): |
| 2563 | 2815 | $disabled = preg_replace('/[^0-9]/', '', $id) <= 6 ? "false" : "true" ; ?> |
| 2564 | - <option value="<?= $id ?>" <?= $quiz_query == $id ? 'selected' : '' ?> <?php echo 'is-pro="'.$disabled.'"'; ?>><?= $q ?></option> | |
| 2816 | + <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 | 2817 | <?php endforeach; ?> |
| 2566 | 2818 | </select> |
| 2567 | 2819 | </div> |
| 2568 | 2820 | <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> | |
| 2821 | + <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"> | |
| 2822 | + <option value="0"><?php echo esc_html__( "Select quiz", "chart-builder" ) ?></option> | |
| 2571 | 2823 | <?php foreach ( $quizes as $quiz): ?> |
| 2572 | - <option value="<?= $quiz['id'] ?>" <?= $quiz_id == $quiz['id'] ? 'selected' : '' ?> ><?= $quiz['title'] ?></option> | |
| 2824 | + <option value="<?php echo esc_attr($quiz['id']) ?>" <?php echo $quiz_id == $quiz['id'] ? 'selected' : '' ?> ><?php echo esc_html($quiz['title'] )?></option> | |
| 2573 | 2825 | <?php endforeach; ?> |
| 2574 | 2826 | </select> |
| 2575 | 2827 | </div> |
| 2576 | 2828 | <div id="ays-chart-quiz-maker-success"></div> |
| @@ -2576,21 +2828,21 @@ | ||
| 2576 | 2828 | <div id="ays-chart-quiz-maker-success"></div> |
| 2577 | 2829 | <div id="ays-chart-quiz-maker-error"></div> |
| 2578 | 2830 | <div class="ays-chart-buttons-group"> |
| 2579 | 2831 | <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" ); ?> | |
| 2832 | + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?> | |
| 2581 | 2833 | </button> |
| 2582 | 2834 | <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-quiz-maker-show-on-chart"> |
| 2583 | 2835 | <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" ); ?> | |
| 2836 | + <?php echo esc_html__( 'Preview', "chart-builder" ); ?> | |
| 2585 | 2837 | </button> |
| 2586 | 2838 | <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" ); ?> | |
| 2839 | + <?php echo esc_html__( 'Save data', "chart-builder" ); ?> | |
| 2588 | 2840 | </button> |
| 2589 | 2841 | </div> |
| 2590 | 2842 | </div> |
| 2591 | 2843 | <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> | |
| 2844 | + <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 | 2845 | </div> |
| 2594 | 2846 | </div> |
| 2595 | 2847 | </div> |
| 2596 | 2848 | <?php |
| @@ -2595,11 +2847,18 @@ | ||
| 2595 | 2847 | </div> |
| 2596 | 2848 | <?php |
| 2597 | 2849 | $content = ob_get_clean(); |
| 2598 | 2850 | |
| 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>'); | |
| 2851 | + $title = sprintf( | |
| 2852 | + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */ | |
| 2853 | + __( 'Get Quiz Maker data', 'chart-builder' ) . | |
| 2854 | + ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' . | |
| 2855 | + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */ | |
| 2856 | + __( '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' ) . '"> | |
| 2857 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 2858 | + </a>', | |
| 2859 | + '<br>', '<b>', '</b>' | |
| 2860 | + ); | |
| 2602 | 2861 | $sources['quiz_maker'] = array( |
| 2603 | 2862 | 'content' => $content, |
| 2604 | 2863 | 'title' => $title |
| 2605 | 2864 | ); |
| @@ -2622,23 +2881,23 @@ | ||
| 2622 | 2881 | <div class="ays-pro-features-v2-video-button"></div> |
| 2623 | 2882 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 2624 | 2883 | <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 | 2884 | <div class="ays-pro-features-v2-upgrade-text"> |
| 2626 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 2885 | + <?php echo esc_html__("Upgrade" , "chart-builder"); ?> | |
| 2627 | 2886 | </div> |
| 2628 | 2887 | </a> |
| 2629 | 2888 | </div> |
| 2630 | - <div class="<?= $html_class_prefix ?>chart-source-data-main ays-accordion-data-main-wrap "> | |
| 2889 | + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main ays-accordion-data-main-wrap "> | |
| 2631 | 2890 | <div id="ays-chart-woocommerce-datas"> |
| 2632 | - <div class="<?= $html_class_prefix ?>woocommerce-datas-form"> | |
| 2891 | + <div class="<?php echo esc_attr($html_class_prefix) ?>woocommerce-datas-form"> | |
| 2633 | 2892 | <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 ) ?>"> | |
| 2893 | + <input type="hidden" name="chart_id" value="<?php echo esc_attr( $chart_id )?>"> | |
| 2894 | + <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" > | |
| 2895 | + <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 | 2896 | <i class="ays_fa ays_fa_info_circle"></i> |
| 2638 | 2897 | </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> | |
| 2898 | + <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]"> | |
| 2899 | + <option value=""><?php echo esc_html__( 'Select query', 'chart-builder') ?></option> | |
| 2641 | 2900 | </select> |
| 2642 | 2901 | </div> |
| 2643 | 2902 | <div class='ays-chart-woocommerce-datas-success'></div> |
| 2644 | 2903 | <div class='ays-chart-woocommerce-datas-error'></div> |
| @@ -2644,16 +2903,16 @@ | ||
| 2644 | 2903 | <div class='ays-chart-woocommerce-datas-error'></div> |
| 2645 | 2904 | </div> |
| 2646 | 2905 | <div class="ays-chart-buttons-group"> |
| 2647 | 2906 | <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" ); ?> | |
| 2907 | + <?php echo esc_html__( 'Show Results', "chart-builder" ); ?> | |
| 2649 | 2908 | </button> |
| 2650 | 2909 | <button class="<?php echo esc_attr($html_class_prefix) ?>show-on-chart-bttns" id="ays-chart-woocommerce-datas-show-on-chart"> |
| 2651 | 2910 | <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" ); ?> | |
| 2911 | + <?php echo esc_html__( 'Preview', "chart-builder" ); ?> | |
| 2653 | 2912 | </button> |
| 2654 | 2913 | <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" ); ?> | |
| 2914 | + <?php echo esc_html__( 'Save data', "chart-builder" ); ?> | |
| 2656 | 2915 | </button> |
| 2657 | 2916 | </div> |
| 2658 | 2917 | </div> |
| 2659 | 2918 | </div> |
| @@ -2660,12 +2919,19 @@ | ||
| 2660 | 2919 | </div> |
| 2661 | 2920 | </div> |
| 2662 | 2921 | <?php |
| 2663 | 2922 | $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>'); | |
| 2923 | + | |
| 2924 | + $title = sprintf( | |
| 2925 | + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */ | |
| 2926 | + esc_html__( 'Get WooCommerce data', 'chart-builder' ) . | |
| 2927 | + ' <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="' . | |
| 2928 | + /* translators: %1$s: Line break, %2$s: Opening bold tag, %3$s: Closing bold tag. */ | |
| 2929 | + __( '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' ) . '"> | |
| 2930 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 2931 | + </a>', | |
| 2932 | + '<br>', '<b>', '</b>' | |
| 2933 | + ); | |
| 2668 | 2934 | $sources['woocommerce'] = array( |
| 2669 | 2935 | 'content' => $content, |
| 2670 | 2936 | 'title' => $title |
| 2671 | 2937 | ); |
| @@ -2679,9 +2945,10 @@ | ||
| 2679 | 2945 | $source = $args['source']; |
| 2680 | 2946 | $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source; |
| 2681 | 2947 | $settings = $args['settings']; |
| 2682 | 2948 | $source_chart_type = $args['source_chart_type']; |
| 2683 | - $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : 'add'; | |
| 2949 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 2950 | + $action = isset($_GET['action']) ? sanitize_text_field(wp_unslash($_GET['action'])) : 'add'; | |
| 2684 | 2951 | |
| 2685 | 2952 | if (isset($source) && !empty($source)) { |
| 2686 | 2953 | if ( !isset( $source[0] ) ) { |
| 2687 | 2954 | if (count($source[1]) > 2) { |
| @@ -2686,15 +2953,15 @@ | ||
| 2686 | 2953 | if ( !isset( $source[0] ) ) { |
| 2687 | 2954 | if (count($source[1]) > 2) { |
| 2688 | 2955 | $titles = array(); |
| 2689 | 2956 | for ($i = 0; $i < count($source[1]); $i++) { |
| 2690 | - array_push($titles, __("Title", $this->plugin_name).$i); | |
| 2957 | + array_push($titles, __("Title", 'chart-builder').$i); | |
| 2691 | 2958 | } |
| 2692 | 2959 | $source[0] = $titles; |
| 2693 | 2960 | } else { |
| 2694 | 2961 | $source[0] = array( |
| 2695 | - __("Country", $this->plugin_name), | |
| 2696 | - __("Population", $this->plugin_name), | |
| 2962 | + __("Country", 'chart-builder'), | |
| 2963 | + __("Population", 'chart-builder'), | |
| 2697 | 2964 | ); |
| 2698 | 2965 | } |
| 2699 | 2966 | |
| 2700 | 2967 | ksort($source); |
| @@ -2716,9 +2983,9 @@ | ||
| 2716 | 2983 | ?> |
| 2717 | 2984 | <div class="ays-accordion-data-main-wrap"> |
| 2718 | 2985 | <div class="<?php echo esc_attr($html_class_prefix) ?>source-data-main-wrap"> |
| 2719 | 2986 | <?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"> | |
| 2987 | + <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 | 2988 | <!-- <div class="<//?= $html_class_prefix ?>icons-box"> |
| 2722 | 2989 | <img class="<//?= $html_class_prefix ?>add-new-row" src="<//?php echo CHART_BUILDER_ADMIN_URL; ?>/images/icons/add-circle-outline.svg"> |
| 2723 | 2990 | </div> --> |
| 2724 | 2991 | <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container"> |
| @@ -2729,14 +2996,14 @@ | ||
| 2729 | 2996 | if ($source_id == 0): ?> |
| 2730 | 2997 | <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>"> |
| 2731 | 2998 | <div class="ays-chart-empty-data-table-cell"></div> |
| 2732 | 2999 | <?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); ?>"> | |
| 3000 | + <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 | 3001 | <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 | 3002 | <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 | 3003 | </svg> |
| 2737 | 3004 | <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'" : "" ?>> | |
| 3005 | + <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 | 3006 | <?php if ($each_source_id !== 0): ?> |
| 2740 | 3007 | <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 | 3008 | <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 | 3009 | </svg> |
| @@ -2758,14 +3025,14 @@ | ||
| 2758 | 3025 | </svg> |
| 2759 | 3026 | </div> |
| 2760 | 3027 | <?php foreach($source_value as $each_source_id => $each_source_value): ?> |
| 2761 | 3028 | <?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)); ?>"> | |
| 3029 | + <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); ?>"> | |
| 3030 | + <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 | 3031 | </div> |
| 2765 | 3032 | <?php else: ?> |
| 2766 | 3033 | <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"> | |
| 3034 | + <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 | 3035 | </div> |
| 2769 | 3036 | <?php endif; ?> |
| 2770 | 3037 | <?php endforeach; ?> |
| 2771 | 3038 | </div> |
| @@ -2772,16 +3039,16 @@ | ||
| 2772 | 3039 | <?php endif; ?> |
| 2773 | 3040 | <?php endif; ?> |
| 2774 | 3041 | <?php endforeach; ?> |
| 2775 | 3042 | <?php else:?> |
| 2776 | - <div class="<?= $html_class_prefix ?>chart-source-data-edit-block"> | |
| 3043 | + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block"> | |
| 2777 | 3044 | <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"> | |
| 3045 | + <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 | 3046 | <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 | 3047 | <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 | 3048 | </svg> |
| 2782 | 3049 | <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'> | |
| 3050 | + <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 | 3051 | <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 | 3052 | <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 | 3053 | </svg> |
| 2787 | 3054 | </div> |
| @@ -2808,30 +3075,30 @@ | ||
| 2808 | 3075 | <?php endif; ?> |
| 2809 | 3076 | </div> |
| 2810 | 3077 | <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 | 3078 | <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" ); ?> | |
| 3079 | + <?php echo esc_html__( 'Add column', "chart-builder" ); ?> | |
| 2813 | 3080 | </div> |
| 2814 | 3081 | </div> |
| 2815 | 3082 | <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box"> |
| 2816 | 3083 | <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" ); ?> | |
| 3084 | + <?php echo esc_html__( 'Add row', "chart-builder" ); ?> | |
| 2818 | 3085 | </div> |
| 2819 | 3086 | <br> |
| 2820 | 3087 | <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 | 3088 | <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" ); ?> | |
| 3089 | + <?php echo esc_html__( 'Preview', "chart-builder" ); ?> | |
| 2823 | 3090 | </button> |
| 2824 | 3091 | </div> |
| 2825 | 3092 | <?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"> | |
| 3093 | + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-main-org-type display_none cb-changable-manual cb-org_chart-manual"> | |
| 3094 | + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-org-type"> | |
| 3095 | + <ul id="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-tree-content"> | |
| 2829 | 3096 | </ul> |
| 2830 | 3097 | </div> |
| 2831 | 3098 | <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 | 3099 | <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" ); ?> | |
| 3100 | + <?php echo esc_html__( 'Preview', "chart-builder" ); ?> | |
| 2834 | 3101 | </button> |
| 2835 | 3102 | </div> |
| 2836 | 3103 | </div> |
| 2837 | 3104 | </div> |
| @@ -2856,15 +3123,16 @@ | ||
| 2856 | 3123 | $source = $args['source']; |
| 2857 | 3124 | $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source; |
| 2858 | 3125 | $settings = $args['settings']; |
| 2859 | 3126 | $source_chart_type = $args['source_chart_type']; |
| 2860 | - $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : 'add'; | |
| 3127 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 3128 | + $action = isset($_GET['action']) ? sanitize_text_field((wp_unslash($_GET['action']))) : 'add'; | |
| 2861 | 3129 | |
| 2862 | 3130 | ob_start(); |
| 2863 | 3131 | ?> |
| 2864 | 3132 | <div class="ays-accordion-data-main-wrap"> |
| 2865 | 3133 | <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"> | |
| 3134 | + <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 | 3135 | <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content-container"> |
| 2868 | 3136 | <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-content"> |
| 2869 | 3137 | <?php if(!empty($source)): |
| 2870 | 3138 | foreach($source as $source_id => $source_value): |
| @@ -2872,14 +3140,14 @@ | ||
| 2872 | 3140 | if ($source_id == 0): ?> |
| 2873 | 3141 | <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block" data-source-id = "<?php echo esc_attr($source_id); ?>"> |
| 2874 | 3142 | <div class="ays-chart-empty-data-table-cell"></div> |
| 2875 | 3143 | <?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); ?>"> | |
| 3144 | + <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 | 3145 | <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 | 3146 | <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 | 3147 | </svg> |
| 2880 | 3148 | <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'" : "" ?>> | |
| 3149 | + <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 | 3150 | <?php if ($each_source_id !== 0): ?> |
| 2883 | 3151 | <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 | 3152 | <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 | 3153 | </svg> |
| @@ -2901,14 +3169,14 @@ | ||
| 2901 | 3169 | </svg> |
| 2902 | 3170 | </div> |
| 2903 | 3171 | <?php foreach($source_value as $each_source_id => $each_source_value): ?> |
| 2904 | 3172 | <?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)); ?>"> | |
| 3173 | + <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); ?>"> | |
| 3174 | + <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 | 3175 | </div> |
| 2908 | 3176 | <?php else: ?> |
| 2909 | 3177 | <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"> | |
| 3178 | + <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 | 3179 | </div> |
| 2912 | 3180 | <?php endif; ?> |
| 2913 | 3181 | <?php endforeach; ?> |
| 2914 | 3182 | </div> |
| @@ -2915,16 +3183,16 @@ | ||
| 2915 | 3183 | <?php endif; ?> |
| 2916 | 3184 | <?php endif; ?> |
| 2917 | 3185 | <?php endforeach; ?> |
| 2918 | 3186 | <?php else:?> |
| 2919 | - <div class="<?= $html_class_prefix ?>chart-source-data-edit-block"> | |
| 3187 | + <div class="<?php echo esc_attr($html_class_prefix) ?>chart-source-data-edit-block"> | |
| 2920 | 3188 | <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"> | |
| 3189 | + <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 | 3190 | <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 | 3191 | <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 | 3192 | </svg> |
| 2925 | 3193 | <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'> | |
| 3194 | + <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 | 3195 | <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 | 3196 | <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 | 3197 | </svg> |
| 2930 | 3198 | </div> |
| @@ -2951,19 +3219,19 @@ | ||
| 2951 | 3219 | <?php endif; ?> |
| 2952 | 3220 | </div> |
| 2953 | 3221 | <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 | 3222 | <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" ); ?> | |
| 3223 | + <?php echo esc_html__( 'Add column', "chart-builder" ); ?> | |
| 2956 | 3224 | </div> |
| 2957 | 3225 | </div> |
| 2958 | 3226 | <div class="<?php echo esc_attr($html_class_prefix) ?>icons-box <?php echo esc_attr($html_class_prefix) ?>add-new-row-box"> |
| 2959 | 3227 | <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" ); ?> | |
| 3228 | + <?php echo esc_html__( 'Add row', "chart-builder" ); ?> | |
| 2961 | 3229 | </div> |
| 2962 | 3230 | <br> |
| 2963 | 3231 | <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 | 3232 | <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" ); ?> | |
| 3233 | + <?php echo esc_html__( 'Preview', "chart-builder" ); ?> | |
| 2966 | 3234 | </button> |
| 2967 | 3235 | </div> |
| 2968 | 3236 | </div> |
| 2969 | 3237 | </div> |
| @@ -3019,9 +3287,9 @@ | ||
| 3019 | 3287 | |
| 3020 | 3288 | $sources[] = $content; |
| 3021 | 3289 | } |
| 3022 | 3290 | $content_for_escape = implode('' , $sources ); |
| 3023 | - echo html_entity_decode(esc_html( $content_for_escape )); | |
| 3291 | + echo html_entity_decode( $content_for_escape ); | |
| 3024 | 3292 | } |
| 3025 | 3293 | |
| 3026 | 3294 | public function settings_contents_general_settings( $sources, $args ){ |
| 3027 | 3295 | $html_class_prefix = $args['html_class_prefix']; |
| @@ -3296,9 +3564,9 @@ | ||
| 3296 | 3564 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3297 | 3565 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3298 | 3566 | <label for="ays-chart-option-tooltip-trigger"> |
| 3299 | 3567 | <?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") ); ?>"> | |
| 3568 | + <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 | 3569 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3302 | 3570 | </a> |
| 3303 | 3571 | </label> |
| 3304 | 3572 | </div> |
| @@ -3347,9 +3615,9 @@ | ||
| 3347 | 3615 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3348 | 3616 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3349 | 3617 | <label for="ays-chart-option-tooltip-font-size" class="form-label"> |
| 3350 | 3618 | <?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") ); ?>"> | |
| 3619 | + <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 | 3620 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3353 | 3621 | </a> |
| 3354 | 3622 | </label> |
| 3355 | 3623 | </div> |
| @@ -3377,9 +3645,9 @@ | ||
| 3377 | 3645 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3378 | 3646 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3379 | 3647 | <label for="ays-chart-option-tooltip-bold"> |
| 3380 | 3648 | <?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") ); ?>"> | |
| 3649 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") )); ?>"> | |
| 3382 | 3650 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3383 | 3651 | </a> |
| 3384 | 3652 | </label> |
| 3385 | 3653 | </div> |
| @@ -3410,8 +3678,47 @@ | ||
| 3410 | 3678 | |
| 3411 | 3679 | return $sources; |
| 3412 | 3680 | } |
| 3413 | 3681 | |
| 3682 | + public function settings_contents_tooltip_settings_chartjs( $sources, $args ){ | |
| 3683 | + $html_class_prefix = $args['html_class_prefix']; | |
| 3684 | + $html_name_prefix = $args['html_name_prefix']; | |
| 3685 | + $settings = $args['settings']; | |
| 3686 | + | |
| 3687 | + $tooltip_text_color = $settings['tooltip_text_color']; | |
| 3688 | + | |
| 3689 | + ob_start(); | |
| 3690 | + ?> | |
| 3691 | + <div class="ays-accordion-data-main-wrap "> | |
| 3692 | + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> | |
| 3693 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 3694 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 3695 | + <label for="ays-chart-option-tooltip-text-color"> | |
| 3696 | + <?php echo esc_html(__( "Text color", "chart-builder" )); ?> | |
| 3697 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the tooltip text.","chart-builder") ); ?>"> | |
| 3698 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 3699 | + </a> | |
| 3700 | + </label> | |
| 3701 | + </div> | |
| 3702 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 3703 | + <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) ?>"> | |
| 3704 | + </div> | |
| 3705 | + </div> <!-- Text color --> | |
| 3706 | + </div> | |
| 3707 | + </div> | |
| 3708 | + <?php | |
| 3709 | + $content = ob_get_clean(); | |
| 3710 | + | |
| 3711 | + $title = __( 'Tooltip', "chart-builder" ); | |
| 3712 | + | |
| 3713 | + $sources['tooltip'] = array( | |
| 3714 | + 'content' => $content, | |
| 3715 | + 'title' => $title | |
| 3716 | + ); | |
| 3717 | + | |
| 3718 | + return $sources; | |
| 3719 | + } | |
| 3720 | + | |
| 3414 | 3721 | public function settings_contents_legend_settings( $sources, $args ){ |
| 3415 | 3722 | $html_class_prefix = $args['html_class_prefix']; |
| 3416 | 3723 | $html_name_prefix = $args['html_name_prefix']; |
| 3417 | 3724 | $settings = $args['settings']; |
| @@ -3431,9 +3738,9 @@ | ||
| 3431 | 3738 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3432 | 3739 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3433 | 3740 | <label for="ays-chart-option-legend-position"> |
| 3434 | 3741 | <?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") ); ?>"> | |
| 3742 | + <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 | 3743 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3437 | 3744 | </a> |
| 3438 | 3745 | </label> |
| 3439 | 3746 | </div> |
| @@ -3464,9 +3771,9 @@ | ||
| 3464 | 3771 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3465 | 3772 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3466 | 3773 | <label for="ays-chart-option-legend-alignment"> |
| 3467 | 3774 | <?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") ); ?>"> | |
| 3775 | + <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 | 3776 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3470 | 3777 | </a> |
| 3471 | 3778 | </label> |
| 3472 | 3779 | </div> |
| @@ -3486,9 +3793,9 @@ | ||
| 3486 | 3793 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3487 | 3794 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3488 | 3795 | <label for="ays-chart-option-legend-font-color"> |
| 3489 | 3796 | <?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") ); ?>"> | |
| 3797 | + <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 | 3798 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3492 | 3799 | </a> |
| 3493 | 3800 | </label> |
| 3494 | 3801 | </div> |
| @@ -3499,9 +3806,9 @@ | ||
| 3499 | 3806 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3500 | 3807 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3501 | 3808 | <label for="ays-chart-option-legend-font-size" class="form-label"> |
| 3502 | 3809 | <?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") ); ?>"> | |
| 3810 | + <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 | 3811 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3505 | 3812 | </a> |
| 3506 | 3813 | </label> |
| 3507 | 3814 | </div> |
| @@ -3556,8 +3863,159 @@ | ||
| 3556 | 3863 | |
| 3557 | 3864 | return $sources; |
| 3558 | 3865 | } |
| 3559 | 3866 | |
| 3867 | + public function settings_contents_legend_settings_chartjs( $sources, $args ){ | |
| 3868 | + $html_class_prefix = $args['html_class_prefix']; | |
| 3869 | + $html_name_prefix = $args['html_name_prefix']; | |
| 3870 | + $settings = $args['settings']; | |
| 3871 | + $legend_positions = $settings['legend_positions']; | |
| 3872 | + $legend_position = $settings['legend_position']; | |
| 3873 | + $legend_alignments = $settings['legend_alignments']; | |
| 3874 | + $legend_alignment = $settings['legend_alignment']; | |
| 3875 | + $legend_color = $settings['legend_color']; | |
| 3876 | + $legend_font_size = $settings['legend_font_size']; | |
| 3877 | + $legend_reverse = $settings['legend_reverse']; | |
| 3878 | + $legend_bold = $settings['legend_bold']; | |
| 3879 | + $legend_italic = $settings['legend_italic']; | |
| 3880 | + ob_start(); | |
| 3881 | + ?> | |
| 3882 | + <div class="ays-accordion-data-main-wrap"> | |
| 3883 | + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> | |
| 3884 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 3885 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 3886 | + <label for="ays-chart-option-legend-position"> | |
| 3887 | + <?php echo esc_html(__( "Position", "chart-builder" )); ?> | |
| 3888 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate position for the chart legend.","chart-builder") )); ?>"> | |
| 3889 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 3890 | + </a> | |
| 3891 | + </label> | |
| 3892 | + </div> | |
| 3893 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 3894 | + <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]"> | |
| 3895 | + <?php | |
| 3896 | + foreach ( $legend_positions as $option_slug => $option ): | |
| 3897 | + $selected = ( $legend_position == $option_slug ) ? 'selected' : ''; | |
| 3898 | + ?> | |
| 3899 | + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?> ><?php echo esc_html($option); ?></option> | |
| 3900 | + <?php | |
| 3901 | + endforeach; | |
| 3902 | + ?> | |
| 3903 | + </select> | |
| 3904 | + </div> | |
| 3905 | + </div> <!-- Legend position --> | |
| 3906 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 3907 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 3908 | + <label for="ays-chart-option-legend-alignment"> | |
| 3909 | + <?php echo esc_html(__( "Alignment", "chart-builder" )); ?> | |
| 3910 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the appropriate alignment for the chart legend.","chart-builder") )); ?>"> | |
| 3911 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 3912 | + </a> | |
| 3913 | + </label> | |
| 3914 | + </div> | |
| 3915 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 3916 | + <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]"> | |
| 3917 | + <?php | |
| 3918 | + foreach ( $legend_alignments as $option_slug => $option ): | |
| 3919 | + $selected = ( $legend_alignment == $option_slug ) ? 'selected' : ''; | |
| 3920 | + ?> | |
| 3921 | + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option> | |
| 3922 | + <?php | |
| 3923 | + endforeach; | |
| 3924 | + ?> | |
| 3925 | + </select> | |
| 3926 | + </div> | |
| 3927 | + </div> <!-- Legend alignment --> | |
| 3928 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 3929 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 3930 | + <label for="ays-chart-option-legend-font-color"> | |
| 3931 | + <?php echo esc_html(__( "Font Color", "chart-builder" )); ?> | |
| 3932 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose the font color for the chart legend.","chart-builder") )); ?>"> | |
| 3933 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 3934 | + </a> | |
| 3935 | + </label> | |
| 3936 | + </div> | |
| 3937 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 3938 | + <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) ?>"> | |
| 3939 | + </div> | |
| 3940 | + </div> <!-- Legend font color --> | |
| 3941 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 3942 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 3943 | + <label for="ays-chart-option-legend-font-size" class="form-label"> | |
| 3944 | + <?php echo esc_html(__( "Font size", "chart-builder" )); ?> | |
| 3945 | + <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") )); ?>"> | |
| 3946 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 3947 | + </a> | |
| 3948 | + </label> | |
| 3949 | + </div> | |
| 3950 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 3951 | + <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) ?>"> | |
| 3952 | + <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div> | |
| 3953 | + </div> | |
| 3954 | + </div> <!-- Font size --> | |
| 3955 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 3956 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 3957 | + <label for="ays-chart-option-legend-italic"> | |
| 3958 | + <?php echo esc_html(__( "Italic text", "chart-builder" )); ?> | |
| 3959 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart legend text italic.","chart-builder") ); ?>"> | |
| 3960 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 3961 | + </a> | |
| 3962 | + </label> | |
| 3963 | + </div> | |
| 3964 | + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 3965 | + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> | |
| 3966 | + <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); ?> > | |
| 3967 | + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> | |
| 3968 | + </label> | |
| 3969 | + </div> | |
| 3970 | + </div> <!-- Italic text --> | |
| 3971 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 3972 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 3973 | + <label for="ays-chart-option-legend-bold"> | |
| 3974 | + <?php echo esc_html(__( "Bold text", "chart-builder" )); ?> | |
| 3975 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart legend text bold.","chart-builder") ); ?>"> | |
| 3976 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 3977 | + </a> | |
| 3978 | + </label> | |
| 3979 | + </div> | |
| 3980 | + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 3981 | + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> | |
| 3982 | + <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); ?> > | |
| 3983 | + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> | |
| 3984 | + </label> | |
| 3985 | + </div> | |
| 3986 | + </div> <!-- Bold text --> | |
| 3987 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt"> | |
| 3988 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 3989 | + <label for="ays-chart-option-legend-revers"> | |
| 3990 | + <?php echo esc_html(__( "Show datasets in reverse order", "chart-builder" )); ?> | |
| 3991 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this toggle to show datasets in reverse ordering.","chart-builder") ); ?>"> | |
| 3992 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 3993 | + </a> | |
| 3994 | + </label> | |
| 3995 | + </div> | |
| 3996 | + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 3997 | + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> | |
| 3998 | + <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); ?> > | |
| 3999 | + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> | |
| 4000 | + </label> | |
| 4001 | + </div> | |
| 4002 | + </div> <!-- reverse datasets --> | |
| 4003 | + </div> | |
| 4004 | + </div> | |
| 4005 | + <?php | |
| 4006 | + $content = ob_get_clean(); | |
| 4007 | + | |
| 4008 | + $title = __( 'Legend', "chart-builder" ); | |
| 4009 | + | |
| 4010 | + $sources['legend'] = array( | |
| 4011 | + 'content' => $content, | |
| 4012 | + 'title' => $title | |
| 4013 | + ); | |
| 4014 | + | |
| 4015 | + return $sources; | |
| 4016 | + } | |
| 4017 | + | |
| 3560 | 4018 | public function settings_contents_horizontal_axis_settings( $sources, $args ){ |
| 3561 | 4019 | $html_class_prefix = $args['html_class_prefix']; |
| 3562 | 4020 | $html_name_prefix = $args['html_name_prefix']; |
| 3563 | 4021 | $settings = $args['settings']; |
| @@ -3573,8 +4031,9 @@ | ||
| 3573 | 4031 | $haxis_slanted_text_angle = $settings['haxis_slanted_text_angle']; |
| 3574 | 4032 | $haxis_show_text_every = $settings['haxis_show_text_every']; |
| 3575 | 4033 | $haxis_format_options = $settings['axes_format_options']; |
| 3576 | 4034 | $haxis_format = $settings['haxis_format']; |
| 4035 | + $haxis_enable_divide_percent = $settings['haxis_enable_divide_percent']; | |
| 3577 | 4036 | $haxis_label_font_size = $settings['haxis_label_font_size']; |
| 3578 | 4037 | $haxis_max_value = $settings['haxis_max_value']; |
| 3579 | 4038 | $haxis_min_value = $settings['haxis_min_value']; |
| 3580 | 4039 | $haxis_text_font_size = $settings['haxis_text_font_size']; |
| @@ -3588,9 +4047,9 @@ | ||
| 3588 | 4047 | $haxis_minor_gridlines_color = $settings['haxis_minor_gridlines_color']; |
| 3589 | 4048 | |
| 3590 | 4049 | ob_start(); |
| 3591 | 4050 | ?> |
| 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"> | |
| 4051 | + <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 | 4052 | <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> |
| 3594 | 4053 | <h6>Label</h6> |
| 3595 | 4054 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3596 | 4055 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -3595,9 +4054,9 @@ | ||
| 3595 | 4054 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3596 | 4055 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3597 | 4056 | <label for="ays-chart-option-haxis-title" class="form-label"> |
| 3598 | 4057 | <?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") ); ?>"> | |
| 4058 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the horizontal axis","chart-builder") ); ?>"> | |
| 3600 | 4059 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3601 | 4060 | </a> |
| 3602 | 4061 | </label> |
| 3603 | 4062 | </div> |
| @@ -3682,9 +4141,9 @@ | ||
| 3682 | 4141 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3683 | 4142 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3684 | 4143 | <label for="ays-chart-option-haxis-text-position" class="form-label"> |
| 3685 | 4144 | <?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") ); ?>"> | |
| 4145 | + <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 | 4146 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3688 | 4147 | </a> |
| 3689 | 4148 | </label> |
| 3690 | 4149 | </div> |
| @@ -3865,32 +4324,40 @@ | ||
| 3865 | 4324 | <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 | 4325 | </div> |
| 3867 | 4326 | </div> <!-- Horizontal axis baseline color --> |
| 3868 | 4327 | |
| 3869 | - <br> | |
| 3870 | - <h6>Format</h6> | |
| 3871 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 4328 | + <br class="cb-changable-opt cb-bar_chart-opt " > | |
| 4329 | + <h6 class="cb-changable-opt cb-bar_chart-opt">Format</h6> | |
| 4330 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt " > | |
| 3872 | 4331 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3873 | 4332 | <label for="ays-chart-option-haxis-format" class="form-label"> |
| 3874 | 4333 | <?php echo esc_html(__( "Format", "chart-builder" )); ?> |
| 3875 | 4334 | <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 | - ) ); | |
| 4335 | + echo esc_attr( sprintf( | |
| 4336 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4337 | + "<p>" . __('A format string for numeric axis labels. You can choose any of the following:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" . | |
| 4338 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4339 | + __('%1$sNone:%2$s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" . | |
| 4340 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4341 | + __('%1$sDecimal:%2$s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" . | |
| 4342 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4343 | + __('%1$sScientific:%2$s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" . | |
| 4344 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4345 | + __('%1$sCurrency:%2$s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" . | |
| 4346 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4347 | + __('%1$sPercent:%2$s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" . | |
| 4348 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4349 | + __('%1$sShort:%2$s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" . | |
| 4350 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4351 | + __('%1$sLong:%2$s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>", | |
| 4352 | + '<em>', '</em>', | |
| 4353 | + '<em>', '</em>', | |
| 4354 | + '<em>', '</em>', | |
| 4355 | + '<em>', '</em>', | |
| 4356 | + '<em>', '</em>', | |
| 4357 | + '<em>', '</em>', | |
| 4358 | + '<em>', '</em>' | |
| 4359 | + )); | |
| 3893 | 4360 | ?>"> |
| 3894 | 4361 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3895 | 4362 | </a> |
| 3896 | 4363 | </label> |
| @@ -3907,10 +4374,26 @@ | ||
| 3907 | 4374 | ?> |
| 3908 | 4375 | </select> |
| 3909 | 4376 | </div> |
| 3910 | 4377 | </div> <!-- Horizontal axis format --> |
| 3911 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 4378 | + <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 | 4379 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4380 | + <label for="ays-chart-option-haxis-enable-divide-percent"> | |
| 4381 | + <?php echo esc_html(__( "Remove Extra Zeros ", "chart-builder" )); ?> | |
| 4382 | + <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") ); ?>"> | |
| 4383 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 4384 | + </a> | |
| 4385 | + </label> | |
| 4386 | + </div> | |
| 4387 | + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 4388 | + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> | |
| 4389 | + <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); ?> > | |
| 4390 | + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> | |
| 4391 | + </label> | |
| 4392 | + </div> | |
| 4393 | + </div> <!--Remove Extra Zeros"--> | |
| 4394 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt" > | |
| 4395 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 3913 | 4396 | <label for="ays-chart-option-haxis-max-value" class="form-label"> |
| 3914 | 4397 | <?php echo esc_html(__( "Max value", "chart-builder" )); ?> |
| 3915 | 4398 | <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>"> |
| 3916 | 4399 | <i class="ays_fa ays_fa_info_circle"></i> |
| @@ -3920,9 +4403,9 @@ | ||
| 3920 | 4403 | <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 | 4404 | <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 | 4405 | </div> |
| 3923 | 4406 | </div> <!-- Horizontal axis max value --> |
| 3924 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 4407 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-bar_chart-opt" > | |
| 3925 | 4408 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3926 | 4409 | <label for="ays-chart-option-haxis-min-value" class="form-label"> |
| 3927 | 4410 | <?php echo esc_html(__( "Min value", "chart-builder" )); ?> |
| 3928 | 4411 | <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>"> |
| @@ -3961,8 +4444,9 @@ | ||
| 3961 | 4444 | $vaxis_text_color = $settings['vaxis_text_color']; |
| 3962 | 4445 | $vaxis_baseline_color = $settings['vaxis_baseline_color']; |
| 3963 | 4446 | $vaxis_format_options = $settings['axes_format_options']; |
| 3964 | 4447 | $vaxis_format = $settings['vaxis_format']; |
| 4448 | + $vaxis_enable_divide_percent = $settings['vaxis_enable_divide_percent']; | |
| 3965 | 4449 | $vaxis_label_font_size = $settings['vaxis_label_font_size']; |
| 3966 | 4450 | $vaxis_max_value = $settings['vaxis_max_value']; |
| 3967 | 4451 | $vaxis_min_value = $settings['vaxis_min_value']; |
| 3968 | 4452 | $vaxis_text_font_size = $settings['vaxis_text_font_size']; |
| @@ -3976,9 +4460,9 @@ | ||
| 3976 | 4460 | $vaxis_minor_gridlines_color = $settings['vaxis_minor_gridlines_color']; |
| 3977 | 4461 | |
| 3978 | 4462 | ob_start(); |
| 3979 | 4463 | ?> |
| 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"> | |
| 4464 | + <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 | 4465 | <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> |
| 3982 | 4466 | <h6>Label</h6> |
| 3983 | 4467 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3984 | 4468 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -3983,9 +4467,9 @@ | ||
| 3983 | 4467 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 3984 | 4468 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 3985 | 4469 | <label for="ays-chart-option-vaxis-title" class="form-label"> |
| 3986 | 4470 | <?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") ); ?>"> | |
| 4471 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The title of the vertical axis","chart-builder") ); ?>"> | |
| 3988 | 4472 | <i class="ays_fa ays_fa_info_circle"></i> |
| 3989 | 4473 | </a> |
| 3990 | 4474 | </label> |
| 3991 | 4475 | </div> |
| @@ -4057,9 +4541,9 @@ | ||
| 4057 | 4541 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 4058 | 4542 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4059 | 4543 | <label for="ays-chart-option-vaxis-text-position" class="form-label"> |
| 4060 | 4544 | <?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") ); ?>"> | |
| 4545 | + <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 | 4546 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4063 | 4547 | </a> |
| 4064 | 4548 | </label> |
| 4065 | 4549 | </div> |
| @@ -4205,24 +4689,32 @@ | ||
| 4205 | 4689 | <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 | 4690 | </div> |
| 4207 | 4691 | </div> <!-- Vertical axis baseline color --> |
| 4208 | 4692 | |
| 4209 | - <br> | |
| 4210 | - <h6>Format</h6> | |
| 4211 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 4693 | + <br class="cb-changable-opt cb-column_chart-opt cb-line_chart-opt"> | |
| 4694 | + <h6 class="cb-changable-opt cb-column_chart-opt cb-line_chart-opt">Format</h6> | |
| 4695 | + <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 | 4696 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4213 | 4697 | <label for="ays-chart-option-vaxis-format" class="form-label"> |
| 4214 | 4698 | <?php echo esc_html(__( "Format", "chart-builder" )); ?> |
| 4215 | 4699 | <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php |
| 4216 | - echo htmlspecialchars( sprintf ( | |
| 4700 | + echo esc_attr( sprintf( | |
| 4701 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4217 | 4702 | "<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>", | |
| 4703 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4704 | + __('%1$sNone:%2$s Displays numbers with no formatting (e.g., 8000000)', "chart-builder") . "</li><li>" . | |
| 4705 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4706 | + __('%1$sDecimal:%2$s Displays numbers with thousands separators (e.g., 8,000,000)', "chart-builder") . "</li><li>" . | |
| 4707 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4708 | + __('%1$sScientific:%2$s Displays numbers in scientific notation (e.g., 8e6)', "chart-builder") . "</li><li>" . | |
| 4709 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4710 | + __('%1$sCurrency:%2$s Displays numbers in the local currency (e.g., $8,000,000.00)', "chart-builder") . "</li><li>" . | |
| 4711 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4712 | + __('%1$sPercent:%2$s Displays numbers as percentages (e.g., 800,000,000%%)', "chart-builder") . "</li><li>" . | |
| 4713 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4714 | + __('%1$sShort:%2$s Displays abbreviated numbers (e.g., 8M)', "chart-builder") . "</li><li>" . | |
| 4715 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4716 | + __('%1$sLong:%2$s Displays numbers as full words (e.g., 8 million)', "chart-builder") . "</li></ul>", | |
| 4225 | 4717 | '<em>', '</em>', |
| 4226 | 4718 | '<em>', '</em>', |
| 4227 | 4719 | '<em>', '</em>', |
| 4228 | 4720 | '<em>', '</em>', |
| @@ -4228,9 +4720,9 @@ | ||
| 4228 | 4720 | '<em>', '</em>', |
| 4229 | 4721 | '<em>', '</em>', |
| 4230 | 4722 | '<em>', '</em>', |
| 4231 | 4723 | '<em>', '</em>' |
| 4232 | - ) ); | |
| 4724 | + )); | |
| 4233 | 4725 | ?>"> |
| 4234 | 4726 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4235 | 4727 | </a> |
| 4236 | 4728 | </label> |
| @@ -4247,10 +4739,26 @@ | ||
| 4247 | 4739 | ?> |
| 4248 | 4740 | </select> |
| 4249 | 4741 | </div> |
| 4250 | 4742 | </div> <!-- Vertical axis format --> |
| 4251 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 4743 | + <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 | 4744 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4745 | + <label for="ays-chart-option-vaxis-enable-divide-percent"> | |
| 4746 | + <?php echo esc_html(__( "Remove Extra Zeros", "chart-builder" )); ?> | |
| 4747 | + <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") ); ?>"> | |
| 4748 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 4749 | + </a> | |
| 4750 | + </label> | |
| 4751 | + </div> | |
| 4752 | + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 4753 | + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> | |
| 4754 | + <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); ?> > | |
| 4755 | + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> | |
| 4756 | + </label> | |
| 4757 | + </div> | |
| 4758 | + </div> <!--Remove Extra Zeros--> | |
| 4759 | + <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"> | |
| 4760 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 4253 | 4761 | <label for="ays-chart-option-vaxis-max-value" class="form-label"> |
| 4254 | 4762 | <?php echo esc_html(__( "Max value", "chart-builder" )); ?> |
| 4255 | 4763 | <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The maximum value of the axis.","chart-builder") ); ?>"> |
| 4256 | 4764 | <i class="ays_fa ays_fa_info_circle"></i> |
| @@ -4260,9 +4768,9 @@ | ||
| 4260 | 4768 | <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 | 4769 | <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 | 4770 | </div> |
| 4263 | 4771 | </div> <!-- Vertical axis max value --> |
| 4264 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 4772 | + <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 | 4773 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4266 | 4774 | <label for="ays-chart-option-vaxis-min-value" class="form-label"> |
| 4267 | 4775 | <?php echo esc_html(__( "Min value", "chart-builder" )); ?> |
| 4268 | 4776 | <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The minimum value of the axis.","chart-builder") ); ?>"> |
| @@ -4301,9 +4809,9 @@ | ||
| 4301 | 4809 | $animation_easing = $settings['animation_easing']; |
| 4302 | 4810 | |
| 4303 | 4811 | ob_start(); |
| 4304 | 4812 | ?> |
| 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"> | |
| 4813 | + <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 | 4814 | <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> |
| 4307 | 4815 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 4308 | 4816 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4309 | 4817 | <label for="ays-chart-option-enable-animation"> |
| @@ -4354,23 +4862,24 @@ | ||
| 4354 | 4862 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4355 | 4863 | <label for="ays-chart-option-animation-easing" class="form-label"> |
| 4356 | 4864 | <?php echo esc_html(__( "Easing", "chart-builder" )); ?> |
| 4357 | 4865 | <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php |
| 4358 | - echo htmlspecialchars( sprintf( | |
| 4866 | + echo esc_attr( sprintf( | |
| 4867 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4359 | 4868 | "<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 | - ) ); | |
| 4869 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4870 | + __('%1$sLinear:%2$s Constant speed.', "chart-builder") . "</li><li>" . | |
| 4871 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4872 | + __('%1$sEase in:%2$s Start slow and speed up.', "chart-builder") . "</li><li>" . | |
| 4873 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4874 | + __('%1$sEase out:%2$s Start fast and slow down.', "chart-builder") . "</li><li>" . | |
| 4875 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 4876 | + __('%1$sEase in and out:%2$s Start slow, speed up, then slow down.', "chart-builder") . "</li></ul>", | |
| 4877 | + '<em>', '</em>', | |
| 4878 | + '<em>', '</em>', | |
| 4879 | + '<em>', '</em>', | |
| 4880 | + '<em>', '</em>' | |
| 4881 | + )); | |
| 4373 | 4882 | ?>"> |
| 4374 | 4883 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4375 | 4884 | </a> |
| 4376 | 4885 | </label> |
| @@ -4409,9 +4918,9 @@ | ||
| 4409 | 4918 | $html_name_prefix = $args['html_name_prefix']; |
| 4410 | 4919 | |
| 4411 | 4920 | ob_start(); |
| 4412 | 4921 | ?> |
| 4413 | - <div class="ays-accordion-data-main-wrap <?= $html_class_prefix ?>options-live-chart-settings-tab"> | |
| 4922 | + <div class="ays-accordion-data-main-wrap <?php echo esc_attr($html_class_prefix) ?>options-live-chart-settings-tab"> | |
| 4414 | 4923 | <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> |
| 4415 | 4924 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box"> |
| 4416 | 4925 | <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box"> |
| 4417 | 4926 | <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button"> |
| @@ -4416,15 +4925,15 @@ | ||
| 4416 | 4925 | <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box"> |
| 4417 | 4926 | <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button"> |
| 4418 | 4927 | <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 | 4928 | <div class="ays-pro-features-v2-video-text"> |
| 4420 | - <?php echo __("Watch Video" , "chart-builder"); ?> | |
| 4929 | + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?> | |
| 4421 | 4930 | </div> |
| 4422 | 4931 | </a> |
| 4423 | 4932 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 4424 | 4933 | <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 | 4934 | <div class="ays-pro-features-v2-upgrade-text"> |
| 4426 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 4935 | + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?> | |
| 4427 | 4936 | </div> |
| 4428 | 4937 | </a> |
| 4429 | 4938 | </div> |
| 4430 | 4939 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -4446,15 +4955,15 @@ | ||
| 4446 | 4955 | <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box"> |
| 4447 | 4956 | <a href="https://www.youtube.com/watch?v=lhTqZmFUNz4" target="_blank" class="ays-pro-features-v2-video-button"> |
| 4448 | 4957 | <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 | 4958 | <div class="ays-pro-features-v2-video-text"> |
| 4450 | - <?php echo __("Watch Video" , "chart-builder"); ?> | |
| 4959 | + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?> | |
| 4451 | 4960 | </div> |
| 4452 | 4961 | </a> |
| 4453 | 4962 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 4454 | 4963 | <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 | 4964 | <div class="ays-pro-features-v2-upgrade-text"> |
| 4456 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 4965 | + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?> | |
| 4457 | 4966 | </div> |
| 4458 | 4967 | </a> |
| 4459 | 4968 | </div> |
| 4460 | 4969 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -4494,9 +5003,9 @@ | ||
| 4494 | 5003 | $enable_img = $settings['enable_img']; |
| 4495 | 5004 | |
| 4496 | 5005 | ob_start(); |
| 4497 | 5006 | ?> |
| 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"> | |
| 5007 | + <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 | 5008 | <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> |
| 4500 | 5009 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section ays-pro-features-v2-main-box"> |
| 4501 | 5010 | <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box"> |
| 4502 | 5011 | <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button"> |
| @@ -4501,15 +5010,15 @@ | ||
| 4501 | 5010 | <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box"> |
| 4502 | 5011 | <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button"> |
| 4503 | 5012 | <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 | 5013 | <div class="ays-pro-features-v2-video-text"> |
| 4505 | - <?php echo __("Watch Video" , "chart-builder"); ?> | |
| 5014 | + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?> | |
| 4506 | 5015 | </div> |
| 4507 | 5016 | </a> |
| 4508 | 5017 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 4509 | 5018 | <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 | 5019 | <div class="ays-pro-features-v2-upgrade-text"> |
| 4511 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 5020 | + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?> | |
| 4512 | 5021 | </div> |
| 4513 | 5022 | </a> |
| 4514 | 5023 | </div> |
| 4515 | 5024 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -4531,15 +5040,15 @@ | ||
| 4531 | 5040 | <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box"> |
| 4532 | 5041 | <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button"> |
| 4533 | 5042 | <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 | 5043 | <div class="ays-pro-features-v2-video-text"> |
| 4535 | - <?php echo __("Watch Video" , "chart-builder"); ?> | |
| 5044 | + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?> | |
| 4536 | 5045 | </div> |
| 4537 | 5046 | </a> |
| 4538 | 5047 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 4539 | 5048 | <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 | 5049 | <div class="ays-pro-features-v2-upgrade-text"> |
| 4541 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 5050 | + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?> | |
| 4542 | 5051 | </div> |
| 4543 | 5052 | </a> |
| 4544 | 5053 | </div> |
| 4545 | 5054 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -4561,15 +5070,15 @@ | ||
| 4561 | 5070 | <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box"> |
| 4562 | 5071 | <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button"> |
| 4563 | 5072 | <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 | 5073 | <div class="ays-pro-features-v2-video-text"> |
| 4565 | - <?php echo __("Watch Video" , "chart-builder"); ?> | |
| 5074 | + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?> | |
| 4566 | 5075 | </div> |
| 4567 | 5076 | </a> |
| 4568 | 5077 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 4569 | 5078 | <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 | 5079 | <div class="ays-pro-features-v2-upgrade-text"> |
| 4571 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 5080 | + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?> | |
| 4572 | 5081 | </div> |
| 4573 | 5082 | </a> |
| 4574 | 5083 | </div> |
| 4575 | 5084 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -4591,15 +5100,15 @@ | ||
| 4591 | 5100 | <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box"> |
| 4592 | 5101 | <a href="https://www.youtube.com/watch?v=9UqLXG5NU_I" target="_blank" class="ays-pro-features-v2-video-button"> |
| 4593 | 5102 | <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 | 5103 | <div class="ays-pro-features-v2-video-text"> |
| 4595 | - <?php echo __("Watch Video" , "chart-builder"); ?> | |
| 5104 | + <?php echo esc_html(__("Watch Video" , "chart-builder")); ?> | |
| 4596 | 5105 | </div> |
| 4597 | 5106 | </a> |
| 4598 | 5107 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 4599 | 5108 | <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 | 5109 | <div class="ays-pro-features-v2-upgrade-text"> |
| 4601 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 5110 | + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?> | |
| 4602 | 5111 | </div> |
| 4603 | 5112 | </a> |
| 4604 | 5113 | </div> |
| 4605 | 5114 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -4627,9 +5136,9 @@ | ||
| 4627 | 5136 | </label> |
| 4628 | 5137 | </div> |
| 4629 | 5138 | <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 4630 | 5139 | <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?> > | |
| 5140 | + <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 | 5141 | <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> |
| 4633 | 5142 | </label> |
| 4634 | 5143 | </div> |
| 4635 | 5144 | </div> <!-- IMG option end --> |
| @@ -4686,9 +5195,9 @@ | ||
| 4686 | 5195 | |
| 4687 | 5196 | $sources[] = $content; |
| 4688 | 5197 | } |
| 4689 | 5198 | $content_for_escape = implode('' , $sources ); |
| 4690 | - echo html_entity_decode(esc_html( $content_for_escape )); | |
| 5199 | + echo html_entity_decode( esc_html($content_for_escape) ); | |
| 4691 | 5200 | } |
| 4692 | 5201 | |
| 4693 | 5202 | public function settings_contents_chart_styles_settings( $sources, $args ){ |
| 4694 | 5203 | $html_class_prefix = $args['html_class_prefix']; |
| @@ -4712,8 +5221,9 @@ | ||
| 4712 | 5221 | $border_width_with_title = $settings['border_width_with_title']; |
| 4713 | 5222 | $border_radius_with_title = $settings['border_radius_with_title']; |
| 4714 | 5223 | $border_color_with_title = $settings['border_color_with_title']; |
| 4715 | 5224 | $border_style_with_title = $settings['border_style_with_title']; |
| 5225 | + $border_style = $settings['border_style']; | |
| 4716 | 5226 | $border_styles = $settings['border_styles']; |
| 4717 | 5227 | $border_radius = $settings['border_radius']; |
| 4718 | 5228 | $border_color = $settings['border_color']; |
| 4719 | 5229 | $box_shadow = $settings['box_shadow']; |
| @@ -4726,9 +5236,9 @@ | ||
| 4726 | 5236 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 4727 | 5237 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4728 | 5238 | <label for="ays-chart-option-width" class="form-label"> |
| 4729 | 5239 | <?php echo esc_html(__( "Width", "chart-builder" )); ?> |
| 4730 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container, in percents.","chart-builder") ); ?>"> | |
| 5240 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container, in percents.","chart-builder") ); ?>"> | |
| 4731 | 5241 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4732 | 5242 | </a> |
| 4733 | 5243 | </label> |
| 4734 | 5244 | </div> |
| @@ -4749,9 +5259,9 @@ | ||
| 4749 | 5259 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 4750 | 5260 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4751 | 5261 | <label for="ays-chart-option-responsive-width" class="form-label"> |
| 4752 | 5262 | <?php echo esc_html(__( "Responsive Width", "chart-builder" )); ?> |
| 4753 | - <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") ); ?>"> | |
| 5263 | + <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") ); ?>"> | |
| 4754 | 5264 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4755 | 5265 | </a> |
| 4756 | 5266 | </label> |
| 4757 | 5267 | </div> |
| @@ -4765,9 +5275,9 @@ | ||
| 4765 | 5275 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 4766 | 5276 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4767 | 5277 | <label for="ays-chart-option-position"> |
| 4768 | 5278 | <?php echo esc_html(__( "Position", "chart-builder" )); ?> |
| 4769 | - <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") ); ?>"> | |
| 5279 | + <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") ); ?>"> | |
| 4770 | 5280 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4771 | 5281 | </a> |
| 4772 | 5282 | </label> |
| 4773 | 5283 | </div> |
| @@ -4787,9 +5297,9 @@ | ||
| 4787 | 5297 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 4788 | 5298 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4789 | 5299 | <label for="ays-chart-option-height" class="form-label"> |
| 4790 | 5300 | <?php echo esc_html(__( "Height", "chart-builder" )); ?> |
| 4791 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The height of the chart container, in pixels.","chart-builder") ); ?>"> | |
| 5301 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The height of the chart container, in pixels.","chart-builder") ); ?>"> | |
| 4792 | 5302 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4793 | 5303 | </a> |
| 4794 | 5304 | </label> |
| 4795 | 5305 | </div> |
| @@ -4810,9 +5320,9 @@ | ||
| 4810 | 5320 | <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"> |
| 4811 | 5321 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4812 | 5322 | <label for="ays-chart-option-font-size" class="form-label"> |
| 4813 | 5323 | <?php echo esc_html(__( "Font size", "chart-builder" )); ?> |
| 4814 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart text.","chart-builder") ); ?>"> | |
| 5324 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart text.","chart-builder") ); ?>"> | |
| 4815 | 5325 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4816 | 5326 | </a> |
| 4817 | 5327 | </label> |
| 4818 | 5328 | </div> |
| @@ -4820,24 +5330,24 @@ | ||
| 4820 | 5330 | <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) ?>"> |
| 4821 | 5331 | <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div> |
| 4822 | 5332 | </div> |
| 4823 | 5333 | </div> <!-- Font size --> |
| 4824 | - <div class="form-group row mb-2 <?= $html_class_prefix ?>options-section cb-changable-opt cb-org_chart-opt display_none"> | |
| 4825 | - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title"> | |
| 5334 | + <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"> | |
| 5335 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 4826 | 5336 | <label for="ays-chart-option-org-chart-font-size" class="form-label"> |
| 4827 | - <?php echo __( "Element size", $this->plugin_name ); ?> | |
| 4828 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The size of the chart element.","chart-builder") ); ?>"> | |
| 5337 | + <?php echo esc_html(__( "Element size", 'chart-builder' )); ?> | |
| 5338 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The size of the chart element.","chart-builder") ); ?>"> | |
| 4829 | 5339 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4830 | 5340 | </a> |
| 4831 | 5341 | </label> |
| 4832 | 5342 | </div> |
| 4833 | 5343 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> |
| 4834 | - <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]"> | |
| 5344 | + <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]"> | |
| 4835 | 5345 | <?php |
| 4836 | 5346 | foreach ( $org_chart_font_size_options as $option_slug => $option ): |
| 4837 | 5347 | $selected = ( $org_chart_font_size == $option_slug ) ? 'selected' : ''; |
| 4838 | 5348 | ?> |
| 4839 | - <option value="<?php echo $option_slug; ?>" <?php echo $selected; ?>><?php echo $option; ?></option> | |
| 5349 | + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_attr($option); ?></option> | |
| 4840 | 5350 | <?php |
| 4841 | 5351 | endforeach; |
| 4842 | 5352 | ?> |
| 4843 | 5353 | </select> |
| @@ -4846,9 +5356,9 @@ | ||
| 4846 | 5356 | <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"> |
| 4847 | 5357 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4848 | 5358 | <label for="ays-chart-option-background-color"> |
| 4849 | 5359 | <?php echo esc_html(__( "Background Color", "chart-builder" )); ?> |
| 4850 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart container.","chart-builder") ); ?>"> | |
| 5360 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart container.","chart-builder") ); ?>"> | |
| 4851 | 5361 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4852 | 5362 | </a> |
| 4853 | 5363 | </label> |
| 4854 | 5364 | </div> |
| @@ -4859,9 +5369,9 @@ | ||
| 4859 | 5369 | <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"> |
| 4860 | 5370 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4861 | 5371 | <label for="ays-chart-option-transparent-background" class="form-label"> |
| 4862 | 5372 | <?php echo esc_html(__( "Transparent background", "chart-builder" )); ?> |
| 4863 | - <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") ); ?>"> | |
| 5373 | + <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") ); ?>"> | |
| 4864 | 5374 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4865 | 5375 | </a> |
| 4866 | 5376 | </label> |
| 4867 | 5377 | </div> |
| @@ -4875,9 +5385,9 @@ | ||
| 4875 | 5385 | <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"> |
| 4876 | 5386 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4877 | 5387 | <label for="ays-chart-option-border-width"> |
| 4878 | 5388 | <?php echo esc_html(__( "Border Width", "chart-builder" )); ?> |
| 4879 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The width of the chart container border.","chart-builder") ); ?>"> | |
| 5389 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border.","chart-builder") ); ?>"> | |
| 4880 | 5390 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4881 | 5391 | </a> |
| 4882 | 5392 | </label> |
| 4883 | 5393 | </div> |
| @@ -4888,9 +5398,9 @@ | ||
| 4888 | 5398 | <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"> |
| 4889 | 5399 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4890 | 5400 | <label for="ays-chart-option-border-color"> |
| 4891 | 5401 | <?php echo esc_html(__( "Border Color", "chart-builder" )); ?> |
| 4892 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart container.","chart-builder") ); ?>"> | |
| 5402 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart container.","chart-builder") ); ?>"> | |
| 4893 | 5403 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4894 | 5404 | </a> |
| 4895 | 5405 | </label> |
| 4896 | 5406 | </div> |
| @@ -4901,9 +5411,9 @@ | ||
| 4901 | 5411 | <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"> |
| 4902 | 5412 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4903 | 5413 | <label for="ays-chart-option-border-radius"> |
| 4904 | 5414 | <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?> |
| 4905 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border radius of the chart container.","chart-builder") ); ?>"> | |
| 5415 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border radius of the chart container.","chart-builder") ); ?>"> | |
| 4906 | 5416 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4907 | 5417 | </a> |
| 4908 | 5418 | </label> |
| 4909 | 5419 | </div> |
| @@ -4912,11 +5422,33 @@ | ||
| 4912 | 5422 | </div> |
| 4913 | 5423 | </div> <!-- Border radius --> |
| 4914 | 5424 | <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"> |
| 4915 | 5425 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5426 | + <label for="ays-chart-option-border-style"> | |
| 5427 | + <?php echo esc_html(__( "Border Style", "chart-builder" )); ?> | |
| 5428 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border.","chart-builder") ); ?>"> | |
| 5429 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5430 | + </a> | |
| 5431 | + </label> | |
| 5432 | + </div> | |
| 5433 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5434 | + <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]"> | |
| 5435 | + <?php | |
| 5436 | + foreach ( $border_styles as $option_slug => $option ): | |
| 5437 | + $selected = ( $border_style == $option_slug ) ? 'selected' : ''; | |
| 5438 | + ?> | |
| 5439 | + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option> | |
| 5440 | + <?php | |
| 5441 | + endforeach; | |
| 5442 | + ?> | |
| 5443 | + </select> | |
| 5444 | + </div> | |
| 5445 | + </div> <!-- Border style --> | |
| 5446 | + <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"> | |
| 5447 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 4916 | 5448 | <label for="ays-chart-option-box-shadow" class="form-label"> |
| 4917 | 5449 | <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?> |
| 4918 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to add shadow to chart's container.","chart-builder") ); ?>"> | |
| 5450 | + <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") ); ?>"> | |
| 4919 | 5451 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4920 | 5452 | </a> |
| 4921 | 5453 | </label> |
| 4922 | 5454 | </div> |
| @@ -4930,9 +5462,9 @@ | ||
| 4930 | 5462 | <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"> |
| 4931 | 5463 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4932 | 5464 | <label for="ays-chart-option-box-shadow-color" class="form-label"> |
| 4933 | 5465 | <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?> |
| 4934 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose chart container's box shadow color.","chart-builder") ); ?>"> | |
| 5466 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose chart container's box shadow color.","chart-builder") ); ?>"> | |
| 4935 | 5467 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4936 | 5468 | </a> |
| 4937 | 5469 | </label> |
| 4938 | 5470 | </div> |
| @@ -4943,9 +5475,9 @@ | ||
| 4943 | 5475 | <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"> |
| 4944 | 5476 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4945 | 5477 | <label for="ays-chart-option-border-width-with-title"> |
| 4946 | 5478 | <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?> |
| 4947 | - <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") ); ?>"> | |
| 5479 | + <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") ); ?>"> | |
| 4948 | 5480 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4949 | 5481 | </a> |
| 4950 | 5482 | </label> |
| 4951 | 5483 | </div> |
| @@ -4956,9 +5488,9 @@ | ||
| 4956 | 5488 | <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"> |
| 4957 | 5489 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4958 | 5490 | <label for="ays-chart-option-border-radius-with-title"> |
| 4959 | 5491 | <?php echo esc_html(__( "Border radius (including title)", "chart-builder" )); ?> |
| 4960 | - <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") ); ?>"> | |
| 5492 | + <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") ); ?>"> | |
| 4961 | 5493 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4962 | 5494 | </a> |
| 4963 | 5495 | </label> |
| 4964 | 5496 | </div> |
| @@ -4969,9 +5501,9 @@ | ||
| 4969 | 5501 | <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"> |
| 4970 | 5502 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4971 | 5503 | <label for="ays-chart-option-border-color-with-title"> |
| 4972 | 5504 | <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?> |
| 4973 | - <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") ); ?>"> | |
| 5505 | + <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") ); ?>"> | |
| 4974 | 5506 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4975 | 5507 | </a> |
| 4976 | 5508 | </label> |
| 4977 | 5509 | </div> |
| @@ -4982,9 +5514,9 @@ | ||
| 4982 | 5514 | <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"> |
| 4983 | 5515 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 4984 | 5516 | <label for="ays-chart-option-border-style-with-title"> |
| 4985 | 5517 | <?php echo esc_html(__( "Border Style (including title)", "chart-builder" )); ?> |
| 4986 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The style of the chart container border including chart title and description.","chart-builder") ); ?>"> | |
| 5518 | + <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") ); ?>"> | |
| 4987 | 5519 | <i class="ays_fa ays_fa_info_circle"></i> |
| 4988 | 5520 | </a> |
| 4989 | 5521 | </label> |
| 4990 | 5522 | </div> |
| @@ -4999,14 +5531,14 @@ | ||
| 4999 | 5531 | endforeach; |
| 5000 | 5532 | ?> |
| 5001 | 5533 | </select> |
| 5002 | 5534 | </div> |
| 5003 | - </div> <!-- Position --> | |
| 5535 | + </div> <!-- Border style with title --> | |
| 5004 | 5536 | <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"> |
| 5005 | 5537 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5006 | 5538 | <label for="ays-chart-option-padding-outer"> |
| 5007 | 5539 | <?php echo esc_html(__( "Padding", "chart-builder" )); ?> |
| 5008 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The padding of the chart container.","chart-builder") ); ?>"> | |
| 5540 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The padding of the chart container.","chart-builder") ); ?>"> | |
| 5009 | 5541 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5010 | 5542 | </a> |
| 5011 | 5543 | </label> |
| 5012 | 5544 | </div> |
| @@ -5028,8 +5560,273 @@ | ||
| 5028 | 5560 | |
| 5029 | 5561 | return $sources; |
| 5030 | 5562 | } |
| 5031 | 5563 | |
| 5564 | + public function settings_contents_chart_styles_settings_chartjs( $sources, $args ){ | |
| 5565 | + $html_class_prefix = $args['html_class_prefix']; | |
| 5566 | + $html_name_prefix = $args['html_name_prefix']; | |
| 5567 | + $settings = $args['settings']; | |
| 5568 | + $border_width_with_title = $settings['border_width_with_title']; | |
| 5569 | + $border_radius_with_title = $settings['border_radius_with_title']; | |
| 5570 | + $border_color_with_title = $settings['border_color_with_title']; | |
| 5571 | + $border_style_with_title = $settings['border_style_with_title']; | |
| 5572 | + $width = $settings['width']; | |
| 5573 | + $width_format = $settings['width_format']; | |
| 5574 | + $height = $settings['height']; | |
| 5575 | + $height_format = $settings['height_format']; | |
| 5576 | + $width_format_options = $settings['width_format_options']; | |
| 5577 | + $border_width = $settings['border_width']; | |
| 5578 | + $border_radius = $settings['border_radius']; | |
| 5579 | + $border_color = $settings['border_color']; | |
| 5580 | + $background_color_chart = $settings['background_color_chart']; | |
| 5581 | + $border_style = $settings['border_style']; | |
| 5582 | + $border_styles = $settings['border_styles']; | |
| 5583 | + $box_shadow = $settings['box_shadow']; | |
| 5584 | + $box_shadow_color = $settings['box_shadow_color']; | |
| 5585 | + $padding_outer = $settings['padding_outer']; | |
| 5586 | + ob_start(); | |
| 5587 | + ?> | |
| 5588 | + <div class="ays-accordion-data-main-wrap"> | |
| 5589 | + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> | |
| 5590 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5591 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5592 | + <label for="ays-chart-option-width" class="form-label"> | |
| 5593 | + <?php echo esc_html(__( "Width", "chart-builder" )); ?> | |
| 5594 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container, in percents.","chart-builder") ); ?>"> | |
| 5595 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5596 | + </a> | |
| 5597 | + </label> | |
| 5598 | + </div> | |
| 5599 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5600 | + <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) ?>"> | |
| 5601 | + <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]"> | |
| 5602 | + <?php | |
| 5603 | + foreach ( $width_format_options as $option_slug => $option ): | |
| 5604 | + $selected = ( $width_format == $option_slug ) ? 'selected' : ''; | |
| 5605 | + ?> | |
| 5606 | + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option> | |
| 5607 | + <?php | |
| 5608 | + endforeach; | |
| 5609 | + ?> | |
| 5610 | + </select> | |
| 5611 | + </div> | |
| 5612 | + </div> <!-- Width --> | |
| 5613 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5614 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5615 | + <label for="ays-chart-option-height" class="form-label"> | |
| 5616 | + <?php echo esc_html(__( "Height", "chart-builder" )); ?> | |
| 5617 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The height of the chart container, in pixels.","chart-builder") ); ?>"> | |
| 5618 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5619 | + </a> | |
| 5620 | + </label> | |
| 5621 | + </div> | |
| 5622 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5623 | + <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) ?>"> | |
| 5624 | + <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]"> | |
| 5625 | + <?php | |
| 5626 | + foreach ( $width_format_options as $option_slug => $option ): | |
| 5627 | + $selected = ( $height_format == $option_slug ) ? 'selected' : ''; | |
| 5628 | + ?> | |
| 5629 | + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option> | |
| 5630 | + <?php | |
| 5631 | + endforeach; | |
| 5632 | + ?> | |
| 5633 | + </select> | |
| 5634 | + </div> | |
| 5635 | + </div> <!-- Height --> | |
| 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-border-width"> | |
| 5639 | + <?php echo esc_html(__( "Border Width", "chart-builder" )); ?> | |
| 5640 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the chart container border.","chart-builder") ); ?>"> | |
| 5641 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5642 | + </a> | |
| 5643 | + </label> | |
| 5644 | + </div> | |
| 5645 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5646 | + <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) ?>"> | |
| 5647 | + </div> | |
| 5648 | + </div> <!-- Border Width --> | |
| 5649 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5650 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5651 | + <label for="ays-chart-option-border-radius"> | |
| 5652 | + <?php echo esc_html(__( "Border Radius", "chart-builder" )); ?> | |
| 5653 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The radius of the chart container border.","chart-builder") ); ?>"> | |
| 5654 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5655 | + </a> | |
| 5656 | + </label> | |
| 5657 | + </div> | |
| 5658 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5659 | + <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) ?>"> | |
| 5660 | + </div> | |
| 5661 | + </div> <!-- Border Radius --> | |
| 5662 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5663 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5664 | + <label for="ays-chart-option-border-color"> | |
| 5665 | + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?> | |
| 5666 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart container.","chart-builder") ); ?>"> | |
| 5667 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5668 | + </a> | |
| 5669 | + </label> | |
| 5670 | + </div> | |
| 5671 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 5672 | + <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) ?>"> | |
| 5673 | + </div> | |
| 5674 | + </div> <!-- Border color --> | |
| 5675 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5676 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5677 | + <label for="ays-chart-option-border-style"> | |
| 5678 | + <?php echo esc_html(__( "Border Style", "chart-builder" )); ?> | |
| 5679 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The style of the chart container border.","chart-builder") ); ?>"> | |
| 5680 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5681 | + </a> | |
| 5682 | + </label> | |
| 5683 | + </div> | |
| 5684 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5685 | + <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]"> | |
| 5686 | + <?php | |
| 5687 | + foreach ( $border_styles as $option_slug => $option ): | |
| 5688 | + $selected = ( $border_style == $option_slug ) ? 'selected' : ''; | |
| 5689 | + ?> | |
| 5690 | + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option> | |
| 5691 | + <?php | |
| 5692 | + endforeach; | |
| 5693 | + ?> | |
| 5694 | + </select> | |
| 5695 | + </div> | |
| 5696 | + </div> <!-- Border style --> | |
| 5697 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5698 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5699 | + <label for="ays-chart-option-backgorund-color"> | |
| 5700 | + <?php echo esc_html(__( "Background Color", "chart-builder" )); ?> | |
| 5701 | + <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") ); ?>"> | |
| 5702 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5703 | + </a> | |
| 5704 | + </label> | |
| 5705 | + </div> | |
| 5706 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 5707 | + <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) ?>"> | |
| 5708 | + </div> | |
| 5709 | + </div><!-- Background color --> | |
| 5710 | + | |
| 5711 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5712 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5713 | + <label for="ays-chart-option-box-shadow" class="form-label"> | |
| 5714 | + <?php echo esc_html(__( "Box Shadow", "chart-builder" )); ?> | |
| 5715 | + <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") ); ?>"> | |
| 5716 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5717 | + </a> | |
| 5718 | + </label> | |
| 5719 | + </div> | |
| 5720 | + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 5721 | + <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> | |
| 5722 | + <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); ?> > | |
| 5723 | + <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> | |
| 5724 | + </label> | |
| 5725 | + </div> | |
| 5726 | + </div> <!-- box shadow --> | |
| 5727 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5728 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5729 | + <label for="ays-chart-option-box-shadow-color" class="form-label"> | |
| 5730 | + <?php echo esc_html(__( "Box Shadow Color", "chart-builder" )); ?> | |
| 5731 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Choose chart container's box shadow color.","chart-builder") ); ?>"> | |
| 5732 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5733 | + </a> | |
| 5734 | + </label> | |
| 5735 | + </div> | |
| 5736 | + <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 5737 | + <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) ?>"> | |
| 5738 | + </div> | |
| 5739 | + </div> <!-- box shadow color --> | |
| 5740 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5741 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5742 | + <label for="ays-chart-option-border-width-with-title"> | |
| 5743 | + <?php echo esc_html(__( "Border Width (including title)", "chart-builder" )); ?> | |
| 5744 | + <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") ); ?>"> | |
| 5745 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5746 | + </a> | |
| 5747 | + </label> | |
| 5748 | + </div> | |
| 5749 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5750 | + <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) ?>"> | |
| 5751 | + </div> | |
| 5752 | + </div> <!-- Border Width with title --> | |
| 5753 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5754 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5755 | + <label for="ays-chart-option-border-radius-with-title"> | |
| 5756 | + <?php echo esc_html(__( "Border Radius (including title)", "chart-builder" )); ?> | |
| 5757 | + <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") ); ?>"> | |
| 5758 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5759 | + </a> | |
| 5760 | + </label> | |
| 5761 | + </div> | |
| 5762 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5763 | + <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) ?>"> | |
| 5764 | + </div> | |
| 5765 | + </div> <!-- Border radius with title --> | |
| 5766 | + <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"> | |
| 5767 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5768 | + <label for="ays-chart-option-border-color-with-title"> | |
| 5769 | + <?php echo esc_html(__( "Border Color (including title)", "chart-builder" )); ?> | |
| 5770 | + <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") ); ?>"> | |
| 5771 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5772 | + </a> | |
| 5773 | + </label> | |
| 5774 | + </div> | |
| 5775 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5776 | + <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) ?>"> | |
| 5777 | + </div> | |
| 5778 | + </div> <!-- Border colro with title --> | |
| 5779 | + <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"> | |
| 5780 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5781 | + <label for="ays-chart-option-border-style-with-title"> | |
| 5782 | + <?php echo esc_html(__( "Border Style (including title)", "chart-builder" )); ?> | |
| 5783 | + <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") ); ?>"> | |
| 5784 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5785 | + </a> | |
| 5786 | + </label> | |
| 5787 | + </div> | |
| 5788 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5789 | + <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]"> | |
| 5790 | + <?php | |
| 5791 | + foreach ( $border_styles as $option_slug => $option ): | |
| 5792 | + $selected = ( $border_style_with_title == $option_slug ) ? 'selected' : ''; | |
| 5793 | + ?> | |
| 5794 | + <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option> | |
| 5795 | + <?php | |
| 5796 | + endforeach; | |
| 5797 | + ?> | |
| 5798 | + </select> | |
| 5799 | + </div> | |
| 5800 | + </div> <!-- Border style with title --> | |
| 5801 | + <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"> | |
| 5802 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5803 | + <label for="ays-chart-option-padding-outer"> | |
| 5804 | + <?php echo esc_html(__( "Padding", "chart-builder" )); ?> | |
| 5805 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The padding of the chart container.","chart-builder") ); ?>"> | |
| 5806 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 5807 | + </a> | |
| 5808 | + </label> | |
| 5809 | + </div> | |
| 5810 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5811 | + <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) ?>"> | |
| 5812 | + </div> | |
| 5813 | + </div> <!-- Padding outer --> | |
| 5814 | + </div> | |
| 5815 | + </div> | |
| 5816 | + <?php | |
| 5817 | + $content = ob_get_clean(); | |
| 5818 | + | |
| 5819 | + $title = __( 'Chart', "chart-builder" ); | |
| 5820 | + | |
| 5821 | + $sources['chart'] = array( | |
| 5822 | + 'content' => $content, | |
| 5823 | + 'title' => $title | |
| 5824 | + ); | |
| 5825 | + | |
| 5826 | + return $sources; | |
| 5827 | + } | |
| 5828 | + | |
| 5032 | 5829 | public function settings_contents_chart_area_styles_settings( $sources, $args ){ |
| 5033 | 5830 | $html_class_prefix = $args['html_class_prefix']; |
| 5034 | 5831 | $html_name_prefix = $args['html_name_prefix']; |
| 5035 | 5832 | $settings = $args['settings']; |
| @@ -5048,9 +5845,9 @@ | ||
| 5048 | 5845 | <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"> |
| 5049 | 5846 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5050 | 5847 | <label for="ays-chart-option-chart-background-color"> |
| 5051 | 5848 | <?php echo esc_html(__( "Background Color", "chart-builder" )); ?> |
| 5052 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The background color of the chart area.","chart-builder") ); ?>"> | |
| 5849 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The background color of the chart area.","chart-builder") ); ?>"> | |
| 5053 | 5850 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5054 | 5851 | </a> |
| 5055 | 5852 | </label> |
| 5056 | 5853 | </div> |
| @@ -5061,9 +5858,9 @@ | ||
| 5061 | 5858 | <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"> |
| 5062 | 5859 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5063 | 5860 | <label for="ays-chart-option-chart-border-width"> |
| 5064 | 5861 | <?php echo esc_html(__( "Border Width", "chart-builder" )); ?> |
| 5065 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border width of the chart area.","chart-builder") ); ?>"> | |
| 5862 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border width of the chart area.","chart-builder") ); ?>"> | |
| 5066 | 5863 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5067 | 5864 | </a> |
| 5068 | 5865 | </label> |
| 5069 | 5866 | </div> |
| @@ -5074,9 +5871,9 @@ | ||
| 5074 | 5871 | <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"> |
| 5075 | 5872 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5076 | 5873 | <label for="ays-chart-option-chart-border-color"> |
| 5077 | 5874 | <?php echo esc_html(__( "Border Color", "chart-builder" )); ?> |
| 5078 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The border color of the chart area.","chart-builder") ); ?>"> | |
| 5875 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The border color of the chart area.","chart-builder") ); ?>"> | |
| 5079 | 5876 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5080 | 5877 | </a> |
| 5081 | 5878 | </label> |
| 5082 | 5879 | </div> |
| @@ -5087,9 +5884,9 @@ | ||
| 5087 | 5884 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5088 | 5885 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5089 | 5886 | <label for="ays-chart-option-chart-left-margin"> |
| 5090 | 5887 | <?php echo esc_html(__( "Left Margin", "chart-builder" )); ?> |
| 5091 | - <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") ); ?>"> | |
| 5888 | + <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") ); ?>"> | |
| 5092 | 5889 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5093 | 5890 | </a> |
| 5094 | 5891 | </label> |
| 5095 | 5892 | </div> |
| @@ -5100,9 +5897,9 @@ | ||
| 5100 | 5897 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5101 | 5898 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5102 | 5899 | <label for="ays-chart-option-chart-right-margin"> |
| 5103 | 5900 | <?php echo esc_html(__( "Right Margin", "chart-builder" )); ?> |
| 5104 | - <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") ); ?>"> | |
| 5901 | + <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") ); ?>"> | |
| 5105 | 5902 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5106 | 5903 | </a> |
| 5107 | 5904 | </label> |
| 5108 | 5905 | </div> |
| @@ -5113,9 +5910,9 @@ | ||
| 5113 | 5910 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5114 | 5911 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5115 | 5912 | <label for="ays-chart-option-chart-top-margin"> |
| 5116 | 5913 | <?php echo esc_html(__( "Top Margin", "chart-builder" )); ?> |
| 5117 | - <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") ); ?>"> | |
| 5914 | + <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") ); ?>"> | |
| 5118 | 5915 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5119 | 5916 | </a> |
| 5120 | 5917 | </label> |
| 5121 | 5918 | </div> |
| @@ -5126,9 +5923,9 @@ | ||
| 5126 | 5923 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5127 | 5924 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5128 | 5925 | <label for="ays-chart-option-chart-bottom-margin"> |
| 5129 | 5926 | <?php echo esc_html(__( "Bottom Margin", "chart-builder" )); ?> |
| 5130 | - <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") ); ?>"> | |
| 5927 | + <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") ); ?>"> | |
| 5131 | 5928 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5132 | 5929 | </a> |
| 5133 | 5930 | </label> |
| 5134 | 5931 | </div> |
| @@ -5178,9 +5975,9 @@ | ||
| 5178 | 5975 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5179 | 5976 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5180 | 5977 | <label for="ays-chart-option-title-color"> |
| 5181 | 5978 | <?php echo esc_html(__( "Color", "chart-builder" )); ?> |
| 5182 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>"> | |
| 5979 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>"> | |
| 5183 | 5980 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5184 | 5981 | </a> |
| 5185 | 5982 | </label> |
| 5186 | 5983 | </div> |
| @@ -5191,9 +5988,9 @@ | ||
| 5191 | 5988 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5192 | 5989 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5193 | 5990 | <label for="ays-chart-option-title-font-size" class="form-label"> |
| 5194 | 5991 | <?php echo esc_html(__( "Font size", "chart-builder" )); ?> |
| 5195 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>"> | |
| 5992 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>"> | |
| 5196 | 5993 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5197 | 5994 | </a> |
| 5198 | 5995 | </label> |
| 5199 | 5996 | </div> |
| @@ -5205,9 +6002,9 @@ | ||
| 5205 | 6002 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5206 | 6003 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5207 | 6004 | <label for="ays-chart-option-title-bold" class="form-label"> |
| 5208 | 6005 | <?php echo esc_html(__( "Bold text", "chart-builder" )); ?> |
| 5209 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>"> | |
| 6006 | + <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") ); ?>"> | |
| 5210 | 6007 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5211 | 6008 | </a> |
| 5212 | 6009 | </label> |
| 5213 | 6010 | </div> |
| @@ -5221,9 +6018,9 @@ | ||
| 5221 | 6018 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5222 | 6019 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5223 | 6020 | <label for="ays-chart-option-title-italic" class="form-label"> |
| 5224 | 6021 | <?php echo esc_html(__( "Italic text", "chart-builder" )); ?> |
| 5225 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>"> | |
| 6022 | + <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") ); ?>"> | |
| 5226 | 6023 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5227 | 6024 | </a> |
| 5228 | 6025 | </label> |
| 5229 | 6026 | </div> |
| @@ -5237,9 +6034,9 @@ | ||
| 5237 | 6034 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5238 | 6035 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5239 | 6036 | <label for="ays-chart-option-title-position"> |
| 5240 | 6037 | <?php echo esc_html(__( "Position", "chart-builder" )); ?> |
| 5241 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>"> | |
| 6038 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>"> | |
| 5242 | 6039 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5243 | 6040 | </a> |
| 5244 | 6041 | </label> |
| 5245 | 6042 | </div> |
| @@ -5259,9 +6056,9 @@ | ||
| 5259 | 6056 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5260 | 6057 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5261 | 6058 | <label for="ays-chart-option-title-gap" class="form-label"> |
| 5262 | 6059 | <?php echo esc_html(__( "Gap", "chart-builder" )); ?> |
| 5263 | - <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") ); ?>"> | |
| 6060 | + <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") ); ?>"> | |
| 5264 | 6061 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5265 | 6062 | </a> |
| 5266 | 6063 | </label> |
| 5267 | 6064 | </div> |
| @@ -5273,9 +6070,9 @@ | ||
| 5273 | 6070 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5274 | 6071 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5275 | 6072 | <label for="ays-chart-option-title-gap-description" class="form-label"> |
| 5276 | 6073 | <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?> |
| 5277 | - <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") ); ?>"> | |
| 6074 | + <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") ); ?>"> | |
| 5278 | 6075 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5279 | 6076 | </a> |
| 5280 | 6077 | </label> |
| 5281 | 6078 | </div> |
| @@ -5287,9 +6084,9 @@ | ||
| 5287 | 6084 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5288 | 6085 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5289 | 6086 | <label for="ays-chart-option-title-text-transform"> |
| 5290 | 6087 | <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?> |
| 5291 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>"> | |
| 6088 | + <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") ); ?>"> | |
| 5292 | 6089 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5293 | 6090 | </a> |
| 5294 | 6091 | </label> |
| 5295 | 6092 | </div> |
| @@ -5309,9 +6106,9 @@ | ||
| 5309 | 6106 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5310 | 6107 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5311 | 6108 | <label for="ays-chart-option-title-letter-spacing" class="form-label"> |
| 5312 | 6109 | <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?> |
| 5313 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>"> | |
| 6110 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>"> | |
| 5314 | 6111 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5315 | 6112 | </a> |
| 5316 | 6113 | </label> |
| 5317 | 6114 | </div> |
| @@ -5323,9 +6120,9 @@ | ||
| 5323 | 6120 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5324 | 6121 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5325 | 6122 | <label for="ays-chart-option-title-text-decoration"> |
| 5326 | 6123 | <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?> |
| 5327 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>"> | |
| 6124 | + <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") ); ?>"> | |
| 5328 | 6125 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5329 | 6126 | </a> |
| 5330 | 6127 | </label> |
| 5331 | 6128 | </div> |
| @@ -5345,9 +6142,9 @@ | ||
| 5345 | 6142 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5346 | 6143 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5347 | 6144 | <label for="ays-chart-option-title-text-shadow" class="form-label"> |
| 5348 | 6145 | <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?> |
| 5349 | - <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") ); ?>"> | |
| 6146 | + <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") ); ?>"> | |
| 5350 | 6147 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5351 | 6148 | </a> |
| 5352 | 6149 | </label> |
| 5353 | 6150 | </div> |
| @@ -5361,9 +6158,9 @@ | ||
| 5361 | 6158 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5362 | 6159 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5363 | 6160 | <label for="ays-chart-option-title-shadow-color"> |
| 5364 | 6161 | <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?> |
| 5365 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>"> | |
| 6162 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>"> | |
| 5366 | 6163 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5367 | 6164 | </a> |
| 5368 | 6165 | </label> |
| 5369 | 6166 | </div> |
| @@ -5413,9 +6210,9 @@ | ||
| 5413 | 6210 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5414 | 6211 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5415 | 6212 | <label for="ays-chart-option-title-color"> |
| 5416 | 6213 | <?php echo esc_html(__( "Color", "chart-builder" )); ?> |
| 5417 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart title.","chart-builder") ); ?>"> | |
| 6214 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart title.","chart-builder") ); ?>"> | |
| 5418 | 6215 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5419 | 6216 | </a> |
| 5420 | 6217 | </label> |
| 5421 | 6218 | </div> |
| @@ -5426,9 +6223,9 @@ | ||
| 5426 | 6223 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5427 | 6224 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5428 | 6225 | <label for="ays-chart-option-title-font-size" class="form-label"> |
| 5429 | 6226 | <?php echo esc_html(__( "Font size", "chart-builder" )); ?> |
| 5430 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart title.","chart-builder") ); ?>"> | |
| 6227 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart title.","chart-builder") ); ?>"> | |
| 5431 | 6228 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5432 | 6229 | </a> |
| 5433 | 6230 | </label> |
| 5434 | 6231 | </div> |
| @@ -5440,9 +6237,9 @@ | ||
| 5440 | 6237 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5441 | 6238 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5442 | 6239 | <label for="ays-chart-option-title-bold" class="form-label"> |
| 5443 | 6240 | <?php echo esc_html(__( "Bold text", "chart-builder" )); ?> |
| 5444 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text bold.","chart-builder") ); ?>"> | |
| 6241 | + <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") ); ?>"> | |
| 5445 | 6242 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5446 | 6243 | </a> |
| 5447 | 6244 | </label> |
| 5448 | 6245 | </div> |
| @@ -5456,9 +6253,9 @@ | ||
| 5456 | 6253 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5457 | 6254 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5458 | 6255 | <label for="ays-chart-option-title-italic" class="form-label"> |
| 5459 | 6256 | <?php echo esc_html(__( "Italic text", "chart-builder" )); ?> |
| 5460 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart title text italic.","chart-builder") ); ?>"> | |
| 6257 | + <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") ); ?>"> | |
| 5461 | 6258 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5462 | 6259 | </a> |
| 5463 | 6260 | </label> |
| 5464 | 6261 | </div> |
| @@ -5472,9 +6269,9 @@ | ||
| 5472 | 6269 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5473 | 6270 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5474 | 6271 | <label for="ays-chart-option-title-position"> |
| 5475 | 6272 | <?php echo esc_html(__( "Position", "chart-builder" )); ?> |
| 5476 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart title.","chart-builder") ); ?>"> | |
| 6273 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart title.","chart-builder") ); ?>"> | |
| 5477 | 6274 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5478 | 6275 | </a> |
| 5479 | 6276 | </label> |
| 5480 | 6277 | </div> |
| @@ -5494,9 +6291,9 @@ | ||
| 5494 | 6291 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5495 | 6292 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5496 | 6293 | <label for="ays-chart-option-title-gap" class="form-label"> |
| 5497 | 6294 | <?php echo esc_html(__( "Gap", "chart-builder" )); ?> |
| 5498 | - <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") ); ?>"> | |
| 6295 | + <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") ); ?>"> | |
| 5499 | 6296 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5500 | 6297 | </a> |
| 5501 | 6298 | </label> |
| 5502 | 6299 | </div> |
| @@ -5508,9 +6305,9 @@ | ||
| 5508 | 6305 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5509 | 6306 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5510 | 6307 | <label for="ays-chart-option-title-gap-description" class="form-label"> |
| 5511 | 6308 | <?php echo esc_html(__( "Distance from description", "chart-builder" )); ?> |
| 5512 | - <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") ); ?>"> | |
| 6309 | + <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") ); ?>"> | |
| 5513 | 6310 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5514 | 6311 | </a> |
| 5515 | 6312 | </label> |
| 5516 | 6313 | </div> |
| @@ -5522,9 +6319,9 @@ | ||
| 5522 | 6319 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5523 | 6320 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5524 | 6321 | <label for="ays-chart-option-title-text-transform"> |
| 5525 | 6322 | <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?> |
| 5526 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>"> | |
| 6323 | + <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") ); ?>"> | |
| 5527 | 6324 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5528 | 6325 | </a> |
| 5529 | 6326 | </label> |
| 5530 | 6327 | </div> |
| @@ -5544,9 +6341,9 @@ | ||
| 5544 | 6341 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5545 | 6342 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5546 | 6343 | <label for="ays-chart-option-title-letter-spacing" class="form-label"> |
| 5547 | 6344 | <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?> |
| 5548 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart title letters.","chart-builder") ); ?>"> | |
| 6345 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart title letters.","chart-builder") ); ?>"> | |
| 5549 | 6346 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5550 | 6347 | </a> |
| 5551 | 6348 | </label> |
| 5552 | 6349 | </div> |
| @@ -5558,9 +6355,9 @@ | ||
| 5558 | 6355 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5559 | 6356 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5560 | 6357 | <label for="ays-chart-option-title-text-decoration"> |
| 5561 | 6358 | <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?> |
| 5562 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart title.","chart-builder") ); ?>"> | |
| 6359 | + <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") ); ?>"> | |
| 5563 | 6360 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5564 | 6361 | </a> |
| 5565 | 6362 | </label> |
| 5566 | 6363 | </div> |
| @@ -5580,9 +6377,9 @@ | ||
| 5580 | 6377 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5581 | 6378 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5582 | 6379 | <label for="ays-chart-option-title-text-shadow" class="form-label"> |
| 5583 | 6380 | <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?> |
| 5584 | - <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") ); ?>"> | |
| 6381 | + <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") ); ?>"> | |
| 5585 | 6382 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5586 | 6383 | </a> |
| 5587 | 6384 | </label> |
| 5588 | 6385 | </div> |
| @@ -5596,9 +6393,9 @@ | ||
| 5596 | 6393 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5597 | 6394 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5598 | 6395 | <label for="ays-chart-option-title-shadow-color"> |
| 5599 | 6396 | <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?> |
| 5600 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart title.","chart-builder") ); ?>"> | |
| 6397 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart title.","chart-builder") ); ?>"> | |
| 5601 | 6398 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5602 | 6399 | </a> |
| 5603 | 6400 | </label> |
| 5604 | 6401 | </div> |
| @@ -5647,9 +6444,9 @@ | ||
| 5647 | 6444 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5648 | 6445 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5649 | 6446 | <label for="ays-chart-option-description-color"> |
| 5650 | 6447 | <?php echo esc_html(__( "Color", "chart-builder" )); ?> |
| 5651 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>"> | |
| 6448 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>"> | |
| 5652 | 6449 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5653 | 6450 | </a> |
| 5654 | 6451 | </label> |
| 5655 | 6452 | </div> |
| @@ -5660,9 +6457,9 @@ | ||
| 5660 | 6457 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5661 | 6458 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5662 | 6459 | <label for="ays-chart-option-description-font-size" class="form-label"> |
| 5663 | 6460 | <?php echo esc_html(__( "Font size", "chart-builder" )); ?> |
| 5664 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>"> | |
| 6461 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>"> | |
| 5665 | 6462 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5666 | 6463 | </a> |
| 5667 | 6464 | </label> |
| 5668 | 6465 | </div> |
| @@ -5674,9 +6471,9 @@ | ||
| 5674 | 6471 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5675 | 6472 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5676 | 6473 | <label for="ays-chart-option-description-bold" class="form-label"> |
| 5677 | 6474 | <?php echo esc_html(__( "Bold text", "chart-builder" )); ?> |
| 5678 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>"> | |
| 6475 | + <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") ); ?>"> | |
| 5679 | 6476 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5680 | 6477 | </a> |
| 5681 | 6478 | </label> |
| 5682 | 6479 | </div> |
| @@ -5690,9 +6487,9 @@ | ||
| 5690 | 6487 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5691 | 6488 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5692 | 6489 | <label for="ays-chart-option-description-italic" class="form-label"> |
| 5693 | 6490 | <?php echo esc_html(__( "Italic text", "chart-builder" )); ?> |
| 5694 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>"> | |
| 6491 | + <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") ); ?>"> | |
| 5695 | 6492 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5696 | 6493 | </a> |
| 5697 | 6494 | </label> |
| 5698 | 6495 | </div> |
| @@ -5706,9 +6503,9 @@ | ||
| 5706 | 6503 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5707 | 6504 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5708 | 6505 | <label for="ays-chart-option-description-position"> |
| 5709 | 6506 | <?php echo esc_html(__( "Position", "chart-builder" )); ?> |
| 5710 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>"> | |
| 6507 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>"> | |
| 5711 | 6508 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5712 | 6509 | </a> |
| 5713 | 6510 | </label> |
| 5714 | 6511 | </div> |
| @@ -5728,9 +6525,9 @@ | ||
| 5728 | 6525 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5729 | 6526 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5730 | 6527 | <label for="ays-chart-option-description-text-transform"> |
| 5731 | 6528 | <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?> |
| 5732 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>"> | |
| 6529 | + <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") ); ?>"> | |
| 5733 | 6530 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5734 | 6531 | </a> |
| 5735 | 6532 | </label> |
| 5736 | 6533 | </div> |
| @@ -5750,9 +6547,9 @@ | ||
| 5750 | 6547 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5751 | 6548 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5752 | 6549 | <label for="ays-chart-option-description-letter-spacing" class="form-label"> |
| 5753 | 6550 | <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?> |
| 5754 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>"> | |
| 6551 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>"> | |
| 5755 | 6552 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5756 | 6553 | </a> |
| 5757 | 6554 | </label> |
| 5758 | 6555 | </div> |
| @@ -5764,9 +6561,9 @@ | ||
| 5764 | 6561 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5765 | 6562 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5766 | 6563 | <label for="ays-chart-option-description-text-decoration"> |
| 5767 | 6564 | <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?> |
| 5768 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>"> | |
| 6565 | + <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") ); ?>"> | |
| 5769 | 6566 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5770 | 6567 | </a> |
| 5771 | 6568 | </label> |
| 5772 | 6569 | </div> |
| @@ -5786,9 +6583,9 @@ | ||
| 5786 | 6583 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5787 | 6584 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5788 | 6585 | <label for="ays-chart-option-description-text-shadow" class="form-label"> |
| 5789 | 6586 | <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?> |
| 5790 | - <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") ); ?>"> | |
| 6587 | + <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") ); ?>"> | |
| 5791 | 6588 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5792 | 6589 | </a> |
| 5793 | 6590 | </label> |
| 5794 | 6591 | </div> |
| @@ -5802,9 +6599,9 @@ | ||
| 5802 | 6599 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5803 | 6600 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5804 | 6601 | <label for="ays-chart-option-description-shadow-color"> |
| 5805 | 6602 | <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?> |
| 5806 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>"> | |
| 6603 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>"> | |
| 5807 | 6604 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5808 | 6605 | </a> |
| 5809 | 6606 | </label> |
| 5810 | 6607 | </div> |
| @@ -5853,9 +6650,9 @@ | ||
| 5853 | 6650 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5854 | 6651 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5855 | 6652 | <label for="ays-chart-option-description-color"> |
| 5856 | 6653 | <?php echo esc_html(__( "Color", "chart-builder" )); ?> |
| 5857 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color of the chart description.","chart-builder") ); ?>"> | |
| 6654 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the chart description.","chart-builder") ); ?>"> | |
| 5858 | 6655 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5859 | 6656 | </a> |
| 5860 | 6657 | </label> |
| 5861 | 6658 | </div> |
| @@ -5866,9 +6663,9 @@ | ||
| 5866 | 6663 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5867 | 6664 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5868 | 6665 | <label for="ays-chart-option-description-font-size" class="form-label"> |
| 5869 | 6666 | <?php echo esc_html(__( "Font size", "chart-builder" )); ?> |
| 5870 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The font size of the chart description.","chart-builder") ); ?>"> | |
| 6667 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The font size of the chart description.","chart-builder") ); ?>"> | |
| 5871 | 6668 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5872 | 6669 | </a> |
| 5873 | 6670 | </label> |
| 5874 | 6671 | </div> |
| @@ -5880,9 +6677,9 @@ | ||
| 5880 | 6677 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5881 | 6678 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5882 | 6679 | <label for="ays-chart-option-description-bold" class="form-label"> |
| 5883 | 6680 | <?php echo esc_html(__( "Bold text", "chart-builder" )); ?> |
| 5884 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text bold.","chart-builder") ); ?>"> | |
| 6681 | + <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") ); ?>"> | |
| 5885 | 6682 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5886 | 6683 | </a> |
| 5887 | 6684 | </label> |
| 5888 | 6685 | </div> |
| @@ -5896,9 +6693,9 @@ | ||
| 5896 | 6693 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5897 | 6694 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5898 | 6695 | <label for="ays-chart-option-description-italic" class="form-label"> |
| 5899 | 6696 | <?php echo esc_html(__( "Italic text", "chart-builder" )); ?> |
| 5900 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Tick this option to make the chart description text italic.","chart-builder") ); ?>"> | |
| 6697 | + <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") ); ?>"> | |
| 5901 | 6698 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5902 | 6699 | </a> |
| 5903 | 6700 | </label> |
| 5904 | 6701 | </div> |
| @@ -5912,9 +6709,9 @@ | ||
| 5912 | 6709 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5913 | 6710 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5914 | 6711 | <label for="ays-chart-option-description-position"> |
| 5915 | 6712 | <?php echo esc_html(__( "Position", "chart-builder" )); ?> |
| 5916 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The position of the chart description.","chart-builder") ); ?>"> | |
| 6713 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The position of the chart description.","chart-builder") ); ?>"> | |
| 5917 | 6714 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5918 | 6715 | </a> |
| 5919 | 6716 | </label> |
| 5920 | 6717 | </div> |
| @@ -5934,9 +6731,9 @@ | ||
| 5934 | 6731 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5935 | 6732 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5936 | 6733 | <label for="ays-chart-option-description-text-transform"> |
| 5937 | 6734 | <?php echo esc_html(__( "Text-transform", "chart-builder" )); ?> |
| 5938 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>"> | |
| 6735 | + <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") ); ?>"> | |
| 5939 | 6736 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5940 | 6737 | </a> |
| 5941 | 6738 | </label> |
| 5942 | 6739 | </div> |
| @@ -5956,9 +6753,9 @@ | ||
| 5956 | 6753 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5957 | 6754 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5958 | 6755 | <label for="ays-chart-option-description-letter-spacing" class="form-label"> |
| 5959 | 6756 | <?php echo esc_html(__( "Letter spacing", "chart-builder" )); ?> |
| 5960 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify the space between the chart description letters.","chart-builder") ); ?>"> | |
| 6757 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Specify the space between the chart description letters.","chart-builder") ); ?>"> | |
| 5961 | 6758 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5962 | 6759 | </a> |
| 5963 | 6760 | </label> |
| 5964 | 6761 | </div> |
| @@ -5970,9 +6767,9 @@ | ||
| 5970 | 6767 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5971 | 6768 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5972 | 6769 | <label for="ays-chart-option-description-text-decoration"> |
| 5973 | 6770 | <?php echo esc_html(__( "Text-decoration", "chart-builder" )); ?> |
| 5974 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Specify how to capitalize the text of the chart description.","chart-builder") ); ?>"> | |
| 6771 | + <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") ); ?>"> | |
| 5975 | 6772 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5976 | 6773 | </a> |
| 5977 | 6774 | </label> |
| 5978 | 6775 | </div> |
| @@ -5992,9 +6789,9 @@ | ||
| 5992 | 6789 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5993 | 6790 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5994 | 6791 | <label for="ays-chart-option-description-text-shadow" class="form-label"> |
| 5995 | 6792 | <?php echo esc_html(__( "Text shadow", "chart-builder" )); ?> |
| 5996 | - <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") ); ?>"> | |
| 6793 | + <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") ); ?>"> | |
| 5997 | 6794 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5998 | 6795 | </a> |
| 5999 | 6796 | </label> |
| 6000 | 6797 | </div> |
| @@ -6008,9 +6805,9 @@ | ||
| 6008 | 6805 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 6009 | 6806 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6010 | 6807 | <label for="ays-chart-option-description-shadow-color"> |
| 6011 | 6808 | <?php echo esc_html(__( "Text Shadow Color", "chart-builder" )); ?> |
| 6012 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The text shadow color of the chart description.","chart-builder") ); ?>"> | |
| 6809 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The text shadow color of the chart description.","chart-builder") ); ?>"> | |
| 6013 | 6810 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6014 | 6811 | </a> |
| 6015 | 6812 | </label> |
| 6016 | 6813 | </div> |
| @@ -6071,9 +6868,9 @@ | ||
| 6071 | 6868 | |
| 6072 | 6869 | $sources[] = $content; |
| 6073 | 6870 | } |
| 6074 | 6871 | $content_for_escape = implode('' , $sources ); |
| 6075 | - echo html_entity_decode(esc_html( $content_for_escape )); | |
| 6872 | + echo html_entity_decode( esc_html($content_for_escape) ); | |
| 6076 | 6873 | } |
| 6077 | 6874 | |
| 6078 | 6875 | public function settings_contents_advanced_settings( $sources, $args ){ |
| 6079 | 6876 | $html_class_prefix = $args['html_class_prefix']; |
| @@ -6178,9 +6975,9 @@ | ||
| 6178 | 6975 | <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"> |
| 6179 | 6976 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6180 | 6977 | <label for="ays-chart-option-slice-text"> |
| 6181 | 6978 | <?php echo esc_html(__( "Slice text", "chart-builder" )); ?> |
| 6182 | - <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") ); ?>"> | |
| 6979 | + <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") ); ?>"> | |
| 6183 | 6980 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6184 | 6981 | </a> |
| 6185 | 6982 | </label> |
| 6186 | 6983 | </div> |
| @@ -6200,9 +6997,9 @@ | ||
| 6200 | 6997 | <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"> |
| 6201 | 6998 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6202 | 6999 | <label for="ays-chart-option-tooltip-text"> |
| 6203 | 7000 | <?php echo esc_html(__( "Slice tooltip text", "chart-builder" )); ?> |
| 6204 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("Choose how to display the text in the chart tooltip.","chart-builder") ); ?>"> | |
| 7001 | + <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") ); ?>"> | |
| 6205 | 7002 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6206 | 7003 | </a> |
| 6207 | 7004 | </label> |
| 6208 | 7005 | </div> |
| @@ -6235,9 +7032,9 @@ | ||
| 6235 | 7032 | <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"> |
| 6236 | 7033 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6237 | 7034 | <label for="ays-chart-option-data-grouping-label" class="form-label"> |
| 6238 | 7035 | <?php echo esc_html(__( "Chart Data Grouping Label", "chart-builder" )); ?> |
| 6239 | - <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") ); ?>"> | |
| 7036 | + <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") ); ?>"> | |
| 6240 | 7037 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6241 | 7038 | </a> |
| 6242 | 7039 | </label> |
| 6243 | 7040 | </div> |
| @@ -6278,17 +7075,18 @@ | ||
| 6278 | 7075 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6279 | 7076 | <label for="ays-chart-option-focus-target"> |
| 6280 | 7077 | <?php echo esc_html(__( "Focus target", "chart-builder" )); ?> |
| 6281 | 7078 | <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php |
| 6282 | - echo htmlspecialchars( sprintf( | |
| 7079 | + echo esc_html( sprintf( | |
| 7080 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 6283 | 7081 | "<p>" . __('There are two ways to focus the data table elements.', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" . |
| 6284 | - __('%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>" . | |
| 6285 | - __('%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>", | |
| 6286 | - '<em>', | |
| 6287 | - '</em>', | |
| 6288 | - '<em>', | |
| 6289 | - '</em>' | |
| 6290 | - ) ); | |
| 7082 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 7083 | + __('%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>" . | |
| 7084 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 7085 | + __('%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>", | |
| 7086 | + '<em>', '</em>', | |
| 7087 | + '<em>', '</em>' | |
| 7088 | + )); | |
| 6291 | 7089 | ?>"> |
| 6292 | 7090 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6293 | 7091 | </a> |
| 6294 | 7092 | </label> |
| @@ -6323,17 +7121,18 @@ | ||
| 6323 | 7121 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6324 | 7122 | <label for="ays-chart-option-group-width"> |
| 6325 | 7123 | <?php echo esc_html(__( "Bar width", "chart-builder" )); ?> |
| 6326 | 7124 | <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php |
| 6327 | - echo htmlspecialchars( sprintf( | |
| 7125 | + echo esc_html( sprintf( | |
| 7126 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 6328 | 7127 | "<p>" . __('The width of the bars, specified in either of these formats:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" . |
| 6329 | - __('%sPixels:%s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" . | |
| 6330 | - __('%sPercentage:%s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>", | |
| 6331 | - '<em>', | |
| 6332 | - '</em>', | |
| 6333 | - '<em>', | |
| 6334 | - '</em>' | |
| 6335 | - ) ); | |
| 7128 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 7129 | + __('%1$sPixels:%2$s Set the width of the bars in pixels.', "chart-builder") . "</li><li>" . | |
| 7130 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 7131 | + __('%1$sPercentage:%2$s Set the width of the bars in percentage.', "chart-builder") . "</li></ul>", | |
| 7132 | + '<em>', '</em>', | |
| 7133 | + '<em>', '</em>' | |
| 7134 | + )); | |
| 6336 | 7135 | ?>"> |
| 6337 | 7136 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6338 | 7137 | </a> |
| 6339 | 7138 | </label> |
| @@ -6385,23 +7184,24 @@ | ||
| 6385 | 7184 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6386 | 7185 | <label for="ays-chart-option-multiple-data-format"> |
| 6387 | 7186 | <?php echo esc_html(__( "Multiple data format", "chart-builder" )); ?> |
| 6388 | 7187 | <a class="ays_help" data-bs-toggle="tooltip" data-bs-html="true" title="<?php |
| 6389 | - echo htmlspecialchars( sprintf( | |
| 7188 | + echo esc_html( sprintf( | |
| 7189 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 6390 | 7190 | "<p>" . __('How multiple data selections are rolled up into tooltips:', "chart-builder") . "</p><ul class='ays_tooltop_ul'><li>" . |
| 6391 | - __('%sCategory:%s Group selected data by row titles.', "chart-builder") . "</li><li>" . | |
| 6392 | - __('%sSeries:%s Group selected data by column titles.', "chart-builder") . "</li><li>" . | |
| 6393 | - __('%sAuto:%s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" . | |
| 6394 | - __('%sNone:%s Show only one tooltip per selection.', "chart-builder") . "</li></ul>", | |
| 6395 | - '<em>', | |
| 6396 | - '</em>', | |
| 6397 | - '<em>', | |
| 6398 | - '</em>', | |
| 6399 | - '<em>', | |
| 6400 | - '</em>', | |
| 6401 | - '<em>', | |
| 6402 | - '</em>' | |
| 6403 | - ) ); | |
| 7191 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 7192 | + __('%1$sCategory:%2$s Group selected data by row titles.', "chart-builder") . "</li><li>" . | |
| 7193 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 7194 | + __('%1$sSeries:%2$s Group selected data by column titles.', "chart-builder") . "</li><li>" . | |
| 7195 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 7196 | + __('%1$sAuto:%2$s Group selected data by row titles, if they have the same titles or by column titles', "chart-builder") . "</li><li>" . | |
| 7197 | + /* translators: %1$s: Opening <em> tag, %2$s: Closing <em> tag */ | |
| 7198 | + __('%1$sNone:%2$s Show only one tooltip per selection.', "chart-builder") . "</li></ul>", | |
| 7199 | + '<em>', '</em>', | |
| 7200 | + '<em>', '</em>', | |
| 7201 | + '<em>', '</em>', | |
| 7202 | + '<em>', '</em>' | |
| 7203 | + )); | |
| 6404 | 7204 | ?>"> |
| 6405 | 7205 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6406 | 7206 | </a> |
| 6407 | 7207 | </label> |
| @@ -6556,15 +7356,15 @@ | ||
| 6556 | 7356 | <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) ?>"> |
| 6557 | 7357 | </div> |
| 6558 | 7358 | </div> <!-- Line dash pattern --> |
| 6559 | 7359 | <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"> |
| 6560 | - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title"> | |
| 7360 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 6561 | 7361 | <label for="ays-chart-option-donut-hole-size"> |
| 6562 | - <?php echo __( "Hole size", $this->plugin_name ); ?> | |
| 7362 | + <?php echo esc_html(__( "Hole size", 'chart-builder' )); ?> | |
| 6563 | 7363 | </label> |
| 6564 | 7364 | </div> |
| 6565 | - <div class="col-sm-7 <?= $html_class_prefix ?>input-align-right <?= $html_class_prefix ?>option-input"> | |
| 6566 | - <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 ?>"> | |
| 7365 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 7366 | + <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) ?>"> | |
| 6567 | 7367 | </div> |
| 6568 | 7368 | </div> <!-- Donut hole size --> |
| 6569 | 7369 | <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"> |
| 6570 | 7370 | <div class="ays-pro-features-v2-small-buttons-box-middle ays-pro-features-v2-big-buttons-box"> |
| @@ -6571,20 +7371,20 @@ | ||
| 6571 | 7371 | <div class="ays-pro-features-v2-video-button"></div> |
| 6572 | 7372 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 6573 | 7373 | <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> |
| 6574 | 7374 | <div class="ays-pro-features-v2-upgrade-text"> |
| 6575 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 7375 | + <?php echo esc_html(__("Upgrade" , "chart-builder")); ?> | |
| 6576 | 7376 | </div> |
| 6577 | 7377 | </a> |
| 6578 | 7378 | </div> |
| 6579 | - <div class="col-sm-5 d-flex align-items-center <?= $html_class_prefix ?>option-title"> | |
| 7379 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix )?>option-title"> | |
| 6580 | 7380 | <label for="ays-chart-option-curve-type"> |
| 6581 | - <?php echo __( "Line curve type", "chart-builder" ); ?> | |
| 7381 | + <?php echo esc_html(__( "Line curve type", "chart-builder" )); ?> | |
| 6582 | 7382 | </label> |
| 6583 | 7383 | </div> |
| 6584 | 7384 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> |
| 6585 | - <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]"> | |
| 6586 | - <option><?php echo __( "Straight", "chart-builder" ); ?></option> | |
| 7385 | + <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]"> | |
| 7386 | + <option><?php echo esc_html(__( "Straight", "chart-builder" )); ?></option> | |
| 6587 | 7387 | </select> |
| 6588 | 7388 | </div> |
| 6589 | 7389 | </div> <!-- Line curve type --> |
| 6590 | 7390 | <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"> |
| @@ -6632,9 +7432,9 @@ | ||
| 6632 | 7432 | <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"> |
| 6633 | 7433 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6634 | 7434 | <label for="ays-chart-option-org-classname" class="form-label"> |
| 6635 | 7435 | <?php echo esc_html(__( "Custom CSS class", "chart-builder" )); ?> |
| 6636 | - <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") ); ?>"> | |
| 7436 | + <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") ); ?>"> | |
| 6637 | 7437 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6638 | 7438 | </a> |
| 6639 | 7439 | </label> |
| 6640 | 7440 | </div> |
| @@ -6645,9 +7445,11 @@ | ||
| 6645 | 7445 | <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none"> |
| 6646 | 7446 | <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"> |
| 6647 | 7447 | <br> |
| 6648 | 7448 | <blockquote> |
| 6649 | - <?php echo sprintf(__( "%sNote:%s Custom CSS class must be set for the options below to take effect.", $this->plugin_name ), '<strong>', '</strong>'); ?> | |
| 7449 | + <?php echo sprintf( | |
| 7450 | + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */ | |
| 7451 | + esc_html(__( '%1$sNote:%2$s Custom CSS class must be set for the options below to take effect.', 'chart-builder' )), '<strong>', '</strong>'); ?> | |
| 6650 | 7452 | </blockquote> |
| 6651 | 7453 | <br> |
| 6652 | 7454 | </div> |
| 6653 | 7455 | <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"> |
| @@ -6745,9 +7547,9 @@ | ||
| 6745 | 7547 | <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"> |
| 6746 | 7548 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6747 | 7549 | <label for="ays-chart-option-org-selected-classname" class="form-label"> |
| 6748 | 7550 | <?php echo esc_html(__( "Selected node custom CSS class", "chart-builder" )); ?> |
| 6749 | - <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") ); ?>"> | |
| 7551 | + <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") ); ?>"> | |
| 6750 | 7552 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6751 | 7553 | </a> |
| 6752 | 7554 | </label> |
| 6753 | 7555 | </div> |
| @@ -6758,9 +7560,14 @@ | ||
| 6758 | 7560 | <div class="form-group mb-2 cb-changable-opt cb-org_chart-opt display_none"> |
| 6759 | 7561 | <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"> |
| 6760 | 7562 | <br> |
| 6761 | 7563 | <blockquote> |
| 6762 | - <?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>'); ?> | |
| 7564 | + <?php echo sprintf( | |
| 7565 | + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */ | |
| 7566 | + 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' )), | |
| 7567 | + '<strong>', | |
| 7568 | + '</strong>' | |
| 7569 | + ); ?> | |
| 6763 | 7570 | </blockquote> |
| 6764 | 7571 | <br> |
| 6765 | 7572 | </div> |
| 6766 | 7573 | <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"> |
| @@ -6812,8 +7619,10 @@ | ||
| 6812 | 7619 | $outer_radius = $settings['outer_radius']; |
| 6813 | 7620 | $slice_spacing = $settings['slice_spacing']; |
| 6814 | 7621 | $circumference = $settings['circumference']; |
| 6815 | 7622 | $start_angle = $settings['start_angle']; |
| 7623 | + $slice_border_color = $settings['slice_border_color']; | |
| 7624 | + $slice_border_width = $settings['slice_border_width']; | |
| 6816 | 7625 | // $index_axis = $settings['index_axis']; |
| 6817 | 7626 | |
| 6818 | 7627 | ob_start(); |
| 6819 | 7628 | ?> |
| @@ -6874,8 +7683,34 @@ | ||
| 6874 | 7683 | <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) ?>"> |
| 6875 | 7684 | <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">°</div> |
| 6876 | 7685 | </div> |
| 6877 | 7686 | </div> <!-- Start Angle --> |
| 7687 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt "> | |
| 7688 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 7689 | + <label for="ays-chart-option-slice-border-width"> | |
| 7690 | + <?php echo esc_html(__( "Border Width", "chart-builder" )); ?> | |
| 7691 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The width of the slice borders.","chart-builder") ); ?>"> | |
| 7692 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 7693 | + </a> | |
| 7694 | + </label> | |
| 7695 | + </div> | |
| 7696 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 7697 | + <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) ?>"> | |
| 7698 | + </div> | |
| 7699 | + </div> <!-- Border Width --> | |
| 7700 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section cb-changable-opt cb-pie_chart-opt "> | |
| 7701 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 7702 | + <label for="ays-chart-option-slice-border-color"> | |
| 7703 | + <?php echo esc_html(__( "Border Color", "chart-builder" )); ?> | |
| 7704 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the slice borders.","chart-builder") ); ?>"> | |
| 7705 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 7706 | + </a> | |
| 7707 | + </label> | |
| 7708 | + </div> | |
| 7709 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 7710 | + <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) ?>"> | |
| 7711 | + </div> | |
| 7712 | + </div> <!-- Slice border color --> | |
| 6878 | 7713 | <!-- <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"> |
| 6879 | 7714 | <div class="col-sm-5 d-flex align-items-center <?php // echo esc_attr($html_class_prefix) ?>option-title"> |
| 6880 | 7715 | <label for="ays-chart-option-index-axis"> |
| 6881 | 7716 | <?php // echo esc_html(__( "Horizontal ", "chart-builder" )); ?> |
| @@ -6918,15 +7753,15 @@ | ||
| 6918 | 7753 | if ( !isset( $source[0] ) ) { |
| 6919 | 7754 | if (count($source[1]) > 2) { |
| 6920 | 7755 | $titles = array(); |
| 6921 | 7756 | for ($i = 0; $i < count($source[1]); $i++) { |
| 6922 | - array_push($titles, __("Title", $this->plugin_name).$i); | |
| 7757 | + array_push($titles, __("Title", 'chart-builder').$i); | |
| 6923 | 7758 | } |
| 6924 | 7759 | $source[0] = $titles; |
| 6925 | 7760 | } else { |
| 6926 | 7761 | $source[0] = array( |
| 6927 | - __("Country", $this->plugin_name), | |
| 6928 | - __("Population", $this->plugin_name), | |
| 7762 | + __("Country", 'chart-builder'), | |
| 7763 | + __("Population", 'chart-builder'), | |
| 6929 | 7764 | ); |
| 6930 | 7765 | } |
| 6931 | 7766 | |
| 6932 | 7767 | ksort($source); |
| @@ -6959,9 +7794,9 @@ | ||
| 6959 | 7794 | <g> |
| 6960 | 7795 | <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" /> |
| 6961 | 7796 | </g> |
| 6962 | 7797 | </svg> |
| 6963 | - <span><?php echo $val[0]; ?></span> | |
| 7798 | + <span><?php echo esc_html($val[0]); ?></span> | |
| 6964 | 7799 | </legend> |
| 6965 | 7800 | <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content"> |
| 6966 | 7801 | <div class="ays-slices-accordion-data-main-wrap"> |
| 6967 | 7802 | <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> |
| @@ -6968,9 +7803,9 @@ | ||
| 6968 | 7803 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 6969 | 7804 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 6970 | 7805 | <label for="ays-chart-option-slice-color"> |
| 6971 | 7806 | <?php echo esc_html(__( "Color", "chart-builder" )); ?> |
| 6972 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for this slice.","chart-builder") ); ?>"> | |
| 7807 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice.","chart-builder") ); ?>"> | |
| 6973 | 7808 | <i class="ays_fa ays_fa_info_circle"></i> |
| 6974 | 7809 | </a> |
| 6975 | 7810 | </label> |
| 6976 | 7811 | </div> |
| @@ -6975,13 +7810,13 @@ | ||
| 6975 | 7810 | </label> |
| 6976 | 7811 | </div> |
| 6977 | 7812 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 6978 | 7813 | <input type="color" |
| 6979 | - id="ays-chart-option-slice-color-<?php echo $key; ?>" | |
| 7814 | + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>" | |
| 6980 | 7815 | class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" |
| 6981 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo $key; ?>]" | |
| 6982 | - value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : $slice_colors_default[$key]; ?>" | |
| 6983 | - data-slice-id="<?php echo $key; ?>"> | |
| 7816 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo esc_attr($key); ?>]" | |
| 7817 | + value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : esc_attr($slice_colors_default[$key]); ?>" | |
| 7818 | + data-slice-id="<?php echo esc_attr($key); ?>"> | |
| 6984 | 7819 | </div> |
| 6985 | 7820 | </div> <!-- Slice color --> |
| 6986 | 7821 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 6987 | 7822 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -6993,13 +7828,13 @@ | ||
| 6993 | 7828 | </label> |
| 6994 | 7829 | </div> |
| 6995 | 7830 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 6996 | 7831 | <input type="number" |
| 6997 | - id="ays-chart-option-slice-offset-<?php echo $key; ?>" | |
| 7832 | + id="ays-chart-option-slice-offset-<?php echo esc_attr($key); ?>" | |
| 6998 | 7833 | class="ays-chart-option-slice-offset ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" |
| 6999 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo $key; ?>]" | |
| 7834 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_offset][<?php echo esc_attr($key); ?>]" | |
| 7000 | 7835 | value="<?php echo isset($slice_offset[$key]) ? esc_attr($slice_offset[$key]) : 0 ; ?>" |
| 7001 | - data-slice-id="<?php echo $key; ?>" | |
| 7836 | + data-slice-id="<?php echo esc_attr($key); ?>" | |
| 7002 | 7837 | step=".01" min="0.0" max="1.0"> |
| 7003 | 7838 | </div> |
| 7004 | 7839 | </div> <!-- Slice offset --> |
| 7005 | 7840 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| @@ -7005,9 +7840,9 @@ | ||
| 7005 | 7840 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 7006 | 7841 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 7007 | 7842 | <label for="ays-chart-option-slice-text-color"> |
| 7008 | 7843 | <?php echo esc_html(__( "Text color", "chart-builder" )); ?> |
| 7009 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo htmlspecialchars( __("The color to use for the text of this slice.","chart-builder") ); ?>"> | |
| 7844 | + <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") ); ?>"> | |
| 7010 | 7845 | <i class="ays_fa ays_fa_info_circle"></i> |
| 7011 | 7846 | </a> |
| 7012 | 7847 | </label> |
| 7013 | 7848 | </div> |
| @@ -7012,13 +7847,13 @@ | ||
| 7012 | 7847 | </label> |
| 7013 | 7848 | </div> |
| 7014 | 7849 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 7015 | 7850 | <input type="color" |
| 7016 | - id="ays-chart-option-slice-text-color-<?php echo $key; ?>" | |
| 7851 | + id="ays-chart-option-slice-text-color-<?php echo esc_attr($key); ?>" | |
| 7017 | 7852 | class="ays-chart-option-slice-text-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" |
| 7018 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo $key; ?>]" | |
| 7853 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_text_color][<?php echo esc_attr($key); ?>]" | |
| 7019 | 7854 | value="<?php echo isset($slice_text_color[$key]) ? esc_attr($slice_text_color[$key]) : '#ffffff'; ?>" |
| 7020 | - data-slice-id="<?php echo $key; ?>"> | |
| 7855 | + data-slice-id="<?php echo esc_attr($key); ?>"> | |
| 7021 | 7856 | </div> |
| 7022 | 7857 | </div> <!-- Slice color --> |
| 7023 | 7858 | </div> |
| 7024 | 7859 | </div> |
| @@ -7030,9 +7865,9 @@ | ||
| 7030 | 7865 | </div> |
| 7031 | 7866 | </div> |
| 7032 | 7867 | <br> |
| 7033 | 7868 | <blockquote> |
| 7034 | - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?> | |
| 7869 | + <?php echo esc_html(__( "Save the chart to update the data.", "chart-builder" )); ?> | |
| 7035 | 7870 | </blockquote> |
| 7036 | 7871 | </div> |
| 7037 | 7872 | <?php |
| 7038 | 7873 | |
| @@ -7043,9 +7878,9 @@ | ||
| 7043 | 7878 | } |
| 7044 | 7879 | |
| 7045 | 7880 | $content = ob_get_clean(); |
| 7046 | 7881 | |
| 7047 | - $title = __( 'Slices settings', "chart-builder" ); | |
| 7882 | + $title = esc_html(__( 'Slices settings', 'chart-builder' )); | |
| 7048 | 7883 | |
| 7049 | 7884 | $sources['slices_settings'] = array( |
| 7050 | 7885 | 'content' => $content, |
| 7051 | 7886 | 'title' => $title |
| @@ -7052,9 +7887,120 @@ | ||
| 7052 | 7887 | ); |
| 7053 | 7888 | |
| 7054 | 7889 | return $sources; |
| 7055 | 7890 | } |
| 7891 | + | |
| 7892 | + public function settings_contents_slices_settings_chartjs( $sources, $args ){ | |
| 7893 | + $html_class_prefix = $args['html_class_prefix']; | |
| 7894 | + $html_name_prefix = $args['html_name_prefix']; | |
| 7895 | + $settings = $args['settings']; | |
| 7896 | + $source = $args['source']; | |
| 7897 | + $source = isset($source["commonTypeCharts"]) ? $source["commonTypeCharts"] : $source; | |
| 7898 | + $source_chart_type = $args['source_chart_type']; | |
| 7899 | + $settings = $args['settings']; | |
| 7900 | + $title_row = array_shift($source); | |
| 7056 | 7901 | |
| 7902 | + if (isset($source) && !empty($source)) { | |
| 7903 | + if ( !isset( $source[0] ) ) { | |
| 7904 | + if (count($source[1]) > 2) { | |
| 7905 | + $titles = array(); | |
| 7906 | + for ($i = 0; $i < count($source[1]); $i++) { | |
| 7907 | + array_push($titles, __("Title", 'chart-builder').$i); | |
| 7908 | + } | |
| 7909 | + $source[0] = $titles; | |
| 7910 | + } else { | |
| 7911 | + $source[0] = array( | |
| 7912 | + __("Country", 'chart-builder'), | |
| 7913 | + __("Population", 'chart-builder'), | |
| 7914 | + ); | |
| 7915 | + } | |
| 7916 | + | |
| 7917 | + ksort($source); | |
| 7918 | + } | |
| 7919 | + } | |
| 7920 | + | |
| 7921 | + if ($source_chart_type == 'pie_chart') { | |
| 7922 | + foreach ($source as $key => $row) { | |
| 7923 | + $source[$key] = array_slice($row, 0, 2); | |
| 7924 | + } | |
| 7925 | + } | |
| 7926 | + | |
| 7927 | + ob_start(); | |
| 7928 | + if ($source_chart_type == 'pie_chart') { | |
| 7929 | + $slice_color = $settings['slice_color']; | |
| 7930 | + $slice_colors_default = $settings['slice_colors_default']; | |
| 7931 | + | |
| 7932 | + ?> | |
| 7933 | + <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"> | |
| 7934 | + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> | |
| 7935 | + <div class="<?php echo esc_attr($html_class_prefix) ?>slices-settings"> | |
| 7936 | + <?php | |
| 7937 | + foreach ( $source as $key => $val ): | |
| 7938 | + ?> | |
| 7939 | + <fieldset class="ays-slices-accordion-options-container <?php echo esc_attr($html_class_prefix) ?>options-slices-<?php echo esc_attr($key); ?>" data-collapsed="true"> | |
| 7940 | + <legend class="ays-slices-accordion-options-header"> | |
| 7941 | + <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"> | |
| 7942 | + <g> | |
| 7943 | + <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" /> | |
| 7944 | + </g> | |
| 7945 | + </svg> | |
| 7946 | + <span><?php echo esc_html($val[0]); ?></span> | |
| 7947 | + </legend> | |
| 7948 | + <div class="ays-slices-accordion-options-content ays-slices-accordion-options-content"> | |
| 7949 | + <div class="ays-slices-accordion-data-main-wrap"> | |
| 7950 | + <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> | |
| 7951 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 7952 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 7953 | + <label for="ays-chart-option-slice-color"> | |
| 7954 | + <?php echo esc_html(__( "Color", "chart-builder" )); ?> | |
| 7955 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color to use for this slice.","chart-builder") ); ?>"> | |
| 7956 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 7957 | + </a> | |
| 7958 | + </label> | |
| 7959 | + </div> | |
| 7960 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 7961 | + <input type="color" | |
| 7962 | + id="ays-chart-option-slice-color-<?php echo esc_attr($key); ?>" | |
| 7963 | + class="ays-chart-option-slice-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" | |
| 7964 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[slice_color][<?php echo esc_attr($key); ?>]" | |
| 7965 | + value="<?php echo isset($slice_color[$key]) ? esc_attr($slice_color[$key]) : esc_attr($slice_colors_default[$key]); ?>" | |
| 7966 | + data-slice-id="<?php echo esc_attr($key); ?>"> | |
| 7967 | + </div> | |
| 7968 | + </div> <!-- Slice color --> | |
| 7969 | + </div> | |
| 7970 | + </div> | |
| 7971 | + </div> | |
| 7972 | + </fieldset> | |
| 7973 | + <?php | |
| 7974 | + endforeach; | |
| 7975 | + ?> | |
| 7976 | + </div> | |
| 7977 | + </div> | |
| 7978 | + <br> | |
| 7979 | + <blockquote> | |
| 7980 | + <?php echo esc_html(__( "Save the chart to update the data.", "chart-builder" )); ?> | |
| 7981 | + </blockquote> | |
| 7982 | + </div> | |
| 7983 | + <?php | |
| 7984 | + | |
| 7985 | + } else { | |
| 7986 | + ?> | |
| 7987 | + <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> | |
| 7988 | + <?php | |
| 7989 | + } | |
| 7990 | + | |
| 7991 | + $content = ob_get_clean(); | |
| 7992 | + | |
| 7993 | + $title = esc_html(__( 'Slices settings', 'chart-builder' )); | |
| 7994 | + | |
| 7995 | + $sources['slices_settings'] = array( | |
| 7996 | + 'content' => $content, | |
| 7997 | + 'title' => $title | |
| 7998 | + ); | |
| 7999 | + | |
| 8000 | + return $sources; | |
| 8001 | + } | |
| 8002 | + | |
| 7057 | 8003 | public function settings_contents_series_settings( $sources, $args ){ |
| 7058 | 8004 | $html_class_prefix = $args['html_class_prefix']; |
| 7059 | 8005 | $html_name_prefix = $args['html_name_prefix']; |
| 7060 | 8006 | $settings = $args['settings']; |
| @@ -7071,15 +8017,15 @@ | ||
| 7071 | 8017 | if ( !isset( $source[0] ) ) { |
| 7072 | 8018 | if (count($source[1]) > 2) { |
| 7073 | 8019 | $titles = array(); |
| 7074 | 8020 | for ($i = 0; $i < count($source[1]); $i++) { |
| 7075 | - array_push($titles, __("Title", $this->plugin_name).$i); | |
| 8021 | + array_push($titles, __("Title", "chart-builder").$i); | |
| 7076 | 8022 | } |
| 7077 | 8023 | $source[0] = $titles; |
| 7078 | 8024 | } else { |
| 7079 | 8025 | $source[0] = array( |
| 7080 | - __("Country", $this->plugin_name), | |
| 7081 | - __("Population", $this->plugin_name), | |
| 8026 | + __("Country", "chart-builder"), | |
| 8027 | + __("Population", "chart-builder"), | |
| 7082 | 8028 | ); |
| 7083 | 8029 | } |
| 7084 | 8030 | |
| 7085 | 8031 | ksort($source); |
| @@ -7097,8 +8043,9 @@ | ||
| 7097 | 8043 | $series_row = array_shift($source); |
| 7098 | 8044 | $title = array_shift($series_row); |
| 7099 | 8045 | $series_color = $settings['series_color']; |
| 7100 | 8046 | $series_colors_default = $settings['series_colors_default']; |
| 8047 | + $series_format = $settings['series_format']; | |
| 7101 | 8048 | $series_visible_in_legend = $settings['series_visible_in_legend']; |
| 7102 | 8049 | $series_line_width = $settings['series_line_width']; |
| 7103 | 8050 | $series_point_size = $settings['series_point_size']; |
| 7104 | 8051 | $series_point_shape = $settings['series_point_shape']; |
| @@ -7116,9 +8063,9 @@ | ||
| 7116 | 8063 | <g> |
| 7117 | 8064 | <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" /> |
| 7118 | 8065 | </g> |
| 7119 | 8066 | </svg> |
| 7120 | - <span><?php echo $val; ?></span> | |
| 8067 | + <span><?php echo esc_attr($val); ?></span> | |
| 7121 | 8068 | </legend> |
| 7122 | 8069 | <div class="ays-series-accordion-options-content ays-series-accordion-options-content"> |
| 7123 | 8070 | <div class="ays-series-accordion-data-main-wrap"> |
| 7124 | 8071 | <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> |
| @@ -7129,13 +8076,13 @@ | ||
| 7129 | 8076 | </label> |
| 7130 | 8077 | </div> |
| 7131 | 8078 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 7132 | 8079 | <input type="color" |
| 7133 | - id="ays-chart-option-series-color-<?php echo $key; ?>" | |
| 8080 | + id="ays-chart-option-series-color-<?php echo esc_attr($key); ?>" | |
| 7134 | 8081 | class="ays-chart-option-series-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" |
| 7135 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo $key; ?>]" | |
| 7136 | - value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : $series_colors_default[$key]; ?>" | |
| 7137 | - data-series-id="<?php echo $key; ?>"> | |
| 8082 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_color][<?php echo esc_attr($key); ?>]" | |
| 8083 | + value="<?php echo isset($series_color[$key]) ? esc_attr($series_color[$key]) : esc_attr($series_colors_default[$key]); ?>" | |
| 8084 | + data-series-id="<?php echo esc_attr($key); ?>"> | |
| 7138 | 8085 | </div> |
| 7139 | 8086 | </div> <!-- series color --> |
| 7140 | 8087 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 7141 | 8088 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -7148,18 +8095,36 @@ | ||
| 7148 | 8095 | </div> |
| 7149 | 8096 | <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 7150 | 8097 | <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> |
| 7151 | 8098 | <input type="checkbox" |
| 7152 | - id="ays-chart-option-series-visible-in-legend-<?php echo $key; ?>" | |
| 8099 | + id="ays-chart-option-series-visible-in-legend-<?php echo esc_attr($key); ?>" | |
| 7153 | 8100 | class="ays-chart-option-series-visible-in-legend <?php echo esc_attr($html_class_prefix) ?>toggle-switch" |
| 7154 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo $key; ?>]" | |
| 8101 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_visible_in_legend][<?php echo esc_attr($key); ?>]" | |
| 7155 | 8102 | value="on" |
| 7156 | - data-series-id="<?php echo $key; ?>" | |
| 8103 | + data-series-id="<?php echo esc_attr($key); ?>" | |
| 7157 | 8104 | <?php echo isset($series_visible_in_legend[$key]) && $series_visible_in_legend[$key] == 'on' ? 'checked' : (!isset($series_color[$key]) ? 'checked' : ''); ?> > |
| 7158 | 8105 | <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> |
| 7159 | 8106 | </label> |
| 7160 | 8107 | </div> |
| 7161 | 8108 | </div> <!-- Series visible in legend --> |
| 8109 | + <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 8110 | + <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 8111 | + <label for="ays-chart-option-series-color"> | |
| 8112 | + <?php echo esc_html(__( "Format", "chart-builder" )); ?> | |
| 8113 | + <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") ); ?>"> | |
| 8114 | + <i class="ays_fa ays_fa_info_circle"></i> | |
| 8115 | + </a> | |
| 8116 | + </label> | |
| 8117 | + </div> | |
| 8118 | + <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 8119 | + <input type="text" | |
| 8120 | + id="ays-chart-option-series-format-<?php echo $key; ?>" | |
| 8121 | + class="ays-chart-option-series-format ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" | |
| 8122 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_format][<?php echo $key; ?>]" | |
| 8123 | + value="<?php echo isset($series_format[$key]) && '' !== $series_format[$key] ? esc_attr($series_format[$key]) : ''; ?>" | |
| 8124 | + data-series-id="<?php echo $key; ?>"> | |
| 8125 | + </div> | |
| 8126 | + </div> <!-- Format --> | |
| 7162 | 8127 | <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"> |
| 7163 | 8128 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 7164 | 8129 | <label for="ays-chart-option-series-line-width"> |
| 7165 | 8130 | <?php echo esc_html(__( "Line width", "chart-builder" )); ?> |
| @@ -7169,13 +8134,13 @@ | ||
| 7169 | 8134 | </label> |
| 7170 | 8135 | </div> |
| 7171 | 8136 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 7172 | 8137 | <input type="number" |
| 7173 | - id="ays-chart-option-series-line-width-<?php echo $key; ?>" | |
| 8138 | + id="ays-chart-option-series-line-width-<?php echo esc_attr($key); ?>" | |
| 7174 | 8139 | class="ays-chart-option-series-line-width ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" |
| 7175 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo $key; ?>]" | |
| 7176 | - value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : $line_width; ?>" | |
| 7177 | - data-series-id="<?php echo $key; ?>"> | |
| 8140 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_line_width][<?php echo esc_attr($key); ?>]" | |
| 8141 | + value="<?php echo isset($series_line_width[$key]) ? esc_attr($series_line_width[$key]) : esc_attr($line_width); ?>" | |
| 8142 | + data-series-id="<?php echo esc_attr($key); ?>"> | |
| 7178 | 8143 | </div> |
| 7179 | 8144 | </div> <!-- Line width --> |
| 7180 | 8145 | <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"> |
| 7181 | 8146 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -7187,13 +8152,13 @@ | ||
| 7187 | 8152 | </label> |
| 7188 | 8153 | </div> |
| 7189 | 8154 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 7190 | 8155 | <input type="number" |
| 7191 | - id="ays-chart-option-series-point-size-<?php echo $key; ?>" | |
| 8156 | + id="ays-chart-option-series-point-size-<?php echo esc_attr($key); ?>" | |
| 7192 | 8157 | class="ays-chart-option-series-point-size ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" |
| 7193 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo $key; ?>]" | |
| 7194 | - value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : $point_size; ?>" | |
| 7195 | - data-series-id="<?php echo $key; ?>"> | |
| 8158 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_size][<?php echo esc_attr($key); ?>]" | |
| 8159 | + value="<?php echo isset($series_point_size[$key]) ? esc_attr($series_point_size[$key]) : esc_attr($point_size); ?>" | |
| 8160 | + data-series-id="<?php echo esc_attr($key); ?>"> | |
| 7196 | 8161 | </div> |
| 7197 | 8162 | </div> <!-- Point size --> |
| 7198 | 8163 | <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"> |
| 7199 | 8164 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -7205,12 +8170,12 @@ | ||
| 7205 | 8170 | </label> |
| 7206 | 8171 | </div> |
| 7207 | 8172 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 7208 | 8173 | <select |
| 7209 | - id="ays-chart-option-series-point-shape-<?php echo $key; ?>" | |
| 8174 | + id="ays-chart-option-series-point-shape-<?php echo esc_attr($key); ?>" | |
| 7210 | 8175 | class="ays-chart-option-series-point-shape <?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" |
| 7211 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo $key; ?>]" | |
| 7212 | - data-series-id="<?php echo $key; ?>"> | |
| 8176 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[series_point_shape][<?php echo esc_attr($key); ?>]" | |
| 8177 | + data-series-id="<?php echo esc_attr($key); ?>"> | |
| 7213 | 8178 | > |
| 7214 | 8179 | <?php |
| 7215 | 8180 | $value = isset($series_point_shape[$key]) ? esc_attr($series_point_shape[$key]) : $point_shape; |
| 7216 | 8181 | foreach ( $point_shape_options as $option_slug => $option ): |
| @@ -7233,11 +8198,16 @@ | ||
| 7233 | 8198 | </div> |
| 7234 | 8199 | </div> |
| 7235 | 8200 | <br> |
| 7236 | 8201 | <blockquote> |
| 7237 | - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?> | |
| 8202 | + <?php echo esc_html(__( "Save the chart to update the data.", 'chart-builder' )); ?> | |
| 7238 | 8203 | <br> |
| 7239 | - <?php echo sprintf(__( "%sNote:%s If you are not able to set the options, disable the row settings feature.", $this->plugin_name ), '<strong>', '</strong>'); ?> | |
| 8204 | + <?php echo sprintf( | |
| 8205 | + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */ | |
| 8206 | + esc_html(__( '%1$sNote:%2$s If you are not able to set the options, disable the row settings feature.', 'chart-builder' )), | |
| 8207 | + '<strong>', | |
| 8208 | + '</strong>' | |
| 8209 | + ); ?> | |
| 7240 | 8210 | </blockquote> |
| 7241 | 8211 | </div> |
| 7242 | 8212 | <?php |
| 7243 | 8213 | |
| @@ -7271,15 +8241,15 @@ | ||
| 7271 | 8241 | if ( !isset( $source[0] ) ) { |
| 7272 | 8242 | if (count($source[1]) > 2) { |
| 7273 | 8243 | $titles = array(); |
| 7274 | 8244 | for ($i = 0; $i < count($source[1]); $i++) { |
| 7275 | - array_push($titles, __("Title", $this->plugin_name).$i); | |
| 8245 | + array_push($titles, __("Title", 'chart-builder').$i); | |
| 7276 | 8246 | } |
| 7277 | 8247 | $source[0] = $titles; |
| 7278 | 8248 | } else { |
| 7279 | 8249 | $source[0] = array( |
| 7280 | - __("Country", $this->plugin_name), | |
| 7281 | - __("Population", $this->plugin_name), | |
| 8250 | + __("Country", 'chart-builder'), | |
| 8251 | + __("Population", 'chart-builder'), | |
| 7282 | 8252 | ); |
| 7283 | 8253 | } |
| 7284 | 8254 | |
| 7285 | 8255 | ksort($source); |
| @@ -7325,9 +8295,9 @@ | ||
| 7325 | 8295 | <g> |
| 7326 | 8296 | <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" /> |
| 7327 | 8297 | </g> |
| 7328 | 8298 | </svg> |
| 7329 | - <span><?php echo $val; ?></span> | |
| 8299 | + <span><?php echo esc_html($val); ?></span> | |
| 7330 | 8300 | </legend> |
| 7331 | 8301 | <div class="ays-rows-accordion-options-content ays-rows-accordion-options-content"> |
| 7332 | 8302 | <div class="ays-rows-accordion-data-main-wrap"> |
| 7333 | 8303 | <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> |
| @@ -7338,13 +8308,13 @@ | ||
| 7338 | 8308 | </label> |
| 7339 | 8309 | </div> |
| 7340 | 8310 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 7341 | 8311 | <input type="color" |
| 7342 | - id="ays-chart-option-rows-color-<?php echo $key; ?>" | |
| 8312 | + id="ays-chart-option-rows-color-<?php echo esc_attr($key); ?>" | |
| 7343 | 8313 | class="ays-chart-option-rows-color form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" |
| 7344 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo $key; ?>]" | |
| 7345 | - value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : $series_color; ?>" | |
| 7346 | - data-rows-id="<?php echo $key; ?>"> | |
| 8314 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_color][<?php echo esc_attr($key); ?>]" | |
| 8315 | + value="<?php echo isset($rows_color[$key]) && '' !== $rows_color[$key] ? esc_attr($rows_color[$key]) : esc_attr($series_color); ?>" | |
| 8316 | + data-rows-id="<?php echo esc_attr($key); ?>"> | |
| 7347 | 8317 | </div> |
| 7348 | 8318 | </div> <!-- color --> |
| 7349 | 8319 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 7350 | 8320 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| @@ -7353,13 +8323,13 @@ | ||
| 7353 | 8323 | </label> |
| 7354 | 8324 | </div> |
| 7355 | 8325 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 7356 | 8326 | <input type="number" |
| 7357 | - id="ays-chart-option-rows-opacity-<?php echo $key; ?>" | |
| 8327 | + id="ays-chart-option-rows-opacity-<?php echo esc_attr($key); ?>" | |
| 7358 | 8328 | class="ays-chart-option-rows-opacity ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" |
| 7359 | - name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo $key; ?>]" | |
| 8329 | + name="<?php echo esc_attr($html_name_prefix); ?>settings[rows_opacity][<?php echo esc_attr($key); ?>]" | |
| 7360 | 8330 | value="<?php echo isset($rows_opacity[$key]) && '' !== $rows_opacity[$key] ? esc_attr($rows_opacity[$key]) : 1.0; ?>" |
| 7361 | - data-rows-id="<?php echo $key; ?>" | |
| 8331 | + data-rows-id="<?php echo esc_attr($key); ?>" | |
| 7362 | 8332 | step=".1" min="0" max="1"> |
| 7363 | 8333 | </div> |
| 7364 | 8334 | </div> <!-- opacity --> |
| 7365 | 8335 | </div> |
| @@ -7370,17 +8340,27 @@ | ||
| 7370 | 8340 | endforeach; |
| 7371 | 8341 | ?> |
| 7372 | 8342 | <br> |
| 7373 | 8343 | <blockquote> |
| 7374 | - <?php echo __( "Save the chart to update the data.", $this->plugin_name ); ?> | |
| 8344 | + <?php echo esc_html(__( "Save the chart to update the data.", 'chart-builder' )); ?> | |
| 7375 | 8345 | <br> |
| 7376 | - <?php echo sprintf(__( "%sNote:%s The applied styles will work only if the chart has one column.", $this->plugin_name ), '<strong>', '</strong>'); ?> | |
| 8346 | + <?php echo sprintf( | |
| 8347 | + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */ | |
| 8348 | + esc_html(__( '%1$sNote:%2$s The applied styles will work only if the chart has one column.', 'chart-builder' )), | |
| 8349 | + '<strong>', | |
| 8350 | + '</strong>' | |
| 8351 | + ); ?> | |
| 7377 | 8352 | </blockquote> |
| 7378 | 8353 | </div> |
| 7379 | 8354 | <div class="<?php echo esc_attr($html_class_prefix) ?>not-hidden-options-section <?php echo $enable_row_settings === 'checked' ? 'display_none' : ''; ?>"> |
| 7380 | 8355 | <br> |
| 7381 | 8356 | <blockquote> |
| 7382 | - <?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>'); ?> | |
| 8357 | + <?php echo sprintf( | |
| 8358 | + /* translators: %1$s: Opening <strong> tag, %2$s: Closing </strong> tag */ | |
| 8359 | + esc_html(__( '%1$sNote:%2$s If this option is disabled, the general options will be set from the series settings.', 'chart-builder' )), | |
| 8360 | + '<strong>', | |
| 8361 | + '</strong>' | |
| 8362 | + ); ?> | |
| 7383 | 8363 | </blockquote> |
| 7384 | 8364 | </div> |
| 7385 | 8365 | </div> |
| 7386 | 8366 | </div> |