Stealth Login Page - Version 3.0.0

Version Description

  • Added full MU support.
  • Disabled the login/logout/lost-password URL filtering - it knows if you're logged in.
  • Added wp-config.php settings support to bypass the settings page if you're locked out or in a MU environment.
Download this release

Release Info

Developer peterdog
Plugin Icon wp plugin Stealth Login Page
Version 3.0.0
Comparing to
See all releases

Code changes from version 2.1.2 to 3.0.0

includes/display-functions.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * Check the URL of the WordPress login page for a specific query string.
5
- *
6
- */
7
-
8
- add_action( 'login_init', 'slp_login_stringcheck' );
9
- function slp_login_stringcheck() {
10
-
11
- global $slp_options, $custom_url;
12
-
13
- // set the location a failed attempt goes to
14
- $redirect = $slp_options['redirect_url'];
15
- $question = $slp_options['question'];
16
- $answer = $slp_options['answer'];
17
-
18
- // get the requested URL
19
- $form_request = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
20
-
21
- if ( $form_request !== $custom_url ) {
22
- wp_redirect( esc_url_raw ($redirect), 302 );
23
- }
24
-
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/documentation.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Documentation page
5
+ *
6
+ * @since 3.0.0
7
+ */
8
+ function slp_documentation() {
9
+
10
+ global $slp_options, $custom_url;
11
+
12
+ ob_start(); ?>
13
+ <div class="wrap">
14
+ <h2><?php _e( 'Stealth Login Page Documentation', 'stealth-login-page' ); ?></h2>
15
+
16
+ <h3><?php _e( 'Network (multi-site) Activation', 'stealth-login-page' ); ?></h3>
17
+ <p><?php _e( 'Version 3.0.0 added full multi-site capabilities. Previously, the plugin needed each site to have the settings page filled out and the enable checkbox checked. Now, for v3.0.0 and above, Network Activate the plugin.' ); ?></p>
18
+ <p><?php _e( 'Add the following 3 lines to wp-config.php (right after the $table_prefix variable is good placement) to fully engage the plugin across the network:', 'stealth-login-page' ); ?></p>
19
+ <ul>
20
+ <li>$slp_redirect = "URL"</li>
21
+ <li>$slp_question = "question";</li>
22
+ <li>$slp_answer = "answer";</li>
23
+ </ul>
24
+ <p><?php _e( 'Change each variable to customize the redirect URL, question, and answer settings. If one of the variable entries (not the custom "answer" for each) is missing, the plugin will not activate the redirect function. All three are required to be in the file.', 'stealth-login-page' ); ?></p>
25
+ <p><strong><?php _e( 'Note: Adding these to wp-config.php will override any and all settings on any site (single or multi-site install both) and put that custom URL and redirect URL in play.', 'stealth-login-page' ); ?></strong></p>
26
+ <p><?php _e( 'There is no e-mail URL for the wp-config.php route because (obviously) if you have the ability to put those in place, you also have the ability to change settings or disable it.', 'stealth-login-page' ); ?></p>
27
+ <p><?php _e( 'If you remove the wp-config.php variables, then any site that has the settings page filled out and the "enable" checkbox checked will revert to the settings page behavior.', 'stealth-login-page' ); ?></p>
28
+ <h3><?php _e( 'Lost Password/Logout', 'stealth-login-page' ); ?></h3>
29
+ <p><?php _e( 'Due to the number of support requests involving the lost password function or logouts (or anything else that happens aside from purely attempting to visit the login page from direct navigation), the URL filter that was in place in v2.1.2 has been removed. While it solved many issues, it created more than it solved.', 'stealth-login-page' ); ?></p>
30
+ <h4><?php _e( 'To make up for that...', 'stealth-login-page' ); ?></h4>
31
+ <p><?php _e( 'The redirect function is bypassed if the system recognizes you as being in a logged in session. As of yet, it is not certain how this will behave in 3.6 when a session times out and the pop-up appears, but hopefully nothing will need to be altered.', 'stealth-login-page' ); ?></p>
32
+ <h3><?php _e( 'Donations', 'stealth-login-page' ); ?></h3>
33
+ <p><?php _e( 'An additional 15 hours of programming went into v3.0.0 to enable multi-site, streamline the code, and rebuild the redirect functions from the ground up to eliminate as many potential scenarios as possible.', 'stealth-login-page' ); ?></p>
34
+ <p><?php _e( 'Any donations will allow this to continue to be developed and supported, as there are several new features that should be included, but there is not enough funding to neglect paid projects.', 'stealth-login-page' ); ?></p>
35
+ <p><strong><?php _e('Like the plugin? Please ', 'stealth-login-page'); ?> <a href="http://wordpress.org/support/view/plugin-reviews/stealth-login-page?rate=5#postform" target="_blank"> <?php _e('rate and review', 'stealth-login-page'); ?></a> <?php _e(' it', 'stealth-login-page'); ?>.</strong></p>
36
+ <br />
37
+ <p><center><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7T2JDSM64HQV8" target="_blank"><img src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" /></a></center></p>
38
+ </div><!-- .wrap -->
39
+ <?php
40
+ echo ob_get_clean();
41
+ }
includes/settings-functions.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ add_action( 'login_init', 'slp_settings_login_stringcheck' );
4
+ function slp_settings_login_stringcheck() {
5
+
6
+ global $slp_options, $custom_url, $message;
7
+
8
+ // get the requested URL
9
+ $form_request_local = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
10
+ $form_request = $_SERVER['HTTP_REFERER'];
11
+
12
+ if ( (is_user_logged_in(TRUE)) ) {
13
+ return;
14
+ }
15
+
16
+ elseif (! ( ($form_request_local == $custom_url) || ($form_request == $custom_url) ) ) {
17
+ wp_redirect( esc_url_raw ($slp_options['redirect_url']), 302 );
18
+ echo $message;
19
+ die;
20
+ }
21
+
22
+ }
includes/settings-page.php CHANGED
@@ -79,48 +79,4 @@ function slp_admin() {
79
  </div><!-- .wrap -->
80
  <?php
81
  echo ob_get_clean();
82
- }
83
-
84
- /*-------------------------------------------------------------
85
- Name: slp_credits
86
-
87
- Purpose: Promotional stuff shown throughout the plugin
88
- Since: 1.1.3
89
- -------------------------------------------------------------*/
90
- function slp_credits() {
91
-
92
- echo '<table class="widefat" style="margin-top: .5em">';
93
-
94
- echo '<thead>';
95
- echo '<tr valign="top">';
96
- echo ' <th width="27%">'.__('Your support makes a difference', 'stealth-login-page').'</th>';
97
- echo ' <th>'.__('Useful links', 'stealth-login-page').'</th>';
98
- echo ' <th width="35%">'.__('Brought to you by', 'stealth-login-page').'</th>';
99
- echo '</tr>';
100
- echo '</thead>';
101
-
102
- echo '<tbody>';
103
- echo '<tr>';
104
- echo '<td><ul>';
105
- echo ' <li>'.__('Your generous gift will ensure the continued development of Stealth Login Page and bring more benefits and features. Thank you for your consideration!', 'stealth-login-page').'</li>';
106
-
107
- echo ' <li><center><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7T2JDSM64HQV8" target="_blank"><img src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" /></a></center></li>';
108
- echo ' <li>'.__('Like the plugin? Please ', 'stealth-login-page').' <a href="http://wordpress.org/support/view/plugin-reviews/stealth-login-page?rate=5#postform" target="_blank">'.__('rate and review', 'stealth-login-page').'</a> '.__('it', 'stealth-login-page').'.</li>';
109
- echo '</ul></td>';
110
-
111
- echo '<td style="border-left:1px #ddd solid;"><ul>';
112
-
113
- echo ' <li>'.__('Find my website at', 'stealth-login-page').' <a href="http://www.petersenmediagroup.com" target="_blank">petersenmediagroup.com</a>.</li>';
114
- echo ' <li>'.__('Beef up your security even more with', 'stealth-login-page').' <a href="http://wordpress.org/extend/plugins/limit-login-attempts/" target="_blank">'.__('Limit Login Attempts','stealth-login-page').'</a>.</li>';
115
- echo ' <li>'.__('Learn more about secure WordPress hosting with a ', 'stealth-login-page').' <a href="http://www.petersenmediagroup.com/wordpress-hosting/" target="_blank">'.__('managed host', 'stealth-login-page').'</a>.</li>';
116
- echo '</ul></td>';
117
-
118
- echo '<td style="border-left:1px #ddd solid;"><ul>';
119
- echo ' <li><a href="http://www.petersenmediagroup.com" title="Petersen Media Group"><img src="'.WP_CONTENT_URL.'/plugins/stealth-login-page/images/pmg-logo.png" alt="pmg-logo" width="150" height="67" align="left" style="padding: 0 10px 10px 0;" /></a>';
120
- echo ' <a href="http://www.petersenmediagroup.com" title="Petersen Media Group">Petersen Media Group</a> - '.__('I’m a straight-shooter and listen to what my clients want, run it through my filters, and come up with what they need. Not a "yes man" by any stretch of the imagination, I don’t consider a project a success unless it serves my client well. I have a "do no harm" policy to protect them from mis-information and trying things I’ve already learned about the hard way.', 'stealth-login-page').' '.__('Visit the', 'stealth-login-page').' <a href="http://www.petersenmediagroup.com" target="_blank">'.__('Petersen Media Group', 'stealth-login-page').'</a> '.__('website', 'stealth-login-page').'.</li>';
121
- echo '</ul></td>';
122
- echo '</tr>';
123
- echo '</tbody>';
124
-
125
- echo '</table>';
126
  }
79
  </div><!-- .wrap -->
80
  <?php
81
  echo ob_get_clean();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  }
