This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Redirect to login if not logged in | |
* @version 1.3 | |
*/ | |
/* | |
Plugin Name: Redirect to login if not logged in | |
Plugin URI: http://wordpress.org/plugins/redirect-to-login-if-not-logged-in/ | |
Description: Redirect to wp-login.php if user is not logged in. | |
Author: Daan Kortenbach |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove_filter('template_redirect', 'redirect_canonical'); | |
/*************************************************************************** | |
// Adding a new rule | |
****************************************************************************/ | |
add_filter( 'rewrite_rules_array','kv_listing_rewrite_rules' ); | |
function kv_listing_rewrite_rules( $rules ) { |
NewerOlder