SHARE
TWEET

remove the register link from the wp-login.php script

pustakakoran Apr 23rd, 2017 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sumber:
  2. https://snippets.webaware.com.au/snippets/remove-register-link-wordpress-wp-login-php/
  3.  
  4. /**
  5. * remove the register link from the wp-login.php script
  6. */
  7. add_filter('option_users_can_register', function($value) {
  8.     $script = basename(parse_url($_SERVER['SCRIPT_NAME'], PHP_URL_PATH));
  9.  
  10.     if ($script == 'wp-login.php') {
  11.         $value = false;
  12.     }
  13.  
  14.     return $value;
  15. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top