Created
October 29, 2019 11:15
-
-
Save delowardev/39e81203bb3917fd81451bde1f552be0 to your computer and use it in GitHub Desktop.
Helps you to customize the login & registration forms in Tutor LMS WordPress plugin.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Fires Before Tutor Global Login Form | |
* @Hook: tutor_load_template_before | |
* @Template: global.login | |
*/ | |
add_action('tutor_load_template_before', 'tutor_global_login_before', 10, 2); | |
function tutor_global_login_before($template, $variable){ | |
if ($template === 'global.login'){ | |
echo '<button>Login with Facebook</button>'; | |
} | |
} | |
/** | |
* Fires After Tutor Global Login Form | |
* @Hook: tutor_load_template_after | |
* @Template: global.login | |
*/ | |
add_action('tutor_load_template_after', 'tutor_global_login_after', 10, 2); | |
function tutor_global_login_after($template, $variable){ | |
if ($template === 'global.login'){ | |
echo '<button>Login with Facebook</button>'; | |
} | |
} | |
/** | |
* Fires Before Tutor Student Registration Form | |
* @Hook: tutor_load_template_before | |
* @Template: dashboard.registration | |
*/ | |
add_action('tutor_load_template_before', 'tutor_registration_before', 10, 2); | |
function tutor_registration_before($template, $variable){ | |
if ($template === 'dashboard.registration'){ | |
echo '<button>Login with Facebook</button>'; | |
} | |
} | |
/** | |
* Fires After Tutor Student Registration Form | |
* @Hook: tutor_load_template_after | |
* @Template: dashboard.registration | |
*/ | |
add_action('tutor_load_template_after', 'tutor_registration_after', 10, 2); | |
function tutor_registration_after($template, $variable){ | |
if ($template === 'dashboard.registration'){ | |
echo '<button>Login with Facebook</button>'; | |
} | |
} | |
/** | |
* Fires Before Tutor Instructor Registration Form | |
* @Hook: tutor_load_template_before | |
* @Template: dashboard.instructor.registration | |
*/ | |
add_action('tutor_load_template_before', 'tutor_instructor_registration_before', 10, 2); | |
function tutor_instructor_registration_before($template, $variable){ | |
if ($template === 'dashboard.instructor.registration'){ | |
echo '<button>Login with Facebook</button>'; | |
} | |
} | |
/** | |
* Fires After Tutor Instructor Registration Form | |
* @Hook: tutor_load_template_after | |
* @Template: dashboard.instructor.registration | |
*/ | |
add_action('tutor_load_template_after', 'tutor_instructor_registration_after', 10, 2); | |
function tutor_instructor_registration_after($template, $variable){ | |
if ($template === 'dashboard.instructor.registration'){ | |
echo '<button>Login with Facebook</button>'; | |
} | |
} |
can we add a new field to the login page??
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well structured!