Theme My Login - Version 6.4.4

Version Description

  • Fix file loading for non-standard directory setups
  • Fix language files not loading properly
  • Fix password reset cookie path
Download this release

Release Info

Developer jfarthing84
Plugin Icon 128x128 Theme My Login
Version 6.4.4
Comparing to
See all releases

Code changes from version 6.4.3 to 6.4.4

admin/class-theme-my-login-admin.php CHANGED
@@ -50,11 +50,11 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
50
  * @access public
51
  */
52
  protected function load() {
53
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
54
- add_action( 'admin_menu', array( &$this, 'admin_menu' ), 8 );
55
- add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ), 11 );
56
 
57
- register_uninstall_hook( WP_PLUGIN_DIR . '/theme-my-login/theme-my-login.php', array( 'Theme_My_Login_Admin', 'uninstall' ) );
58
  }
59
 
60
  /**
@@ -93,7 +93,7 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
93
  public function admin_init() {
94
 
95
  // Register setting
96
- register_setting( 'theme_my_login', 'theme_my_login', array( &$this, 'save_settings' ) );
97
 
98
  // Install/Upgrade
99
  if ( version_compare( $this->get_option( 'version', 0 ), Theme_My_Login::VERSION, '<' ) )
@@ -104,9 +104,9 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
104
  add_settings_section( 'modules', __( 'Modules', 'theme-my-login' ), '__return_false', $this->options_key );
105
 
106
  // Add fields
107
- add_settings_field( 'enable_css', __( 'Stylesheet', 'theme-my-login' ), array( &$this, 'settings_field_enable_css' ), $this->options_key, 'general' );
108
- add_settings_field( 'login_type', __( 'Login Type', 'theme-my-login' ), array( &$this, 'settings_field_login_type' ), $this->options_key, 'general' );
109
- add_settings_field( 'modules', __( 'Modules', 'theme-my-login' ), array( &$this, 'settings_field_modules' ), $this->options_key, 'modules' );
110
  }
111
 
112
  /**
@@ -116,7 +116,7 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
116
  * @access public
117
  */
