Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!is_user_logged_in())
- wp_redirect('/login/');
- ?>
- /wp-content/my-theme/my-account/
- /wp-content/my-theme/my-account/world.php
- /wp-content/my-theme/my-account/subscription.php
- /wp-content/my-theme/my-dashboard.php
- /wp-content/my-theme/my-files.php
- <input type="hidden" name="redirect" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
- if ( (isset($_GET['action']) && $_GET['action'] != 'logout') || (isset($_POST['login_location']) && !empty($_POST['login_location'])) ) {
- add_filter('login_redirect', 'my_login_redirect', 10, 3);
- function my_login_redirect() {
- $location = $_SERVER['HTTP_REFERER'];
- wp_safe_redirect($location);
- exit();
- }
- }
- <?php
- if(!is_user_logged_in())
- wp_redirect('/login/?redirect_to=' . $_SERVER["REQUEST_URI"]);
- ?>
- /login.php?redirect_to=/wp-content/my-theme/my-account/subscription.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement