Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/src/js/lib/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions classes/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
function ( $file ) {
return basename( $file, '.svg' );
},
glob( tutor()->path . 'assets/icons/kids/*.svg' ) ?: array()

Check failure on line 177 in classes/Assets.php

View workflow job for this annotation

GitHub Actions / WPCS

Using short ternaries is not allowed as they are rarely used correctly
);
}

Expand Down Expand Up @@ -291,7 +291,7 @@
* @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;
}
Expand Down Expand Up @@ -450,7 +450,7 @@
* @return void
*/
public function common_scripts( $slug ) {
if ( ! $this->should_load_legacy_scripts() ) {
if ( ! self::should_load_legacy_scripts() ) {
return;
}

Expand Down Expand Up @@ -802,7 +802,7 @@
* @return void
*/
public function enqueue_scripts() {
if ( $this->should_load_legacy_scripts() ) {
if ( self::should_load_legacy_scripts() ) {
return;
}

Expand Down Expand Up @@ -862,7 +862,7 @@
*
* @return boolean
*/
public function should_load_legacy_scripts(): bool {
public static function should_load_legacy_scripts(): bool {
$load = true;

$post_id = get_the_ID();
Expand Down
67 changes: 65 additions & 2 deletions classes/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
),
);

Expand Down
4 changes: 2 additions & 2 deletions templates/dashboard/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
tutor_load_template( 'feature_disabled', $args );
?>
<?php else : ?>
<div id="tutor-registration-wrap" class="tutor-card" style="max-width: 520px; margin: 10px auto;">
<div id="tutor-registration-wrap" class="tutor-card tutor-p-none tutor-py-9" style="max-width: 520px; margin: 0px auto;">

<?php do_action( 'tutor_before_student_reg_form' ); ?>

<form method="post" enctype="multipart/form-data" id="tutor-registration-form">
<form method="post" enctype="multipart/form-data" id="tutor-registration-form" class="tutor-p-8">
<input type="hidden" name="tutor_course_enroll_attempt" value="<?php echo isset( $_GET['enrol_course_id'] ) ? (int) $_GET['enrol_course_id'] : ''; ?>">
<?php do_action( 'tutor_student_reg_form_start' ); ?>

Expand Down
2 changes: 1 addition & 1 deletion templates/email/email_styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: <?php echo esc_html( $email_short_code_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: <?php echo esc_html( $header_background_color ); ?>; border-bottom: 1px solid <?php echo esc_html( $header_divider_color ); ?>; padding: 20px 50px;}
Expand Down
13 changes: 9 additions & 4 deletions templates/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* @since 1.0.0
*/

use TUTOR\Assets;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}
Expand All @@ -20,23 +22,26 @@

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();
?>

<?php
//phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
do_action( 'tutor/template/login/before/wrap' );
?>
<div <?php tutor_post_class( 'tutor-page-wrap tutor-w-full' ); ?>>
<div class="tutor-template-segment tutor-login-wrap tutor-card tutor-p-8 tutor-shadow-md" style="max-width: 100%; width : 520px; margin: 40px auto;">
<div class="tutor-login-form-wrapper">
<div class="tutor-template-segment tutor-login-wrap tutor-card tutor-shadow-md tutor-px-none tutor-py-9" style="max-width: 100%; width : 520px; margin: 40px auto;">
<div class="tutor-login-form-wrapper tutor-p-8">
<div class="tutor-small tutor-mb-5">
<?php esc_html_e( 'Hi, Welcome back!', 'tutor' ); ?>
</div>
<?php
// load form template.
$login_form = trailingslashit( tutor()->path ) . 'templates/login-form.php';
$login_form = trailingslashit( tutor()->path ) . 'templates/login-form.php';
$login_form_legacy = trailingslashit( tutor()->path ) . 'templates/login-form-legacy.php';
tutor_load_template_from_custom_path(
$login_form,
$should_load_legacy_scripts ? $login_form_legacy : $login_form,
false
);
?>
Expand Down
5 changes: 0 additions & 5 deletions v2-library/src/scss/elements/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,3 @@ $disabled-color: #e9e9ea !default;
transform: rotate(360deg);
}
}

// google auth button
#tutor-pro-google-authentication {
width: 400px;
}
Loading