118
  public function admin_enqueue_scripts() {
119
- wp_enqueue_script( 'theme-my-login-admin', plugins_url( 'theme-my-login/admin/js/theme-my-login-admin.js' ), array( 'jquery' ), Theme_My_Login::VERSION, true );
120
  wp_localize_script( 'theme-my-login-admin', 'tmlAdmin', array(
121
  'interim_login_url' => site_url( 'wp-login.php?interim-login=1', 'login' )
122
  ) );
@@ -197,7 +197,7 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
197
  * @access public
198
  */
199
  public function settings_field_modules() {
200
- foreach ( get_plugins( '/theme-my-login/modules' ) as $path => $data ) {
201
  $id = sanitize_key( $data['Name'] );
202
  ?>
203
  <input name="theme_my_login[active_modules][]" type="checkbox" id="theme_my_login_active_modules_<?php echo $id; ?>" value="<?php echo $path; ?>"<?php checked( in_array( $path, (array) $this->get_option( 'active_modules' ) ) ); ?> />
@@ -227,8 +227,8 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
227
  // If we have modules to activate
228
  if ( $activate = array_diff( $settings['active_modules'], $this->get_option( 'active_modules', array() ) ) ) {
229
  foreach ( $activate as $module ) {
230
- if ( file_exists( WP_PLUGIN_DIR . '/theme-my-login/modules/' . $module ) )
231
- include_once( WP_PLUGIN_DIR . '/theme-my-login/modules/' . $module );
232
  do_action( 'tml_activate_' . $module );
233
  }
234
  }
@@ -345,8 +345,8 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
345
 
346
  // Activate modules
347
  foreach ( $this->get_option( 'active_modules', array() ) as $module ) {
348
- if ( file_exists( WP_PLUGIN_DIR . '/theme-my-login/modules/' . $module ) )
349
- include_once( WP_PLUGIN_DIR . '/theme-my-login/modules/' . $module );
350
  do_action( 'tml_activate_' . $module );
351
  }
352
 
@@ -387,12 +387,12 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
387
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
388
 
389
  // Run module uninstall hooks
390
- $modules = get_plugins( '/theme-my-login/modules' );
391
  foreach ( array_keys( $modules ) as $module ) {
392
  $module = plugin_basename( trim( $module ) );
393
 
394
- if ( file_exists( WP_PLUGIN_DIR . '/theme-my-login/modules/' . $module ) )
395
- @include ( WP_PLUGIN_DIR . '/theme-my-login/modules/' . $module );
396
 
397
  do_action( 'tml_uninstall_' . $module );
398
  }
50
  * @access public
51
  */
52
  protected function load() {
53
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
54
+ add_action( 'admin_menu', array( $this, 'admin_menu' ), 8 );
55
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ), 11 );
56
 
57
+ register_uninstall_hook( THEME_MY_LOGIN_PATH . '/theme-my-login.php', array( 'Theme_My_Login_Admin', 'uninstall' ) );
58
  }
59
 
60
  /**
93
  public function admin_init() {
94
 
95
  // Register setting
96
+ register_setting( 'theme_my_login', 'theme_my_login', array( $this, 'save_settings' ) );
97
 
98
  // Install/Upgrade
99
  if ( version_compare( $this->get_option( 'version', 0 ), Theme_My_Login::VERSION, '<' ) )
104
  add_settings_section( 'modules', __( 'Modules', 'theme-my-login' ), '__return_false', $this->options_key );
105
 
106
  // Add fields
107
+ add_settings_field( 'enable_css', __( 'Stylesheet', 'theme-my-login' ), array( $this, 'settings_field_enable_css' ), $this->options_key, 'general' );
108
+ add_settings_field( 'login_type', __( 'Login Type', 'theme-my-login' ), array( $this, 'settings_field_login_type' ), $this->options_key, 'general' );
109
+ add_settings_field( 'modules', __( 'Modules', 'theme-my-login' ), array( $this, 'settings_field_modules' ), $this->options_key, 'modules' );
110
  }
111
 
112
  /**
116
  * @access public
117
  */
118
  public function admin_enqueue_scripts() {
119
+ wp_enqueue_script( 'theme-my-login-admin', plugins_url( 'js/theme-my-login-admin.js', __FILE__ ), array( 'jquery' ), Theme_My_Login::VERSION, true );
120
  wp_localize_script( 'theme-my-login-admin', 'tmlAdmin', array(
121
  'interim_login_url' => site_url( 'wp-login.php?interim-login=1', 'login' )
122
  ) );
197
  * @access public
198
  */
199
  public function settings_field_modules() {
200
+ foreach ( get_plugins( sprintf( '/%s/modules', plugin_basename( THEME_MY_LOGIN_PATH ) ) ) as $path => $data ) {
201
  $id = sanitize_key( $data['Name'] );
202
  ?>
203
  <input name="theme_my_login[active_modules][]" type="checkbox" id="theme_my_login_active_modules_<?php echo $id; ?>" value="<?php echo $path; ?>"<?php checked( in_array( $path, (array) $this->get_option( 'active_modules' ) ) ); ?> />
227
  // If we have modules to activate
228
  if ( $activate = array_diff( $settings['active_modules'], $this->get_option( 'active_modules', array() ) ) ) {
229
  foreach ( $activate as $module ) {
230
+ if ( file_exists( THEME_MY_LOGIN_PATH . '/modules/' . $module ) )
231
+ include_once( THEME_MY_LOGIN_PATH . '/modules/' . $module );
232
  do_action( 'tml_activate_' . $module );
233
  }
234
  }
345
 
346
  // Activate modules
347
  foreach ( $this->get_option( 'active_modules', array() ) as $module ) {
348
+ if ( file_exists( THEME_MY_LOGIN_PATH . '/modules/' . $module ) )
349
+ include_once( THEME_MY_LOGIN_PATH . '/modules/' . $module );
350
  do_action( 'tml_activate_' . $module );
351
  }
352
 
387
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
388
 
389
  // Run module uninstall hooks
390
+ $modules = get_plugins( sprintf( '/%s/modules', plugin_basename( THEME_MY_LOGIN_PATH ) ) );
391
  foreach ( array_keys( $modules ) as $module ) {
392
  $module = plugin_basename( trim( $module ) );
393
 
394
+ if ( file_exists( THEME_MY_LOGIN_PATH . '/modules/' . $module ) )
395
+ @include ( THEME_MY_LOGIN_PATH . '/modules/' . $module );
396
 
397
  do_action( 'tml_uninstall_' . $module );
398
  }
includes/class-theme-my-login-ms-signup.php CHANGED
@@ -36,20 +36,20 @@ class Theme_My_Login_MS_Signup extends Theme_My_Login_Abstract {
36
 
37
  $theme_my_login = Theme_My_Login::get_object();
38
 
39
- add_action( 'tml_request_register', array( &$this, 'tml_request_register' ) );
40
- add_action( 'tml_request_activate', array( &$this, 'tml_request_activate' ) );
41
- add_action( 'tml_display_register', array( &$this, 'tml_display_register' ) );
42
- add_action( 'tml_display_activate', array( &$this, 'tml_display_activate' ) );
43
- add_filter( 'tml_title', array( &$this, 'tml_title' ), 10, 2 );
44
-
45
- add_action( 'switch_blog', array( &$theme_my_login, 'load_options' ) );
46
- add_action( 'wpmu_new_blog', array( &$this, 'wpmu_new_blog' ), 10, 2 );
47
-
48
- add_filter( 'site_url', array( &$this, 'site_url' ), 9, 3 );
49
- add_filter( 'home_url', array( &$this, 'site_url' ), 9, 3 );
50
- add_filter( 'network_site_url', array( &$this, 'network_site_url' ), 10, 3 );
51
- add_filter( 'network_home_url', array( &$this, 'network_site_url' ), 10, 3 );
52
- add_filter( 'clean_url', array( &$this, 'clean_url' ), 10, 3 );
53
  }
54
 
55
  /**
@@ -64,7 +64,7 @@ class Theme_My_Login_MS_Signup extends Theme_My_Login_Abstract {
64
  global $current_site;
65
 
66
  add_action( 'wp_head', 'wp_no_robots' );
67
- add_action( 'wp_head', array( &$this, 'signup_header' ) );
68
 
69
  if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
70
  wp_redirect( network_home_url() );
@@ -371,7 +371,7 @@ class Theme_My_Login_MS_Signup extends Theme_My_Login_Abstract {
371
  if ( is_object( $wp_object_cache ) )
372
  $wp_object_cache->cache_enabled = false;
373
 
374
- add_action( 'wp_head', array( &$this, 'activate_header' ) );
375
  }
376
 
377
  /**
@@ -484,8 +484,8 @@ class Theme_My_Login_MS_Signup extends Theme_My_Login_Abstract {
484
  public function wpmu_new_blog( $blog_id, $user_id ) {
485
  global $wpdb;
486
  require_once ( ABSPATH . '/wp-admin/includes/plugin.php' );
487
- if ( is_plugin_active_for_network( 'theme-my-login/theme-my-login.php' ) ) {
488
- require_once( WP_PLUGIN_DIR . '/theme-my-login/admin/class-theme-my-login-admin.php' );
489
  switch_to_blog( $blog_id );
490
  $admin = Theme_My_Login_Admin::get_object();
491
  $admin->install();
36
 
37
  $theme_my_login = Theme_My_Login::get_object();
38
 
39
+ add_action( 'tml_request_register', array( $this, 'tml_request_register' ) );
40
+ add_action( 'tml_request_activate', array( $this, 'tml_request_activate' ) );
41
+ add_action( 'tml_display_register', array( $this, 'tml_display_register' ) );
42
+ add_action( 'tml_display_activate', array( $this, 'tml_display_activate' ) );
43
+ add_filter( 'tml_title', array( $this, 'tml_title' ), 10, 2 );
44
+
45
+ add_action( 'switch_blog', array( $theme_my_login, 'load_options' ) );
46
+ add_action( 'wpmu_new_blog', array( $this, 'wpmu_new_blog' ), 10, 2 );
47
+
48
+ add_filter( 'site_url', array( $this, 'site_url' ), 9, 3 );
49
+ add_filter( 'home_url', array( $this, 'site_url' ), 9, 3 );
50
+ add_filter( 'network_site_url', array( $this, 'network_site_url' ), 10, 3 );
51
+ add_filter( 'network_home_url', array( $this, 'network_site_url' ), 10, 3 );
52
+ add_filter( 'clean_url', array( $this, 'clean_url' ), 10, 3 );
53
  }
54
 
55
  /**
64
  global $current_site;
65
 
66
  add_action( 'wp_head', 'wp_no_robots' );
67
+ add_action( 'wp_head', array( $this, 'signup_header' ) );
68
 
69
  if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
70
  wp_redirect( network_home_url() );
371
  if ( is_object( $wp_object_cache ) )
372
  $wp_object_cache->cache_enabled = false;
373
 
374
+ add_action( 'wp_head', array( $this, 'activate_header' ) );
375
  }
376
 
377
  /**
484
  public function wpmu_new_blog( $blog_id, $user_id ) {
485
  global $wpdb;
486
  require_once ( ABSPATH . '/wp-admin/includes/plugin.php' );
487
+ if ( is_plugin_active_for_network( plugin_basename( THEME_MY_LOGIN_PATH ) . '/theme-my-login.php' ) ) {
488
+ require_once( THEME_MY_LOGIN_PATH . '/admin/class-theme-my-login-admin.php' );
489
  switch_to_blog( $blog_id );
490
  $admin = Theme_My_Login_Admin::get_object();
491
  $admin->install();
includes/class-theme-my-login-template.php CHANGED
@@ -127,7 +127,7 @@ class Theme_My_Login_Template extends Theme_My_Login_Abstract {
127
  echo $this->get_option( 'after_widget' ) . "\n";
128
  $output = ob_get_contents();
129
  ob_end_clean();
130
- return apply_filters_ref_array( 'tml_display', array( $output, $action, &$this ) );
131
  }
132
 
133
  /**
@@ -449,14 +449,14 @@ class Theme_My_Login_Template extends Theme_My_Login_Abstract {
449
  // Easy access to current user
450
  $current_user = wp_get_current_user();
451
 
452
- extract( apply_filters_ref_array( 'tml_template_args', array( $args, &$this ) ) );
453
 
454
  $template_paths = apply_filters( 'tml_template_paths', array(
455
  get_stylesheet_directory() . '/theme-my-login',
456
  get_stylesheet_directory(),
457
  get_template_directory() . '/theme-my-login',
458
  get_template_directory(),
459
- WP_PLUGIN_DIR . '/theme-my-login/templates'
460
  ) );
461
 
462
  foreach ( (array) $template_names as $template_name ) {
@@ -475,7 +475,7 @@ class Theme_My_Login_Template extends Theme_My_Login_Abstract {
475
  }
476
  }
477
 
478
- $located = apply_filters_ref_array( 'tml_template', array( $located, $template_names, &$this ) );
479
 
480
  if ( $load && '' != $located )
481
  include( $located );
127
  echo $this->get_option( 'after_widget' ) . "\n";
128
  $output = ob_get_contents();
129
  ob_end_clean();
130
+ return apply_filters_ref_array( 'tml_display', array( $output, $action, $this ) );
131
  }
132
 
133
  /**
449
  // Easy access to current user
450
  $current_user = wp_get_current_user();
451
 
452
+ extract( apply_filters_ref_array( 'tml_template_args', array( $args, $this ) ) );
453
 
454
  $template_paths = apply_filters( 'tml_template_paths', array(
455
  get_stylesheet_directory() . '/theme-my-login',
456
  get_stylesheet_directory(),
457
  get_template_directory() . '/theme-my-login',
458
  get_template_directory(),
459
+ THEME_MY_LOGIN_PATH . '/templates'
460
  ) );
461
 
462
  foreach ( (array) $template_names as $template_name ) {
475
  }
476
  }
477
 
478
+ $located = apply_filters_ref_array( 'tml_template', array( $located, $template_names, $this ) );
479
 
480
  if ( $load && '' != $located )
481
  include( $located );
includes/class-theme-my-login.php CHANGED
@@ -21,7 +21,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
21
  * @since 6.3.2
22
  * @const string
23
  */
24
- const VERSION = '6.4.3';
25
 
26
  /**
27
  * Holds options key
@@ -132,27 +132,28 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
132
 
133
  $this->load_instance();
134
 
135
- add_action( 'plugins_loaded', array( &$this, 'plugins_loaded' ) );
136
- add_action( 'init', array( &$this, 'init' ) );
137
- add_action( 'widgets_init', array( &$this, 'widgets_init' ) );
138
- add_action( 'wp', array( &$this, 'wp' ) );
139
- add_action( 'pre_get_posts', array( &$this, 'pre_get_posts' ) );
140
- add_action( 'template_redirect', array( &$this, 'template_redirect' ) );
141
- add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
142
- add_action( 'wp_head', array( &$this, 'wp_head' ) );
143
- add_action( 'wp_footer', array( &$this, 'wp_footer' ) );
144
- add_action( 'wp_print_footer_scripts', array( &$this, 'wp_print_footer_scripts' ) );
145
- add_action( 'wp_authenticate', array( &$this, 'wp_authenticate' ) );
146
-
147
- add_filter( 'site_url', array( &$this, 'site_url' ), 10, 3 );
148
- add_filter( 'logout_url', array( &$this, 'logout_url' ), 10, 2 );
149
- add_filter( 'single_post_title', array( &$this, 'single_post_title' ) );
150
- add_filter( 'the_title', array( &$this, 'the_title' ), 10, 2 );
151
- add_filter( 'wp_setup_nav_menu_item', array( &$this, 'wp_setup_nav_menu_item' ) );
152
- add_filter( 'wp_list_pages_excludes', array( &$this, 'wp_list_pages_excludes' ) );
153
- add_filter( 'page_link', array( &$this, 'page_link' ), 10, 2 );
154
-
155
- add_shortcode( 'theme-my-login', array( &$this, 'shortcode' ) );
 
156
  }
157
 
158
 
@@ -168,8 +169,8 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
168
  */
169
  public function plugins_loaded() {
170
  foreach ( $this->get_option( 'active_modules', array() ) as $module ) {
171
- if ( file_exists( WP_PLUGIN_DIR . '/theme-my-login/modules/' . $module ) )
172
- include_once( WP_PLUGIN_DIR . '/theme-my-login/modules/' . $module );
173
  }
174
  do_action_ref_array( 'tml_modules_loaded', array( &$this ) );
175
  }
@@ -183,7 +184,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
183
  public function init() {
184
  global $pagenow;
185
 
186
- self::load_textdomain();
187
 
188
  $this->errors = new WP_Error();
189
 
@@ -366,11 +367,10 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
366
  // Dirty hack for now
367
  global $rp_login, $rp_key;
368
 
369
- list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
370
  $rp_cookie = 'wp-resetpass-' . COOKIEHASH;
371
  if ( isset( $_GET['key'] ) ) {
372
  $value = sprintf( '%s:%s', wp_unslash( $_GET['login'] ), wp_unslash( $_GET['key'] ) );
373
- setcookie( $rp_cookie, $value, 0, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
374
  wp_safe_redirect( remove_query_arg( array( 'key', 'login' ) ) );
375
  exit;
376
  }
@@ -386,7 +386,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
386
  }
387
 
388
  if ( ! $user || is_wp_error( $user ) ) {
389
- setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
390
  if ( $user && $user->get_error_code() === 'expired_key' )
391
  wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=expiredkey' ) );
392
  else
@@ -401,7 +401,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
401
 
402
  if ( ( ! $this->errors->get_error_code() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) {
403
  reset_password( $user, $_POST['pass1'] );
404
- setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
405
  $redirect_to = site_url( 'wp-login.php?resetpass=complete' );
406
  wp_safe_redirect( $redirect_to );
407
  exit;
@@ -1015,7 +1015,7 @@ if(typeof wpOnload=='function')wpOnload()
1015
  elseif ( file_exists( get_template_directory() . '/' . $file ) )
1016
  $stylesheet = get_template_directory_uri() . '/' . $file;
1017
  else
1018
- $stylesheet = plugins_url( '/theme-my-login/' . $file );
1019
  return $stylesheet;
1020
  }
1021
 
@@ -1084,32 +1084,31 @@ if(typeof wpOnload=='function')wpOnload()
1084
  }
1085
 
1086
  /**
1087
- * Load the translation file for current language. Checks the languages
1088
- * folder inside the plugin first, and then the default WordPress
1089
- * languages folder.
1090
  *
1091
  * Note that custom translation files inside the plugin folder
1092
  * will be removed on plugin updates. If you're creating custom
1093
- * translation files, please use the global language folder.
 
1094
  *
1095
- * @since 6.3
1096
  *
1097
- * @return bool True on success, false on failure
 
1098
  */
1099
- private static function load_textdomain() {
1100
-
1101
- // Traditional WordPress plugin locale filter
1102
- $locale = apply_filters( 'plugin_locale', get_locale(), 'theme-my-login' );
1103
- $mofile = sprintf( 'theme-my-login-%s.mo', $locale );
1104
-
1105
- // Look in global /wp-content/languages/theme-my-login folder
1106
- load_textdomain( 'theme-my-login', WP_LANG_DIR . '/theme-my-login/' . $mofile );
1107
-
1108
- // Look in local /wp-content/plugins/theme-my-login/languages folder
1109
- load_textdomain( 'theme-my-login', WP_PLUGIN_DIR . '/theme-my-login/languages/' . $mofile );
1110
 
1111
- // Look in global /wp-content/languages/plugins folder
1112
- load_plugin_textdomain( 'theme-my-login' );
1113
  }
1114
 
1115
  /**
21
  * @since 6.3.2
22
  * @const string
23
  */
24
+ const VERSION = '6.4.4';
25
 
26
  /**
27
  * Holds options key
132
 
133
  $this->load_instance();
134
 
135
+ add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
136
+ add_action( 'init', array( $this, 'init' ) );
137
+ add_action( 'load_textdomain', array( $this, 'load_custom_textdomain' ), 10, 2 );
138
+ add_action( 'widgets_init', array( $this, 'widgets_init' ) );
139
+ add_action( 'wp', array( $this, 'wp' ) );
140
+ add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
141
+ add_action( 'template_redirect', array( $this, 'template_redirect' ) );
142
+ add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
143
+ add_action( 'wp_head', array( $this, 'wp_head' ) );
144
+ add_action( 'wp_footer', array( $this, 'wp_footer' ) );
145
+ add_action( 'wp_print_footer_scripts', array( $this, 'wp_print_footer_scripts' ) );
146
+ add_action( 'wp_authenticate', array( $this, 'wp_authenticate' ) );
147
+
148
+ add_filter( 'site_url', array( $this, 'site_url' ), 10, 3 );
149
+ add_filter( 'logout_url', array( $this, 'logout_url' ), 10, 2 );
150
+ add_filter( 'single_post_title', array( $this, 'single_post_title' ) );
151
+ add_filter( 'the_title', array( $this, 'the_title' ), 10, 2 );
152
+ add_filter( 'wp_setup_nav_menu_item', array( $this, 'wp_setup_nav_menu_item' ) );
153
+ add_filter( 'wp_list_pages_excludes', array( $this, 'wp_list_pages_excludes' ) );
154
+ add_filter( 'page_link', array( $this, 'page_link' ), 10, 2 );
155
+
156
+ add_shortcode( 'theme-my-login', array( $this, 'shortcode' ) );
157
  }
158
 
159
 
169
  */
170
  public function plugins_loaded() {
171
  foreach ( $this->get_option( 'active_modules', array() ) as $module ) {
172
+ if ( file_exists( THEME_MY_LOGIN_PATH . '/modules/' . $module ) )
173
+ include_once( THEME_MY_LOGIN_PATH . '/modules/' . $module );
174
  }
175
  do_action_ref_array( 'tml_modules_loaded', array( &$this ) );
176
  }
184
  public function init() {
185
  global $pagenow;
186
 
187
+ load_plugin_textdomain( 'theme-my-login', false, plugin_basename( THEME_MY_LOGIN_PATH ) . '/languages' );
188
 
189
  $this->errors = new WP_Error();
190
 
367
  // Dirty hack for now
368
  global $rp_login, $rp_key;
369
 
 
370
  $rp_cookie = 'wp-resetpass-' . COOKIEHASH;
371
  if ( isset( $_GET['key'] ) ) {
372
  $value = sprintf( '%s:%s', wp_unslash( $_GET['login'] ), wp_unslash( $_GET['key'] ) );
373
+ setcookie( $rp_cookie, $value, 0, '/', COOKIE_DOMAIN, is_ssl(), true );
374
  wp_safe_redirect( remove_query_arg( array( 'key', 'login' ) ) );
375
  exit;
376
  }
386
  }
387
 
388
  if ( ! $user || is_wp_error( $user ) ) {
389
+ setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, '/', COOKIE_DOMAIN, is_ssl(), true );
390
  if ( $user && $user->get_error_code() === 'expired_key' )
391
  wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=expiredkey' ) );
392
  else
401
 
402
  if ( ( ! $this->errors->get_error_code() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) {
403
  reset_password( $user, $_POST['pass1'] );
404
+ setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, '/', COOKIE_DOMAIN, is_ssl(), true );
405
  $redirect_to = site_url( 'wp-login.php?resetpass=complete' );
406
  wp_safe_redirect( $redirect_to );
407
  exit;
1015
  elseif ( file_exists( get_template_directory() . '/' . $file ) )
1016
  $stylesheet = get_template_directory_uri() . '/' . $file;
1017
  else
1018
+ $stylesheet = plugins_url( $file, dirname( __FILE__ ) );
1019
  return $stylesheet;
1020
  }
1021
 
1084
  }
1085
 
1086
  /**
1087
+ * Load a custom translation file for current language if available.
 
 
1088
  *
1089
  * Note that custom translation files inside the plugin folder
1090
  * will be removed on plugin updates. If you're creating custom
1091
+ * translation files, please place them in a '/theme-my-login/'
1092
+ * directory within the global language folder.
1093
  *
1094
+ * @since 6.4.4
1095
  *
1096
+ * @param string $domain The domain for which a language file is being loaded.
1097
+ * @param string $mofile Full path to the target mofile.
1098
  */
1099
+ public function load_custom_textdomain( $domain, $mofile ) {
1100
+ if ( 'theme-my-login' === $domain ) {
1101
+ remove_action( 'load_textdomain', array( $this, 'load_custom_textdomain' ), 10, 2 );
1102
+
1103
+ // Look in global /wp-content/languages/theme-my-login folder for a translation
1104
+ // and load it if available.
1105
+ $mofile = basename( $mofile );
1106
+ if ( file_exists( WP_LANG_DIR . '/theme-my-login/' . $mofile ) ) {
1107
+ load_textdomain( 'theme-my-login', WP_LANG_DIR . '/theme-my-login/' . $mofile );
1108
+ }
 
1109
 
1110
+ add_action( 'load_textdomain', array( $this, 'load_custom_textdomain' ), 10, 2 );
1111
+ }
1112
  }
1113
 
1114
  /**
{language → languages}/theme-my-login.pot RENAMED
File without changes
modules/custom-email/admin/custom-email-admin.php CHANGED
@@ -44,12 +44,12 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
44
  * @access protected
45
  */
46
  protected function load() {
47
- add_action( 'tml_uninstall_custom-email/custom-email.php', array( &$this, 'uninstall' ) );
48
 
49
- add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
50
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
51
 
52
- add_action( 'load-tml_page_theme_my_login_email', array( &$this, 'load_settings_page' ) );
53
  }
54
 
55
  /**
@@ -91,20 +91,20 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
91
  __( 'E-mail', 'theme-my-login' ),
92
  'manage_options',
93
  $this->options_key,
94
- array( &$this, 'settings_page' )
95
  );
96
 
97
- add_meta_box( 'new_user', __( 'New User', 'theme-my-login' ), array( &$this, 'new_user_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
98
- add_meta_box( 'new_user_admin', __( 'New User Admin', 'theme-my-login' ), array( &$this, 'new_user_admin_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
99
- add_meta_box( 'retrieve_pass', __( 'Retrieve Password', 'theme-my-login' ), array( &$this, 'retrieve_pass_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
100
- add_meta_box( 'reset_pass', __( 'Reset Password', 'theme-my-login' ), array( &$this, 'reset_pass_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
101
 
102
  // Check for User Moderation module
103
  if ( class_exists( 'Theme_My_Login_User_Moderation' ) ) {
104
- add_meta_box( 'user_activation', __( 'User Activation', 'theme-my-login' ), array( &$this, 'user_activation_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
105
- add_meta_box( 'user_approval', __( 'User Approval', 'theme-my-login' ), array( &$this, 'user_approval_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
106
- add_meta_box( 'user_approval_admin', __( 'User Approval Admin', 'theme-my-login'), array( &$this, 'user_approval_admin_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
107
- add_meta_box( 'user_denial', __( 'User Denial', 'theme-my-login' ), array( &$this, 'user_denial_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
108
  }
109
  }
110
 
@@ -117,7 +117,7 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
117
  * @access public
118
  */
119
  public function admin_init() {
120
- register_setting( $this->options_key, $this->options_key, array( &$this, 'save_settings' ) );
121
  }
122
 
123
  /**
@@ -129,7 +129,7 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
129
  * @access public
130
  */
131
  public function load_settings_page() {
132
- wp_enqueue_script( 'tml-custom-email-admin', plugins_url( 'theme-my-login/modules/custom-email/admin/js/custom-email-admin.js' ), array( 'postbox' ) );
133
  }
134
 
135
  /**
44
  * @access protected
45
  */
46
  protected function load() {
47
+ add_action( 'tml_uninstall_custom-email/custom-email.php', array( $this, 'uninstall' ) );
48
 
49
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
50
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
51
 
52
+ add_action( 'load-tml_page_theme_my_login_email', array( $this, 'load_settings_page' ) );
53
  }
54
 
55
  /**
91
  __( 'E-mail', 'theme-my-login' ),
92
  'manage_options',
93
  $this->options_key,
94
+ array( $this, 'settings_page' )
95
  );
96
 
97
+ add_meta_box( 'new_user', __( 'New User', 'theme-my-login' ), array( $this, 'new_user_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
98
+ add_meta_box( 'new_user_admin', __( 'New User Admin', 'theme-my-login' ), array( $this, 'new_user_admin_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
99
+ add_meta_box( 'retrieve_pass', __( 'Retrieve Password', 'theme-my-login' ), array( $this, 'retrieve_pass_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
100
+ add_meta_box( 'reset_pass', __( 'Reset Password', 'theme-my-login' ), array( $this, 'reset_pass_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
101
 
102
  // Check for User Moderation module
103
  if ( class_exists( 'Theme_My_Login_User_Moderation' ) ) {
104
+ add_meta_box( 'user_activation', __( 'User Activation', 'theme-my-login' ), array( $this, 'user_activation_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
105
+ add_meta_box( 'user_approval', __( 'User Approval', 'theme-my-login' ), array( $this, 'user_approval_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
106
+ add_meta_box( 'user_approval_admin', __( 'User Approval Admin', 'theme-my-login'), array( $this, 'user_approval_admin_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
107
+ add_meta_box( 'user_denial', __( 'User Denial', 'theme-my-login' ), array( $this, 'user_denial_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
108
  }
109
  }
110
 
117
  * @access public
118
  */
119
  public function admin_init() {
120
+ register_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );
121
  }
122
 
123
  /**
129
  * @access public
130
  */
131
  public function load_settings_page() {
132
+ wp_enqueue_script( 'tml-custom-email-admin', plugins_url( 'js/custom-email-admin.js', __FILE__ ), array( 'postbox' ) );
133
  }
134
 
135
  /**
modules/custom-email/custom-email.php CHANGED
@@ -112,26 +112,26 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
112
  * @access protected
113
  */
114
  protected function load() {
115
- add_filter( 'wp_mail_from', array( &$this, 'mail_from_filter' ) );
116
- add_filter( 'wp_mail_from_name', array( &$this, 'mail_from_name_filter' ) );
117
- add_filter( 'wp_mail_content_type', array( &$this, 'mail_content_type_filter' ) );
118
 
119
- add_action( 'retrieve_password', array( &$this, 'apply_retrieve_pass_filters' ) );
120
- add_action( 'password_reset', array( &$this, 'apply_password_reset_filters' ) );
121
- add_action( 'tml_new_user_notification', array( &$this, 'apply_new_user_filters' ) );
122
 
123
  remove_action( 'register_new_user', 'wp_send_new_user_notifications' );
124
  remove_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );
125
  remove_action( 'after_password_reset', 'wp_password_change_notification' );
126
 
127
- add_action( 'register_new_user', array( &$this, 'new_user_notification' ) );
128
- add_action( 'edit_user_created_user', array( &$this, 'new_user_notification' ), 10, 2 );
129
- add_action( 'after_password_reset', array( &$this, 'password_change_notification' ) );
130
 
131
- add_action( 'register_post', array( &$this, 'apply_user_moderation_notification_filters' ) );
132
- add_action( 'tml_user_activation_resend', array( &$this, 'apply_user_moderation_notification_filters' ) );
133
- add_action( 'approve_user', array( &$this, 'apply_user_approval_notification_filters' ) );
134
- add_action( 'deny_user', array( &$this, 'apply_user_denial_notification_filters' ) );
135
  }
136
 
137
  /**
@@ -165,8 +165,8 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
165
  $this->get_option( array( 'retrieve_pass', 'mail_from_name' ) ),
166
  $this->get_option( array( 'retrieve_pass', 'mail_content_type' ) )
167
  );
168
- add_filter( 'retrieve_password_title', array( &$this, 'retrieve_pass_title_filter' ), 10, 3 );
169
- add_filter( 'retrieve_password_message', array( &$this, 'retrieve_pass_message_filter' ), 10, 4 );
170
  }
171
 
172
  /**
@@ -184,10 +184,10 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
184
  $this->get_option( array( 'reset_pass', 'admin_mail_from_name' ) ),
185
  $this->get_option( array( 'reset_pass', 'admin_mail_content_type' ) )
186
  );
187
- add_filter( 'password_change_notification_mail_to', array( &$this, 'password_change_notification_mail_to_filter' ) );
188
- add_filter( 'password_change_notification_title', array( &$this, 'password_change_notification_title_filter' ), 10, 2 );
189
- add_filter( 'password_change_notification_message', array( &$this, 'password_change_notification_message_filter' ), 10, 2 );
190
- add_filter( 'send_password_change_notification', array( &$this, 'send_password_change_notification_filter' ) );
191
  }
192
 
193
  /**
@@ -200,13 +200,13 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
200
  * @access public
201
  */
202
  public function apply_new_user_filters() {
203
- add_filter( 'new_user_notification_title', array( &$this, 'new_user_notification_title_filter' ), 10, 2 );
204
- add_filter( 'new_user_notification_message', array( &$this, 'new_user_notification_message_filter' ), 10, 3 );
205
- add_filter( 'send_new_user_notification', array( &$this, 'send_new_user_notification_filter' ) );
206
- add_filter( 'new_user_admin_notification_mail_to', array( &$this, 'new_user_admin_notification_mail_to_filter' ) );
207
- add_filter( 'new_user_admin_notification_title', array( &$this, 'new_user_admin_notification_title_filter' ), 10, 2 );
208
- add_filter( 'new_user_admin_notification_message', array( &$this, 'new_user_admin_notification_message_filter' ), 10, 2 );
209
- add_filter( 'send_new_user_admin_notification', array( &$this, 'send_new_user_admin_notification_filter' ) );
210
  }
211
 
212
  /**
@@ -548,8 +548,8 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
548
  $this->get_option( array( 'user_activation', 'mail_from_name' ) ),
549
  $this->get_option( array( 'user_activation', 'mail_content_type' ) )
550
  );
551
- add_filter( 'user_activation_notification_title', array( &$this, 'user_activation_notification_title_filter' ), 10, 2 );
552
- add_filter( 'user_activation_notification_message', array( &$this, 'user_activation_notification_message_filter' ), 10, 3 );
553
  break;
554
  case 'admin' :
555
  $this->set_mail_headers(
@@ -557,10 +557,10 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
557
  $this->get_option( array( 'user_approval', 'admin_mail_from_name' ) ),
558
  $this->get_option( array( 'user_approval', 'admin_mail_content_type' ) )
559
  );
560
- add_filter( 'user_approval_admin_notification_mail_to', array( &$this, 'user_approval_admin_notification_mail_to_filter' ) );
561
- add_filter( 'user_approval_admin_notification_title', array( &$this, 'user_approval_admin_notification_title_filter' ), 10, 2 );
562
- add_filter( 'user_approval_admin_notification_message', array( &$this, 'user_approval_admin_notification_message_filter' ), 10, 2 );
563
- add_filter( 'send_new_user_approval_admin_notification', array( &$this, 'send_new_user_approval_admin_notification_filter' ) );
564
  break;
565
  }
566
  }
@@ -580,8 +580,8 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
580
  $this->get_option( array( 'user_approval', 'mail_from_name' ) ),
581
  $this->get_option( array( 'user_approval', 'mail_content_type' ) )
582
  );
583
- add_filter( 'user_approval_notification_title', array( &$this, 'user_approval_notification_title_filter' ), 10, 2 );
584
- add_filter( 'user_approval_notification_message', array( &$this, 'user_approval_notification_message_filter' ), 10, 3 );
585
  }
586
 
587
  /**
@@ -599,9 +599,9 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
599
  $this->get_option( array( 'user_denial', 'mail_from_name' ) ),
600
  $this->get_option( array( 'user_denial', 'mail_content_type' ) )
601
  );
602
- add_filter( 'user_denial_notification_title', array( &$this, 'user_denial_notification_title_filter' ), 10, 2 );
603
- add_filter( 'user_denial_notification_message', array( &$this, 'user_denial_notification_message_filter' ), 10, 2 );
604
- add_filter( 'send_new_user_denial_notification', array( &$this, 'send_new_user_denial_notification_filter' ) );
605
  }
606
 
607
  /**
112
  * @access protected
113
  */
114
  protected function load() {
115
+ add_filter( 'wp_mail_from', array( $this, 'mail_from_filter' ) );
116
+ add_filter( 'wp_mail_from_name', array( $this, 'mail_from_name_filter' ) );
117
+ add_filter( 'wp_mail_content_type', array( $this, 'mail_content_type_filter' ) );
118
 
119
+ add_action( 'retrieve_password', array( $this, 'apply_retrieve_pass_filters' ) );
120
+ add_action( 'password_reset', array( $this, 'apply_password_reset_filters' ) );
121
+ add_action( 'tml_new_user_notification', array( $this, 'apply_new_user_filters' ) );
122
 
123
  remove_action( 'register_new_user', 'wp_send_new_user_notifications' );
124
  remove_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );
125
  remove_action( 'after_password_reset', 'wp_password_change_notification' );
126
 
127
+ add_action( 'register_new_user', array( $this, 'new_user_notification' ) );
128
+ add_action( 'edit_user_created_user', array( $this, 'new_user_notification' ), 10, 2 );
129
+ add_action( 'after_password_reset', array( $this, 'password_change_notification' ) );
130
 
131
+ add_action( 'register_post', array( $this, 'apply_user_moderation_notification_filters' ) );
132
+ add_action( 'tml_user_activation_resend', array( $this, 'apply_user_moderation_notification_filters' ) );
133
+ add_action( 'approve_user', array( $this, 'apply_user_approval_notification_filters' ) );
134
+ add_action( 'deny_user', array( $this, 'apply_user_denial_notification_filters' ) );
135
  }
136
 
137
  /**
165
  $this->get_option( array( 'retrieve_pass', 'mail_from_name' ) ),
166
  $this->get_option( array( 'retrieve_pass', 'mail_content_type' ) )
167
  );
168
+ add_filter( 'retrieve_password_title', array( $this, 'retrieve_pass_title_filter' ), 10, 3 );
169
+ add_filter( 'retrieve_password_message', array( $this, 'retrieve_pass_message_filter' ), 10, 4 );
170
  }
171
 
172
  /**
184
  $this->get_option( array( 'reset_pass', 'admin_mail_from_name' ) ),
185
  $this->get_option( array( 'reset_pass', 'admin_mail_content_type' ) )
186
  );
187
+ add_filter( 'password_change_notification_mail_to', array( $this, 'password_change_notification_mail_to_filter' ) );
188
+ add_filter( 'password_change_notification_title', array( $this, 'password_change_notification_title_filter' ), 10, 2 );
189
+ add_filter( 'password_change_notification_message', array( $this, 'password_change_notification_message_filter' ), 10, 2 );
190
+ add_filter( 'send_password_change_notification', array( $this, 'send_password_change_notification_filter' ) );
191
  }
192
 
193
  /**
200
  * @access public
201
  */
202
  public function apply_new_user_filters() {
203
+ add_filter( 'new_user_notification_title', array( $this, 'new_user_notification_title_filter' ), 10, 2 );
204
+ add_filter( 'new_user_notification_message', array( $this, 'new_user_notification_message_filter' ), 10, 3 );
205
+ add_filter( 'send_new_user_notification', array( $this, 'send_new_user_notification_filter' ) );
206
+ add_filter( 'new_user_admin_notification_mail_to', array( $this, 'new_user_admin_notification_mail_to_filter' ) );
207
+ add_filter( 'new_user_admin_notification_title', array( $this, 'new_user_admin_notification_title_filter' ), 10, 2 );
208
+ add_filter( 'new_user_admin_notification_message', array( $this, 'new_user_admin_notification_message_filter' ), 10, 2 );
209
+ add_filter( 'send_new_user_admin_notification', array( $this, 'send_new_user_admin_notification_filter' ) );
210
  }
211
 
212
  /**
548
  $this->get_option( array( 'user_activation', 'mail_from_name' ) ),
549
  $this->get_option( array( 'user_activation', 'mail_content_type' ) )
550
  );
551
+ add_filter( 'user_activation_notification_title', array( $this, 'user_activation_notification_title_filter' ), 10, 2 );
552
+ add_filter( 'user_activation_notification_message', array( $this, 'user_activation_notification_message_filter' ), 10, 3 );
553
  break;
554
  case 'admin' :
555
  $this->set_mail_headers(
557
  $this->get_option( array( 'user_approval', 'admin_mail_from_name' ) ),
558
  $this->get_option( array( 'user_approval', 'admin_mail_content_type' ) )
559
  );
560
+ add_filter( 'user_approval_admin_notification_mail_to', array( $this, 'user_approval_admin_notification_mail_to_filter' ) );
561
+ add_filter( 'user_approval_admin_notification_title', array( $this, 'user_approval_admin_notification_title_filter' ), 10, 2 );
562
+ add_filter( 'user_approval_admin_notification_message', array( $this, 'user_approval_admin_notification_message_filter' ), 10, 2 );
563
+ add_filter( 'send_new_user_approval_admin_notification', array( $this, 'send_new_user_approval_admin_notification_filter' ) );
564
  break;
565
  }
566
  }
580
  $this->get_option( array( 'user_approval', 'mail_from_name' ) ),
581
  $this->get_option( array( 'user_approval', 'mail_content_type' ) )
582
  );
583
+ add_filter( 'user_approval_notification_title', array( $this, 'user_approval_notification_title_filter' ), 10, 2 );
584
+ add_filter( 'user_approval_notification_message', array( $this, 'user_approval_notification_message_filter' ), 10, 3 );
585
  }
586
 
587
  /**
599
  $this->get_option( array( 'user_denial', 'mail_from_name' ) ),
600
  $this->get_option( array( 'user_denial', 'mail_content_type' ) )
601
  );
602
+ add_filter( 'user_denial_notification_title', array( $this, 'user_denial_notification_title_filter' ), 10, 2 );
603
+ add_filter( 'user_denial_notification_message', array( $this, 'user_denial_notification_message_filter' ), 10, 2 );
604
+ add_filter( 'send_new_user_denial_notification', array( $this, 'send_new_user_denial_notification_filter' ) );
605
  }
606
 
607
  /**
modules/custom-passwords/custom-passwords.php CHANGED
@@ -35,22 +35,22 @@ class Theme_My_Login_Custom_Passwords extends Theme_My_Login_Abstract {
35
  * @access protected
36
  */
37
  protected function load() {
38
- add_action( 'register_form', array( &$this, 'password_fields' ) );
39
- add_filter( 'registration_errors', array( &$this, 'password_errors' ) );
40
- add_filter( 'random_password', array( &$this, 'set_password' ) );
41
 
42
- add_action( 'signup_extra_fields', array( &$this, 'ms_password_fields' ) );
43
- add_action( 'signup_hidden_fields', array( &$this, 'ms_hidden_password_field' ) );
44
- add_filter( 'wpmu_validate_user_signup', array( &$this, 'ms_password_errors' ) );
45
- add_filter( 'add_signup_meta', array( &$this, 'ms_save_password' ) );
46
 
47
- add_action( 'register_new_user', array( &$this, 'remove_default_password_nag' ) );
48
- add_action( 'approve_user', array( &$this, 'remove_default_password_nag' ) );
49
 
50
- add_filter( 'tml_register_passmail_template_message', array( &$this, 'register_passmail_template_message' ) );
51
- add_action( 'tml_request', array( &$this, 'action_messages' ) );
52
 
53
- add_filter( 'registration_redirect', array( &$this, 'registration_redirect' ) );
54
  }
55
 
56
  /**
@@ -221,7 +221,7 @@ class Theme_My_Login_Custom_Passwords extends Theme_My_Login_Abstract {
221
  global $wpdb;
222
 
223
  // Remove filter as not to filter User Moderation activation key
224
- remove_filter( 'random_password', array( &$this, 'set_password' ) );
225
 
226
  if ( is_multisite() && isset( $_REQUEST['key'] ) ) {
227
  if ( $meta = $wpdb->get_var( $wpdb->prepare( "SELECT meta FROM $wpdb->signups WHERE activation_key = %s", $_REQUEST['key'] ) ) ) {
35
  * @access protected
36
  */
37
  protected function load() {
38
+ add_action( 'register_form', array( $this, 'password_fields' ) );
39
+ add_filter( 'registration_errors', array( $this, 'password_errors' ) );
40
+ add_filter( 'random_password', array( $this, 'set_password' ) );
41
 
42
+ add_action( 'signup_extra_fields', array( $this, 'ms_password_fields' ) );
43
+ add_action( 'signup_hidden_fields', array( $this, 'ms_hidden_password_field' ) );
44
+ add_filter( 'wpmu_validate_user_signup', array( $this, 'ms_password_errors' ) );
45
+ add_filter( 'add_signup_meta', array( $this, 'ms_save_password' ) );
46
 
47
+ add_action( 'register_new_user', array( $this, 'remove_default_password_nag' ) );
48
+ add_action( 'approve_user', array( $this, 'remove_default_password_nag' ) );
49
 
50
+ add_filter( 'tml_register_passmail_template_message', array( $this, 'register_passmail_template_message' ) );
51
+ add_action( 'tml_request', array( $this, 'action_messages' ) );
52
 
53
+ add_filter( 'registration_redirect', array( $this, 'registration_redirect' ) );
54
  }
55
 
56
  /**
221
  global $wpdb;
222
 
223
  // Remove filter as not to filter User Moderation activation key
224
+ remove_filter( 'random_password', array( $this, 'set_password' ) );
225
 
226
  if ( is_multisite() && isset( $_REQUEST['key'] ) ) {
227
  if ( $meta = $wpdb->get_var( $wpdb->prepare( "SELECT meta FROM $wpdb->signups WHERE activation_key = %s", $_REQUEST['key'] ) ) ) {
modules/custom-redirection/admin/custom-redirection-admin.php CHANGED
@@ -41,12 +41,12 @@ class Theme_My_Login_Custom_Redirection_Admin extends Theme_My_Login_Abstract {
41
  * @access protected
42
  */
43
  protected function load() {
44
- add_action( 'tml_uninstall_custom-redirection/custom-redirection.php', array( &$this, 'uninstall' ) );
45
 
46
- add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
47
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
48
 
49
- add_action( 'load-tml_page_theme_my_login_redirection', array( &$this, 'load_settings_page' ) );
50
  }
51
 
52
  /**
@@ -87,12 +87,12 @@ class Theme_My_Login_Custom_Redirection_Admin extends Theme_My_Login_Abstract {
87
  __( 'Redirection', 'theme-my-login' ),
88
  'manage_options',
89
  $this->options_key,
90
- array( &$this, 'settings_page' )
91
  );
92
 
93
  foreach ( $wp_roles->get_names() as $role => $role_name ) {
94
  if ( 'pending' != $role )
95
- add_meta_box( $role, translate_user_role( $role_name ), array( &$this, 'redirection_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
96
  }
97
  }
98
 
@@ -117,7 +117,7 @@ class Theme_My_Login_Custom_Redirection_Admin extends Theme_My_Login_Abstract {
117
  * @access public
118
  */
119
  public function load_settings_page() {
120
- wp_enqueue_script( 'tml-custom-redirection-admin', plugins_url( 'theme-my-login/modules/custom-redirection/admin/js/custom-redirection-admin.js' ), array( 'postbox' ) );
121
  }
122
 
123
  /**
41
  * @access protected
42
  */
43
  protected function load() {
44
+ add_action( 'tml_uninstall_custom-redirection/custom-redirection.php', array( $this, 'uninstall' ) );
45
 
46
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
47
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
48
 
49
+ add_action( 'load-tml_page_theme_my_login_redirection', array( $this, 'load_settings_page' ) );
50
  }
51
 
52
  /**
87
  __( 'Redirection', 'theme-my-login' ),
88
  'manage_options',
89
  $this->options_key,
90
+ array( $this, 'settings_page' )
91
  );
92
 
93
  foreach ( $wp_roles->get_names() as $role => $role_name ) {
94
  if ( 'pending' != $role )
95
+ add_meta_box( $role, translate_user_role( $role_name ), array( $this, 'redirection_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
96
  }
97
  }
98
 
117
  * @access public
118
  */
119
  public function load_settings_page() {
120
+ wp_enqueue_script( 'tml-custom-redirection-admin', plugins_url( 'js/custom-redirection-admin.js', __FILE__ ), array( 'postbox' ) );
121
  }
122
 
123
  /**
modules/custom-redirection/custom-redirection.php CHANGED
@@ -46,9 +46,9 @@ class Theme_My_Login_Custom_Redirection extends Theme_My_Login_Abstract {
46
  * @access protected
47
  */
48
  protected function load() {
49
- add_action( 'login_form', array( &$this, 'login_form' ) );
50
- add_filter( 'login_redirect', array( &$this, 'login_redirect' ), 10, 3 );
51
- add_filter( 'logout_redirect', array( &$this, 'logout_redirect' ), 10, 3 );
52
  }
53
 
54
  /**
46
  * @access protected
47
  */
48
  protected function load() {
49
+ add_action( 'login_form', array( $this, 'login_form' ) );
50
+ add_filter( 'login_redirect', array( $this, 'login_redirect' ), 10, 3 );
51
+ add_filter( 'logout_redirect', array( $this, 'logout_redirect' ), 10, 3 );
52
  }
53
 
54
  /**
modules/custom-user-links/admin/custom-user-links-admin.php CHANGED
@@ -44,15 +44,15 @@ class Theme_My_Login_Custom_User_Links_Admin extends Theme_My_Login_Abstract {
44
  * @access protected
45
  */
46
  protected function load() {
47
- add_action( 'tml_uninstall_custom-user-links/custom-user-links.php', array( &$this, 'uninstall' ) );
48
 
49
- add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
50
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
51
 
52
- add_action( 'load-tml_page_theme_my_login_user_links', array( &$this, 'load_settings_page' ) );
53
 
54
- add_action( 'wp_ajax_add-user-link', array( &$this, 'add_user_link_ajax' ) );
55
- add_action( 'wp_ajax_delete-user-link', array( &$this, 'delete_user_link_ajax' ) );
56
  }
57
 
58
  /**
@@ -95,12 +95,12 @@ class Theme_My_Login_Custom_User_Links_Admin extends Theme_My_Login_Abstract {
95
  __( 'User Links', 'theme-my-login' ),
96
  'manage_options',
97
  $this->options_key,
98
- array( &$this, 'settings_page' )
99
  );
100
 
101
  foreach ( $wp_roles->get_names() as $role => $role_name ) {
102
  if ( 'pending' != $role )
103
- add_meta_box( $role, translate_user_role( $role_name ), array( &$this, 'user_links_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
104
  }
105
  }
106
 
@@ -113,7 +113,7 @@ class Theme_My_Login_Custom_User_Links_Admin extends Theme_My_Login_Abstract {
113
  * @access public
114
  */
115
  public function admin_init() {
116
- register_setting( $this->options_key, $this->options_key, array( &$this, 'save_settings' ) );
117
  }
118
 
119
  /**
@@ -125,8 +125,8 @@ class Theme_My_Login_Custom_User_Links_Admin extends Theme_My_Login_Abstract {
125
  * @access public
126
  */
127
  public function load_settings_page() {
128
- wp_enqueue_style( 'tml-custom-user-links-admin', plugins_url( 'theme-my-login/modules/custom-user-links/admin/css/custom-user-links-admin.css' ) );
129
- wp_enqueue_script( 'tml-custom-user-links-admin', plugins_url( 'theme-my-login/modules/custom-user-links/admin/js/custom-user-links-admin.js' ), array( 'wp-lists', 'postbox', 'jquery-ui-sortable' ) );
130
  }
131
 
132
  /**
44
  * @access protected
45
  */
46
  protected function load() {
47
+ add_action( 'tml_uninstall_custom-user-links/custom-user-links.php', array( $this, 'uninstall' ) );
48
 
49
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
50
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
51
 
52
+ add_action( 'load-tml_page_theme_my_login_user_links', array( $this, 'load_settings_page' ) );
53
 
54
+ add_action( 'wp_ajax_add-user-link', array( $this, 'add_user_link_ajax' ) );
55
+ add_action( 'wp_ajax_delete-user-link', array( $this, 'delete_user_link_ajax' ) );
56
  }
57
 
58
  /**
95
  __( 'User Links', 'theme-my-login' ),
96
  'manage_options',
97
  $this->options_key,
98
+ array( $this, 'settings_page' )
99
  );
100
 
101
  foreach ( $wp_roles->get_names() as $role => $role_name ) {
102
  if ( 'pending' != $role )
103
+ add_meta_box( $role, translate_user_role( $role_name ), array( $this, 'user_links_meta_box' ), 'tml_page_' . $this->options_key, 'normal' );
104
  }
105
  }
106
 
113
  * @access public
114
  */
115
  public function admin_init() {
116
+ register_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );
117
  }
118
 
119
  /**
125
  * @access public
126
  */
127
  public function load_settings_page() {
128
+ wp_enqueue_style( 'tml-custom-user-links-admin', plugins_url( 'css/custom-user-links-admin.css', __FILE__ ) );
129
+ wp_enqueue_script( 'tml-custom-user-links-admin', plugins_url( 'js/custom-user-links-admin.js', __FILE__ ), array( 'wp-lists', 'postbox', 'jquery-ui-sortable' ) );
130
  }
131
 
132
  /**
modules/custom-user-links/custom-user-links.php CHANGED
@@ -78,7 +78,7 @@ class Theme_My_Login_Custom_User_Links extends Theme_My_Login_Abstract {
78
  * @access protected
79
  */
80
  protected function load() {
81
- add_filter( 'tml_user_links', array( &$this, 'get_user_links' ) );
82
  }
83
 
84
  /**
78
  * @access protected
79
  */
80
  protected function load() {
81
+ add_filter( 'tml_user_links', array( $this, 'get_user_links' ) );
82
  }
83
 
84
  /**
modules/recaptcha/admin/recaptcha-admin.php CHANGED
@@ -54,10 +54,10 @@ class Theme_My_Login_Recaptcha_Admin extends Theme_My_Login_Abstract {
54
  * @access protected
55
  */
56
  protected function load() {
57
- add_action( 'tml_uninstall_recaptcha/recaptcha.php', array( &$this, 'uninstall' ) );
58
 
59
- add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
60
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
61
  }
62
 
63
  /**
@@ -90,14 +90,14 @@ class Theme_My_Login_Recaptcha_Admin extends Theme_My_Login_Abstract {
90
  __( 'reCAPTCHA', 'theme-my-login' ),
91
  'manage_options',
92
  $this->options_key,
93
- array( &$this, 'settings_page' )
94
  );
95
 
96
  add_settings_section( 'general', null, '__return_false', $this->options_key );
97
 
98
- add_settings_field( 'public_key', __( 'Site Key', 'theme-my-login' ), array( &$this, 'settings_field_public_key' ), $this->options_key, 'general' );
99
- add_settings_field( 'private_key', __( 'Secret Key', 'theme-my-login' ), array( &$this, 'settings_field_private_key' ), $this->options_key, 'general' );
100
- add_settings_field( 'theme', __( 'Theme', 'theme-my-login' ), array( &$this, 'settings_field_theme' ), $this->options_key, 'general' );
101
  }
102
 
103
  /**
@@ -109,7 +109,7 @@ class Theme_My_Login_Recaptcha_Admin extends Theme_My_Login_Abstract {
109
  * @access public
110
  */
111
  public function admin_init() {
112
- register_setting( $this->options_key, $this->options_key, array( &$this, 'save_settings' ) );
113
  }
114
 
115
  /**
54
  * @access protected
55
  */
56
  protected function load() {
57
+ add_action( 'tml_uninstall_recaptcha/recaptcha.php', array( $this, 'uninstall' ) );
58
 
59
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
60
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
61
  }
62
 
63
  /**
90
  __( 'reCAPTCHA', 'theme-my-login' ),
91
  'manage_options',
92
  $this->options_key,
93
+ array( $this, 'settings_page' )
94
  );
95
 
96
  add_settings_section( 'general', null, '__return_false', $this->options_key );
97
 
98
+ add_settings_field( 'public_key', __( 'Site Key', 'theme-my-login' ), array( $this, 'settings_field_public_key' ), $this->options_key, 'general' );
99
+ add_settings_field( 'private_key', __( 'Secret Key', 'theme-my-login' ), array( $this, 'settings_field_private_key' ), $this->options_key, 'general' );
100
+ add_settings_field( 'theme', __( 'Theme', 'theme-my-login' ), array( $this, 'settings_field_theme' ), $this->options_key, 'general' );
101
  }
102
 
103
  /**
109
  * @access public
110
  */
111
  public function admin_init() {
112
+ register_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );
113
  }