includes/wp-config-functions.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ add_action( 'login_init', 'slp_wpconfig_login_stringcheck' );
4
+ function slp_wpconfig_login_stringcheck() {
5
+
6
+ global $slp_redirect, $slp_question, $slp_answer, $custom_wp_config, $message;
7
+
8
+ // get the requested URL
9
+ $form_request_local = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
10
+ $form_request = $_SERVER['HTTP_REFERER'];
11
+
12
+ if ( (is_user_logged_in(TRUE)) ) {
13
+ return;
14
+ }
15
+ elseif (! ( ($form_request_local == $custom_wp_config) || ($form_request == $custom_wp_config) ) ) {
16
+
17
+ wp_redirect( esc_url_raw ($slp_redirect), 302 );
18
+ echo $message;
19
+ die;
20
+
21
+ }
22
+ }
languages/stealth-login-page-de_DE.mo DELETED
Binary file
languages/stealth-login-page-pl_PL.mo DELETED
Binary file
plugin.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Stealth Login Page
4
  Plugin URI: http://wordpress.org/extend/plugins/stealth-login-page/
5
- Version: 2.1.2
6
  Author: Jesse Petersen
7
  Author URI: http://www.petersenmediagroup.com
8
  Description: Protect your /wp-admin and wp-login.php pages from being accessed without editing .htaccess
