Trouble modifying login function and JobRoller core file
I have added a custom modal pop-up that calls the default WordPress login form (wp_login_form() ) and unfortunately, submitted logins from that form don't work with the JobRoller theme's login routine. The JobRoller login form has the form submit input named "login" but the default
WP login form uses the name "
wp-submit". Unfortunately, this fails the check in the jobroller/framework/includes/views-login.php function, which is:
Code:
if ( ! isset( $_POST['login'] ) ) {
return;
}
I have modified that check to work with the following hack:
Code:
if ( isset( $_POST['wp-submit'] ) ) {
$_POST['login'] = 'Login';
}
if ( ! isset( $_POST['login'] ) ) {
return;
}
This does the trick, but the mod is in the core of JobRoller, and copying the file to /childtheme/framework/includes/views-login.php doesn't override the core file.
So my questions are:
- How do I overwrite a core file in this directory tree in my child theme?
- What is the equivalent get login form function for JobRoller?
- Also, I'm curious why JR doesn't use the default input name, "wp-submit", from WP (see line 463 here). Did they change it in WP and it was never updated in JR, or is it intentionally set to a different name?