114
 
115
  /**
modules/recaptcha/recaptcha.php CHANGED
@@ -65,15 +65,15 @@ class Theme_My_Login_Recaptcha extends Theme_My_Login_Abstract {
65
  if ( ! ( $this->get_option( 'public_key' ) || $this->get_option( 'private_key' ) ) )
66
  return;
67
 
68
- add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
69
 
70
- add_action( 'register_form', array( &$this, 'recaptcha_display' ) );
71
- add_filter( 'registration_errors', array( &$this, 'registration_errors' ) );
72
 
73
  if ( is_multisite() ) {
74
- add_action( 'signup_extra_fields', array( &$this, 'recaptcha_display' ) );
75
- add_filter( 'wpmu_validate_user_signup', array( &$this, 'wpmu_validate_signup' ) );
76
- add_filter( 'wpmu_validate_blog_signup', array( &$this, 'wpmu_validate_signup' ) );
77
  }
78
  }
79
 
65
  if ( ! ( $this->get_option( 'public_key' ) || $this->get_option( 'private_key' ) ) )
66
  return;
67
 
68
+ add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
69
 
70
+ add_action( 'register_form', array( $this, 'recaptcha_display' ) );
71
+ add_filter( 'registration_errors', array( $this, 'registration_errors' ) );
72
 
73
  if ( is_multisite() ) {
74
+ add_action( 'signup_extra_fields', array( $this, 'recaptcha_display' ) );
75
+ add_filter( 'wpmu_validate_user_signup', array( $this, 'wpmu_validate_signup' ) );
76
+ add_filter( 'wpmu_validate_blog_signup', array( $this, 'wpmu_validate_signup' ) );
77
  }
78
  }
79
 
modules/security/admin/security-admin.php CHANGED
@@ -52,13 +52,13 @@ class Theme_My_Login_Security_Admin extends Theme_My_Login_Abstract {
52
  * @access protected
53
  */