@@ -16,6 +16,17 @@
16
 
17
  Thanks to David Decker for DE localization: http://deckerweb.de/kontakt/
18
 
 
 
 
 
 
 
 
 
 
 
 
19
  Licenced under the GNU GPL:
20
 
21
  This program is free software; you can redistribute it and/or modify
@@ -48,9 +59,80 @@ function slp_load_plugin_translations() {
48
 
49
  }
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  add_action('admin_menu', 'slp_plugin_menu');
52
  function slp_plugin_menu() {
53
  add_options_page( __( 'Stealth Login Page', 'stealth-login-page' ), __( 'Stealth Login Page', 'stealth-login-page' ), 'manage_options', 'stealth-login-page', 'slp_admin' );
 
54
  return;
55
  }
56
 
@@ -67,43 +149,76 @@ function slp_admin_settings_link( $links, $file ) {
67
 
68
  if ( plugin_basename(__FILE__) == $file ) {
69
  $settings_link = '<a href="' . admin_url( 'options-general.php?page=stealth-login-page' ) . '">' . __( 'Settings', 'stealth-login-page' ) . '</a>';
70
- array_unshift( $links, $settings_link );
 
71
  }
72
 
73
  return $links;
74
 
75
  }
76
 
77
- /**
78
- * Edit the logout/login/lost_password URLs to the new custom URL
79
- *
80
- * @since 2.1.0
81
- * @param $old
82
- * @param $new
83
- * @param $url
84
- * @return array
85
- */
86
- add_filter('site_url', 'wplogin_filter', 10, 3);
87
- function wplogin_filter( $url, $path, $orig_scheme ) {
88
- global $custom_url_ending;
89
-
90
- $old = array( "/(wp-login\.php)/");
91
- $new = array( $custom_url_ending );
92
-
93
- return preg_replace( $old, $new, $url, 1);
94
- }
95
-
96
  // Global Variables ---------------------- //
