Version Description
- Tweak: Optimized rw_display_widget() filter
- New: Chinese translation by Changmeng Hu
Download this release
Release Info
Developer | dfactory |
Plugin | Restrict Widgets |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- readme.txt +11 -3
- restrict-widgets.php +9 -5
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.3
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 1.1.
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
@@ -30,6 +30,10 @@ For more information, check out plugin page at [dFactory](http://www.dfactory.eu
|
|
30 |
* Polylang compatible
|
31 |
* .pot file for translations included
|
32 |
|
|
|
|
|
|
|
|
|
33 |
|
34 |
== Installation ==
|
35 |
|
@@ -48,6 +52,10 @@ No questions yet.
|
|
48 |
|
49 |
== Changelog ==
|
50 |
|
|
|
|
|
|
|
|
|
51 |
= 1.1.0 =
|
52 |
* Fix: Show on selected not working in some cases
|
53 |
* Fix: Restricting on user_logged_in/out
|
@@ -62,5 +70,5 @@ Initial release
|
|
62 |
|
63 |
== Upgrade Notice ==
|
64 |
|
65 |
-
= 1.1.
|
66 |
-
|
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.3
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 1.1.1
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
30 |
* Polylang compatible
|
31 |
* .pot file for translations included
|
32 |
|
33 |
+
= Translations: =
|
34 |
+
|
35 |
+
* Chinese - by Changmeng Hu
|
36 |
+
|
37 |
|
38 |
== Installation ==
|
39 |
|
52 |
|
53 |
== Changelog ==
|
54 |
|
55 |
+
= 1.1.1 =
|
56 |
+
* Tweak: Optimized rw_display_widget() filter
|
57 |
+
* New: Chinese translation by Changmeng Hu
|
58 |
+
|
59 |
= 1.1.0 =
|
60 |
* Fix: Show on selected not working in some cases
|
61 |
* Fix: Restricting on user_logged_in/out
|
70 |
|
71 |
== Upgrade Notice ==
|
72 |
|
73 |
+
= 1.1.1 =
|
74 |
+
Optimized rw_display_widget() filter and Chinese translation
|
restrict-widgets.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Restrict Widgets
|
4 |
-
Description: Restrict Widgets allows you to hide or display widgets on specified pages.
|
5 |
-
Version: 1.1.
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/restrict-widgets/
|
@@ -587,8 +587,7 @@ class Restrict_Widgets
|
|
587 |
</tr>
|
588 |
</table>
|
589 |
<input type="submit" value="'.__('Save settings', 'restrict-widgets').'" name="save-widgets-options" class="button button-primary" id="save-widgets-options" />
|
590 |
-
<p id="df-credits">
|
591 |
-
'<a href="http://www.dfactory.eu" target="_blank" title="dFactory - Quality plugins for WordPress"><img src="'.plugins_url('images/logo-dfactory.png' ,__FILE__).'" title="dFactory - Quality plugins for WordPress" alt="dFactory - Quality plugins for WordPress" /></a></p>
|
592 |
<br class="clear" />
|
593 |
</form>
|
594 |
</div>
|
@@ -1403,8 +1402,13 @@ class Restrict_Widgets
|
|
1403 |
$final_return = ((($empty_lang === FALSE && $empty_user === FALSE && $empty_main === FALSE && $display_lang === FALSE && $display_user === FALSE && $display_main === FALSE) || ($empty_lang === FALSE && $empty_user === FALSE && $display_lang === FALSE && $display_user === FALSE) || ($empty_lang === FALSE && $empty_main === FALSE && $display_lang === FALSE && $display_main === FALSE) || ($empty_user === FALSE && $empty_main === FALSE && $display_user === FALSE && $display_main === FALSE) || ($empty_lang === FALSE && $display_lang === FALSE) || ($empty_user === FALSE && $display_lang === FALSE) || ($empty_main === FALSE && $display_main === FALSE)) ? FALSE : $instance);
|
1404 |
}
|
1405 |
|
|
|
|
|
|
|
|
|
|
|
1406 |
//display: return $instance, hide: return FALSE
|
1407 |
-
return
|
1408 |
}
|
1409 |
|
1410 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Restrict Widgets
|
4 |
+
Description: Restrict Widgets not only allows you to easily hide or display widgets on specified pages but gives you complete control over widgets and sidebars.
|
5 |
+
Version: 1.1.1
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/restrict-widgets/
|
587 |
</tr>
|
588 |
</table>
|
589 |
<input type="submit" value="'.__('Save settings', 'restrict-widgets').'" name="save-widgets-options" class="button button-primary" id="save-widgets-options" />
|
590 |
+
<p id="df-credits">Created by<a href="http://www.dfactory.eu" target="_blank" title="dFactory - Quality plugins for WordPress"><img src="'.plugins_url('images/logo-dfactory.png' ,__FILE__).'" title="dFactory - Quality plugins for WordPress" alt="dFactory - Quality plugins for WordPress" /></a></p>
|
|
|
591 |
<br class="clear" />
|
592 |
</form>
|
593 |
</div>
|
1402 |
$final_return = ((($empty_lang === FALSE && $empty_user === FALSE && $empty_main === FALSE && $display_lang === FALSE && $display_user === FALSE && $display_main === FALSE) || ($empty_lang === FALSE && $empty_user === FALSE && $display_lang === FALSE && $display_user === FALSE) || ($empty_lang === FALSE && $empty_main === FALSE && $display_lang === FALSE && $display_main === FALSE) || ($empty_user === FALSE && $empty_main === FALSE && $display_user === FALSE && $display_main === FALSE) || ($empty_lang === FALSE && $display_lang === FALSE) || ($empty_user === FALSE && $display_lang === FALSE) || ($empty_main === FALSE && $display_main === FALSE)) ? FALSE : $instance);
|
1403 |
}
|
1404 |
|
1405 |
+
// filter true or false
|
1406 |
+
$final_return = apply_filters_ref_array('rw_display_widget', array($final_return, $instance));
|
1407 |
+
// if true return instance
|
1408 |
+
$final_return = ($final_return === FALSE) ? FALSE : $instance;
|
1409 |
+
|
1410 |
//display: return $instance, hide: return FALSE
|
1411 |
+
return $final_return;
|
1412 |
}
|
1413 |
|
1414 |
|