54
  protected function load() {
55
- add_action( 'tml_uninstall_security/security.php', array( &$this, 'uninstall' ) );
56
 
57
- add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
58
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
59
 
60
- add_action( 'load-users.php', array( &$this, 'load_users_page' ) );
61
- add_filter( 'user_row_actions', array( &$this, 'user_row_actions' ), 10, 2 );
62
  }
63
 
64
  /**
@@ -90,14 +90,14 @@ class Theme_My_Login_Security_Admin extends Theme_My_Login_Abstract {
90
  __( 'Security', 'theme-my-login' ),
91
  'manage_options',
92
  $this->options_key,
93
- array( &$this, 'settings_page' )
94
  );
95
 
96
  add_settings_section( 'general', null, '__return_false', $this->options_key );
97
 
98
- add_settings_field( 'private_site', __( 'Private Site', 'theme-my-login' ), array( &$this, 'settings_field_private_site' ), $this->options_key, 'general' );
99
- add_settings_field( 'private_login', __( 'Private Login', 'theme-my-login' ), array( &$this, 'settings_field_private_login' ), $this->options_key, 'general' );
100
- add_settings_field( 'login_attempts', __( 'Login Attempts', 'theme-my-login' ), array( &$this, 'settings_field_login_attempts' ), $this->options_key, 'general' );
101
  }
102
 
103
  /**
@@ -107,7 +107,7 @@ class Theme_My_Login_Security_Admin extends Theme_My_Login_Abstract {
107
  * @access public
108
  */