97
  $slp_prefix = 'slp_';
98
  $slp_plugin_name = 'Stealth Login Page';
99
  // retrieve plugin settings from options table
100
  $slp_options = get_option('slp_settings');
101
  $custom_url = site_url() . '/wp-login.php?' . $slp_options['question'] . '=' . $slp_options['answer'];
102
- $custom_url_ending = "wp-login.php?" . $slp_options['question'] . '=' . $slp_options['answer'];
103
- $custom_logged_out = $custom_url . '?loggedout=true';
104
- $custom_lost_password = $custom_url . '&action=lostpassword';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
 
106
  // Includes ------------------------------ //
107
  include('includes/settings-page.php'); // loads the admin settings page
108
- if ( $slp_options['enable'] )
109
- include('includes/display-functions.php'); // loads the output functions
 
 
 
 
 
2
  /*
3
  Plugin Name: Stealth Login Page
4
  Plugin URI: http://wordpress.org/extend/plugins/stealth-login-page/
5
+ Version: 3.0.0
6
  Author: Jesse Petersen
7
  Author URI: http://www.petersenmediagroup.com
8
  Description: Protect your /wp-admin and wp-login.php pages from being accessed without editing .htaccess
16
 
17
  Thanks to David Decker for DE localization: http://deckerweb.de/kontakt/
18
 
19
+ Limit of liability: Installation and use of this plugin acknowledges the
20
+ understanding that this program alters the wp-config.php file and adds
21
+ settings to the WordPress database. The author is not responsible for any
22
+ damages or loss of data that might possibly be incurred through the
23
+ installation or use of the plugin.
24
+
25
+ Support: This is a free plugin, therefore support is limited to bugs that
26
+ affect all installations. Requests of any other nature will be at the
27
+ discretion of the plugin author to add or modify the code to account for
28
+ various installations, servers, or plugin conflicts.
29
+
30
  Licenced under the GNU GPL:
31
 
32
  This program is free software; you can redistribute it and/or modify
59
 
60
  }
61
 
62
+ register_activation_hook( __FILE__, 'slp_activate' );
63
+ register_deactivation_hook( __FILE__, 'slp_deactivate' );
64
+
65
+ function slp_activate($networkwide) {
66
+ global $wpdb;
67
+
68
+ if (function_exists('is_multisite') && is_multisite()) {
69
+ // check if it is a network activation - if so, run the activation function for each blog id
70
+ if ($networkwide) {
71
+ $old_blog = $wpdb->blogid;
72
+ // Get all blog ids
73
+ $blogids = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
74
+ foreach ($blogids as $blog_id) {
75
+ switch_to_blog($blog_id);
76
+ return _slp_activate($networkwide);
77
+ }
78
+ switch_to_blog($old_blog);
79
+ return;
80
+ }
81
+ }
82
+ return _slp_activate($networkwide);
83
+ }
84
+
85
+ function slp_network_propagate($pfunction, $networkwide) {
86
+ global $wpdb;
87
+
88
+ if (function_exists('is_multisite') && is_multisite()) {
89
+ // check if it is a network activation - if so, run the activation function
90
+ // for each blog id
91
+ if ($networkwide) {
92
+ $old_blog = $wpdb->blogid;
93
+ // Get all blog ids
94
+ $blogids = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
95
+ foreach ($blogids as $blog_id) {
96
+ switch_to_blog($blog_id);
97
+ call_user_func($pfunction, $networkwide);
98
+ }
99
+ switch_to_blog($old_blog);
100
+ return;
101
+ }
102
+ }
103
+ call_user_func($pfunction, $networkwide);
104
+ }
105
+
106
+
107
+ function slp_deactivate($networkwide) {
108
+ slp_network_propagate('_slp_deactivate', $networkwide);
109
+ }
110
+
111
+ add_action( 'wpmu_new_blog', 'slp_new_blog', 10, 6);
112
+
113
+ function slp_new_blog($blog_id, $user_id, $domain, $path, $site_id, $meta ) {
114
+ global $wpdb;
115
+
116
+ if (is_plugin_active_for_network('stealth-login-page/plugin.php')) {
117
+ $old_blog = $wpdb->blogid;
118
+ switch_to_blog($blog_id);
119
+ _slp_activate(TRUE);
120
+ switch_to_blog($old_blog);
121
+ }
122
+ }
123
+
124
+ function _slp_activate($networkwide) {
125
+ return ;
126
+ }
127
+
128
+ function _slp_deactivate($networkwide) {
129
+ return ;
130
+ }
131
+
132
  add_action('admin_menu', 'slp_plugin_menu');
133
  function slp_plugin_menu() {
134
  add_options_page( __( 'Stealth Login Page', 'stealth-login-page' ), __( 'Stealth Login Page', 'stealth-login-page' ), 'manage_options', 'stealth-login-page', 'slp_admin' );
135
+ add_options_page( __( 'Stealth Login Page Documentation', 'stealth-login-page' ), __( 'Stealth Login Page Documentation', 'stealth-login-page' ), 'activate_plugins', 'stealth-login-page-documentation', 'slp_documentation' );
136
  return;
137
  }
138
 
149
 
150
  if ( plugin_basename(__FILE__) == $file ) {
151
  $settings_link = '<a href="' . admin_url( 'options-general.php?page=stealth-login-page' ) . '">' . __( 'Settings', 'stealth-login-page' ) . '</a>';
152
+ $documentation_link = '<a href="' . admin_url( 'options-general.php?page=stealth-login-page-documentation' ) . '">' . __( 'Documentation', 'stealth-login-page' ) . '</a>';
153
+ array_unshift( $links, $settings_link, $documentation_link );
154
  }
155
 
156
  return $links;
157
 
158
  }
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  // Global Variables ---------------------- //
161
  $slp_prefix = 'slp_';
162
  $slp_plugin_name = 'Stealth Login Page';
163
  // retrieve plugin settings from options table
164
  $slp_options = get_option('slp_settings');
165
  $custom_url = site_url() . '/wp-login.php?' . $slp_options['question'] . '=' . $slp_options['answer'];
166
+ if ( isset($slp_question) && isset($slp_answer) && isset($slp_redirect) ) {
167
+ $custom_wp_config = site_url() . '/wp-login.php?' . $slp_question . '=' . $slp_answer;
168
+ }
169
+ $message = '<h2 style="text-align: center; margin-top: 4em;">You suck! Go hack someone else.</h2>';
170
+
171
+ /*-------------------------------------------------------------
172
+ Name: slp_credits
173
+
174
+ Purpose: Promotional stuff shown throughout the plugin
175
+ Since: 1.1.3
176
+ -------------------------------------------------------------*/
177
+ function slp_credits() {
178
+
179
+ echo '<table class="widefat" style="margin-top: .5em">';
180
+
181
+ echo '<thead>';
182
+ echo '<tr valign="top">';
183
+ echo ' <th width="27%">'.__('Your support makes a difference', 'stealth-login-page').'</th>';
184
+ echo ' <th>'.__('Useful links', 'stealth-login-page').'</th>';
185
+ echo ' <th width="35%">'.__('Brought to you by', 'stealth-login-page').'</th>';
186
+ echo '</tr>';
187
+ echo '</thead>';
188
+
189
+ echo '<tbody>';
190
+ echo '<tr>';
191
+ echo '<td><ul>';
192
+ echo ' <li>'.__('Your generous gift will ensure the continued development of Stealth Login Page and bring more benefits and features. Thank you for your consideration!', 'stealth-login-page').'</li>';
193
+
194
+ echo ' <li><center><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7T2JDSM64HQV8" target="_blank"><img src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" /></a></center></li>';
195
+ echo ' <li>'.__('Like the plugin? Please ', 'stealth-login-page').' <a href="http://wordpress.org/support/view/plugin-reviews/stealth-login-page?rate=5#postform" target="_blank">'.__('rate and review', 'stealth-login-page').'</a> '.__('it', 'stealth-login-page').'.</li>';
196
+ echo '</ul></td>';
197
+
198
+ echo '<td style="border-left:1px #ddd solid;"><ul>';
199
+
200
+ echo ' <li><strong>'.__('Plugin documentation', 'stealth-login-page').' <a href="'.admin_url() . 'options-general.php?page=stealth-login-page-documentation" target="_blank">right here in the dashboard</a>.</strong></li><br /><br />';
201
+ echo ' <li>'.__('Find my website at', 'stealth-login-page').' <a href="http://www.petersenmediagroup.com" target="_blank">petersenmediagroup.com</a>.</li>';
202
+ echo ' <li>'.__('Beef up your security even more with', 'stealth-login-page').' <a href="http://wordpress.org/extend/plugins/limit-login-attempts/" target="_blank">'.__('Limit Login Attempts','stealth-login-page').'</a>.</li>';
203
+ echo ' <li>'.__('Learn more about secure WordPress hosting with a ', 'stealth-login-page').' <a href="http://www.petersenmediagroup.com/wordpress-hosting/" target="_blank">'.__('managed host', 'stealth-login-page').'</a>.</li>';
204
+ echo '</ul></td>';
205
+
206
+ echo '<td style="border-left:1px #ddd solid;"><ul>';
207
+ echo ' <li><a href="http://www.petersenmediagroup.com" title="Petersen Media Group"><img src="'. plugins_url( 'images/pmg-logo.png' , __FILE__ ) .'" alt="pmg-logo" width="150" height="67" align="left" style="padding: 0 10px 10px 0;" /></a>';
208
+ echo ' <a href="http://www.petersenmediagroup.com" title="Petersen Media Group">Petersen Media Group</a> - '.__('I’m a straight-shooter and listen to what my clients want, run it through my filters, and come up with what they need. Not a "yes man" by any stretch of the imagination, I don’t consider a project a success unless it serves my client well. I have a "do no harm" policy to protect them from mis-information and trying things I’ve already learned about the hard way.', 'stealth-login-page').' '.__('Visit the', 'stealth-login-page').' <a href="http://www.petersenmediagroup.com" target="_blank">'.__('Petersen Media Group', 'stealth-login-page').'</a> '.__('website', 'stealth-login-page').'.</li>';
209
+ echo '</ul></td>';
210
+ echo '</tr>';
211
+ echo '</tbody>';
212
+
213
+ echo '</table>';
214
+ }
215
 
216
  // Includes ------------------------------ //
217
  include('includes/settings-page.php'); // loads the admin settings page
218
+ include('includes/documentation.php'); // loads the admin settings page
219
+ if ( $slp_options['enable'] ) {
220
+ include('includes/settings-functions.php'); // loads the settings page functions
221
+ }
222
+ elseif ( isset($custom_wp_config) ) {
223
+ include('includes/wp-config-functions.php'); // loads the wp-config.php functions
224
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: login, wp-admin, redirect, security, 302
5
  Requires at least: 3.4.2
6
  Tested up to: 3.5.1
7
- Stable tag: 2.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -28,10 +28,6 @@ When using a login limiting plugin, it is possible that someone is on your netwo
28
 
29
  This does NOT replace the need for security "best practices" such as a strong password or a secure hosting environment. This is an additional layer of security, best combined with a login limiter such as <a href="http://wordpress.org/extend/plugins/limit-login-attempts/">Limit Login Attempts</a> or <a href="http://wordpress.org/extend/plugins/login-lockdown/">Login Lockdown</a>.
30
 
31
- = WP 3.6 Warning =
32
-
33
- It has come to my attention that the new WP 3.6 session timeout function opens up the login form but it doesn't have any idea about the new URL to avoid a redirect, so it will automatically redirect when this happens. I AM trying to fix this before 3.6 drops, but please be aware of this if you don't see v 1.2.1 and you've upgraded to WP 3.6 or 3.6-beta.
34
-
35
  == Installation ==
36
 
37
  1. Upload contents of the directory to /wp-content/plugins/ (or use the automatic installer)
@@ -39,11 +35,17 @@ It has come to my attention that the new WP 3.6 session timeout function opens u
39
  1. Configure the settings to create the secret URL string and redirect URL.
40
  1. Verify it works by going to your default login form URL.
41
 
 
 
 
 
 
 
42
  == Frequently Asked Questions ==
43
 
44
  = Does this work on MU sites? =
45
 
46
- Absolutely.
47
 
48
  = I noticed Limit Login Attempts or Login Lockdown still reporting lockouts. Why? =
49
 
@@ -65,6 +67,11 @@ See more [examples](http://www.petersenmediagroup.com/plugins/stealth-login-page
65
 
66
  == Changelog ==
67
 
 
 
 
 
 
68
  = 2.1.2 =
69
  * Efficiencies improved.
70
  * Edited global variables for efficiency.
@@ -109,6 +116,11 @@ See more [examples](http://www.petersenmediagroup.com/plugins/stealth-login-page
109
 
110
  == Upgrade Notice ==
111
 
 
 
 
 
 
112
  = 2.1.2 =
113
  * Efficiencies improved.
114
  * Edited global variables for efficiency.
4
  Tags: login, wp-admin, redirect, security, 302
5
  Requires at least: 3.4.2
6
  Tested up to: 3.5.1
7
+ Stable tag: 3.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
28
 
29
  This does NOT replace the need for security "best practices" such as a strong password or a secure hosting environment. This is an additional layer of security, best combined with a login limiter such as <a href="http://wordpress.org/extend/plugins/limit-login-attempts/">Limit Login Attempts</a> or <a href="http://wordpress.org/extend/plugins/login-lockdown/">Login Lockdown</a>.
30
 
 
 
 
 
31
  == Installation ==
32
 
33
  1. Upload contents of the directory to /wp-content/plugins/ (or use the automatic installer)
35
  1. Configure the settings to create the secret URL string and redirect URL.
36
  1. Verify it works by going to your default login form URL.
37
 
38
+ Add the following variables to wp-config.php if you are on a MU site and want to globally activate it with the same settings on all sites (change what is in quotes to your liking):
39
+
40
+ $slp_redirect = "URL";
41
+ $slp_question = "question";
42
+ $slp_answer = "answer";
43
+
44
  == Frequently Asked Questions ==
45
 
46
  = Does this work on MU sites? =
47
 
48
+ Version 3.0.0 and greater is fully network-activated, includes uninstall, and bypasses all the settings pages with wp-config.php variables. See the Intallation tab or above in this file for instructions.
49
 
50
  = I noticed Limit Login Attempts or Login Lockdown still reporting lockouts. Why? =
51
 
67
 
68
  == Changelog ==
69
 
70
+ = 3.0.0 =
71
+ * Added full MU support.
72
+ * Disabled the login/logout/lost-password URL filtering - it knows if you're logged in.
73
+ * Added wp-config.php settings support to bypass the settings page if you're locked out or in a MU environment.
74
+
75
  = 2.1.2 =
76
  * Efficiencies improved.
77
  * Edited global variables for efficiency.
116
 
117
  == Upgrade Notice ==
118
 
119
+ = 3.0.0 =
120
+ * Added full MU support.
121
+ * Disabled the login/logout/lost-password URL filtering - it knows if you're logged in.
122
+ * Added wp-config.php settings support to bypass the settings page if you're locked out or in a MU environment.
123
+
124
  = 2.1.2 =
125
  * Efficiencies improved.
126
  * Edited global variables for efficiency.
uninstall.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('WP_UNINSTALL_PLUGIN')) {
3
+ header('Status: 403 Forbidden');
4
+ header('HTTP/1.1 403 Forbidden');
5
+ exit();
6
+ }
7
+
8
+
9
+ if ( !is_user_logged_in() )
10
+ wp_die( 'You must be logged in to run this script.' );
11
+
12
+ if ( !current_user_can( 'install_plugins' ) )
13
+ wp_die( 'You do not have permission to run this script.' );
14
+
15
+ function slp_uninstall() {
16
+ delete_option('slp_options');
17
+ }
18
+
19
+ global $wpdb;
20
+ if (function_exists('is_multisite') && is_multisite()) {
21
+ $blogids = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM $wpdb->blogs"));
22
+ $old_blog = $wpdb->blogid;
23
+ foreach ($blogids as $blog_id) {
24
+ switch_to_blog($blog_id);
25
+ slp_uninstall();
26
+ }
27
+ // restore old blog
28
+ switch_to_blog($old_blog);
29
+ } else
30
+ slp_uninstall();
31
+ ?>