Skip to content

Commit

Permalink
load login class even if activation not enabled fixes #40
Browse files Browse the repository at this point in the history
  • Loading branch information
tripflex committed Jul 19, 2019
1 parent 77b75ce commit e690557
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2,311 deletions.
11 changes: 7 additions & 4 deletions classes/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ class WP_Login_Flow_Login {
/**
* WP_Login_Flow_Login constructor.
*/
function __construct() {
function __construct( $activation_enabled ) {

if ( $activation_enabled ) {
add_action( 'login_init', array( $this, 'login_init' ) );
add_filter( 'wp_login_errors', array( $this, 'wp_login_errors' ), 10, 2 );
add_filter( 'gettext', array( $this, 'check_for_string_changes' ), 1 );
}

add_action( 'login_init', array( $this, 'login_init' ) );
add_filter( 'wp_login_errors', array( $this, 'wp_login_errors' ), 10, 2 );
// add_action( 'login_form_rp', array($this, 'activation_redirect'), 9999 );
add_filter( 'gettext', array( $this, 'check_for_string_changes' ), 1 );
// Action right before output of password being reset ( wp-login.php:603 )
// add_filter( 'validate_password_reset', array( $this, 'activation_password_set' ), 9999, 1 );
add_filter( 'login_enqueue_scripts', array( $this, 'login_assets' ) );
Expand Down
2 changes: 1 addition & 1 deletion languages/wp-login-flow.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WP Login Flow 3.0.2\n"
"Report-Msgid-Bugs-To: http://plugins.smyl.es\n"
"POT-Creation-Date: 2019-05-30 20:40:09+00:00\n"
"POT-Creation-Date: 2019-05-30 20:41:39+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: tripflex
Donate link: https://www.patreon.com/smyles
Tags: wp-login, wp-login.php, login flow, wp login flow, activation, activate, email, background, responsive, color, login, customize, custom, permalink, rewrite, url, register, lost, forgot, password, template, reset, register, registration, password, password registration, admin bar, smyles, tripflex
Requires at least: 4.4
Tested up to: 5.2.1
Stable tag: 3.0.2
Tested up to: 5.2.2
Stable tag: 3.0.3
License: GPLv3

wp-login permalinks, auto login, register w/ pass, login/logout redirects, email as username, bg/logo/color customizations, hide admin bar, and more!
Expand Down Expand Up @@ -126,6 +126,10 @@ Yes! It works with any version of WordPress 4.4 or newer!

== Changelog ==

= 3.0.3 - July 19, 2019 =
* Fix login/register loader not being added when activation is not enabled
* Bump tested up to 5.2.2

= 3.0.2 - May 30, 2019 =
* Use `login_headertext` for 5.2.0+ instead of `login_headertitle`
* Bump tested up to 5.2.1
Expand Down
2 changes: 1 addition & 1 deletion wp-login-flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ function __construct() {
register_deactivation_hook( __FILE__, array( $this, 'plugin_deactivate' ) );

new WP_Login_Flow_Core();
new WP_Login_Flow_Login( $this->activation_enabled() );

if ( $this->activation_enabled() ) {
new WP_Login_Flow_Login();
new WP_Login_Flow_User();
include( 'pluggables/wp-password-change-notification.php' );
}
Expand Down
Loading

0 comments on commit e690557

Please sign in to comment.