109
  public function admin_init() {
110
- register_setting( $this->options_key, $this->options_key, array( &$this, 'save_settings' ) );
111
  }
112
 
113
  /**
@@ -228,9 +228,9 @@ class Theme_My_Login_Security_Admin extends Theme_My_Login_Abstract {
228
 
229
  $security = Theme_My_Login_Security::get_object();
230
 
231
- wp_enqueue_script( 'tml-security-admin', plugins_url( 'theme-my-login/modules/security/admin/js/security-admin.js' ), array( 'jquery' ) );
232
 
233
- add_action( 'admin_notices', array( &$this, 'admin_notices' ) );
234
 
235
  if ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'lock', 'unlock' ) ) ) {
236
 
52
  * @access protected
53
  */
54
  protected function load() {
55
+ add_action( 'tml_uninstall_security/security.php', array( $this, 'uninstall' ) );
56
 
57
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
58
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
59
 
60
+ add_action( 'load-users.php', array( $this, 'load_users_page' ) );
61
+ add_filter( 'user_row_actions', array( $this, 'user_row_actions' ), 10, 2 );
62
  }
63
 
64
  /**
90
  __( 'Security', 'theme-my-login' ),
91
  'manage_options',
92
  $this->options_key,
93
+ array( $this, 'settings_page' )
94
  );
95
 
96
  add_settings_section( 'general', null, '__return_false', $this->options_key );
97
 
98
+ add_settings_field( 'private_site', __( 'Private Site', 'theme-my-login' ), array( $this, 'settings_field_private_site' ), $this->options_key, 'general' );
99
+ add_settings_field( 'private_login', __( 'Private Login', 'theme-my-login' ), array( $this, 'settings_field_private_login' ), $this->options_key, 'general' );
100
+ add_settings_field( 'login_attempts', __( 'Login Attempts', 'theme-my-login' ), array( $this, 'settings_field_login_attempts' ), $this->options_key, 'general' );
101
  }
102
 
103
  /**
107
  * @access public
108
  */
