WP Hide Post - Version 1.1.9

Version Description

Download this release

Release Info

Developer rmahfoud
Plugin Icon wp plugin WP Hide Post
Version 1.1.9
Comparing to
See all releases

Code changes from version 1.1.4 to 1.1.9

Files changed (2) hide show
  1. readme.txt +3 -2
  2. wp-hide-post.php +9 -7
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: rmahfoud
3
  Donate link: http://anappleaday.konceptus.net/donate
4
  Tags: SEO,hide,show,visbility,privacy,customization,sitemap,filter
5
  Requires at least: 2.6
6
- Tested up to: 2.8.5
7
- Stable tag: 1.1.4
8
 
9
  Enables you to control the visibility of items on your blog by making posts/pages hidden on some parts of your blog, while still visible in other parts as well as to search engines. This plugin is the new incarnation of the 'WP low Profiler'. If this plugin already exists, it will be upgraded to this one, keeping all existing settings.
10
 
@@ -92,6 +92,7 @@ Ditto. It will be deleted. If you had any existing data (if you had it active be
92
 
93
  == Revision History ==
94
 
 
95
  * 10/24/2009: v1.1.4 - Added compatibility with Wordpress 2.8.5
96
  * 08/07/2009: v1.1.3 - Extended support for Wordpress 2.6
97
  * 08/07/2009: v1.1.2 - Bug fixes.
3
  Donate link: http://anappleaday.konceptus.net/donate
4
  Tags: SEO,hide,show,visbility,privacy,customization,sitemap,filter
5
  Requires at least: 2.6
6
+ Tested up to: 2.9
7
+ Stable tag: 1.1.9
8
 
9
  Enables you to control the visibility of items on your blog by making posts/pages hidden on some parts of your blog, while still visible in other parts as well as to search engines. This plugin is the new incarnation of the 'WP low Profiler'. If this plugin already exists, it will be upgraded to this one, keeping all existing settings.
10
 
92
 
93
  == Revision History ==
94
 
95
+ * 01/02/2009: v1.1.9 - Compatibility with Wordpress 2.9
96
  * 10/24/2009: v1.1.4 - Added compatibility with Wordpress 2.8.5
97
  * 08/07/2009: v1.1.3 - Extended support for Wordpress 2.6
98
  * 08/07/2009: v1.1.2 - Bug fixes.
wp-hide-post.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Hide Post
4
  Plugin URI: http://anappleaday.konceptus.net/posts/wp-hide-post/
5
  Description: Enables a user to control the visibility of items on the blog by making posts and pages selectively hidden in different views throughout the blog, such as on the front page, category pages, search results, etc... The hidden item remains otherwise accessible directly using permalinks, and also visible to search engines as part of the sitemap (at least). This plugin enables new SEO possibilities for authors since it enables them to create new posts and pages without being forced to display them on their front and in feeds.
6
- Version: 1.1.4
7
  Author: Robert Mahfoud
8
  Author URI: http://anappleaday.konceptus.net
9
  Text Domain: wp_hide_post
@@ -151,12 +151,14 @@ function wphp_exclude_low_profile_items($item_type, $posts) {
151
  // now loop over the pages, and exclude the ones with low profile in this context
152
  $result = array();
153
  $page_flags = $wpdb->get_results("SELECT post_id, meta_value FROM ".WPHP_TABLE_NAME." WHERE meta_key = '_wplp_page_flags'", OBJECT_K);
154
- foreach($posts as $post) {
155
- $check = isset($page_flags[ $post->ID ]) ? $page_flags[ $post->ID ]->meta_value : null;
156
- if( ($check == 'front' && wphp_is_front_page()) || $check == 'all') {
157
- // exclude page
158
- } else
159
- $result[] = $post;
 
 
160
  }
161
  return $result;
162
  } else
3
  Plugin Name: WP Hide Post
4
  Plugin URI: http://anappleaday.konceptus.net/posts/wp-hide-post/
5
  Description: Enables a user to control the visibility of items on the blog by making posts and pages selectively hidden in different views throughout the blog, such as on the front page, category pages, search results, etc... The hidden item remains otherwise accessible directly using permalinks, and also visible to search engines as part of the sitemap (at least). This plugin enables new SEO possibilities for authors since it enables them to create new posts and pages without being forced to display them on their front and in feeds.
6
+ Version: 1.1.9
7
  Author: Robert Mahfoud
8
  Author URI: http://anappleaday.konceptus.net
9
  Text Domain: wp_hide_post
151
  // now loop over the pages, and exclude the ones with low profile in this context
152
  $result = array();
153
  $page_flags = $wpdb->get_results("SELECT post_id, meta_value FROM ".WPHP_TABLE_NAME." WHERE meta_key = '_wplp_page_flags'", OBJECT_K);
154
+ if( $posts ) {
155
+ foreach($posts as $post) {
156
+ $check = isset($page_flags[ $post->ID ]) ? $page_flags[ $post->ID ]->meta_value : null;
157
+ if( ($check == 'front' && wphp_is_front_page()) || $check == 'all') {
158
+ // exclude page
159
+ } else
160
+ $result[] = $post;
161
+ }
162
  }
163
  return $result;
164
  } else