Version Description
Download this release
Release Info
Developer | theandystratton |
Plugin | Page Restrict |
Version | 1.8 |
Comparing to | |
See all releases |
Code changes from version 1.7 to 1.8
- pagerestrict.php +5 -5
- readme.txt +4 -1
pagerestrict.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://theandystratton.com/pagerestrict
|
|
5 |
Description: Restrict certain pages to logged in users
|
6 |
Author: Matt Martz & Andy Stratton
|
7 |
Author URI: http://theandystratton.com
|
8 |
-
Version: 1.
|
9 |
|
10 |
Copyright (c) 2008 Matt Martz (http://sivel.net)
|
11 |
Page Restrict is released under the GNU Lesser General Public License (LGPL)
|
@@ -45,7 +45,7 @@ function pr_page_restrict ( $pr_page_content ) {
|
|
45 |
if ( ! isset ( $user_login ) )
|
46 |
$user_login = '';
|
47 |
$pr_page_content .= '
|
48 |
-
<form style="text-align: left;" action="' . get_bloginfo ( '
|
49 |
<p>
|
50 |
<label for="log"><input type="text" name="log" id="log" value="' . wp_specialchars ( stripslashes ( $user_login ) , 1 ) . '" size="22" /> Username</label><br />
|
51 |
<label for="pwd"><input type="password" name="pwd" id="pwd" size="22" /> Password</label><br />
|
@@ -58,16 +58,16 @@ function pr_page_restrict ( $pr_page_content ) {
|
|
58 |
';
|
59 |
|
60 |
if ( get_option('users_can_register') )
|
61 |
-
$pr_page_content .= ' <a href="' . get_bloginfo ( '
|
62 |
|
63 |
-
$pr_page_content .= '<a href="' . get_bloginfo ( '
|
64 |
</p>
|
65 |
';
|
66 |
$post->comment_status = 'closed';
|
67 |
endif;
|
68 |
elseif ( in_array ( $post->ID , pr_get_opt ( 'pages' ) ) && ( is_archive () || is_search () ) ) :
|
69 |
$pr_page_content = '<p>' . pr_get_opt ( 'message' ) . '</p>';
|
70 |
-
$pr_page_content = str_replace('login', '<a href="' . get_bloginfo ( '
|
71 |
endif;
|
72 |
endif;
|
73 |
return $pr_page_content;
|
5 |
Description: Restrict certain pages to logged in users
|
6 |
Author: Matt Martz & Andy Stratton
|
7 |
Author URI: http://theandystratton.com
|
8 |
+
Version: 1.8
|
9 |
|
10 |
Copyright (c) 2008 Matt Martz (http://sivel.net)
|
11 |
Page Restrict is released under the GNU Lesser General Public License (LGPL)
|
45 |
if ( ! isset ( $user_login ) )
|
46 |
$user_login = '';
|
47 |
$pr_page_content .= '
|
48 |
+
<form style="text-align: left;" action="' . get_bloginfo ( 'wpurl' ) . '/wp-login.php" method="post">
|
49 |
<p>
|
50 |
<label for="log"><input type="text" name="log" id="log" value="' . wp_specialchars ( stripslashes ( $user_login ) , 1 ) . '" size="22" /> Username</label><br />
|
51 |
<label for="pwd"><input type="password" name="pwd" id="pwd" size="22" /> Password</label><br />
|
58 |
';
|
59 |
|
60 |
if ( get_option('users_can_register') )
|
61 |
+
$pr_page_content .= ' <a href="' . get_bloginfo ( 'wpurl' ) . '/wp-register.php">Register</a> | ';
|
62 |
|
63 |
+
$pr_page_content .= '<a href="' . get_bloginfo ( 'wpurl' ) . '/wp-login.php?action=lostpassword">Lost your password?</a>
|
64 |
</p>
|
65 |
';
|
66 |
$post->comment_status = 'closed';
|
67 |
endif;
|
68 |
elseif ( in_array ( $post->ID , pr_get_opt ( 'pages' ) ) && ( is_archive () || is_search () ) ) :
|
69 |
$pr_page_content = '<p>' . pr_get_opt ( 'message' ) . '</p>';
|
70 |
+
$pr_page_content = str_replace('login', '<a href="' . get_bloginfo ( 'wpurl' ) . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']) . '">login</a>', $pr_page_content);
|
71 |
endif;
|
72 |
endif;
|
73 |
return $pr_page_content;
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: theandystratton, sivel
|
|
3 |
Tags: pages, page, restrict, restriction, logged in, cms
|
4 |
Requires at least: 2.6
|
5 |
Tested up to: 2.9
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Restrict certain pages to logged in users.
|
9 |
|
@@ -45,6 +45,9 @@ NOTE: See "Other Notes" for Upgrade and Usage Instructions as well as other pert
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
48 |
= 1.7 (2010-01-18) =
|
49 |
* Fixed a bug that added slashes to quotes in the custom restriction message.
|
50 |
|
3 |
Tags: pages, page, restrict, restriction, logged in, cms
|
4 |
Requires at least: 2.6
|
5 |
Tested up to: 2.9
|
6 |
+
Stable tag: 1.8
|
7 |
|
8 |
Restrict certain pages to logged in users.
|
9 |
|
45 |
|
46 |
== Changelog ==
|
47 |
|
48 |
+
= 1.7 (2010-02-12) =
|
49 |
+
* Changed URL's to wp-login.php to use get_bloginfo('wpurl') instead of get_bloginfo('url') to ensure proper redirection when users install files outside of the site's document root.
|
50 |
+
|
51 |
= 1.7 (2010-01-18) =
|
52 |
* Fixed a bug that added slashes to quotes in the custom restriction message.
|
53 |
|