109
  public function admin_init() {
110
+ register_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );
111
  }
112
 
113
  /**
228
 
229
  $security = Theme_My_Login_Security::get_object();
230
 
231
+ wp_enqueue_script( 'tml-security-admin', plugins_url( 'js/security-admin.js', __FILE__ ), array( 'jquery' ) );
232
 
233
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
234
 
235
  if ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'lock', 'unlock' ) ) ) {
236
 
modules/security/security.php CHANGED
@@ -68,18 +68,18 @@ class Theme_My_Login_Security extends Theme_My_Login_Abstract {
68
  * @access protected
69
  */
70
  protected function load() {
71
- add_action( 'init', array( &$this, 'init' ) );
72
- add_action( 'template_redirect', array( &$this, 'template_redirect' ) );
73
- add_action( 'tml_request_unlock', array( &$this, 'request_unlock' ) );
74
- add_action( 'tml_request', array( &$this, 'action_messages' ) );
75
 
76
- add_action( 'authenticate', array( &$this, 'authenticate' ), 100, 3 );
77
- add_filter( 'allow_password_reset', array( &$this, 'allow_password_reset' ), 10, 2 );
78
 
79
- add_action( 'show_user_profile', array( &$this, 'show_user_profile' ) );
80
- add_action( 'edit_user_profile', array( &$this, 'show_user_profile' ) );
81
 
82
- add_filter( 'show_admin_bar', array( &$this, 'show_admin_bar' ) );
83
  }
84
 
85
  /**
68
  * @access protected
69
  */
70
  protected function load() {
71
+ add_action( 'init', array( $this, 'init' ) );
72
+ add_action( 'template_redirect', array( $this, 'template_redirect' ) );
73
+ add_action( 'tml_request_unlock', array( $this, 'request_unlock' ) );
74
+ add_action( 'tml_request', array( $this, 'action_messages' ) );
75
 
76
+ add_action( 'authenticate', array( $this, 'authenticate' ), 100, 3 );
77
+ add_filter( 'allow_password_reset', array( $this, 'allow_password_reset' ), 10, 2 );
78
 
79
+ add_action( 'show_user_profile', array( $this, 'show_user_profile' ) );
80
+ add_action( 'edit_user_profile', array( $this, 'show_user_profile' ) );
81
 
82
+ add_filter( 'show_admin_bar', array( $this, 'show_admin_bar' ) );
83
  }
84
 
85
  /**
modules/themed-profiles/admin/themed-profiles-admin.php CHANGED
@@ -41,11 +41,11 @@ class Theme_My_Login_Themed_Profiles_Admin extends Theme_My_Login_Abstract {
41
  * @access protected
42
  */
43
  protected function load() {
44
- add_action( 'tml_activate_themed-profiles/themed-profiles.php', array( &$this, 'activate' ) );
45
- add_action( 'tml_uninstall_themed-profiles/themed-profiles.php', array( &$this, 'uninstall' ) );
46
 
47
- add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
48
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
49
  }
50
 
51
  /**
@@ -109,13 +109,13 @@ class Theme_My_Login_Themed_Profiles_Admin extends Theme_My_Login_Abstract {
109
  __( 'Themed Profiles', 'theme-my-login' ),
110
  'manage_options',
111
  $this->options_key,
112
- array( &$this, 'settings_page' )
113
  );
114
 
115
  add_settings_section( 'general', null, '__return_false', $this->options_key );
116
 
117
- add_settings_field( 'themed_profiles', __( 'Themed Profiles', 'theme-my-login' ), array( &$this, 'settings_field_themed_profiles' ), $this->options_key, 'general' );
118
- add_settings_field( 'restrict_admin', __( 'Restrict Admin Access', 'theme-my-login' ), array( &$this, 'settings_field_restrict_admin_access' ), $this->options_key, 'general' );
119
  }
120
 
121
  /**
@@ -127,7 +127,7 @@ class Theme_My_Login_Themed_Profiles_Admin extends Theme_My_Login_Abstract {
127
  * @access public
128
  */
129
  public function admin_init() {
130
- register_setting( $this->options_key, $this->options_key, array( &$this, 'save_settings' ) );
131
  }
132
 
133
  /**
41
  * @access protected
42
  */
43
  protected function load() {
44
+ add_action( 'tml_activate_themed-profiles/themed-profiles.php', array( $this, 'activate' ) );
45
+ add_action( 'tml_uninstall_themed-profiles/themed-profiles.php', array( $this, 'uninstall' ) );
46
 
47
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
48
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
49
  }
50
 
51
  /**
109
  __( 'Themed Profiles', 'theme-my-login' ),
110
  'manage_options',
111
  $this->options_key,
112
+ array( $this, 'settings_page' )
113
  );
114
 
115
  add_settings_section( 'general', null, '__return_false', $this->options_key );
116
 
117
+ add_settings_field( 'themed_profiles', __( 'Themed Profiles', 'theme-my-login' ), array( $this, 'settings_field_themed_profiles' ), $this->options_key, 'general' );
118
+ add_settings_field( 'restrict_admin', __( 'Restrict Admin Access', 'theme-my-login' ), array( $this, 'settings_field_restrict_admin_access' ), $this->options_key, 'general' );
119
  }
120
 
121
  /**
127
  * @access public
128
  */
129
  public function admin_init() {
130
+ register_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );
131
  }
132
 
133
  /**
modules/themed-profiles/themed-profiles.php CHANGED
@@ -72,18 +72,18 @@ class Theme_My_Login_Themed_Profiles extends Theme_My_Login_Abstract {
72
  * @access protected
73
  */
74
  protected function load() {
75
- add_action( 'tml_modules_loaded', array( &$this, 'modules_loaded' ) );
76
 
77
- add_action( 'init', array( &$this, 'init' ) );
78
- add_action( 'template_redirect', array( &$this, 'template_redirect' ) );
79
- add_filter( 'show_admin_bar', array( &$this, 'show_admin_bar' ) );
80
- add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
81
- add_filter( 'body_class', array( &$this, 'body_class' ) );
82
 
83
- add_action( 'tml_request_profile', array( &$this, 'tml_request_profile' ) );
84
- add_action( 'tml_display_profile', array( &$this, 'tml_display_profile' ) );
85
 
86
- add_filter( 'wp_setup_nav_menu_item', array( &$this, 'wp_setup_nav_menu_item' ), 12 );
87
  }
88
 
89
  /**
@@ -95,8 +95,8 @@ class Theme_My_Login_Themed_Profiles extends Theme_My_Login_Abstract {
95
  * @access public
96
  */
97
  public function modules_loaded() {
98
- add_filter( 'site_url', array( &$this, 'site_url' ), 10, 3 );
99
- add_filter( 'admin_url', array( &$this, 'site_url' ), 10, 2 );
100
  }
101
 
102
  /**
@@ -202,7 +202,7 @@ class Theme_My_Login_Themed_Profiles extends Theme_My_Login_Abstract {
202
  * @access public
203
  */
204
  public function wp_enqueue_scripts() {
205
- wp_enqueue_script( 'tml-themed-profiles', plugins_url( 'theme-my-login/modules/themed-profiles/themed-profiles.js' ), array( 'jquery' ) );
206
  }
207
 
208
  /**
@@ -244,7 +244,7 @@ class Theme_My_Login_Themed_Profiles extends Theme_My_Login_Abstract {
244
 
245
  register_admin_color_schemes();
246
 
247
- wp_enqueue_style( 'password-strength', plugins_url( 'theme-my-login/modules/themed-profiles/themed-profiles.css' ) );
248
 
249
  wp_enqueue_script( 'user-profile' );
250
 
72
  * @access protected
73
  */
74
  protected function load() {
75
+ add_action( 'tml_modules_loaded', array( $this, 'modules_loaded' ) );
76
 
77
+ add_action( 'init', array( $this, 'init' ) );
78
+ add_action( 'template_redirect', array( $this, 'template_redirect' ) );
79
+ add_filter( 'show_admin_bar', array( $this, 'show_admin_bar' ) );
80
+ add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
81
+ add_filter( 'body_class', array( $this, 'body_class' ) );
82
 
83
+ add_action( 'tml_request_profile', array( $this, 'tml_request_profile' ) );
84
+ add_action( 'tml_display_profile', array( $this, 'tml_display_profile' ) );
85
 
86
+ add_filter( 'wp_setup_nav_menu_item', array( $this, 'wp_setup_nav_menu_item' ), 12 );
87
  }
88
 
89
  /**
95
  * @access public
96
  */
97
  public function modules_loaded() {
98
+ add_filter( 'site_url', array( $this, 'site_url' ), 10, 3 );
99
+ add_filter( 'admin_url', array( $this, 'site_url' ), 10, 2 );
100
  }
101
 
102
  /**
202
  * @access public
203
  */
204
  public function wp_enqueue_scripts() {
205
+ wp_enqueue_script( 'tml-themed-profiles', plugins_url( 'themed-profiles.js', __FILE__ ), array( 'jquery' ) );
206
  }
207
 
208
  /**
244
 
245
  register_admin_color_schemes();
246
 
247
+ wp_enqueue_style( 'password-strength', plugins_url( 'themed-profiles.css', __FILE__ ) );
248
 
249
  wp_enqueue_script( 'user-profile' );
250
 
modules/user-moderation/admin/user-moderation-admin.php CHANGED
@@ -41,21 +41,21 @@ class Theme_My_Login_User_Moderation_Admin extends Theme_My_Login_Abstract {
41
  * @access protected
42
  */
43
  protected function load() {
44
- add_action( 'tml_activate_user-moderation/user-moderation.php', array( &$this, 'activate' ) );
45
- add_action( 'tml_uninstall_user-moderation/user-moderation.php', array( &$this, 'uninstall' ) );
46
 
47
- add_action( 'tml_modules_loaded', array( &$this, 'modules_loaded' ) );
48
 
49
  if ( is_multisite() )
50
  return;
51
 
52
- add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
53
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
54
 
55
- add_action( 'load-users.php', array( &$this, 'load_users_page' ) );
56
- add_filter( 'user_row_actions', array( &$this, 'user_row_actions' ), 10, 2 );
57
 
58
- add_action( 'delete_user', array( &$this, 'deny_user' ) );
59
  }
60
 
61
  /**
@@ -137,12 +137,12 @@ class Theme_My_Login_User_Moderation_Admin extends Theme_My_Login_Abstract {
137
  __( 'Moderation', 'theme-my-login' ),
138
  'manage_options',
139
  $this->options_key,
140
- array( &$this, 'settings_page' )
141
  );
142
 
143
  add_settings_section( 'general', null, '__return_false', $this->options_key );
144
 
145
- add_settings_field( 'type', __( 'Moderation Type', 'theme-my-login' ), array( &$this, 'settings_field_moderation_type' ), $this->options_key, 'general' );
146
  }
147
 
148
  /**
@@ -154,7 +154,7 @@ class Theme_My_Login_User_Moderation_Admin extends Theme_My_Login_Abstract {
154
  * @access public
155
  */
156
  public function admin_init() {
157
- register_setting( $this->options_key, $this->options_key, array( &$this, 'save_settings' ) );
158
  }
159
 
160
  /**
@@ -216,7 +216,7 @@ class Theme_My_Login_User_Moderation_Admin extends Theme_My_Login_Abstract {
216
  * @access public
217
  */
218
  public function load_users_page() {
219
- add_action( 'admin_notices', array( &$this, 'admin_notices' ) );
220
 
221
  // Is there an action?
222
  if ( isset( $_GET['action'] ) ) {
41
  * @access protected
42
  */
43
  protected function load() {
44
+ add_action( 'tml_activate_user-moderation/user-moderation.php', array( $this, 'activate' ) );
45
+ add_action( 'tml_uninstall_user-moderation/user-moderation.php', array( $this, 'uninstall' ) );
46
 
47
+ add_action( 'tml_modules_loaded', array( $this, 'modules_loaded' ) );
48
 
49
  if ( is_multisite() )
50
  return;
51
 
52
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
53
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
54
 
55
+ add_action( 'load-users.php', array( $this, 'load_users_page' ) );
56
+ add_filter( 'user_row_actions', array( $this, 'user_row_actions' ), 10, 2 );
57
 
58
+ add_action( 'delete_user', array( $this, 'deny_user' ) );
59
  }
60
 
61
  /**
137
  __( 'Moderation', 'theme-my-login' ),
138
  'manage_options',
139
  $this->options_key,
140
+ array( $this, 'settings_page' )
141
  );
142
 
143
  add_settings_section( 'general', null, '__return_false', $this->options_key );
144
 
145
+ add_settings_field( 'type', __( 'Moderation Type', 'theme-my-login' ), array( $this, 'settings_field_moderation_type' ), $this->options_key, 'general' );
146
  }
147
 
148
  /**
154
  * @access public
155
  */
156
  public function admin_init() {
157
+ register_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );
158
  }
159
 
160
  /**
216
  * @access public
217
  */
218
  public function load_users_page() {
219
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
220
 
221
  // Is there an action?
222
  if ( isset( $_GET['action'] ) ) {
modules/user-moderation/user-moderation.php CHANGED
@@ -65,18 +65,18 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
65
 
66
  if ( in_array( $this->get_option( 'type' ), array( 'admin', 'email' ) ) ) {
67
 
68
- add_action( 'register_post', array( &$this, 'register_post' ) );
69
- add_filter( 'registration_redirect', array( &$this, 'registration_redirect' ), 100 );
70
 
71
- add_action( 'authenticate', array( &$this, 'authenticate' ), 100, 3 );
72
- add_filter( 'allow_password_reset', array( &$this, 'allow_password_reset' ), 10, 2 );
73
 
74
- add_action( 'tml_request', array( &$this, 'action_messages' ) );
75
- add_action( 'tml_new_user_activated', array( &$this, 'new_user_activated' ) );
76
 
77
  if ( 'email' == $this->get_option( 'type' ) ) {
78
- add_action( 'tml_request_activate', array( &$this, 'user_activation' ) );
79
- add_action( 'tml_request_sendactivation', array( &$this, 'send_activation' ) );
80
  }
81
  }
82
  }
@@ -95,12 +95,12 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
95
  // Remove Custom Email new user notification
96
  if ( class_exists( 'Theme_My_Login_Custom_Email' ) ) {
97
  $custom_email = Theme_My_Login_Custom_Email::get_object();
98
- if ( has_action( 'register_new_user', array( &$custom_email, 'new_user_notification' ) ) )
99
- remove_action( 'register_new_user', array( &$custom_email, 'new_user_notification' ) );
100
  }
101
 
102
  // Moderate user upon registration
103
- add_action( 'register_new_user', array( &$this, 'moderate_user' ), 100 );
104
  }
105
 
106
  /**
65
 
66
  if ( in_array( $this->get_option( 'type' ), array( 'admin', 'email' ) ) ) {
67
 
68
+ add_action( 'register_post', array( $this, 'register_post' ) );
69
+ add_filter( 'registration_redirect', array( $this, 'registration_redirect' ), 100 );
70
 
71
+ add_action( 'authenticate', array( $this, 'authenticate' ), 100, 3 );
72
+ add_filter( 'allow_password_reset', array( $this, 'allow_password_reset' ), 10, 2 );
73
 
74
+ add_action( 'tml_request', array( $this, 'action_messages' ) );
75
+ add_action( 'tml_new_user_activated', array( $this, 'new_user_activated' ) );
76
 
77
  if ( 'email' == $this->get_option( 'type' ) ) {
78
+ add_action( 'tml_request_activate', array( $this, 'user_activation' ) );
79
+ add_action( 'tml_request_sendactivation', array( $this, 'send_activation' ) );
80
  }
81
  }
82
  }
95
  // Remove Custom Email new user notification
96
  if ( class_exists( 'Theme_My_Login_Custom_Email' ) ) {
97
  $custom_email = Theme_My_Login_Custom_Email::get_object();
98
+ if ( has_action( 'register_new_user', array( $custom_email, 'new_user_notification' ) ) )
99
+ remove_action( 'register_new_user', array( $custom_email, 'new_user_notification' ) );
100
  }
101
 
102
  // Moderate user upon registration
103
+ add_action( 'register_new_user', array( $this, 'moderate_user' ), 100 );
104
  }
105
 
106
  /**
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail
5
  Requires at least: 4.4
6
  Tested up to: 4.4
7
- Stable tag: 6.4.3
8
 
9
  Themes the WordPress login pages according to your theme.
10
 
@@ -57,6 +57,11 @@ Please visit http://www.jfarthing.com/development/theme-my-login.
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
60
  = 6.4.3 =
61
  * Fix sending of custom emails when creating a user
62
  * Fix sending of custom emails on user activation/approval
4
  Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail
5
  Requires at least: 4.4
6
  Tested up to: 4.4
7
+ Stable tag: 6.4.4
8
 
9
  Themes the WordPress login pages according to your theme.
10
 
57
 
58
  == Changelog ==
59
 
60
+ = 6.4.4 =
61
+ * Fix file loading for non-standard directory setups
62
+ * Fix language files not loading properly
63
+ * Fix password reset cookie path
64
+
65
  = 6.4.3 =
66
  * Fix sending of custom emails when creating a user
67
  * Fix sending of custom emails on user activation/approval
theme-my-login.php CHANGED
@@ -3,36 +3,40 @@
3
  Plugin Name: Theme My Login
4
  Plugin URI: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/
5
  Description: Themes the WordPress login, registration and forgot password pages according to your theme.
6
- Version: 6.4.3
7
  Author: Jeff Farthing
8
  Author URI: http://www.jfarthing.com
9
  Text Domain: theme-my-login
10
- Domain Path: /language/
11
  */
12
 
13
  // Allow custom functions file
14
  if ( file_exists( WP_PLUGIN_DIR . '/theme-my-login-custom.php' ) )
15
  include_once( WP_PLUGIN_DIR . '/theme-my-login-custom.php' );
16
 
 
 
 
 
17
  // Require a few needed files
18
- require_once( WP_PLUGIN_DIR . '/theme-my-login/includes/class-theme-my-login-common.php' );
19
- require_once( WP_PLUGIN_DIR . '/theme-my-login/includes/class-theme-my-login-abstract.php' );
20
- require_once( WP_PLUGIN_DIR . '/theme-my-login/includes/class-theme-my-login.php' );
21
- require_once( WP_PLUGIN_DIR . '/theme-my-login/includes/class-theme-my-login-template.php' );
22
- require_once( WP_PLUGIN_DIR . '/theme-my-login/includes/class-theme-my-login-widget.php' );
23
 
24
  // Instantiate Theme_My_Login singleton
25
  Theme_My_Login::get_object();
26
 
27
  if ( is_admin() ) {
28
- require_once( WP_PLUGIN_DIR . '/theme-my-login/admin/class-theme-my-login-admin.php' );
29
 
30
  // Instantiate Theme_My_Login_Admin singleton
31
  Theme_My_Login_Admin::get_object();
32
  }
33
 
34
  if ( is_multisite() ) {
35
- require_once( WP_PLUGIN_DIR . '/theme-my-login/includes/class-theme-my-login-ms-signup.php' );
36
 
37
  // Instantiate Theme_My_Login_MS_Signup singleton
38
  Theme_My_Login_MS_Signup::get_object();
3
  Plugin Name: Theme My Login
4
  Plugin URI: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/
5
  Description: Themes the WordPress login, registration and forgot password pages according to your theme.
6
+ Version: 6.4.4
7
  Author: Jeff Farthing
8
  Author URI: http://www.jfarthing.com
9
  Text Domain: theme-my-login
10
+ Domain Path: /languages
11
  */
12
 
13
  // Allow custom functions file
14
  if ( file_exists( WP_PLUGIN_DIR . '/theme-my-login-custom.php' ) )
15
  include_once( WP_PLUGIN_DIR . '/theme-my-login-custom.php' );
16
 
17
+ if ( ! defined( 'THEME_MY_LOGIN_PATH' ) ) {
18
+ define( 'THEME_MY_LOGIN_PATH', dirname( __FILE__ ) );
19
+ }
20
+
21
  // Require a few needed files
22
+ require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-common.php' );
23
+ require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-abstract.php' );
24
+ require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login.php' );
25
+ require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-template.php' );
26
+ require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-widget.php' );
27
 
28
  // Instantiate Theme_My_Login singleton
29
  Theme_My_Login::get_object();
30
 
31
  if ( is_admin() ) {
32
+ require_once( THEME_MY_LOGIN_PATH . '/admin/class-theme-my-login-admin.php' );
33
 
34
  // Instantiate Theme_My_Login_Admin singleton
35
  Theme_My_Login_Admin::get_object();
36
  }
37
 
38
  if ( is_multisite() ) {
39
+ require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-ms-signup.php' );
40
 
41
  // Instantiate Theme_My_Login_MS_Signup singleton
42
  Theme_My_Login_MS_Signup::get_object();