Version Description
- Fix: Enable display/hide on any single page
- Tweak: Change post type archive detection from get_post_type() to get_query_var
Download this release
Release Info
Developer | dfactory |
Plugin | Restrict Widgets |
Version | 1.2.7 |
Comparing to | |
See all releases |
Code changes from version 1.2.6.1 to 1.2.7
- readme.txt +8 -3
- restrict-widgets.php +18 -10
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.dfactory.eu/
|
|
4 |
Tags: widget, widgets, widget-only, cms, conditional tags, conditional, widget logic, widget context, restrict, manage, management, capability, capabilities, sidebar, sidebars, user, permission, permissions
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 1.2.
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
@@ -57,6 +57,10 @@ No questions yet.
|
|
57 |
|
58 |
== Changelog ==
|
59 |
|
|
|
|
|
|
|
|
|
60 |
= 1.2.6.1 =
|
61 |
* Fix: Page hide/display settings broken after 1.2.6 update
|
62 |
|
@@ -117,5 +121,6 @@ Initial release
|
|
117 |
|
118 |
== Upgrade Notice ==
|
119 |
|
120 |
-
= 1.2.
|
121 |
-
* Fix:
|
|
4 |
Tags: widget, widgets, widget-only, cms, conditional tags, conditional, widget logic, widget context, restrict, manage, management, capability, capabilities, sidebar, sidebars, user, permission, permissions
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 1.2.7
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
+
= 1.2.7 =
|
61 |
+
* Fix: Enable display/hide on any single page
|
62 |
+
* Tweak: Change post type archive detection from get_post_type() to get_query_var
|
63 |
+
|
64 |
= 1.2.6.1 =
|
65 |
* Fix: Page hide/display settings broken after 1.2.6 update
|
66 |
|
121 |
|
122 |
== Upgrade Notice ==
|
123 |
|
124 |
+
= 1.2.7 =
|
125 |
+
* Fix: Enable display/hide on any single page
|
126 |
+
* Tweak: Change post type archive detection from get_post_type() to get_query_var
|
restrict-widgets.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Restrict Widgets
|
4 |
Description: All in one solution for widget management in WordPress. Allows you to hide or display widgets on specified pages and restrict access for users.
|
5 |
-
Version: 1.2.
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/restrict-widgets/
|
@@ -1594,15 +1594,25 @@ class Restrict_Widgets
|
|
1594 |
}
|
1595 |
elseif(is_home())
|
1596 |
$found_main = isset($instance['rw_opt']['others_blog_page']) ? true : false;
|
1597 |
-
elseif(is_singular()
|
1598 |
{
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1603 |
}
|
1604 |
-
elseif(
|
1605 |
-
$found_main = isset($instance['rw_opt']['
|
1606 |
elseif(is_category())
|
1607 |
$found_main = isset($instance['rw_opt']['category_'.get_query_var('cat')]) ? true : false;
|
1608 |
elseif(is_tag())
|
@@ -1626,8 +1636,6 @@ class Restrict_Widgets
|
|
1626 |
$found_main = isset($instance['rw_opt']['others_author_archive']) ? true : false;
|
1627 |
elseif(is_date())
|
1628 |
$found_main = isset($instance['rw_opt']['others_date_archive']) ? true : false;
|
1629 |
-
elseif(is_post_type_archive())
|
1630 |
-
$found_main = isset($instance['rw_opt']['cpta_'.get_post_type($post_id)]) ? true : false;
|
1631 |
elseif(function_exists('bbp_is_search') && bbp_is_search())
|
1632 |
$found_main = isset($instance['rw_opt']['bbpress_search']) ? true : false;
|
1633 |
elseif(function_exists('bbp_is_single_user') && bbp_is_single_user())
|
2 |
/*
|
3 |
Plugin Name: Restrict Widgets
|
4 |
Description: All in one solution for widget management in WordPress. Allows you to hide or display widgets on specified pages and restrict access for users.
|
5 |
+
Version: 1.2.7
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/restrict-widgets/
|
1594 |
}
|
1595 |
elseif(is_home())
|
1596 |
$found_main = isset($instance['rw_opt']['others_blog_page']) ? true : false;
|
1597 |
+
elseif(is_singular())
|
1598 |
{
|
1599 |
+
if(is_page())
|
1600 |
+
{
|
1601 |
+
if(isset($instance['rw_opt']['cpt_'.get_post_type($post_id)]))
|
1602 |
+
$found_main = true;
|
1603 |
+
else
|
1604 |
+
$found_main = isset($instance['rw_opt']['pageid_'.$post_id]) ? true : false;
|
1605 |
+
}
|
1606 |
+
else
|
1607 |
+
{
|
1608 |
+
$found_main = isset($instance['rw_opt']['cpt_'.get_post_type($post_id)]) ? true : false;
|
1609 |
+
|
1610 |
+
if(is_single() && $found_main == false)
|
1611 |
+
$found_main = isset($instance['rw_opt']['others_single_post']) ? true : false;
|
1612 |
+
}
|
1613 |
}
|
1614 |
+
elseif(is_post_type_archive())
|
1615 |
+
$found_main = isset($instance['rw_opt']['cpta_'.get_query_var('post_type')]) ? true : false;
|
1616 |
elseif(is_category())
|
1617 |
$found_main = isset($instance['rw_opt']['category_'.get_query_var('cat')]) ? true : false;
|
1618 |
elseif(is_tag())
|
1636 |
$found_main = isset($instance['rw_opt']['others_author_archive']) ? true : false;
|
1637 |
elseif(is_date())
|
1638 |
$found_main = isset($instance['rw_opt']['others_date_archive']) ? true : false;
|
|
|
|
|
1639 |
elseif(function_exists('bbp_is_search') && bbp_is_search())
|
1640 |
$found_main = isset($instance['rw_opt']['bbpress_search']) ? true : false;
|
1641 |
elseif(function_exists('bbp_is_single_user') && bbp_is_single_user())
|