Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save delowardev/39e81203bb3917fd81451bde1f552be0 to your computer and use it in GitHub Desktop.
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.
<?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>';
}
}
@suwisofficial
Copy link

suwisofficial commented Oct 6, 2024

Can we edit login form register now link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment