PluginProbe
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More / 1.1.6
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More v1.1.6
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.10 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 47 releases
content-control / assets / scripts / widget-editor.js

widget-editor.js in Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More 1.1.6, at assets/scripts/widget-editor.js

26 lines 629 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function ($) {
2 "use strict";
3
4 function which_users() {
5 var $this = $(this),
6 $item = $this.parents('.widget').eq(0),
7 $roles = $item.find('.widget_options-roles');
8
9 if ($this.val() == 'logged_in') {
10 $roles.show();
11 } else {
12 $roles.hide();
13 }
14 }
15
16
17 function refresh_all_items() {
18 $('.widget_options-which_users select').each(which_users);
19 }
20
21 $(document)
22 .on('change', '.widget_options-which_users select', which_users)
23 .on('widget-updated', refresh_all_items)
24 .ready(refresh_all_items);
25
26 }(jQuery));