Changeset 2002767
- Timestamp:
- 12/28/2018 09:18:38 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
disable-feeds-and-hide-usernames/trunk/disable-feeds-hide-usernames.php
r1598482 r2002767 16 16 17 17 18 19 if (!is_admin()) { 20 if (preg_match('/author=([0-9]*)/i', $_SERVER['QUERY_STRING'])) die(); 21 add_filter('redirect_canonical', function($redirect, $request){ 22 if (preg_match('/\?author=([0-9]*)(\/*)/i', $request)) die(); 23 else return $redirect; 24 }, 10, 2); 25 } 26 27 add_filter('login_errors', function($error){ 28 return "Incorrect login information"; 29 }); 30 18 31 add_action('template_redirect', function(){ 19 32 if ( is_author() ) {
Note: See TracChangeset
for help on using the changeset viewer.