Changeset 968098
- Timestamp:
- 08/19/2014 06:46:38 AM (12 years ago)
- Location:
- private-posts-page/trunk
- Files:
-
- 2 edited
-
private-posts-page.php (modified) (4 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
private-posts-page/trunk/private-posts-page.php
r780704 r968098 6 6 Plugin Name: Private Posts Page 7 7 Plugin URI: http://plugins.svn.wordpress.org/private-posts-page 8 Description: Private Posts Page will force your designated posts page (blog) to behave like any normal page that is set to private visibility. That is, for non-logged in users the page will return a 404 error and the posts page title will be removed from the menu. Additionally, all posts will set as private as well. The feed will similarly be disabled.9 Version: 1. 0.08 Description: Private Posts Page will force your designated posts page (blog) to behave like any normal page that is set to private visibility. That is, for non-logged in users the page will return a 404 error and the posts page title will be removed from the menu. Additionally, all posts will set as private as well. The feed will similarly be disabled and search will not return private pages in results. 9 Version: 1.1.0 10 10 Author: Doug Sparling 11 11 Author URI: http://www.dougsparling.org … … 34 34 add_action( 'template_redirect', array( $this, 'make_posts_page_private' ) , 1000 ); 35 35 add_filter( 'get_pages', array( $this, 'remove_posts_page_from_menu' ), 1000 ); 36 add_filter( 'wp_page_menu_args', array( $this, 'remove_home_menu_item'), 1000 ); 36 add_filter( 'wp_page_menu_args', array( $this, 'remove_home_menu_item' ), 1000 ); 37 //add_filter( 'widget_posts_args', array( $this, 'remove_posts_from_recent_posts_widget' ), 1000 ); 37 38 } 38 39 … … 46 47 } 47 48 // Any type of post - return 404 48 if ( is_single() || is_archive() || is_category() || is_tag() || is_date() || is_author() ) {49 if ( is_single() || is_archive() || is_category() || is_tag() || is_date() || is_author() || is_search() ) { 49 50 require TEMPLATEPATH . '/404.php'; 50 51 exit; … … 82 83 return $args; 83 84 } 85 86 //public function remove_posts_from_recent_posts_widget( $args ) { 87 // $recent_posts = wp_get_recent_posts(); 88 // $recent_posts_ids_arr = array(); 89 // foreach( $recent_posts as $recent ){ 90 // $recent_posts_ids_arr[] = $recent['ID']; 91 // } 92 // $args['post__not_in'] = $recent_posts_ids_arr; 93 // return $args; 94 //} 84 95 } 85 96 } -
private-posts-page/trunk/readme.txt
r780704 r968098 4 4 Tags: private access, navigation, menu, exclude pages, hide pages, remove_feed 5 5 Requires at least: 2.7 6 Tested up to: 3. 6.17 Stable tag: 1. 0.06 Tested up to: 3.9.2 7 Stable tag: 1.1.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 13 13 == Description == 14 14 15 Private Posts Page will force your designated posts page (blog) to behave like any normal page that is set to private visibility. That is, for non-logged in users the page will return a 404 error and the posts page title will be removed from the menu. Additionally, all posts will set as private as well. The feed will similarly be disabled.15 Private Posts Page will force your designated posts page (blog) to behave like any normal page that is set to private visibility. That is, for non-logged in users the page will return a 404 error and the posts page title will be removed from the menu. Additionally, all posts will be set as private as well. The feed will similarly be disabled and search will not return private pages in results. 16 16 17 17 == Installation == … … 25 25 Private Post Pages was originally written to fill a specific need of mine and I decided to share my work. If there's something you would like added (and it makes sense in the context of what this plugin is trying to achieve), please let me know. That said, I eventually may add an options admin regardless. But your input is important! 26 26 27 **Q. From where will my posts be hidden?** 28 29 None of your blog posts will be displayed on the front/home page or designated blog page. Posts will not be shown on the archive pages, authors page, category page, tag page and will also be removed from the feed and will not be displayed in search results. However, the posts title will be displayed in the default "Recent Posts" and "Recent Comments" widgets. If you're making your entire blog private, just remove these widgets from your theme. 30 27 31 == Screenshots == 28 32 … … 31 35 == Changelog == 32 36 37 = 1.1.0 = 38 39 * Hide posts from search results. 40 33 41 = 1.0.0 = 34 42
Note: See TracChangeset
for help on using the changeset viewer.