Version Description
(2010-05-27) = * Quick update to fix an in_array() warning issued when settings are checked but have not been saved.
Download this release
Release Info
| Developer | theandystratton |
| Plugin | |
| Version | 2.01 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0 to 2.01
- inc/admin.php +1 -1
- pagerestrict.php +8 -2
- readme.txt +4 -1
inc/admin.php
CHANGED
|
@@ -5,7 +5,7 @@ Plugin URI: http://sivel.net/wordpress/
|
|
| 5 |
*/
|
| 6 |
|
| 7 |
//
|
| 8 |
-
$pr_version = '2.
|
| 9 |
|
| 10 |
// Full path and plugin basename of the main plugin file
|
| 11 |
$pr_plugin_file = dirname ( dirname ( __FILE__ ) ) . '/pagerestrict.php';
|
| 5 |
*/
|
| 6 |
|
| 7 |
//
|
| 8 |
+
$pr_version = '2.01';
|
| 9 |
|
| 10 |
// Full path and plugin basename of the main plugin file
|
| 11 |
$pr_plugin_file = dirname ( dirname ( __FILE__ ) ) . '/pagerestrict.php';
|
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: 2.
|
| 9 |
|
| 10 |
Copyright (c) 2008 Matt Martz (http://sivel.net)
|
| 11 |
Page Restrict is released under the GNU Lesser General Public License (LGPL)
|
|
@@ -19,7 +19,13 @@ if ( is_admin () )
|
|
| 19 |
// get specific option
|
| 20 |
function pr_get_opt ( $option ) {
|
| 21 |
$pr_options = get_option ( 'pr_options' );
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
// Add headers to keep browser from caching the pages when user not logged in
|
| 5 |
Description: Restrict certain pages to logged in users
|
| 6 |
Author: Matt Martz & Andy Stratton
|
| 7 |
Author URI: http://theandystratton.com
|
| 8 |
+
Version: 2.01
|
| 9 |
|
| 10 |
Copyright (c) 2008 Matt Martz (http://sivel.net)
|
| 11 |
Page Restrict is released under the GNU Lesser General Public License (LGPL)
|
| 19 |
// get specific option
|
| 20 |
function pr_get_opt ( $option ) {
|
| 21 |
$pr_options = get_option ( 'pr_options' );
|
| 22 |
+
// clean up PHP warning for in_array() later when they have not been saved
|
| 23 |
+
if ( $option == 'posts' || $option == 'pages' ) {
|
| 24 |
+
if ( !is_array($pr_options[$option]) ) {
|
| 25 |
+
$pr_options[$option] = array();
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
return $pr_options[$option];
|
| 29 |
}
|
| 30 |
|
| 31 |
// Add headers to keep browser from caching the pages when user not logged in
|
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: 2.
|
| 7 |
|
| 8 |
Restrict certain pages or posts 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 |
= 2.0 (2010-05-27) =
|
| 49 |
* Added support for restricting posts.
|
| 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: 2.01
|
| 7 |
|
| 8 |
Restrict certain pages or posts to logged in users.
|
| 9 |
|
| 45 |
|
| 46 |
== Changelog ==
|
| 47 |
|
| 48 |
+
= 2.01 (2010-05-27) =
|
| 49 |
+
* Quick update to fix an in_array() warning issued when settings are checked but have not been saved.
|
| 50 |
+
|
| 51 |
= 2.0 (2010-05-27) =
|
| 52 |
* Added support for restricting posts.
|
| 53 |
|
