Changeset 1746911
- Timestamp:
- 10/15/2017 06:35:53 PM (8 years ago)
- Location:
- wps-hide-login/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wps-hide-login.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wps-hide-login/trunk/readme.txt
r1675726 r1746911 5 5 Requires at least: 4.1 6 6 Tested up to: 4.8 7 Stable tag: 1. 1.77 Stable tag: 1.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 65 65 == Changelog == 66 66 67 = 1.2 = 68 * Enhancement: Prevent redirection to login URL when accessing /wp-admin/customize.php directly 69 * Enhancement: Redirect to admin URL when already logged-in and accessing login URL without the action query string 70 67 71 = 1.1.7 = 68 72 * Fix: change fake 404 on wp-admin when not logged-in to a 403 forbidden to prevent fatal errors with various themes & plugins -
wps-hide-login/trunk/wps-hide-login.php
r1434249 r1746911 6 6 Author: Remy Perona for WPServeur 7 7 Author URI: http://profiles.wordpress.org/tabrisrp/ 8 Version: 1. 1.78 Version: 1.2 9 9 Text Domain: wps-hide-login 10 10 License: GPLv2 or later … … 155 155 add_action( 'network_admin_notices', array( $this, 'admin_notices' ) ); 156 156 add_action( 'wp_loaded', array( $this, 'wp_loaded' ) ); 157 add_action( 'setup_theme', array( $this, 'setup_theme' ), 1 ); 157 158 158 159 add_filter( 'plugin_action_links_' . $this->basename(), array( $this, 'plugin_action_links' ) ); … … 384 385 } 385 386 387 public function setup_theme() { 388 global $pagenow; 389 390 if ( ! is_user_logged_in() && 'customize.php' === $pagenow ) { 391 wp_die( __( 'This has been disabled', 'wps-hide-login' ), 403 ); 392 } 393 } 394 386 395 public function wp_loaded() { 387 396 … … 430 439 431 440 } elseif ( $pagenow === 'wp-login.php' ) { 432 433 441 global $error, $interim_login, $action, $user_login; 442 443 if ( is_user_logged_in() && ! isset( $_REQUEST['action'] ) ) { 444 wp_safe_redirect( admin_url() ); 445 die(); 446 } 434 447 435 448 @require_once ABSPATH . 'wp-login.php';
Note: See TracChangeset
for help on using the changeset viewer.