Version Description
Download this release
Release Info
Developer | rmahfoud |
Plugin | WP Hide Post |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- readme.txt +2 -1
- wp-hide-post.php +7 -5
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://anappleaday.konceptus.net/donate
|
|
4 |
Tags: SEO,hide,show,visbility,privacy,customization,sitemap,filter
|
5 |
Requires at least: 2.7.1
|
6 |
Tested up to: 2.8.2
|
7 |
-
Stable tag: 1.0.
|
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 |
* 07/24/2009: v1.0.3 - Initial public release of 'WP Hide Post' and deprecation of 'WP low Profiler'
|
96 |
|
97 |
== Development Blog ==
|
4 |
Tags: SEO,hide,show,visbility,privacy,customization,sitemap,filter
|
5 |
Requires at least: 2.7.1
|
6 |
Tested up to: 2.8.2
|
7 |
+
Stable tag: 1.0.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 |
|
93 |
== Revision History ==
|
94 |
|
95 |
+
* 07/24/2009: v1.0.4 - Minor bug fixes
|
96 |
* 07/24/2009: v1.0.3 - Initial public release of 'WP Hide Post' and deprecation of 'WP low Profiler'
|
97 |
|
98 |
== Development Blog ==
|
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.0.
|
7 |
Author: Robert Mahfoud
|
8 |
Author URI: http://anappleaday.konceptus.net
|
9 |
Text Domain: wp_hide_post
|
@@ -34,6 +34,8 @@ function wphp_init() {
|
|
34 |
global $table_prefix;
|
35 |
if( !defined('WPHP_TABLE_NAME') )
|
36 |
define('WPHP_TABLE_NAME', "${table_prefix}postmeta");
|
|
|
|
|
37 |
if( !defined('WPHP_DEBUG') ) {
|
38 |
define('WPHP_DEBUG', defined('WP_DEBUG') && WP_DEBUG ? 1 : 0);
|
39 |
}
|
@@ -523,9 +525,9 @@ function wphp_query_posts_join($join) {
|
|
523 |
if( wphp_is_applicable('post') && wphp_is_applicable('page')) {
|
524 |
if( !$join )
|
525 |
$join = '';
|
526 |
-
|
527 |
-
|
528 |
-
$join .= ' AND ((
|
529 |
if( wphp_is_front_page() )
|
530 |
$join .= ' AND wphptbl.meta_key = \'_wplp_post_front\' ';
|
531 |
elseif( wphp_is_category())
|
@@ -544,7 +546,7 @@ function wphp_query_posts_join($join) {
|
|
544 |
$join .= ' AND wphptbl.meta_key not like \'_wplp_%\' ';
|
545 |
$join .= ')';
|
546 |
// pages
|
547 |
-
$join .= ' OR (
|
548 |
if( wphp_is_search())
|
549 |
$join .= ' AND wphptbl.meta_key = \'_wplp_page_search\' ';
|
550 |
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.0.4
|
7 |
Author: Robert Mahfoud
|
8 |
Author URI: http://anappleaday.konceptus.net
|
9 |
Text Domain: wp_hide_post
|
34 |
global $table_prefix;
|
35 |
if( !defined('WPHP_TABLE_NAME') )
|
36 |
define('WPHP_TABLE_NAME', "${table_prefix}postmeta");
|
37 |
+
if( !defined('WP_POSTS_TABLE_NAME') )
|
38 |
+
define('WP_POSTS_TABLE_NAME', "${table_prefix}posts");
|
39 |
if( !defined('WPHP_DEBUG') ) {
|
40 |
define('WPHP_DEBUG', defined('WP_DEBUG') && WP_DEBUG ? 1 : 0);
|
41 |
}
|
525 |
if( wphp_is_applicable('post') && wphp_is_applicable('page')) {
|
526 |
if( !$join )
|
527 |
$join = '';
|
528 |
+
$join .= ' LEFT JOIN '.WPHP_TABLE_NAME.' wphptbl ON '.WP_POSTS_TABLE_NAME.'.ID = wphptbl.post_id and wphptbl.meta_key like \'_wplp_%\'';
|
529 |
+
// filter posts
|
530 |
+
$join .= ' AND (('.WP_POSTS_TABLE_NAME.'.post_type = \'post\' ';
|
531 |
if( wphp_is_front_page() )
|
532 |
$join .= ' AND wphptbl.meta_key = \'_wplp_post_front\' ';
|
533 |
elseif( wphp_is_category())
|
546 |
$join .= ' AND wphptbl.meta_key not like \'_wplp_%\' ';
|
547 |
$join .= ')';
|
548 |
// pages
|
549 |
+
$join .= ' OR ('.WP_POSTS_TABLE_NAME.'.post_type = \'page\' AND wphptbl.meta_key <> \'_wplp_page_flags\'';
|
550 |
if( wphp_is_search())
|
551 |
$join .= ' AND wphptbl.meta_key = \'_wplp_page_search\' ';
|
552 |
else
|