diff --git a/assets/src/js/lib/utilities.js b/assets/src/js/lib/utilities.js index 8c600e5e0e..97a022477b 100644 --- a/assets/src/js/lib/utilities.js +++ b/assets/src/js/lib/utilities.js @@ -51,7 +51,7 @@ window.jQuery(document).ready(function($) { .addClass('is-loading'); }, success: function(data) { - if (data.success) { + if (data.success || data.status_code === 200) { if (del) { $('#' + del).fadeOut(function() { $(this).remove(); diff --git a/classes/Assets.php b/classes/Assets.php index 7a7b5ebc5d..d0dd3dba73 100644 --- a/classes/Assets.php +++ b/classes/Assets.php @@ -291,7 +291,7 @@ public function admin_scripts( $slug ) { * @return void */ public function frontend_scripts() { - $load_legacy_scripts = $this->should_load_legacy_scripts(); + $load_legacy_scripts = self::should_load_legacy_scripts(); if ( ! $load_legacy_scripts ) { return; } @@ -450,7 +450,7 @@ public function modify_localize_data( $localize_data ) { * @return void */ public function common_scripts( $slug ) { - if ( ! $this->should_load_legacy_scripts() ) { + if ( ! self::should_load_legacy_scripts() ) { return; } @@ -802,7 +802,7 @@ public static function add_frontend_editor_button() { * @return void */ public function enqueue_scripts() { - if ( $this->should_load_legacy_scripts() ) { + if ( self::should_load_legacy_scripts() ) { return; } @@ -862,7 +862,7 @@ public function enqueue_scripts() { * * @return boolean */ - public function should_load_legacy_scripts(): bool { + public static function should_load_legacy_scripts(): bool { $load = true; $post_id = get_the_ID(); diff --git a/classes/Input.php b/classes/Input.php index cbc76401c9..d412f6716e 100644 --- a/classes/Input.php +++ b/classes/Input.php @@ -380,6 +380,7 @@ public static function allow_iframe( $tags, $context ) { public static function allow_svg( $allowed_tags ) { $svg_tags = array( 'svg' => array( + 'id' => true, 'class' => true, 'aria-hidden' => true, 'aria-label' => true, @@ -389,12 +390,17 @@ public static function allow_svg( $allowed_tags ) { 'height' => true, 'viewbox' => true, 'fill' => true, + 'style' => true, ), 'g' => array( - 'fill' => true, - 'opacity' => true, + 'id' => true, + 'fill' => true, + 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'path' => array( + 'id' => true, 'd' => true, 'fill' => true, 'stroke' => true, @@ -406,8 +412,11 @@ public static function allow_svg( $allowed_tags ) { 'fill-rule' => true, 'clip-rule' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'circle' => array( + 'id' => true, 'cx' => true, 'cy' => true, 'r' => true, @@ -419,8 +428,11 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dasharray' => true, 'stroke-dashoffset' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'rect' => array( + 'id' => true, 'x' => true, 'y' => true, 'width' => true, @@ -434,8 +446,11 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dashoffset' => true, 'opacity' => true, 'rx' => true, + 'transform' => true, + 'style' => true, ), 'line' => array( + 'id' => true, 'x1' => true, 'x2' => true, 'y1' => true, @@ -447,8 +462,11 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dasharray' => true, 'stroke-dashoffset' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'polyline' => array( + 'id' => true, 'points' => true, 'fill' => true, 'stroke' => true, @@ -458,8 +476,11 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dasharray' => true, 'stroke-dashoffset' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'polygon' => array( + 'id' => true, 'points' => true, 'fill' => true, 'stroke' => true, @@ -469,6 +490,48 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dasharray' => true, 'stroke-dashoffset' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, + ), + 'defs' => array(), + 'lineargradient' => array( + 'id' => true, + 'x1' => true, + 'y1' => true, + 'x2' => true, + 'y2' => true, + 'gradientunits' => true, + 'gradienttransform' => true, + 'spreadmethod' => true, + 'xlink:href' => true, + ), + 'radialgradient' => array( + 'id' => true, + 'cx' => true, + 'cy' => true, + 'r' => true, + 'fx' => true, + 'fy' => true, + 'gradientunits' => true, + 'gradienttransform' => true, + 'spreadmethod' => true, + 'xlink:href' => true, + ), + 'stop' => array( + 'offset' => true, + 'stop-color' => true, + 'stop-opacity' => true, + ), + 'clippath' => array( + 'id' => true, + ), + 'use' => array( + 'id' => true, + 'x' => true, + 'y' => true, + 'width' => true, + 'height' => true, + 'xlink:href' => true, ), ); diff --git a/templates/dashboard/registration.php b/templates/dashboard/registration.php index 5470c4f7b1..9a831b3ca4 100644 --- a/templates/dashboard/registration.php +++ b/templates/dashboard/registration.php @@ -33,11 +33,11 @@ tutor_load_template( 'feature_disabled', $args ); ?> -
+
-
+ diff --git a/templates/email/email_styles.php b/templates/email/email_styles.php index 4f57e9494c..1c6216a966 100644 --- a/templates/email/email_styles.php +++ b/templates/email/email_styles.php @@ -41,7 +41,7 @@ .tutor-email-body{font-weight:400;padding: 50px 20px 50px;color: #5B616F;background-color: #EFF1F6;line-height: 26px;font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;} .tutor-email-body a, .tutor-email-body strong {color: ;font-weight:500!important;text-decoration: none;} .tutor-email-body b {font-weight: 700; color: #333333;} -.tutor-email-body a { color: royalblue;} +.tutor-email-body a { color: #3E64DE; word-break: break-all;} .tutor-email-body table {width: 100%; font-size: 16px; border-spacing: 0;} .tutor-email-body table td{padding: 0;margin: 0;} .tutor-email-header{ background-color: ; border-bottom: 1px solid ; padding: 20px 50px;} diff --git a/templates/login.php b/templates/login.php index fe360f17fa..055180a5d1 100644 --- a/templates/login.php +++ b/templates/login.php @@ -8,6 +8,8 @@ * @since 1.0.0 */ +use TUTOR\Assets; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -20,6 +22,8 @@ tutor_utils()->tutor_custom_header(); $login_url = tutor_utils()->get_option( 'enable_tutor_native_login', null, true, true ) ? '' : wp_login_url( tutor()->current_url ); + +$should_load_legacy_scripts = Assets::should_load_legacy_scripts(); ?>
> -