Version Description
- Added some filters.
- Modified the HTML of some settings screen.
- Changed some initial values of stored in database.
- Added a confirmation of Nonce field.
Download this release
Release Info
Developer | gqevu6bsiz |
Plugin | WP Admin UI Customize |
Version | 1.3.7 |
Comparing to | |
See all releases |
Code changes from version 1.3.6 to 1.3.7
- inc/reset_userrole.php +4 -4
- inc/setting_admin_bar_menu.php +73 -173
- inc/setting_admin_general.php +12 -138
- inc/setting_appearance_menus.php +12 -47
- inc/setting_dashboard.php +12 -133
- inc/setting_default.php +123 -101
- inc/setting_loginscreen.php +99 -90
- inc/setting_post_add_edit.php +12 -25
- inc/setting_removemtabox.php +17 -89
- inc/setting_sidemenu.php +99 -191
- inc/setting_site.php +96 -108
- readme.txt +8 -2
- wp-admin-ui-customize.css +67 -75
- wp-admin-ui-customize.js +1 -1
- wp-admin-ui-customize.php +890 -303
inc/reset_userrole.php
CHANGED
@@ -16,15 +16,15 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
16 |
<h2><?php _e( 'Reset User Roles' , $this->ltd ); ?></h2>
|
17 |
<p> </p>
|
18 |
|
19 |
-
<form id="
|
20 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
21 |
-
<?php wp_nonce_field(); ?>
|
22 |
|
23 |
-
<h3><?php _e( '
|
24 |
<ul>
|
25 |
<?php foreach( $Data as $key => $val ) : ?>
|
26 |
<?php if( !empty( $UserRoles[$key] ) ): ?>
|
27 |
-
<li><?php echo $UserRoles[$key]; ?></li>
|
28 |
<?php endif; ?>
|
29 |
<?php endforeach; ?>
|
30 |
</ul>
|
16 |
<h2><?php _e( 'Reset User Roles' , $this->ltd ); ?></h2>
|
17 |
<p> </p>
|
18 |
|
19 |
+
<form id="wauc_reset_userrole" class="wauc_form" method="post" action="">
|
20 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
21 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
22 |
|
23 |
+
<h3><?php _e( 'Applied user roles' , $this->ltd ); ?></h3>
|
24 |
<ul>
|
25 |
<?php foreach( $Data as $key => $val ) : ?>
|
26 |
<?php if( !empty( $UserRoles[$key] ) ): ?>
|
27 |
+
<li><?php echo $UserRoles[$key]["label"]; ?></li>
|
28 |
<?php endif; ?>
|
29 |
<?php endforeach; ?>
|
30 |
</ul>
|
inc/setting_admin_bar_menu.php
CHANGED
@@ -25,165 +25,58 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
25 |
<p><strong><?php _e( 'Notice: Please do not place the same multiple menu slug.' , $this->ltd ); ?></strong></p>
|
26 |
<p class="description"><?php _e( 'Can be more than one custom menu.' , $this->ltd ); ?></p>
|
27 |
|
|
|
|
|
28 |
<p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a></p>
|
29 |
|
30 |
-
<form id="
|
31 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
32 |
-
<?php wp_nonce_field(); ?>
|
33 |
-
|
34 |
-
<div class="metabox-holder columns-2" id="admin_bar-holder">
|
35 |
-
|
36 |
-
<div id="postbox-container-1" class="postbox-container">
|
37 |
-
<div class="postbox">
|
38 |
-
<div class="handlediv" title="Click to toggle"><br></div>
|
39 |
-
<h3 class="hndle"><span><?php _e( 'Left' , $this->ltd ); ?></span></h3>
|
40 |
-
<div class="inside">
|
41 |
-
<?php if( empty( $Data ) ) : ?>
|
42 |
-
|
43 |
-
<?php foreach( $AllDefaultNodes["left"]["main"] as $main_node) : ?>
|
44 |
-
|
45 |
-
<?php $pnsn = array(); ?>
|
46 |
-
<?php if( !empty( $AllDefaultNodes["left"]["sub"] ) ) : ?>
|
47 |
-
<?php foreach( $AllDefaultNodes["left"]["sub"] as $sub_node) : ?>
|
48 |
-
|
49 |
-
<?php if( $main_node->id == $sub_node->parent ) : ?>
|
50 |
-
|
51 |
-
<?php $pnsn[] = array( 'id' => $sub_node->id , 'title' => stripslashes( $sub_node->title ) , 'parent' => $main_node->id , 'href' => $sub_node->href , 'group' => false , 'new' => false ); ?>
|
52 |
-
|
53 |
-
<?php endif; ?>
|
54 |
-
|
55 |
-
<?php endforeach; ?>
|
56 |
-
<?php endif; ?>
|
57 |
-
|
58 |
-
<?php $menu_widget = array( 'id' => $main_node->id , 'title' => stripslashes( $main_node->title ) , 'parent' => '' , 'href' => $main_node->href , 'group' => false , 'new' => false , 'subnode' => $pnsn ); ?>
|
59 |
-
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
60 |
-
|
61 |
-
<?php endforeach; ?>
|
62 |
-
|
63 |
-
<?php else : ?>
|
64 |
|
65 |
-
|
|
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
<?php if( !empty( $Data["left"]["sub"] ) ) : ?>
|
71 |
-
<?php foreach( $Data["left"]["sub"] as $sub_node) : ?>
|
72 |
-
|
73 |
-
<?php if( $main_node["id"] == $sub_node["parent"] ) : ?>
|
74 |
-
|
75 |
-
<?php $pnsn[] = array( 'id' => $sub_node["id"] , 'title' => stripslashes( $sub_node["title"] ) , 'parent' => $main_node["id"] , 'href' => $sub_node["href"] , 'group' => false , 'new' => false ); ?>
|
76 |
-
|
77 |
-
<?php endif; ?>
|
78 |
-
|
79 |
-
<?php endforeach; ?>
|
80 |
-
<?php endif; ?>
|
81 |
-
|
82 |
-
<?php $menu_widget = array( 'id' => $main_node["id"] , 'title' => stripslashes( $main_node["title"] ) , 'parent' => '' , 'href' => $main_node["href"] , 'group' => false , 'new' => false , 'subnode' => $pnsn ); ?>
|
83 |
-
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
84 |
-
|
85 |
-
<?php endforeach; ?>
|
86 |
-
|
87 |
-
<?php endif; ?>
|
88 |
-
|
89 |
-
<?php endif; ?>
|
90 |
</div>
|
91 |
</div>
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
<div class="handlediv" title="Click to toggle"><br></div>
|
97 |
-
<h3 class="hndle"><span><?php _e( 'Right' , $this->ltd ); ?></span></h3>
|
98 |
-
<div class="inside">
|
99 |
-
|
100 |
-
<?php if( empty( $Data ) ) : ?>
|
101 |
-
|
102 |
-
<?php foreach( $AllDefaultNodes["right"]["main"] as $main_node) : ?>
|
103 |
-
|
104 |
-
<?php $pnsn = array(); ?>
|
105 |
-
<?php if( !empty( $AllDefaultNodes["right"]["sub"] ) ) : ?>
|
106 |
-
|
107 |
-
<?php foreach( $AllDefaultNodes["right"]["sub"] as $sub_node) : ?>
|
108 |
-
|
109 |
-
<?php if( $main_node->id == $sub_node->parent ) : ?>
|
110 |
-
|
111 |
-
<?php $pnsn[] = array( 'id' => $sub_node->id , 'title' => stripslashes( $sub_node->title ) , 'parent' => $main_node->id , 'href' => $sub_node->href , 'group' => false , 'new' => false ); ?>
|
112 |
-
|
113 |
-
<?php endif; ?>
|
114 |
-
|
115 |
-
<?php endforeach; ?>
|
116 |
-
<?php endif; ?>
|
117 |
-
|
118 |
-
<?php $menu_widget = array( 'id' => $main_node->id , 'title' => stripslashes( $main_node->title ) , 'parent' => '' , 'href' => $main_node->href , 'group' => false , 'new' => false , 'subnode' => $pnsn ); ?>
|
119 |
-
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
120 |
-
|
121 |
-
<?php endforeach; ?>
|
122 |
-
|
123 |
-
<?php else : ?>
|
124 |
-
|
125 |
-
<?php if( !empty( $Data["right"]["main"] ) ) : ?>
|
126 |
-
|
127 |
-
<?php foreach( $Data["right"]["main"] as $main_node) : ?>
|
128 |
-
|
129 |
-
<?php $pnsn = array(); ?>
|
130 |
-
<?php if( !empty( $Data["right"]["sub"] ) ) : ?>
|
131 |
-
|
132 |
-
<?php foreach( $Data["right"]["sub"] as $sub_node) : ?>
|
133 |
-
|
134 |
-
<?php if( $main_node["id"] == $sub_node["parent"] ) : ?>
|
135 |
-
|
136 |
-
<?php $pnsn[] = array( 'id' => $sub_node["id"] , 'title' => stripslashes( $sub_node["title"] ) , 'parent' => $main_node["id"] , 'href' => $sub_node["href"] , 'group' => false , 'new' => false ); ?>
|
137 |
-
|
138 |
-
<?php endif; ?>
|
139 |
-
|
140 |
-
<?php endforeach; ?>
|
141 |
-
<?php endif; ?>
|
142 |
-
|
143 |
-
<?php $menu_widget = array( 'id' => $main_node["id"] , 'title' => stripslashes( $main_node["title"] ) , 'parent' => '' , 'href' => $main_node["href"] , 'group' => false , 'new' => false , 'subnode' => $pnsn ); ?>
|
144 |
-
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
145 |
-
|
146 |
-
<?php endforeach; ?>
|
147 |
-
|
148 |
-
<?php endif; ?>
|
149 |
-
|
150 |
-
<?php endif; ?>
|
151 |
-
|
152 |
</div>
|
153 |
</div>
|
|
|
|
|
154 |
</div>
|
155 |
-
|
156 |
-
<div class="clear"></div>
|
157 |
-
|
158 |
</div>
|
159 |
|
160 |
-
<div class="metabox-holder columns-1">
|
161 |
|
162 |
<div class="postbox">
|
163 |
<h3 class="hndle"><span><?php _e ( 'Menu items that can be added' , $this->ltd ); ?></span></h3>
|
164 |
<div class="inside">
|
165 |
|
166 |
-
<
|
167 |
<?php $menu_widget = array( 'id' => "custom_node" , 'title' => "" , 'parent' => '' , 'href' => "" , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
168 |
-
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
169 |
<div class="clear"></div>
|
170 |
|
171 |
-
<
|
172 |
-
|
173 |
-
<h4><?php _e( 'Left' , $this->ltd ); ?><?php _e( 'Menus' ); ?></h4>
|
174 |
|
175 |
<?php foreach( $AllDefaultNodes["left"]["main"] as $node_id => $node ) : ?>
|
176 |
|
177 |
<p class="description"><?php echo $node_id; ?></p>
|
178 |
<?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
179 |
-
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
180 |
|
181 |
<?php foreach( $AllDefaultNodes["left"]["sub"] as $child_node_id => $child_node ) : ?>
|
182 |
|
183 |
<?php if( $child_node->parent == $node_id ) : ?>
|
184 |
|
185 |
<?php $menu_widget = array( 'id' => $child_node->id , 'title' => $child_node->title , 'parent' => '' , 'href' => $child_node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
186 |
-
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
187 |
|
188 |
<?php endif; ?>
|
189 |
|
@@ -191,25 +84,24 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
191 |
|
192 |
<div class="clear"></div>
|
193 |
|
194 |
-
|
195 |
<?php endforeach; ?>
|
196 |
|
197 |
<div class="clear"></div>
|
198 |
|
199 |
-
<h4><?php _e( 'Right'
|
200 |
|
201 |
<?php foreach( $AllDefaultNodes["right"]["main"] as $node_id => $node ) : ?>
|
202 |
|
203 |
<p class="description"><?php echo $node_id; ?></p>
|
204 |
<?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
205 |
-
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
206 |
|
207 |
<?php foreach( $AllDefaultNodes["right"]["sub"] as $child_node_id => $child_node ) : ?>
|
208 |
|
209 |
<?php if( $child_node->parent == $node_id ) : ?>
|
210 |
|
211 |
<?php $menu_widget = array( 'id' => $child_node->id , 'title' => $child_node->title , 'parent' => '' , 'href' => $child_node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
212 |
-
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
213 |
|
214 |
<?php endif; ?>
|
215 |
|
@@ -242,25 +134,22 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
242 |
<?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
|
243 |
|
244 |
<style>
|
245 |
-
#
|
246 |
-
#
|
247 |
-
|
248 |
-
#
|
249 |
-
#admin_bar-holder .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
|
250 |
-
#admin_bar-holder .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
|
251 |
-
#admin_bar-holder .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon
|
252 |
{ background-image: url(../wp-includes/images/admin-bar-sprite.png); }
|
253 |
</style>
|
254 |
|
255 |
<script type="text/javascript">
|
256 |
jQuery(document).ready(function($) {
|
257 |
|
258 |
-
var $Form = $("#
|
259 |
-
var $AddInside = $('
|
260 |
-
var $SettingInside = $('#
|
261 |
|
262 |
$AddInside.children('.widget').draggable({
|
263 |
-
connectToSortable: '#
|
264 |
handle: '> .widget-top > .widget-title',
|
265 |
distance: 2,
|
266 |
helper: 'clone',
|
@@ -268,31 +157,10 @@ jQuery(document).ready(function($) {
|
|
268 |
containment: 'document',
|
269 |
stop: function(e,ui) {
|
270 |
widget_each();
|
|
|
271 |
}
|
272 |
});
|
273 |
|
274 |
-
$SettingInside.live( "mouseover" , function() {
|
275 |
-
$('#admin_bar-holder .postbox .inside, #admin_bar-holder .postbox .inside .widget .widget-inside .submenu', $Form).sortable({
|
276 |
-
placeholder: "widget-placeholder",
|
277 |
-
items: '> .widget',
|
278 |
-
connectWith: "#admin_bar-holder .postbox .inside, #admin_bar-holder .postbox .inside .widget .widget-inside .submenu",
|
279 |
-
handle: '> .widget-top > .widget-title',
|
280 |
-
cursor: 'move',
|
281 |
-
distance: 2,
|
282 |
-
containment: 'document',
|
283 |
-
change: function(e,ui) {
|
284 |
-
var $height = ui.helper.height();
|
285 |
-
$('#admin_bar-holder .postbox .inside .widget-placeholder').height($height);
|
286 |
-
},
|
287 |
-
stop: function(e,ui) {
|
288 |
-
if ( ui.item.hasClass('deleting') ) {
|
289 |
-
ui.item.remove();
|
290 |
-
}
|
291 |
-
widget_each();
|
292 |
-
}
|
293 |
-
});
|
294 |
-
});
|
295 |
-
|
296 |
$('.columns-1', $Form).droppable({
|
297 |
tolerance: 'pointer',
|
298 |
accept: function(o){
|
@@ -312,21 +180,49 @@ jQuery(document).ready(function($) {
|
|
312 |
});
|
313 |
|
314 |
|
315 |
-
var $AvailableAction = $('#
|
316 |
$AvailableAction.live( 'click', function() {
|
317 |
$(this).parent().parent().parent().children(".widget-inside").slideToggle();
|
318 |
return false;
|
319 |
});
|
320 |
|
321 |
-
var $RemoveAction = $('#
|
322 |
$RemoveAction.live( 'click', function() {
|
323 |
$(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
|
324 |
return false;
|
325 |
});
|
326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
function widget_each() {
|
328 |
var $Count = 0;
|
329 |
-
$('#
|
330 |
var $InputId = $(this).children(".widget-inside").children(".settings").children(".description").children(".idtext");
|
331 |
var $InputLink = $(this).children(".widget-inside").children(".settings").children(".description").children(".linktext");
|
332 |
var $InputTitle = $(this).children(".widget-inside").children(".settings").children("label").children(".titletext");
|
@@ -338,16 +234,20 @@ jQuery(document).ready(function($) {
|
|
338 |
} else {
|
339 |
$BoxName = $(this).parent().parent().parent().attr("id");
|
340 |
}
|
341 |
-
|
342 |
-
if( $BoxName
|
343 |
-
$BarType = '
|
344 |
-
} else if( $BoxName == 'postbox-container-2' ) {
|
345 |
-
$BarType = 'right';
|
346 |
}
|
347 |
|
348 |
if( $(this).hasClass("custom_node") ) {
|
349 |
var $CustomVal = $InputId.val();
|
350 |
$InputId.val( $CustomVal + Math.ceil( Math.random() * 1000 ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
}
|
352 |
|
353 |
var $Name = 'data' + '[' + $BarType + ']['+$Count+']';
|
25 |
<p><strong><?php _e( 'Notice: Please do not place the same multiple menu slug.' , $this->ltd ); ?></strong></p>
|
26 |
<p class="description"><?php _e( 'Can be more than one custom menu.' , $this->ltd ); ?></p>
|
27 |
|
28 |
+
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
29 |
+
|
30 |
<p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a></p>
|
31 |
|
32 |
+
<form id="wauc_setting_admin_bar_menu" class="wauc_form" method="post" action="">
|
33 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
34 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
<div id="poststuff">
|
37 |
+
<div id="post-body" class="metabox-holder columns-2">
|
38 |
|
39 |
+
<div id="postbox-container-1" class="postbox-container">
|
40 |
+
<div id="right_menus">
|
41 |
+
<?php echo $this->set_setting_admin_bar( 'right' , $Data ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
</div>
|
43 |
</div>
|
44 |
+
|
45 |
+
<div id="postbox-container-2" class="postbox-container">
|
46 |
+
<div id="left_menus">
|
47 |
+
<?php echo $this->set_setting_admin_bar( 'left' , $Data ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
</div>
|
49 |
</div>
|
50 |
+
|
51 |
+
<br class="clear">
|
52 |
</div>
|
|
|
|
|
|
|
53 |
</div>
|
54 |
|
55 |
+
<div id="can_menus" class="metabox-holder columns-1">
|
56 |
|
57 |
<div class="postbox">
|
58 |
<h3 class="hndle"><span><?php _e ( 'Menu items that can be added' , $this->ltd ); ?></span></h3>
|
59 |
<div class="inside">
|
60 |
|
61 |
+
<h4><?php _e( 'Custom' ); ?> <?php _e( 'Menus' ); ?></h4>
|
62 |
<?php $menu_widget = array( 'id' => "custom_node" , 'title' => "" , 'parent' => '' , 'href' => "" , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
63 |
+
<?php echo $this->admin_bar_menu_widget( $menu_widget ); ?>
|
64 |
<div class="clear"></div>
|
65 |
|
66 |
+
<h4><?php _e( 'Left' ); ?> <?php _e( 'Menus' ); ?></h4>
|
|
|
|
|
67 |
|
68 |
<?php foreach( $AllDefaultNodes["left"]["main"] as $node_id => $node ) : ?>
|
69 |
|
70 |
<p class="description"><?php echo $node_id; ?></p>
|
71 |
<?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
72 |
+
<?php echo $this->admin_bar_menu_widget( $menu_widget ); ?>
|
73 |
|
74 |
<?php foreach( $AllDefaultNodes["left"]["sub"] as $child_node_id => $child_node ) : ?>
|
75 |
|
76 |
<?php if( $child_node->parent == $node_id ) : ?>
|
77 |
|
78 |
<?php $menu_widget = array( 'id' => $child_node->id , 'title' => $child_node->title , 'parent' => '' , 'href' => $child_node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
79 |
+
<?php echo $this->admin_bar_menu_widget( $menu_widget ); ?>
|
80 |
|
81 |
<?php endif; ?>
|
82 |
|
84 |
|
85 |
<div class="clear"></div>
|
86 |
|
|
|
87 |
<?php endforeach; ?>
|
88 |
|
89 |
<div class="clear"></div>
|
90 |
|
91 |
+
<h4><?php _e( 'Right' ); ?> <?php _e( 'Menus' ); ?></h4>
|
92 |
|
93 |
<?php foreach( $AllDefaultNodes["right"]["main"] as $node_id => $node ) : ?>
|
94 |
|
95 |
<p class="description"><?php echo $node_id; ?></p>
|
96 |
<?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
97 |
+
<?php echo $this->admin_bar_menu_widget( $menu_widget ); ?>
|
98 |
|
99 |
<?php foreach( $AllDefaultNodes["right"]["sub"] as $child_node_id => $child_node ) : ?>
|
100 |
|
101 |
<?php if( $child_node->parent == $node_id ) : ?>
|
102 |
|
103 |
<?php $menu_widget = array( 'id' => $child_node->id , 'title' => $child_node->title , 'parent' => '' , 'href' => $child_node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
104 |
+
<?php echo $this->admin_bar_menu_widget( $menu_widget ); ?>
|
105 |
|
106 |
<?php endif; ?>
|
107 |
|
134 |
<?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
|
135 |
|
136 |
<style>
|
137 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon,
|
138 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
|
139 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
|
140 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon
|
|
|
|
|
|
|
141 |
{ background-image: url(../wp-includes/images/admin-bar-sprite.png); }
|
142 |
</style>
|
143 |
|
144 |
<script type="text/javascript">
|
145 |
jQuery(document).ready(function($) {
|
146 |
|
147 |
+
var $Form = $("#wauc_setting_admin_bar_menu");
|
148 |
+
var $AddInside = $('#can_menus .postbox .inside', $Form);
|
149 |
+
var $SettingInside = $('#poststuff #post-body .postbox-container .postbox .inside', $Form);
|
150 |
|
151 |
$AddInside.children('.widget').draggable({
|
152 |
+
connectToSortable: '#poststuff #post-body .postbox-container .postbox .inside',
|
153 |
handle: '> .widget-top > .widget-title',
|
154 |
distance: 2,
|
155 |
helper: 'clone',
|
157 |
containment: 'document',
|
158 |
stop: function(e,ui) {
|
159 |
widget_each();
|
160 |
+
menu_sortable();
|
161 |
}
|
162 |
});
|
163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
$('.columns-1', $Form).droppable({
|
165 |
tolerance: 'pointer',
|
166 |
accept: function(o){
|
180 |
});
|
181 |
|
182 |
|
183 |
+
var $AvailableAction = $('#poststuff #post-body .postbox-container .postbox .inside .widget .widget-top .widget-title-action a[href=#available]', $Form);
|
184 |
$AvailableAction.live( 'click', function() {
|
185 |
$(this).parent().parent().parent().children(".widget-inside").slideToggle();
|
186 |
return false;
|
187 |
});
|
188 |
|
189 |
+
var $RemoveAction = $('#poststuff #post-body .postbox-container .postbox .inside .widget .widget-inside .widget-control-actions .alignleft a[href=#remove]', $Form);
|
190 |
$RemoveAction.live( 'click', function() {
|
191 |
$(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
|
192 |
return false;
|
193 |
});
|
194 |
|
195 |
+
var menu_sortable = function menu_sortable() {
|
196 |
+
|
197 |
+
$('#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside, #wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget .widget-inside .submenu').sortable({
|
198 |
+
placeholder: "widget-placeholder",
|
199 |
+
items: '> .widget',
|
200 |
+
connectWith: "#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside, #wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget .widget-inside .submenu",
|
201 |
+
handle: '> .widget-top > .widget-title',
|
202 |
+
cursor: 'move',
|
203 |
+
distance: 2,
|
204 |
+
containment: 'document',
|
205 |
+
change: function(e,ui) {
|
206 |
+
var $height = ui.helper.height();
|
207 |
+
$('#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget-placeholder').height($height);
|
208 |
+
},
|
209 |
+
stop: function(e,ui) {
|
210 |
+
if ( ui.item.hasClass('deleting') ) {
|
211 |
+
ui.item.remove();
|
212 |
+
}
|
213 |
+
widget_each();
|
214 |
+
},
|
215 |
+
});
|
216 |
+
|
217 |
+
}
|
218 |
+
$('#poststuff #post-body').mouseenter(function() {
|
219 |
+
menu_sortable();
|
220 |
+
});
|
221 |
+
menu_sortable();
|
222 |
+
|
223 |
function widget_each() {
|
224 |
var $Count = 0;
|
225 |
+
$('#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget').each(function() {
|
226 |
var $InputId = $(this).children(".widget-inside").children(".settings").children(".description").children(".idtext");
|
227 |
var $InputLink = $(this).children(".widget-inside").children(".settings").children(".description").children(".linktext");
|
228 |
var $InputTitle = $(this).children(".widget-inside").children(".settings").children("label").children(".titletext");
|
234 |
} else {
|
235 |
$BoxName = $(this).parent().parent().parent().attr("id");
|
236 |
}
|
237 |
+
|
238 |
+
if( $BoxName ) {
|
239 |
+
var $BarType = $BoxName.replace( '_menus' , '');
|
|
|
|
|
240 |
}
|
241 |
|
242 |
if( $(this).hasClass("custom_node") ) {
|
243 |
var $CustomVal = $InputId.val();
|
244 |
$InputId.val( $CustomVal + Math.ceil( Math.random() * 1000 ) );
|
245 |
+
} else if( $(this).hasClass("newcustom_node") ) {
|
246 |
+
var $CustomVal = $InputId.val();
|
247 |
+
var $CustomClassName = $CustomVal + Math.ceil( Math.random() * 1000 );
|
248 |
+
$InputId.val( $CustomClassName );
|
249 |
+
$(this).removeClass("newcustom_node");
|
250 |
+
$(this).addClass( $CustomClassName );
|
251 |
}
|
252 |
|
253 |
var $Name = 'data' + '[' + $BarType + ']['+$Count+']';
|
inc/setting_admin_general.php
CHANGED
@@ -7,7 +7,6 @@ if( !empty( $_POST["update"] ) ) {
|
|
7 |
}
|
8 |
|
9 |
$Data = $this->get_data( 'admin_general' );
|
10 |
-
$User = wp_get_current_user();
|
11 |
|
12 |
// include js css
|
13 |
$ReadedJs = array( 'jquery' , 'jquery-ui-sortable' , 'thickbox' );
|
@@ -23,148 +22,23 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
23 |
<h2><?php _e( 'General Screen Settings' , $this->ltd ); ?></h2>
|
24 |
<p> </p>
|
25 |
|
26 |
-
<
|
27 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
28 |
-
<?php wp_nonce_field(); ?>
|
29 |
-
|
30 |
-
<div class="metabox-holder columns-1">
|
31 |
-
|
32 |
-
<div class="postbox">
|
33 |
-
<div class="handlediv" title="Click to toggle"><br></div>
|
34 |
-
<h3 class="hndle"><span><?php echo _e( 'Notifications' , $this->ltd ); ?></span></h3>
|
35 |
-
<div class="inside">
|
36 |
-
<table class="form-table">
|
37 |
-
<tbody>
|
38 |
-
<tr>
|
39 |
-
<th>
|
40 |
-
<label><?php _e( 'WordPress core update notice' , $this->ltd ); ?></label>
|
41 |
-
</th>
|
42 |
-
<td>
|
43 |
-
<?php $field = 'notice_update_core'; ?>
|
44 |
-
<?php $Checked = ''; ?>
|
45 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
46 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
|
47 |
-
</td>
|
48 |
-
</tr>
|
49 |
-
<tr>
|
50 |
-
<th>
|
51 |
-
<label><?php _e( 'Plugin update notice' , $this->ltd ); ?></label>
|
52 |
-
</th>
|
53 |
-
<td>
|
54 |
-
<?php $field = 'notice_update_plugin'; ?>
|
55 |
-
<?php $Checked = ''; ?>
|
56 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
57 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
|
58 |
-
</td>
|
59 |
-
</tr>
|
60 |
-
<tr>
|
61 |
-
<th>
|
62 |
-
<label><?php _e( 'Theme update notice' , $this->ltd ); ?></label>
|
63 |
-
</th>
|
64 |
-
<td>
|
65 |
-
<?php $field = 'notice_update_theme'; ?>
|
66 |
-
<?php $Checked = ''; ?>
|
67 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
68 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
|
69 |
-
</td>
|
70 |
-
</tr>
|
71 |
-
</tbody>
|
72 |
-
</table>
|
73 |
-
</div>
|
74 |
-
</div>
|
75 |
-
|
76 |
-
<div class="postbox">
|
77 |
-
<div class="handlediv" title="Click to toggle"><br></div>
|
78 |
-
<h3 class="hndle"><span><?php echo _e( 'Screen Options and Help Tab' , $this->ltd ); ?></span></h3>
|
79 |
-
<div class="inside">
|
80 |
-
<table class="form-table">
|
81 |
-
<tbody>
|
82 |
-
<tr>
|
83 |
-
<th>
|
84 |
-
<label><?php _e( 'Screen Options' ); ?></label>
|
85 |
-
</th>
|
86 |
-
<td>
|
87 |
-
<?php $field = 'screen_option_tab'; ?>
|
88 |
-
<?php $Checked = ''; ?>
|
89 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
90 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
91 |
-
</td>
|
92 |
-
</tr>
|
93 |
-
<tr>
|
94 |
-
<th>
|
95 |
-
<label><?php _e( 'Help' ); ?></label>
|
96 |
-
</th>
|
97 |
-
<td>
|
98 |
-
<?php $field = 'help_tab'; ?>
|
99 |
-
<?php $Checked = ''; ?>
|
100 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
101 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
102 |
-
</td>
|
103 |
-
</tr>
|
104 |
-
</tbody>
|
105 |
-
</table>
|
106 |
-
</div>
|
107 |
-
</div>
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
<div class="inside">
|
113 |
-
<table class="form-table">
|
114 |
-
<tbody>
|
115 |
-
<tr>
|
116 |
-
<th>
|
117 |
-
<label><?php _e( 'Footer text' , $this->ltd ); ?></label>
|
118 |
-
</th>
|
119 |
-
<td>
|
120 |
-
<?php $field = 'footer_text'; ?>
|
121 |
-
<?php $Val = ''; ?>
|
122 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = esc_html( stripslashes( $Data[$field] ) ); endif; ?>
|
123 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" />
|
124 |
-
<p class="description">Default: <?php _e( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ); ?></p>
|
125 |
-
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
|
126 |
-
</td>
|
127 |
-
</tr>
|
128 |
-
</tbody>
|
129 |
-
</table>
|
130 |
-
</div>
|
131 |
-
</div>
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
<h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
|
136 |
-
<div class="inside">
|
137 |
-
<table class="form-table">
|
138 |
-
<tbody>
|
139 |
-
<?php $field = 'css'; ?>
|
140 |
-
<tr>
|
141 |
-
<th>
|
142 |
-
<label><?php _e( 'CSS file to load' , $this->ltd ); ?></label>
|
143 |
-
</th>
|
144 |
-
<td>
|
145 |
-
<?php $Val = ''; ?>
|
146 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
147 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
148 |
-
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
|
149 |
-
</td>
|
150 |
-
</tr>
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
</th>
|
157 |
-
<td>
|
158 |
-
<?php $Checked = ''; ?>
|
159 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
160 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Remove "Wordpress" from the title tag of the Admin screen' , $this->ltd ); ?></label>
|
161 |
-
</td>
|
162 |
-
</tr>
|
163 |
-
</tbody>
|
164 |
-
</table>
|
165 |
</div>
|
|
|
|
|
166 |
</div>
|
167 |
-
|
168 |
</div>
|
169 |
|
170 |
<p class="submit">
|
7 |
}
|
8 |
|
9 |
$Data = $this->get_data( 'admin_general' );
|
|
|
10 |
|
11 |
// include js css
|
12 |
$ReadedJs = array( 'jquery' , 'jquery-ui-sortable' , 'thickbox' );
|
22 |
<h2><?php _e( 'General Screen Settings' , $this->ltd ); ?></h2>
|
23 |
<p> </p>
|
24 |
|
25 |
+
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
+
<form id="wauc_setting_admin_genelral" class="wauc_form" method="post" action="">
|
28 |
+
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
29 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
<div id="poststuff">
|
32 |
+
<div id="post-body" class="metabox-holder columns-1">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
+
<div id="postbox-container-1" class="postbox-container">
|
35 |
+
<div id="admin_general">
|
36 |
+
<?php echo $this->set_setting_admin_general( $Data ); ?>
|
37 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
</div>
|
39 |
+
|
40 |
+
<br class="clear">
|
41 |
</div>
|
|
|
42 |
</div>
|
43 |
|
44 |
<p class="submit">
|
inc/setting_appearance_menus.php
CHANGED
@@ -21,58 +21,23 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
21 |
<h2><?php _e( 'Appearance Menus Screen Setting' , $this->ltd ); ?></h2>
|
22 |
<p> </p>
|
23 |
|
24 |
-
<
|
|
|
|
|
25 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
26 |
-
<?php wp_nonce_field(); ?>
|
27 |
|
28 |
-
<div
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
<table class="form-table">
|
35 |
-
<tbody>
|
36 |
-
<?php $field = 'add_new_menu'; ?>
|
37 |
-
<tr>
|
38 |
-
<th>
|
39 |
-
<label><?php _e( 'Add a new menu' , $this->ltd ); ?></label>
|
40 |
-
</th>
|
41 |
-
<td>
|
42 |
-
<?php $Checked = ''; ?>
|
43 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
44 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
45 |
-
<p class="description"><?php _e( 'This is useful when you want to use only the menus have been created.' , $this->ltd ); ?></p>
|
46 |
-
<?php if( version_compare( $GLOBALS['wp_version'], '3.6', '>=' ) ) : ?>
|
47 |
-
<p><img src="<?php echo $this->Dir; ?>images/appearance_menus_add_new_menu.png" /></p>
|
48 |
-
<p><img src="<?php echo $this->Dir; ?>images/appearance_menus_add_new_menu_of_location.png" /></p>
|
49 |
-
<?php else: ?>
|
50 |
-
<p><img src="<?php echo $this->Dir; ?>images/3.5.1/appearance_menus_add_new_menu.png" /></p>
|
51 |
-
<?php endif; ?>
|
52 |
-
</td>
|
53 |
-
</tr>
|
54 |
-
<?php $field = 'delete_menu'; ?>
|
55 |
-
<tr>
|
56 |
-
<th>
|
57 |
-
<label><?php _e( 'Delete Menu' ); ?></label>
|
58 |
-
</th>
|
59 |
-
<td>
|
60 |
-
<?php $Checked = ''; ?>
|
61 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
62 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
63 |
-
<p class="description"><?php _e( 'This is useful when you want to use only the menus have been created.' , $this->ltd ); ?></p>
|
64 |
-
<?php if( version_compare( $GLOBALS['wp_version'], '3.6', '>=' ) ) : ?>
|
65 |
-
<p><img src="<?php echo $this->Dir; ?>images/appearance_menus_delete_menu.png" /></p>
|
66 |
-
<?php else: ?>
|
67 |
-
<p><img src="<?php echo $this->Dir; ?>images/3.5.1/appearance_menus_delete_menu.png" /></p>
|
68 |
-
<?php endif; ?>
|
69 |
-
</td>
|
70 |
-
</tr>
|
71 |
-
</tbody>
|
72 |
-
</table>
|
73 |
</div>
|
|
|
|
|
74 |
</div>
|
75 |
-
|
76 |
</div>
|
77 |
|
78 |
<p class="submit">
|
21 |
<h2><?php _e( 'Appearance Menus Screen Setting' , $this->ltd ); ?></h2>
|
22 |
<p> </p>
|
23 |
|
24 |
+
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
25 |
+
|
26 |
+
<form id="wauc_setting_appearance_menus" class="wauc_form" method="post" action="">
|
27 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
28 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
29 |
|
30 |
+
<div id="poststuff">
|
31 |
+
<div id="post-body" class="metabox-holder columns-1">
|
32 |
|
33 |
+
<div id="postbox-container-1" class="postbox-container">
|
34 |
+
<div id="appearance_menus">
|
35 |
+
<?php echo $this->set_setting_appearance_menus( $Data ); ?>
|
36 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
</div>
|
38 |
+
|
39 |
+
<br class="clear">
|
40 |
</div>
|
|
|
41 |
</div>
|
42 |
|
43 |
<p class="submit">
|
inc/setting_dashboard.php
CHANGED
@@ -21,144 +21,23 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
21 |
<h2><?php _e( 'Dashboard' ); ?><?php _e( 'Settings' ); ?></h2>
|
22 |
<p> </p>
|
23 |
|
24 |
-
<
|
|
|
|
|
25 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
26 |
-
<?php wp_nonce_field(); ?>
|
27 |
|
28 |
-
<div
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
<table class="form-table">
|
35 |
-
<tbody>
|
36 |
-
<?php $field = 'show_welcome_panel'; ?>
|
37 |
-
<tr>
|
38 |
-
<th>
|
39 |
-
<label><?php _e( 'Welcome Panel' , $this->ltd ); ?></label>
|
40 |
-
</th>
|
41 |
-
<td>
|
42 |
-
<?php $Checked = ''; ?>
|
43 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
44 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
45 |
-
</td>
|
46 |
-
</tr>
|
47 |
-
<?php $field = 'dashboard_right_now'; ?>
|
48 |
-
<tr>
|
49 |
-
<th>
|
50 |
-
<label><?php _e( 'Right Now' ); ?></label>
|
51 |
-
</th>
|
52 |
-
<td>
|
53 |
-
<?php $Checked = ''; ?>
|
54 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
55 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
56 |
-
</td>
|
57 |
-
</tr>
|
58 |
-
<?php $field = 'dashboard_recent_comments'; ?>
|
59 |
-
<tr>
|
60 |
-
<th>
|
61 |
-
<label><?php _e( 'Recent Comments' ); ?></label>
|
62 |
-
</th>
|
63 |
-
<td>
|
64 |
-
<?php $Checked = ''; ?>
|
65 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
66 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
67 |
-
</td>
|
68 |
-
</tr>
|
69 |
-
<?php $field = 'dashboard_incoming_links'; ?>
|
70 |
-
<tr>
|
71 |
-
<th>
|
72 |
-
<label><?php _e( 'Incoming Links' ); ?></label>
|
73 |
-
</th>
|
74 |
-
<td>
|
75 |
-
<?php $Checked = ''; ?>
|
76 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
77 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
78 |
-
</td>
|
79 |
-
</tr>
|
80 |
-
<?php $field = 'dashboard_plugins'; ?>
|
81 |
-
<tr>
|
82 |
-
<th>
|
83 |
-
<label><?php _e( 'Plugins' ); ?></label>
|
84 |
-
</th>
|
85 |
-
<td>
|
86 |
-
<?php $Checked = ''; ?>
|
87 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
88 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
89 |
-
</td>
|
90 |
-
</tr>
|
91 |
-
<?php $field = 'dashboard_quick_press'; ?>
|
92 |
-
<tr>
|
93 |
-
<th>
|
94 |
-
<label><?php _e( 'QuickPress' ); ?></label>
|
95 |
-
</th>
|
96 |
-
<td>
|
97 |
-
<?php $Checked = ''; ?>
|
98 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
99 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
100 |
-
</td>
|
101 |
-
</tr>
|
102 |
-
<?php $field = 'dashboard_recent_drafts'; ?>
|
103 |
-
<tr>
|
104 |
-
<th>
|
105 |
-
<label><?php _e( 'Recent Drafts' ); ?></label>
|
106 |
-
</th>
|
107 |
-
<td>
|
108 |
-
<?php $Checked = ''; ?>
|
109 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
110 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
111 |
-
</td>
|
112 |
-
</tr>
|
113 |
-
<?php $field = 'dashboard_primary'; ?>
|
114 |
-
<tr>
|
115 |
-
<th>
|
116 |
-
<label><?php _e( 'WordPress Blog' ); ?></label>
|
117 |
-
</th>
|
118 |
-
<td>
|
119 |
-
<?php $Checked = ''; ?>
|
120 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
121 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
122 |
-
</td>
|
123 |
-
</tr>
|
124 |
-
<?php $field = 'dashboard_secondary'; ?>
|
125 |
-
<tr>
|
126 |
-
<th>
|
127 |
-
<label><?php _e( 'Other WordPress News' ); ?></label>
|
128 |
-
</th>
|
129 |
-
<td>
|
130 |
-
<?php $Checked = ''; ?>
|
131 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
132 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
133 |
-
</td>
|
134 |
-
</tr>
|
135 |
-
</tbody>
|
136 |
-
</table>
|
137 |
</div>
|
|
|
|
|
138 |
</div>
|
139 |
-
|
140 |
-
<div class="postbox">
|
141 |
-
<div class="handlediv" title="Click to toggle"><br></div>
|
142 |
-
<h3 class="hndle"><span><?php _e( 'Other' , $this->ltd ); ?></span></h3>
|
143 |
-
<div class="inside">
|
144 |
-
<table class="form-table">
|
145 |
-
<tbody>
|
146 |
-
<?php $field = 'metabox_move'; ?>
|
147 |
-
<tr>
|
148 |
-
<th>
|
149 |
-
<label><?php _e( 'Meta box movement restriction' , $this->ltd ); ?></label>
|
150 |
-
</th>
|
151 |
-
<td>
|
152 |
-
<?php $Checked = ''; ?>
|
153 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
154 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e( "Lock meta box positions" , $this->ltd ); ?></label>
|
155 |
-
</td>
|
156 |
-
</tr>
|
157 |
-
</tbody>
|
158 |
-
</table>
|
159 |
-
</div>
|
160 |
-
</div>
|
161 |
-
|
162 |
</div>
|
163 |
|
164 |
<p class="submit">
|
21 |
<h2><?php _e( 'Dashboard' ); ?><?php _e( 'Settings' ); ?></h2>
|
22 |
<p> </p>
|
23 |
|
24 |
+
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
25 |
+
|
26 |
+
<form id="wauc_setting_dashboard" class="wauc_form" method="post" action="">
|
27 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
28 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
29 |
|
30 |
+
<div id="poststuff">
|
31 |
+
<div id="post-body" class="metabox-holder columns-1">
|
32 |
|
33 |
+
<div id="postbox-container-1" class="postbox-container">
|
34 |
+
<div id="dashboard">
|
35 |
+
<?php echo $this->set_setting_dashboard( $Data ); ?>
|
36 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
</div>
|
38 |
+
|
39 |
+
<br class="clear">
|
40 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
</div>
|
42 |
|
43 |
<p class="submit">
|
inc/setting_default.php
CHANGED
@@ -24,121 +24,143 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
24 |
<p><?php _e( 'Customize the UI of the management screen for all users.' , $this->ltd ); ?></p>
|
25 |
<p><?php _e ( 'Please select the user roles that all settings will apply to.' , $this->ltd ); ?></p>
|
26 |
<p class="description"><?php _e( 'Multiple settings not supported.' , $this->ltd ); ?></p>
|
27 |
-
<p><strong><span style="color: orange;">new</span> <a href="<?php echo $this->Site; ?>
|
28 |
|
29 |
-
<div
|
|
|
30 |
|
31 |
-
|
|
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
<?php $field = 'user_role'; ?>
|
41 |
-
<?php foreach($UserRoles as $key => $val) : ?>
|
42 |
-
<?php $Checked = ''; ?>
|
43 |
-
<?php if( !empty( $Data[$key] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
44 |
-
<p>
|
45 |
-
<label>
|
46 |
-
<input type="checkbox" name="data[<?php echo $field; ?>][<?php echo $key; ?>]" value="1" <?php echo $Checked; ?> />
|
47 |
-
<?php echo $val; ?>
|
48 |
-
</label>
|
49 |
</p>
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
</div>
|
52 |
-
</div>
|
53 |
-
|
54 |
-
<p class="submit">
|
55 |
-
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
|
56 |
-
</p>
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
<?php wp_nonce_field(); ?>
|
72 |
-
<label for="donate_key"><?php _e( 'Donation delete key' , $this->ltd_p ); ?></label>
|
73 |
-
<input type="text" name="donate_key" id="donate_key" value="" class="regular-text" />
|
74 |
-
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Submit' ); ?>" />
|
75 |
-
</form>
|
76 |
-
|
77 |
-
</div>
|
78 |
-
|
79 |
-
<div id="postbox-container-2" class="postbox-container">
|
80 |
-
|
81 |
-
<div class="stuffbox" id="donationbox">
|
82 |
-
<div class="inside">
|
83 |
-
<p style="color: #FFFFFF; font-size: 20px;"><?php _e( 'Donate' , $this->ltd_p ); ?></p>
|
84 |
-
<p style="color: #FFFFFF;"><?php _e( 'You are contented with this plugin?<br />By the laws of Japan, Japan\'s new paypal user can not make a donation button.<br />So i would like you to buy this plugin as the replacement for the donation.' , $this->ltd_p ); ?></p>
|
85 |
-
<p> </p>
|
86 |
-
<p style="text-align: center;">
|
87 |
-
<a href="<?php echo $this->AuthorUrl; ?>line-break-first-and-end/?utm_source=use_plugin&utm_medium=donate&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" class="button-primary" target="_blank">Line Break First and End</a>
|
88 |
-
</p>
|
89 |
-
<p> </p>
|
90 |
-
<div class="donation_memo">
|
91 |
-
<p><strong><?php _e( 'Features' , $this->ltd_p ); ?></strong></p>
|
92 |
-
<p><?php _e( 'Line Break First and End plugin is In the visual editor TinyMCE, It is a plugin that will help when you will not be able to enter a line break.' , $this->ltd_p ); ?></p>
|
93 |
</div>
|
94 |
-
|
95 |
-
|
96 |
-
<
|
97 |
-
|
98 |
-
<
|
99 |
-
<
|
100 |
-
<
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
</div>
|
103 |
</div>
|
104 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
|
121 |
-
<div class="stuffbox" id="usefulbox">
|
122 |
-
<h3><span class="hndle"><?php _e( 'Useful plugins' , $this->ltd_p ); ?></span></h3>
|
123 |
-
<div class="inside">
|
124 |
-
<p><strong><span style="color: orange;">new</span> <a href="<?php echo $this->Site; ?>import_export_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Import & Export Add-on</a></strong></p>
|
125 |
-
<p class="description"><?php _e( 'This add-on is import & export of settings data of WP Admin UI Customize.' , $this->ltd_p ); ?></p>
|
126 |
-
<p><strong><a href="<?php echo $this->Site; ?>multisite_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize for Multisite</a></strong></p>
|
127 |
-
<p class="description"><?php _e( 'This add-on is an add-on to unify the management screen of all sites.' , $this->ltd_p ); ?></p>
|
128 |
-
<p><strong><a href="http://wordpress.org/extend/plugins/post-lists-view-custom/" target="_blank">Post Lists View Custom</a></strong></p>
|
129 |
-
<p class="description"><?php _e( 'Customize the list of the post and page. custom post type page, too. You can customize the column display items freely.' , $this->ltd_p ); ?></p>
|
130 |
-
<p><strong><a href="http://wordpress.org/extend/plugins/announce-from-the-dashboard/" target="_blank">Announce from the Dashboard</a></strong></p>
|
131 |
-
<p class="description"><?php _e( 'Announce to display the dashboard. Change the display to a different user role.' , $this->ltd_p ); ?></p>
|
132 |
-
<p><strong><a href="http://wordpress.org/extend/plugins/custom-options-plus-post-in/" target="_blank">Custom Options Plus Post in</a></strong></p>
|
133 |
-
<p class="description"><?php _e( 'The plugin that allows you to add the value of the options. Option value that you have created, can be used in addition to the template tag, Short code can be used in the body of the article.' , $this->ltd_p ); ?></p>
|
134 |
-
<p> </p>
|
135 |
</div>
|
136 |
</div>
|
137 |
-
|
|
|
138 |
</div>
|
139 |
-
|
140 |
-
<div class="clear"></div>
|
141 |
-
|
142 |
</div>
|
143 |
|
144 |
</div>
|
@@ -152,7 +174,7 @@ jQuery(document).ready(function($) {
|
|
152 |
if( $RDonated == $TDonated ) {
|
153 |
$("#donationbox").hide();
|
154 |
if( $TDonated != "" ) {
|
155 |
-
$("#donation_form").html( '<p> </p><p> </p><span class="description"><?php _e( 'Thank you for your donation.' , $this->
|
156 |
} else {
|
157 |
$("#donation_form").html( '' );
|
158 |
}
|
24 |
<p><?php _e( 'Customize the UI of the management screen for all users.' , $this->ltd ); ?></p>
|
25 |
<p><?php _e ( 'Please select the user roles that all settings will apply to.' , $this->ltd ); ?></p>
|
26 |
<p class="description"><?php _e( 'Multiple settings not supported.' , $this->ltd ); ?></p>
|
27 |
+
<p><strong><span style="color: orange;">new</span> <a href="<?php echo $this->Site; ?>multiple_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Multiple Add-on</a></strong></p>
|
28 |
|
29 |
+
<div id="poststuff">
|
30 |
+
<div id="post-body" class="metabox-holder columns-2">
|
31 |
|
32 |
+
<div id="postbox-container-1" class="postbox-container">
|
33 |
+
<div id="about_plugin">
|
34 |
|
35 |
+
<div class="stuffbox" id="donationbox">
|
36 |
+
<div class="inside">
|
37 |
+
<p style="color: #FFFFFF; font-size: 20px;"><?php _e( 'Donate' , $this->ltd_p ); ?></p>
|
38 |
+
<p style="color: #FFFFFF;"><?php _e( 'You are contented with this plugin?<br />By the laws of Japan, Japan\'s new paypal user can not make a donation button.<br />So i would like you to buy this plugin as the replacement for the donation.' , $this->ltd_p ); ?></p>
|
39 |
+
<p> </p>
|
40 |
+
<p style="text-align: center;">
|
41 |
+
<a href="<?php echo $this->AuthorUrl; ?>line-break-first-and-end/?utm_source=use_plugin&utm_medium=donate&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" class="button-primary" target="_blank">Line Break First and End</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
</p>
|
43 |
+
<p> </p>
|
44 |
+
<div class="donation_memo">
|
45 |
+
<p><strong><?php _e( 'Features' , $this->ltd_p ); ?></strong></p>
|
46 |
+
<p><?php _e( 'Line Break First and End plugin is In the visual editor TinyMCE, It is a plugin that will help when you will not be able to enter a line break.' , $this->ltd_p ); ?></p>
|
47 |
+
</div>
|
48 |
+
<div class="donation_memo">
|
49 |
+
<p><strong><?php _e( 'The primary use of donations' , $this->ltd_p ); ?></strong></p>
|
50 |
+
<ul>
|
51 |
+
<li>- <?php _e( 'Liquidation of time and value' , $this->ltd_p ); ?></li>
|
52 |
+
<li>- <?php _e( 'Additional suggestions feature' , $this->ltd_p ); ?></li>
|
53 |
+
<li>- <?php _e( 'Maintain motivation' , $this->ltd_p ); ?></li>
|
54 |
+
<li>- <?php _e( 'Ensure time as the father of Sunday' , $this->ltd_p ); ?></li>
|
55 |
+
</ul>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
</div>
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
+
<div class="stuffbox" id="aboutbox">
|
61 |
+
<h3><span class="hndle"><?php _e( 'About plugin' , $this->ltd_p ); ?></span></h3>
|
62 |
+
<div class="inside">
|
63 |
+
<p><?php _e( 'Version check' , $this->ltd_p ); ?> : 3.4.2 - 3.5.2</p>
|
64 |
+
<ul>
|
65 |
+
<li><a href="<?php echo $this->Site; ?>?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e( 'Plugin\'s site' , $this->ltd_p ); ?></a></li>
|
66 |
+
<li><a href="<?php echo $this->AuthorUrl; ?>?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e( 'Developer\'s site' , $this->ltd_p ); ?></a></li>
|
67 |
+
<li><a href="http://wordpress.org/support/plugin/wp-admin-ui-customize" target="_blank"><?php _e( 'Support Forums' ); ?></a></li>
|
68 |
+
<li><a href="http://wordpress.org/support/view/plugin-reviews/wp-admin-ui-customize" target="_blank"><?php _e( 'Reviews' , $this->ltd_p ); ?></a></li>
|
69 |
+
<li><a href="https://twitter.com/gqevu6bsiz" target="_blank">twitter</a></li>
|
70 |
+
<li><a href="http://www.facebook.com/pages/Gqevu6bsiz/499584376749601" target="_blank">facebook</a></li>
|
71 |
+
</ul>
|
72 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
</div>
|
74 |
+
|
75 |
+
<div class="stuffbox" id="usefulbox">
|
76 |
+
<h3><span class="hndle"><?php _e( 'Useful plugins' , $this->ltd_p ); ?></span></h3>
|
77 |
+
<div class="inside">
|
78 |
+
<p><strong><span style="color: orange;">new</span> <a href="<?php echo $this->Site; ?>multiple_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Multiple Add-on</a></strong></p>
|
79 |
+
<p class="description"><?php _e( 'This add-on is simply settings of different user roles.' , $this->ltd_p ); ?></p>
|
80 |
+
<p><strong><a href="<?php echo $this->Site; ?>import_export_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Import & Export Add-on</a></strong></p>
|
81 |
+
<p class="description"><?php _e( 'This add-on is import & export of settings data of WP Admin UI Customize.' , $this->ltd_p ); ?></p>
|
82 |
+
<p><strong><a href="<?php echo $this->Site; ?>multisite_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize for Multisite</a></strong></p>
|
83 |
+
<p class="description"><?php _e( 'This add-on is an add-on to unify the management screen of all sites.' , $this->ltd_p ); ?></p>
|
84 |
+
<p><strong><a href="http://wordpress.org/extend/plugins/post-lists-view-custom/" target="_blank">Post Lists View Custom</a></strong></p>
|
85 |
+
<p class="description"><?php _e( 'Customize the list of the post and page. custom post type page, too. You can customize the column display items freely.' , $this->ltd_p ); ?></p>
|
86 |
+
<p><strong><a href="http://wordpress.org/extend/plugins/announce-from-the-dashboard/" target="_blank">Announce from the Dashboard</a></strong></p>
|
87 |
+
<p class="description"><?php _e( 'Announce to display the dashboard. Change the display to a different user role.' , $this->ltd_p ); ?></p>
|
88 |
+
<p><strong><a href="http://wordpress.org/extend/plugins/custom-options-plus-post-in/" target="_blank">Custom Options Plus Post in</a></strong></p>
|
89 |
+
<p class="description"><?php _e( 'The plugin that allows you to add the value of the options. Option value that you have created, can be used in addition to the template tag, Short code can be used in the body of the article.' , $this->ltd_p ); ?></p>
|
90 |
+
<p> </p>
|
91 |
+
</div>
|
92 |
</div>
|
93 |
</div>
|
94 |
</div>
|
95 |
+
|
96 |
+
<div id="postbox-container-2" class="postbox-container">
|
97 |
+
<div id="user_role">
|
98 |
+
<form id="wauc_setting_default" class="wauc_form" method="post" action="">
|
99 |
+
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
100 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
101 |
+
|
102 |
+
<div class="postbox">
|
103 |
+
<h3 class="hndle"><span><?php _e( 'User Roles' ); ?></span></h3>
|
104 |
+
<div class="inside">
|
105 |
+
<?php $field = 'user_role'; ?>
|
106 |
+
<?php foreach($UserRoles as $role_name => $val) : ?>
|
107 |
+
<?php $Checked = ''; ?>
|
108 |
+
<?php if( !empty( $Data[$role_name] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
109 |
+
<p>
|
110 |
+
<label>
|
111 |
+
<input type="checkbox" name="data[<?php echo $field; ?>][<?php echo $role_name; ?>]" value="1" <?php echo $Checked; ?> />
|
112 |
+
<?php echo $val["label"]; ?>
|
113 |
+
</label>
|
114 |
+
</p>
|
115 |
+
<?php endforeach; ?>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
|
119 |
+
<p class="submit">
|
120 |
+
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
|
121 |
+
</p>
|
122 |
+
|
123 |
+
<p class="submit reset">
|
124 |
+
<span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
|
125 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
|
126 |
+
</p>
|
127 |
+
|
128 |
+
<p> </p>
|
129 |
+
|
130 |
+
</form>
|
131 |
+
|
132 |
+
<form id="donation_form" class="wauc_form" method="post" action="">
|
133 |
+
<h3><?php _e( 'If you have already donated to.' , $this->ltd_p ); ?></h3>
|
134 |
+
<p><?php _e( 'Please enter the \'Donation delete key\' that have been described in the \'Line Break First and End download page\'.' , $this->ltd_p ); ?></p>
|
135 |
+
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
136 |
+
<?php wp_nonce_field(); ?>
|
137 |
+
<label for="donate_key"><?php _e( 'Donation delete key' , $this->ltd_p ); ?></label>
|
138 |
+
<input type="text" name="donate_key" id="donate_key" value="" class="regular-text" />
|
139 |
+
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Submit' ); ?>" />
|
140 |
+
</form>
|
141 |
+
|
142 |
+
<p> </p>
|
143 |
|
144 |
+
<div class="stuffbox" style="border-color: #FFC426; border-width: 3px;">
|
145 |
+
<h3 style="background: #FFF2D0; border-color: #FFC426;"><span class="hndle"><?php _e( 'Have you want to customize?' , $this->ltd_p ); ?></span></h3>
|
146 |
+
<div class="inside">
|
147 |
+
<p style="float: right;">
|
148 |
+
<img src="http://www.gravatar.com/avatar/7e05137c5a859aa987a809190b979ed4?s=46" width="46" /><br />
|
149 |
+
<a href="<?php echo $this->AuthorUrl; ?>contact-us/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">gqevu6bsiz</a>
|
150 |
+
</p>
|
151 |
+
<p><?php _e( 'I am good at Admin Screen Customize.' , $this->ltd_p ); ?></p>
|
152 |
+
<p><?php _e( 'Please consider the request to me if it is good.' , $this->ltd_p ); ?></p>
|
153 |
+
<p>
|
154 |
+
<a href="http://wpadminuicustomize.com/blog/category/example/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e ( 'Example Customize' , $this->ltd_p ); ?></a> :
|
155 |
+
<a href="<?php echo $this->AuthorUrl; ?>contact-us/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e( 'Contact me' , $this->ltd_p ); ?></a></p>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
</div>
|
160 |
</div>
|
161 |
+
|
162 |
+
<br class="clear">
|
163 |
</div>
|
|
|
|
|
|
|
164 |
</div>
|
165 |
|
166 |
</div>
|
174 |
if( $RDonated == $TDonated ) {
|
175 |
$("#donationbox").hide();
|
176 |
if( $TDonated != "" ) {
|
177 |
+
$("#donation_form").html( '<p> </p><p> </p><span class="description"><?php _e( 'Thank you for your donation.' , $this->ltd_p ); ?></span>' );
|
178 |
} else {
|
179 |
$("#donation_form").html( '' );
|
180 |
}
|
inc/setting_loginscreen.php
CHANGED
@@ -22,105 +22,114 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
22 |
<h2><?php _e( 'Login Screen Settings' , $this->ltd ); ?></h2>
|
23 |
<p> </p>
|
24 |
|
25 |
-
<form id="
|
26 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
27 |
-
<?php wp_nonce_field(); ?>
|
28 |
|
29 |
<?php if( is_multisite() ) : ?>
|
30 |
<p class="description"><?php _e( 'Is not possible to check the login form if you do not log out in the case of MultiSite.' , $this->ltd ); ?></p>
|
31 |
<?php endif; ?>
|
32 |
<p><a title="<?php _e( 'Login Screen' , $this->ltd ); ?>" href="<?php echo get_option( 'siteurl' ); ?>/wp-login.php?TB_iframe=1&width=520&height=520" class="thickbox"><?php _e( 'Show Login Screen' , $this->ltd ); ?></a></p>
|
33 |
|
34 |
-
<div
|
35 |
-
|
36 |
-
|
37 |
-
<div
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
<
|
44 |
-
<
|
45 |
-
<
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
</div>
|
|
|
|
|
87 |
</div>
|
88 |
-
|
89 |
-
<div class="postbox">
|
90 |
-
<div class="handlediv" title="Click to toggle"><br></div>
|
91 |
-
<h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
|
92 |
-
<div class="inside">
|
93 |
-
<table class="form-table">
|
94 |
-
<tbody>
|
95 |
-
<?php $field = 'login_css'; ?>
|
96 |
-
<tr>
|
97 |
-
<th>
|
98 |
-
<label><?php _e( 'CSS file to load' , $this->ltd ); ?></label>
|
99 |
-
</th>
|
100 |
-
<td>
|
101 |
-
<?php $Val = ''; ?>
|
102 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
103 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
104 |
-
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
|
105 |
-
</td>
|
106 |
-
</tr>
|
107 |
-
<?php $field = 'login_footer'; ?>
|
108 |
-
<tr>
|
109 |
-
<th>
|
110 |
-
<label><?php _e( 'Footer text' , $this->ltd ); ?></label>
|
111 |
-
</th>
|
112 |
-
<td>
|
113 |
-
<?php $Val = ''; ?>
|
114 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = stripslashes( esc_html( $Data[$field] ) ); endif; ?>
|
115 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" id="<?php echo $field; ?>">
|
116 |
-
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
|
117 |
-
</td>
|
118 |
-
</tr>
|
119 |
-
</tbody>
|
120 |
-
</table>
|
121 |
-
</div>
|
122 |
-
</div>
|
123 |
-
|
124 |
</div>
|
125 |
|
126 |
<p class="submit">
|
22 |
<h2><?php _e( 'Login Screen Settings' , $this->ltd ); ?></h2>
|
23 |
<p> </p>
|
24 |
|
25 |
+
<form id="wauc_setting_loginscreen" class="wauc_form" method="post" action="">
|
26 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
27 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
28 |
|
29 |
<?php if( is_multisite() ) : ?>
|
30 |
<p class="description"><?php _e( 'Is not possible to check the login form if you do not log out in the case of MultiSite.' , $this->ltd ); ?></p>
|
31 |
<?php endif; ?>
|
32 |
<p><a title="<?php _e( 'Login Screen' , $this->ltd ); ?>" href="<?php echo get_option( 'siteurl' ); ?>/wp-login.php?TB_iframe=1&width=520&height=520" class="thickbox"><?php _e( 'Show Login Screen' , $this->ltd ); ?></a></p>
|
33 |
|
34 |
+
<div id="poststuff">
|
35 |
+
<div id="post-body" class="metabox-holder columns-1">
|
36 |
+
|
37 |
+
<div id="postbox-container-1" class="postbox-container">
|
38 |
+
<div id="login_screen">
|
39 |
+
|
40 |
+
<div class="postbox">
|
41 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
42 |
+
<h3 class="hndle"><span><?php _e( 'Login Form' , $this->ltd ); ?></span></h3>
|
43 |
+
<div class="inside">
|
44 |
+
<table class="form-table">
|
45 |
+
<tbody>
|
46 |
+
<?php $field = 'login_headerurl'; ?>
|
47 |
+
<tr>
|
48 |
+
<th>
|
49 |
+
<label><?php _e( 'The link after clicking on the logo' , $this->ltd ); ?></label>
|
50 |
+
</th>
|
51 |
+
<td>
|
52 |
+
<?php $Val = ''; ?>
|
53 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
54 |
+
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
55 |
+
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
|
56 |
+
|
57 |
+
</td>
|
58 |
+
</tr>
|
59 |
+
<?php $field = 'login_headertitle'; ?>
|
60 |
+
<tr>
|
61 |
+
<th>
|
62 |
+
<label><?php _e( 'Logo Title' , $this->ltd ); ?></label>
|
63 |
+
</th>
|
64 |
+
<td>
|
65 |
+
<?php $Val = ''; ?>
|
66 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
67 |
+
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
68 |
+
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
|
69 |
+
</td>
|
70 |
+
</tr>
|
71 |
+
<?php $field = 'login_headerlogo'; ?>
|
72 |
+
<tr>
|
73 |
+
<th>
|
74 |
+
<label><?php _e( 'Logo Image path' , $this->ltd ); ?></label>
|
75 |
+
</th>
|
76 |
+
<td>
|
77 |
+
<?php $Val = ''; ?>
|
78 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
79 |
+
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
80 |
+
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
|
81 |
+
<?php if( !empty( $Val ) ) : ?>
|
82 |
+
<?php $img = str_replace( '[blog_url]' , get_bloginfo( 'url' ) , $Val ); ?>
|
83 |
+
<?php $img = str_replace( '[template_directory_uri]' , get_bloginfo( 'url' ) , $img ); ?>
|
84 |
+
<p><img src="<?php echo $img; ?>" alt="Login Logo" /></p>
|
85 |
+
<?php endif; ?>
|
86 |
+
</td>
|
87 |
+
</tr>
|
88 |
+
</tbody>
|
89 |
+
</table>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
|
93 |
+
<div class="postbox">
|
94 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
95 |
+
<h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
|
96 |
+
<div class="inside">
|
97 |
+
<table class="form-table">
|
98 |
+
<tbody>
|
99 |
+
<?php $field = 'login_css'; ?>
|
100 |
+
<tr>
|
101 |
+
<th>
|
102 |
+
<label><?php _e( 'CSS file to load' , $this->ltd ); ?></label>
|
103 |
+
</th>
|
104 |
+
<td>
|
105 |
+
<?php $Val = ''; ?>
|
106 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
107 |
+
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
108 |
+
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
|
109 |
+
</td>
|
110 |
+
</tr>
|
111 |
+
<?php $field = 'login_footer'; ?>
|
112 |
+
<tr>
|
113 |
+
<th>
|
114 |
+
<label><?php _e( 'Footer text' , $this->ltd ); ?></label>
|
115 |
+
</th>
|
116 |
+
<td>
|
117 |
+
<?php $Val = ''; ?>
|
118 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = stripslashes( esc_html( $Data[$field] ) ); endif; ?>
|
119 |
+
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" id="<?php echo $field; ?>">
|
120 |
+
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
|
121 |
+
</td>
|
122 |
+
</tr>
|
123 |
+
</tbody>
|
124 |
+
</table>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
|
128 |
+
</div>
|
129 |
</div>
|
130 |
+
|
131 |
+
<br class="clear">
|
132 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
</div>
|
134 |
|
135 |
<p class="submit">
|
inc/setting_post_add_edit.php
CHANGED
@@ -21,36 +21,23 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
21 |
<h2><?php _e( 'Add New Post and Edit Post Screen Setting' , $this->ltd ); ?></h2>
|
22 |
<p> </p>
|
23 |
|
24 |
-
<
|
|
|
|
|
25 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
26 |
-
<?php wp_nonce_field(); ?>
|
27 |
|
28 |
-
<div
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
<table class="form-table">
|
35 |
-
<tbody>
|
36 |
-
<?php $field = 'default_permalink'; ?>
|
37 |
-
<tr>
|
38 |
-
<th>
|
39 |
-
<label><?php _e( 'Change Permalinks' ); ?></label>
|
40 |
-
</th>
|
41 |
-
<td>
|
42 |
-
<?php $Checked = ''; ?>
|
43 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
44 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
45 |
-
<p class="description"><?php _e( 'Only appears when you have settings to the default permalink.' , $this->ltd ); ?></p>
|
46 |
-
<p><img src="<?php echo $this->Dir; ?>images/post_add_edit_screen__edit_ppermalink.png" /></p>
|
47 |
-
</td>
|
48 |
-
</tr>
|
49 |
-
</tbody>
|
50 |
-
</table>
|
51 |
</div>
|
|
|
|
|
52 |
</div>
|
53 |
-
|
54 |
</div>
|
55 |
|
56 |
<p class="submit">
|
21 |
<h2><?php _e( 'Add New Post and Edit Post Screen Setting' , $this->ltd ); ?></h2>
|
22 |
<p> </p>
|
23 |
|
24 |
+
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
25 |
+
|
26 |
+
<form id="wauc_setting_post_add_edit" class="wauc_form" method="post" action="">
|
27 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
28 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
29 |
|
30 |
+
<div id="poststuff">
|
31 |
+
<div id="post-body" class="metabox-holder columns-1">
|
32 |
|
33 |
+
<div id="postbox-container-1" class="postbox-container">
|
34 |
+
<div id="post_add_edit">
|
35 |
+
<?php echo $this->set_setting_post_add_edit( $Data ); ?>
|
36 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
</div>
|
38 |
+
|
39 |
+
<br class="clear">
|
40 |
</div>
|
|
|
41 |
</div>
|
42 |
|
43 |
<p class="submit">
|
inc/setting_removemtabox.php
CHANGED
@@ -7,7 +7,6 @@ if( !empty( $_POST["update"] ) ) {
|
|
7 |
}
|
8 |
|
9 |
$Data = $this->get_data( 'removemetabox' );
|
10 |
-
$Metaboxes = $this->get_data( "regist_metabox" );
|
11 |
|
12 |
// include js css
|
13 |
$ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
|
@@ -22,100 +21,29 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
22 |
<h2><?php _e( 'Remove meta box' , $this->ltd ); ?></h2>
|
23 |
<p><?php _e( 'Please update or add a "post" and a "page" to load the available meta boxes.' , $this->ltd ); ?></p>
|
24 |
|
25 |
-
<
|
26 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
27 |
-
<?php wp_nonce_field(); ?>
|
28 |
-
|
29 |
-
<div class="metabox-holder columns-1">
|
30 |
-
|
31 |
-
<div class="postbox">
|
32 |
-
<div class="handlediv" title="Click to toggle"><br></div>
|
33 |
-
<h3 class="hndle"><span><?php _e( 'Post' ); ?></span></h3>
|
34 |
-
<div class="inside">
|
35 |
-
|
36 |
-
<?php if( empty( $Metaboxes["metaboxes"]["post"] ) ) : ?>
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
<?php else: ?>
|
42 |
-
|
43 |
-
<table class="form-table">
|
44 |
-
<tbody>
|
45 |
-
<?php foreach( $Metaboxes["metaboxes"]["post"] as $context => $meta_box ) : ?>
|
46 |
-
<?php foreach( $meta_box as $priority => $box ) : ?>
|
47 |
-
<?php foreach( $box as $metabox_id => $metabox_title ) : ?>
|
48 |
-
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
49 |
-
<tr>
|
50 |
-
<th><?php echo $metabox_title; ?></th>
|
51 |
-
<td>
|
52 |
-
<?php $Checked = ''; ?>
|
53 |
-
<?php if( !empty( $Data["post"][$metabox_id] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
54 |
-
<label><input type="checkbox" name="data[post][<?php echo $metabox_id; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
55 |
-
</td>
|
56 |
-
</tr>
|
57 |
-
<?php endif; ?>
|
58 |
-
<?php endforeach; ?>
|
59 |
-
<?php endforeach; ?>
|
60 |
-
<?php endforeach; ?>
|
61 |
-
|
62 |
-
<?php global $wp_version; ?>
|
63 |
-
<?php if ( version_compare( $wp_version , '3.5.1' , '>' ) ) : ?>
|
64 |
-
<tr>
|
65 |
-
<th><?php _e( 'Post Formats' ); ?></th>
|
66 |
-
<td>
|
67 |
-
<?php $Checked = ''; ?>
|
68 |
-
<?php if( !empty( $Data["post"]["postformat"] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
69 |
-
<label><input type="checkbox" name="data[post][postformat]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
70 |
-
</td>
|
71 |
-
</tr>
|
72 |
-
<?php endif; ?>
|
73 |
-
</tbody>
|
74 |
-
</table>
|
75 |
|
|
|
|
|
76 |
|
77 |
-
|
|
|
|
|
|
|
78 |
</div>
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
<div class="inside">
|
85 |
-
|
86 |
-
<?php if( empty( $Metaboxes["metaboxes"]["page"] ) ) : ?>
|
87 |
-
|
88 |
-
<p><?php _e( 'Could not read the meta box.' , $this->ltd ); ?></p>
|
89 |
-
<p><?php _e( 'Meta boxes will be loaded automatically when you update or add a page.' , $this->ltd ); ?></p>
|
90 |
-
|
91 |
-
<?php else: ?>
|
92 |
-
|
93 |
-
<table class="form-table">
|
94 |
-
<tbody>
|
95 |
-
<?php foreach( $Metaboxes["metaboxes"]["page"] as $context => $meta_box ) : ?>
|
96 |
-
<?php foreach( $meta_box as $priority => $box ) : ?>
|
97 |
-
<?php foreach( $box as $metabox_id => $metabox_title ) : ?>
|
98 |
-
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
99 |
-
<tr>
|
100 |
-
<th><?php echo $metabox_title; ?></th>
|
101 |
-
<td>
|
102 |
-
<?php $Checked = ''; ?>
|
103 |
-
<?php if( !empty( $Data["page"][$metabox_id] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
104 |
-
<label><input type="checkbox" name="data[page][<?php echo $metabox_id; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
105 |
-
</td>
|
106 |
-
</tr>
|
107 |
-
<?php endif; ?>
|
108 |
-
<?php endforeach; ?>
|
109 |
-
<?php endforeach; ?>
|
110 |
-
<?php endforeach; ?>
|
111 |
-
</tbody>
|
112 |
-
</table>
|
113 |
-
|
114 |
-
<?php endif; ?>
|
115 |
-
|
116 |
</div>
|
|
|
|
|
117 |
</div>
|
118 |
-
|
119 |
</div>
|
120 |
|
121 |
<p class="submit">
|
7 |
}
|
8 |
|
9 |
$Data = $this->get_data( 'removemetabox' );
|
|
|
10 |
|
11 |
// include js css
|
12 |
$ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
|
21 |
<h2><?php _e( 'Remove meta box' , $this->ltd ); ?></h2>
|
22 |
<p><?php _e( 'Please update or add a "post" and a "page" to load the available meta boxes.' , $this->ltd ); ?></p>
|
23 |
|
24 |
+
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
<form id="wauc_setting_removemtabox" class="wauc_form" method="post" action="">
|
27 |
+
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
28 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
+
<div id="poststuff">
|
31 |
+
<div id="post-body" class="metabox-holder columns-1">
|
32 |
|
33 |
+
<div id="postbox-container-1" class="postbox-container">
|
34 |
+
<div id="metabox_post">
|
35 |
+
<?php echo $this->set_setting_removemetabox( 'post' , $Data ); ?>
|
36 |
+
</div>
|
37 |
</div>
|
38 |
+
|
39 |
+
<div id="postbox-container-2" class="postbox-container">
|
40 |
+
<div id="metabox_page">
|
41 |
+
<?php echo $this->set_setting_removemetabox( 'page' , $Data ); ?>
|
42 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
</div>
|
44 |
+
|
45 |
+
<br class="clear">
|
46 |
</div>
|
|
|
47 |
</div>
|
48 |
|
49 |
<p class="submit">
|
inc/setting_sidemenu.php
CHANGED
@@ -1,15 +1,13 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
global $menu, $submenu;
|
4 |
-
|
5 |
if( !empty( $_POST["update"] ) ) {
|
6 |
$this->update_sidemenu();
|
7 |
} elseif( !empty( $_POST["reset"] ) ) {
|
8 |
$this->update_reset( 'sidemenu' );
|
9 |
}
|
10 |
|
11 |
-
$this->get_roles();
|
12 |
$Data = $this->get_data( 'sidemenu' );
|
|
|
13 |
|
14 |
// include js css
|
15 |
$ReadedJs = array( 'jquery' , 'jquery-ui-draggable' , 'jquery-ui-droppable' , 'jquery-ui-sortable' , 'thickbox' );
|
@@ -26,184 +24,93 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
26 |
<p><?php _e( 'Please change the menu by drag and drop.' , $this->ltd ); ?></p>
|
27 |
<p><strong><?php _e( 'Notice: Please do not place the same multiple menu slug.' , $this->ltd ); ?></strong></p>
|
28 |
|
|
|
|
|
29 |
<p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a></p>
|
30 |
|
31 |
-
<form id="
|
32 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
33 |
-
<?php wp_nonce_field(); ?>
|
34 |
-
|
35 |
-
<div class="metabox-holder columns-2" id="sidemenu-holder">
|
36 |
-
|
37 |
-
<div id="postbox-container-1" class="postbox-container">
|
38 |
-
|
39 |
-
<div class="postbox">
|
40 |
-
<h3 class="hndle">
|
41 |
-
<span><?php _e( 'Current menu' , $this->ltd ); ?></span>
|
42 |
-
</h3>
|
43 |
-
<div class="inside">
|
44 |
-
|
45 |
-
<?php if( empty( $Data ) ) : ?>
|
46 |
|
47 |
-
|
|
|
48 |
|
49 |
-
|
|
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
<?php if( $mm[5] == 'menu-comments' ) : ?>
|
60 |
-
<?php $menu_title = __( 'Comments' )
|
61 |
<?php elseif( $mm[5] == 'menu-appearance' ) : ?>
|
62 |
-
<?php $menu_title = __( 'Appearance' )
|
63 |
<?php elseif( $mm[5] == 'menu-plugins' ) : ?>
|
64 |
-
<?php $menu_title = __( 'Plugins' )
|
65 |
<?php endif; ?>
|
66 |
-
|
67 |
-
|
68 |
-
<?php $mwsm = array(); ?>
|
69 |
-
<?php foreach($submenu as $parent_slug => $sub) : ?>
|
70 |
-
<?php foreach($sub as $sm) : ?>
|
71 |
-
<?php if( $mm[2] == $parent_slug ) : ?>
|
72 |
-
<?php $submenu_title = $sm[0]; ?>
|
73 |
-
|
74 |
-
<?php if( $sm[1] == 'update_core' ) : ?>
|
75 |
-
<?php $submenu_title = __( 'Update' ) . ' [update_total]'; ?>
|
76 |
-
<?php endif; ?>
|
77 |
-
<?php $mwsm[] = array( 'title' => $submenu_title , 'slug' => $sm[2] , 'parent_slug' => $parent_slug , 'cap' => $sm[1] ); ?>
|
78 |
-
<?php endif; ?>
|
79 |
-
<?php endforeach; ?>
|
80 |
-
<?php endforeach; ?>
|
81 |
-
|
82 |
-
<?php endif; ?>
|
83 |
-
|
84 |
-
<?php $menu_widget = array( 'title' => $menu_title , 'slug' => $mm[2] , 'parent_slug' => '' , 'new' => false , 'cap' => $mm[1] , 'submenu' => $mwsm ); ?>
|
85 |
-
<?php $this->menu_widget( $menu_widget ); ?>
|
86 |
-
|
87 |
-
<?php endforeach; ?>
|
88 |
-
|
89 |
-
<?php else: ?>
|
90 |
-
|
91 |
-
<?php if( !empty( $Data["main"] ) ) : ?>
|
92 |
-
|
93 |
-
<?php foreach($Data["main"] as $mm) : ?>
|
94 |
-
|
95 |
-
<?php if( !empty( $mm["title"] ) ) : ?>
|
96 |
-
|
97 |
-
<?php $mwsm = array(); ?>
|
98 |
-
<?php if( !empty( $Data["sub"] ) ) : ?>
|
99 |
-
<?php foreach($Data["sub"] as $sm) : ?>
|
100 |
-
|
101 |
-
<?php if( $mm["slug"] == $sm["parent_slug"] ) : ?>
|
102 |
-
|
103 |
-
<?php $cap = ""; ?>
|
104 |
-
<?php foreach( $submenu[$mm["slug"]] as $k => $tmp_sm ) : ?>
|
105 |
-
<?php if( $tmp_sm[2] == $sm["slug"] ) : ?>
|
106 |
-
<?php $cap = $tmp_sm[1]; ?>
|
107 |
-
<?php break; ?>
|
108 |
-
<?php endif; ?>
|
109 |
-
<?php endforeach; ?>
|
110 |
|
111 |
-
|
|
|
|
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
<?php endif; ?>
|
114 |
-
|
115 |
<?php endforeach; ?>
|
116 |
-
|
117 |
-
|
118 |
-
<?php $cap = ""; ?>
|
119 |
-
<?php foreach( $menu as $tmp_m ) : ?>
|
120 |
-
<?php if( $tmp_m[2] == $mm["slug"] ) : ?>
|
121 |
-
<?php $cap = $tmp_m[1]; ?>
|
122 |
-
<?php break; ?>
|
123 |
-
<?php endif; ?>
|
124 |
<?php endforeach; ?>
|
125 |
-
|
126 |
-
<?php $menu_widget = array( 'title' => $mm["title"] , 'slug' => $mm["slug"] , 'parent_slug' => '' , 'new' => false , 'cap' =>$cap , 'submenu' => $mwsm ); ?>
|
127 |
-
<?php $this->menu_widget( $menu_widget ); ?>
|
128 |
-
|
129 |
-
<?php endif; ?>
|
130 |
-
|
131 |
-
<?php endforeach; ?>
|
132 |
-
|
133 |
-
<?php endif; ?>
|
134 |
-
|
135 |
-
<?php endif; ?>
|
136 |
-
|
137 |
-
</div>
|
138 |
-
</div>
|
139 |
-
|
140 |
-
<p class="sidebar_setting_delete"><a href="#"><?php _e( 'Delete all' ); ?></a></p>
|
141 |
-
|
142 |
-
</div>
|
143 |
-
|
144 |
-
<div id="postbox-container-2" class="postbox-container">
|
145 |
-
|
146 |
-
<div class="postbox">
|
147 |
-
<h3 class="hndle"><span><?php _e( 'Menu items that can be added' , $this->ltd ); ?></span></h3>
|
148 |
-
<div class="inside">
|
149 |
-
|
150 |
-
<p class="description"><?php _e( 'Sepalator' , $this->ltd ); ?></p>
|
151 |
-
<?php $menu_widget = array( 'title' => '-' , 'slug' => 'separator' , 'parent_slug' => '' , 'new' => true , 'cap' => 'read' ); ?>
|
152 |
-
<?php $this->menu_widget( $menu_widget ); ?>
|
153 |
-
<div class="clear"></div>
|
154 |
-
|
155 |
-
<?php foreach($this->Menu as $mm) : ?>
|
156 |
-
|
157 |
-
<?php if( !empty( $mm[0] ) ) : ?>
|
158 |
-
|
159 |
-
<?php $menu_title = $mm[0]; ?>
|
160 |
-
<?php if( $mm[5] == 'menu-comments' ) : ?>
|
161 |
-
<?php $menu_title = __( 'Comments' ); ?>
|
162 |
-
<?php elseif( $mm[5] == 'menu-appearance' ) : ?>
|
163 |
-
<?php $menu_title = __( 'Appearance' ); ?>
|
164 |
-
<?php elseif( $mm[5] == 'menu-plugins' ) : ?>
|
165 |
-
<?php $menu_title = __( 'Plugins' ); ?>
|
166 |
-
<?php endif; ?>
|
167 |
-
<p class="description"><?php echo $menu_title; ?></p>
|
168 |
-
|
169 |
-
<?php foreach($this->SubMenu as $parent_slug => $sub) : ?>
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
<?php if( $mm[2] == $parent_slug ) : ?>
|
174 |
-
<?php $menu_title = $sm[0]; ?>
|
175 |
-
<?php if( $sm[1] == 'update_core' ) : ?>
|
176 |
-
<?php $menu_title = __( 'Update' ) . ' [update_total]'; ?>
|
177 |
-
<?php elseif( $sm[2] == 'edit-comments.php' ) : ?>
|
178 |
-
<?php $menu_title .= ' [comment_count]'; ?>
|
179 |
-
<?php elseif( $sm[2] == 'themes.php' ) : ?>
|
180 |
-
<?php $menu_title .= ' [update_themes]'; ?>
|
181 |
-
<?php elseif( $sm[2] == 'plugins.php' ) : ?>
|
182 |
-
<?php $menu_title .= ' [update_plugins]'; ?>
|
183 |
-
<?php endif; ?>
|
184 |
-
<?php $menu_widget = array( 'title' => $menu_title , 'slug' => $sm[2] , 'parent_slug' => '' , 'new' => true , 'cap' => $sm[1] , 'submenu' => '' ); ?>
|
185 |
-
<?php $this->menu_widget( $menu_widget ); ?>
|
186 |
-
<?php endif; ?>
|
187 |
|
188 |
-
<?php
|
189 |
|
190 |
<?php endforeach; ?>
|
|
|
|
|
|
|
|
|
191 |
|
192 |
-
<div class="clear"></div>
|
193 |
|
194 |
-
|
|
|
|
|
|
|
|
|
195 |
|
196 |
-
<?php
|
197 |
|
198 |
</div>
|
199 |
-
|
200 |
</div>
|
201 |
-
|
|
|
202 |
|
|
|
203 |
</div>
|
204 |
|
205 |
-
<div class="clear"></div>
|
206 |
-
|
207 |
<p class="submit">
|
208 |
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
|
209 |
</p>
|
@@ -219,20 +126,15 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
219 |
|
220 |
<?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
|
221 |
|
222 |
-
<style>
|
223 |
-
#sidemenu-holder #postbox-container-1 .item-edit { background-image: url(<?php echo admin_url(); ?>images/arrows.png); }
|
224 |
-
#sidemenu-holder #postbox-container-1 .item-edit:hover { background-image: url(<?php echo admin_url(); ?>images/arrows-dark.png); }
|
225 |
-
</style>
|
226 |
-
|
227 |
<script type="text/javascript">
|
228 |
jQuery(document).ready(function($) {
|
229 |
|
230 |
-
var $Form = $("#
|
231 |
-
var $AddInside = $('#
|
232 |
-
var $SettingInside = $('#
|
233 |
|
234 |
$AddInside.children('.widget').draggable({
|
235 |
-
connectToSortable: '#
|
236 |
handle: '> .widget-top > .widget-title',
|
237 |
distance: 2,
|
238 |
helper: 'clone',
|
@@ -240,35 +142,14 @@ jQuery(document).ready(function($) {
|
|
240 |
containment: 'document',
|
241 |
stop: function(e,ui) {
|
242 |
widget_each();
|
|
|
243 |
}
|
244 |
});
|
245 |
|
246 |
-
$
|
247 |
-
$('#postbox-container-1 .postbox .inside, #postbox-container-1 .postbox .inside .widget .widget-inside .submenu', $Form).sortable({
|
248 |
-
placeholder: "widget-placeholder",
|
249 |
-
items: '> .widget',
|
250 |
-
connectWith: "#postbox-container-1 .postbox .inside, #postbox-container-1 .postbox .inside .widget .widget-inside .submenu",
|
251 |
-
handle: '> .widget-top > .widget-title',
|
252 |
-
cursor: 'move',
|
253 |
-
distance: 2,
|
254 |
-
containment: 'document',
|
255 |
-
change: function(e,ui) {
|
256 |
-
var $height = ui.helper.height();
|
257 |
-
$('#postbox-container-1 .postbox .inside .widget-placeholder').height($height);
|
258 |
-
},
|
259 |
-
stop: function(e,ui) {
|
260 |
-
if ( ui.item.hasClass('deleting') ) {
|
261 |
-
ui.item.remove();
|
262 |
-
}
|
263 |
-
widget_each();
|
264 |
-
}
|
265 |
-
});
|
266 |
-
});
|
267 |
-
|
268 |
-
$('#postbox-container-2', $Form).droppable({
|
269 |
tolerance: 'pointer',
|
270 |
accept: function(o){
|
271 |
-
return $(o).parent().parent().parent().attr('id') != 'postbox-container-
|
272 |
},
|
273 |
drop: function(e,ui) {
|
274 |
ui.draggable.addClass('deleting');
|
@@ -284,22 +165,49 @@ jQuery(document).ready(function($) {
|
|
284 |
});
|
285 |
|
286 |
|
287 |
-
var $AvailableAction = $('#postbox-container-
|
288 |
$AvailableAction.live( 'click', function() {
|
289 |
$(this).parent().parent().parent().children(".widget-inside").slideToggle();
|
290 |
return false;
|
291 |
});
|
292 |
|
293 |
-
var $RemoveAction = $('#postbox-container-
|
294 |
$RemoveAction.live( 'click', function() {
|
295 |
$(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
|
296 |
return false;
|
297 |
});
|
298 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
|
300 |
function widget_each() {
|
301 |
var $Count = 0;
|
302 |
-
$('#
|
303 |
var $InputSlug = $(this).children(".widget-inside").children(".settings").children(".description").children(".slugtext");
|
304 |
var $InputTitle = $(this).children(".widget-inside").children(".settings").children("label").children(".titletext");
|
305 |
var $InputParentSlug = $(this).children(".widget-inside").children(".settings").children(".parent_slugtext");
|
@@ -323,8 +231,8 @@ jQuery(document).ready(function($) {
|
|
323 |
}
|
324 |
widget_each();
|
325 |
|
326 |
-
$('.sidebar_setting_delete'
|
327 |
-
$(
|
328 |
return false;
|
329 |
});
|
330 |
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
if( !empty( $_POST["update"] ) ) {
|
4 |
$this->update_sidemenu();
|
5 |
} elseif( !empty( $_POST["reset"] ) ) {
|
6 |
$this->update_reset( 'sidemenu' );
|
7 |
}
|
8 |
|
|
|
9 |
$Data = $this->get_data( 'sidemenu' );
|
10 |
+
$Menus = $this->get_data( 'regist_sidemenu' );
|
11 |
|
12 |
// include js css
|
13 |
$ReadedJs = array( 'jquery' , 'jquery-ui-draggable' , 'jquery-ui-droppable' , 'jquery-ui-sortable' , 'thickbox' );
|
24 |
<p><?php _e( 'Please change the menu by drag and drop.' , $this->ltd ); ?></p>
|
25 |
<p><strong><?php _e( 'Notice: Please do not place the same multiple menu slug.' , $this->ltd ); ?></strong></p>
|
26 |
|
27 |
+
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
28 |
+
|
29 |
<p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a></p>
|
30 |
|
31 |
+
<form id="wauc_setting_sidemenu" class="wauc_form" method="post" action="">
|
32 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
33 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
<div id="poststuff">
|
36 |
+
<div id="post-body" class="metabox-holder columns-2">
|
37 |
|
38 |
+
<div id="postbox-container-1" class="postbox-container">
|
39 |
+
<div id="can_menus">
|
40 |
|
41 |
+
<div class="postbox">
|
42 |
+
<h3 class="hndle"><span><?php _e( 'Menu items that can be added' , $this->ltd ); ?></span></h3>
|
43 |
+
<div class="inside">
|
44 |
+
|
45 |
+
<p class="description"><?php _e( 'Sepalator' , $this->ltd ); ?></p>
|
46 |
+
<?php $menu_widget = array( 'title' => '-' , 'slug' => 'separator' , 'parent_slug' => '' , 'new' => true , 'cap' => 'read' ); ?>
|
47 |
+
<?php echo $this->sidebar_menu_widget( $menu_widget ); ?>
|
48 |
+
<div class="clear"></div>
|
49 |
+
|
50 |
+
<?php foreach($Menus["menu"] as $mm) : ?>
|
51 |
+
|
52 |
+
<?php if( !empty( $mm[0] ) ) : ?>
|
53 |
+
|
54 |
+
<?php $menu_title = $mm[0]; ?>
|
55 |
<?php if( $mm[5] == 'menu-comments' ) : ?>
|
56 |
+
<?php $menu_title = __( 'Comments' ); ?>
|
57 |
<?php elseif( $mm[5] == 'menu-appearance' ) : ?>
|
58 |
+
<?php $menu_title = __( 'Appearance' ); ?>
|
59 |
<?php elseif( $mm[5] == 'menu-plugins' ) : ?>
|
60 |
+
<?php $menu_title = __( 'Plugins' ); ?>
|
61 |
<?php endif; ?>
|
62 |
+
<p class="description"><?php echo $menu_title; ?></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
+
<?php foreach($Menus["submenu"] as $parent_slug => $sub) : ?>
|
65 |
+
|
66 |
+
<?php foreach($sub as $sm) : ?>
|
67 |
|
68 |
+
<?php if( $mm[2] == $parent_slug ) : ?>
|
69 |
+
<?php $menu_title = $sm[0]; ?>
|
70 |
+
<?php if( $sm[1] == 'update_core' ) : ?>
|
71 |
+
<?php $menu_title = __( 'Update' ) . ' [update_total]'; ?>
|
72 |
+
<?php elseif( $sm[2] == 'edit-comments.php' ) : ?>
|
73 |
+
<?php $menu_title .= ' [comment_count]'; ?>
|
74 |
+
<?php elseif( $sm[2] == 'themes.php' ) : ?>
|
75 |
+
<?php $menu_title .= ' [update_themes]'; ?>
|
76 |
+
<?php elseif( $sm[2] == 'plugins.php' ) : ?>
|
77 |
+
<?php $menu_title .= ' [update_plugins]'; ?>
|
78 |
+
<?php endif; ?>
|
79 |
+
<?php $menu_widget = array( 'title' => $menu_title , 'slug' => $sm[2] , 'parent_slug' => '' , 'new' => true , 'cap' => $sm[1] , 'submenu' => '' ); ?>
|
80 |
+
<?php echo $this->sidebar_menu_widget( $menu_widget ); ?>
|
81 |
<?php endif; ?>
|
82 |
+
|
83 |
<?php endforeach; ?>
|
84 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
<?php endforeach; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
+
<div class="clear"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
+
<?php endif; ?>
|
90 |
|
91 |
<?php endforeach; ?>
|
92 |
+
|
93 |
+
</div>
|
94 |
+
|
95 |
+
</div>
|
96 |
|
|
|
97 |
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
<div id="postbox-container-2" class="postbox-container">
|
102 |
+
<div id="setting_menus">
|
103 |
|
104 |
+
<?php echo $this->set_setting_sidemenu( $Data ); ?>
|
105 |
|
106 |
</div>
|
|
|
107 |
</div>
|
108 |
+
|
109 |
+
<br class="clear">
|
110 |
|
111 |
+
</div>
|
112 |
</div>
|
113 |
|
|
|
|
|
114 |
<p class="submit">
|
115 |
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
|
116 |
</p>
|
126 |
|
127 |
<?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
|
128 |
|
|
|
|
|
|
|
|
|
|
|
129 |
<script type="text/javascript">
|
130 |
jQuery(document).ready(function($) {
|
131 |
|
132 |
+
var $Form = $("#wauc_setting_sidemenu");
|
133 |
+
var $AddInside = $('#can_menus .postbox .inside', $Form);
|
134 |
+
var $SettingInside = $('#setting_menus .postbox .inside', $Form);
|
135 |
|
136 |
$AddInside.children('.widget').draggable({
|
137 |
+
connectToSortable: '#setting_menus .postbox .inside',
|
138 |
handle: '> .widget-top > .widget-title',
|
139 |
distance: 2,
|
140 |
helper: 'clone',
|
142 |
containment: 'document',
|
143 |
stop: function(e,ui) {
|
144 |
widget_each();
|
145 |
+
menu_sortable();
|
146 |
}
|
147 |
});
|
148 |
|
149 |
+
$('#postbox-container-1', $Form).droppable({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
tolerance: 'pointer',
|
151 |
accept: function(o){
|
152 |
+
return $(o).parent().parent().parent().attr('id') != 'postbox-container-1';
|
153 |
},
|
154 |
drop: function(e,ui) {
|
155 |
ui.draggable.addClass('deleting');
|
165 |
});
|
166 |
|
167 |
|
168 |
+
var $AvailableAction = $('#postbox-container-2 .postbox .inside .widget .widget-top .widget-title-action a[href=#available]', $Form);
|
169 |
$AvailableAction.live( 'click', function() {
|
170 |
$(this).parent().parent().parent().children(".widget-inside").slideToggle();
|
171 |
return false;
|
172 |
});
|
173 |
|
174 |
+
var $RemoveAction = $('#postbox-container-2 .postbox .inside .widget .widget-inside .widget-control-actions .alignleft a[href=#remove]', $Form);
|
175 |
$RemoveAction.live( 'click', function() {
|
176 |
$(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
|
177 |
return false;
|
178 |
});
|
179 |
|
180 |
+
var menu_sortable = function menu_sortable() {
|
181 |
+
|
182 |
+
$('#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside, #wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside .widget .widget-inside .submenu').sortable({
|
183 |
+
placeholder: "widget-placeholder",
|
184 |
+
items: '> .widget',
|
185 |
+
connectWith: "#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside, #wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside .widget .widget-inside .submenu",
|
186 |
+
handle: '> .widget-top > .widget-title',
|
187 |
+
cursor: 'move',
|
188 |
+
distance: 2,
|
189 |
+
containment: 'document',
|
190 |
+
change: function(e,ui) {
|
191 |
+
var $height = ui.helper.height();
|
192 |
+
$('#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside .widget-placeholder').height($height);
|
193 |
+
},
|
194 |
+
stop: function(e,ui) {
|
195 |
+
if ( ui.item.hasClass('deleting') ) {
|
196 |
+
ui.item.remove();
|
197 |
+
}
|
198 |
+
widget_each();
|
199 |
+
},
|
200 |
+
});
|
201 |
+
|
202 |
+
}
|
203 |
+
$('#poststuff #post-body').mouseenter(function() {
|
204 |
+
menu_sortable();
|
205 |
+
});
|
206 |
+
menu_sortable();
|
207 |
|
208 |
function widget_each() {
|
209 |
var $Count = 0;
|
210 |
+
$('#wauc_setting_sidemenu #setting_menus .postbox .inside .widget').each(function() {
|
211 |
var $InputSlug = $(this).children(".widget-inside").children(".settings").children(".description").children(".slugtext");
|
212 |
var $InputTitle = $(this).children(".widget-inside").children(".settings").children("label").children(".titletext");
|
213 |
var $InputParentSlug = $(this).children(".widget-inside").children(".settings").children(".parent_slugtext");
|
231 |
}
|
232 |
widget_each();
|
233 |
|
234 |
+
$('#wauc_setting_sidemenu #setting_menus .sidebar_setting_delete a').live('click', function() {
|
235 |
+
$('#wauc_setting_sidemenu #setting_menus .postbox .inside').html('');
|
236 |
return false;
|
237 |
});
|
238 |
|
inc/setting_site.php
CHANGED
@@ -7,6 +7,7 @@ if( !empty( $_POST["update"] ) ) {
|
|
7 |
}
|
8 |
|
9 |
$Data = $this->get_data( 'site' );
|
|
|
10 |
|
11 |
// include js css
|
12 |
$ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
|
@@ -21,119 +22,106 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
21 |
<h2><?php _e( 'Site Settings' , $this->ltd ); ?></h2>
|
22 |
<p> </p>
|
23 |
|
24 |
-
<
|
|
|
|
|
25 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
26 |
-
<?php wp_nonce_field(); ?>
|
27 |
-
|
28 |
-
<div
|
29 |
-
|
30 |
-
|
31 |
-
<div
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
<
|
38 |
-
<
|
39 |
-
<
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
</div>
|
104 |
-
</div>
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
<?php $field = 'admin_bar'; ?>
|
113 |
-
<tr>
|
114 |
-
<th>
|
115 |
-
<?php echo $field; ?>
|
116 |
-
</th>
|
117 |
-
<td>
|
118 |
-
<?php $arr = array( "hide" => __( 'Hide the Admin bar on the front end' , $this->ltd ) , "front" => __( 'Apply WP Admin UI Customize settings on the front end admin bar also' , $this->ltd ) ); ?>
|
119 |
-
<select name="data[<?php echo $field; ?>]">
|
120 |
-
<option value="">-</option>
|
121 |
-
<?php foreach( $arr as $key => $label ) : ?>
|
122 |
-
<?php $Selected = ''; ?>
|
123 |
-
<?php if( !empty( $Data[$field] ) ) : ?>
|
124 |
-
<?php if( $Data[$field] == $key ) : $Selected = 'selected="selected"'; endif; ?>
|
125 |
-
<?php if( $key == "hide" && $Data[$field] == "1" ) : $Selected = 'selected="selected"'; endif; ?>
|
126 |
-
<?php endif; ?>
|
127 |
-
<option value="<?php echo $key; ?>" <?php echo $Selected; ?>><?php echo $label; ?></option>
|
128 |
-
<?php endforeach; ?>
|
129 |
-
</select>
|
130 |
-
</td>
|
131 |
-
</tr>
|
132 |
-
</tbody>
|
133 |
-
</table>
|
134 |
</div>
|
135 |
-
</div>
|
136 |
|
|
|
|
|
137 |
</div>
|
138 |
|
139 |
<p class="submit">
|
7 |
}
|
8 |
|
9 |
$Data = $this->get_data( 'site' );
|
10 |
+
$SiteSetting = get_option( $this->Record["site"] );
|
11 |
|
12 |
// include js css
|
13 |
$ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
|
22 |
<h2><?php _e( 'Site Settings' , $this->ltd ); ?></h2>
|
23 |
<p> </p>
|
24 |
|
25 |
+
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
26 |
+
|
27 |
+
<form id="wauc_setting_site" class="wauc_form" method="post" action="">
|
28 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
29 |
+
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
30 |
+
|
31 |
+
<div id="poststuff">
|
32 |
+
<div id="post-body" class="metabox-holder columns-1">
|
33 |
+
|
34 |
+
<div id="postbox-container-1" class="postbox-container">
|
35 |
+
|
36 |
+
<div id="meta_fields">
|
37 |
+
<div class="postbox">
|
38 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
39 |
+
<h3 class="hndle"><span>Meta Fields</span></h3>
|
40 |
+
<div class="inside">
|
41 |
+
<table class="form-table">
|
42 |
+
<tbody>
|
43 |
+
<?php $field = 'wp_generator'; ?>
|
44 |
+
<tr>
|
45 |
+
<th>
|
46 |
+
<label><?php echo $field; ?></label>
|
47 |
+
</th>
|
48 |
+
<td>
|
49 |
+
<?php $Checked = ''; ?>
|
50 |
+
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
51 |
+
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
52 |
+
<p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( get_the_generator( 'xhtml' ) ); ?></code></p>
|
53 |
+
</td>
|
54 |
+
</tr>
|
55 |
+
<?php $field = 'wlwmanifest_link'; ?>
|
56 |
+
<tr>
|
57 |
+
<th>
|
58 |
+
<?php echo $field; ?>
|
59 |
+
</th>
|
60 |
+
<td>
|
61 |
+
<?php $Checked = ''; ?>
|
62 |
+
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
63 |
+
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
64 |
+
<p class="description"><?php _e( 'Please display when using the Windows Live Writer.' , $this->ltd ); ?></p>
|
65 |
+
<p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="' . get_bloginfo('wpurl') . '/wp-includes/wlwmanifest.xml" />' ); ?></code></p>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
<?php $field = 'rsd_link'; ?>
|
69 |
+
<tr>
|
70 |
+
<th>
|
71 |
+
<?php echo $field; ?>
|
72 |
+
</th>
|
73 |
+
<td>
|
74 |
+
<?php $Checked = ''; ?>
|
75 |
+
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
76 |
+
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
77 |
+
<p class="description"><?php _e( 'Information of XML-rpc' , $this->ltd ); ?></p>
|
78 |
+
<p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_bloginfo('wpurl') . '"/xmlrpc.php?rsd" />' ); ?></code></p>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
<?php $field = 'feed_links'; ?>
|
82 |
+
<tr>
|
83 |
+
<th>
|
84 |
+
<?php echo $field; ?>
|
85 |
+
</th>
|
86 |
+
<td>
|
87 |
+
<?php $Checked = ''; ?>
|
88 |
+
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
89 |
+
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
90 |
+
<p class="description"><?php _e( 'Sitewide feed' , $this->ltd ); ?></p>
|
91 |
+
<p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( __('%1$s %2$s Feed') , get_bloginfo('name') , '&raquo;' ) ) . '" href="' . get_feed_link( get_default_feed() ) . ' />' ); ?></code></p>
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
+
<?php $field = 'feed_links_extra'; ?>
|
95 |
+
<tr>
|
96 |
+
<th>
|
97 |
+
<?php echo $field; ?>
|
98 |
+
</th>
|
99 |
+
<td>
|
100 |
+
<?php $Checked = ''; ?>
|
101 |
+
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
102 |
+
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
103 |
+
<p class="description"><?php _e( 'Extra feed' , $this->ltd ); ?></p>
|
104 |
+
<p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( __('%1$s %2$s Comments Feed') , get_bloginfo('name') , '&raquo;' ) ) . '" href="' . get_feed_link( get_default_feed() . '&p=***' ) . ' />' ); ?></code></p>
|
105 |
+
</td>
|
106 |
+
</tr>
|
107 |
+
</tbody>
|
108 |
+
</table>
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
|
113 |
</div>
|
|
|
114 |
|
115 |
+
<div id="postbox-container-2" class="postbox-container">
|
116 |
+
|
117 |
+
<div id="general">
|
118 |
+
<?php echo $this->set_setting_site_general( $Data ); ?>
|
119 |
+
</div>
|
120 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
</div>
|
|
|
122 |
|
123 |
+
<br class="clear">
|
124 |
+
</div>
|
125 |
</div>
|
126 |
|
127 |
<p class="submit">
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WP Admin UI Customize ===
|
2 |
Contributors: gqevu6bsiz
|
3 |
-
Donate link: http://gqevu6bsiz.chicappa.jp/please-donation/?utm_source=wporg&utm_medium=donate&utm_content=wauc&utm_campaign=
|
4 |
Tags: admin, post, posts, page, option, sitemenu, menu, custom, customize, dashboard, admin_bar
|
5 |
Requires at least: 3.4.2
|
6 |
Tested up to: 3.5.2
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
@@ -49,6 +49,12 @@ These to Customization is possible.
|
|
49 |
|
50 |
== Changelog ==
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
= 1.3.6 =
|
53 |
* Added the User roles reset.
|
54 |
* Show the User role to Sidemenu.
|
1 |
=== WP Admin UI Customize ===
|
2 |
Contributors: gqevu6bsiz
|
3 |
+
Donate link: http://gqevu6bsiz.chicappa.jp/please-donation/?utm_source=wporg&utm_medium=donate&utm_content=wauc&utm_campaign=1_3_7
|
4 |
Tags: admin, post, posts, page, option, sitemenu, menu, custom, customize, dashboard, admin_bar
|
5 |
Requires at least: 3.4.2
|
6 |
Tested up to: 3.5.2
|
7 |
+
Stable tag: 1.3.7
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
49 |
|
50 |
== Changelog ==
|
51 |
|
52 |
+
= 1.3.7 =
|
53 |
+
* Added some filters.
|
54 |
+
* Modified the HTML of some settings screen.
|
55 |
+
* Changed some initial values of stored in database.
|
56 |
+
* Added a confirmation of Nonce field.
|
57 |
+
|
58 |
= 1.3.6 =
|
59 |
* Added the User roles reset.
|
60 |
* Show the User role to Sidemenu.
|
wp-admin-ui-customize.css
CHANGED
@@ -1,9 +1,33 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
}
|
4 |
-
|
5 |
-
width:
|
6 |
-
margin-left:
|
7 |
}
|
8 |
.postbox-container .postbox .hndle {
|
9 |
cursor: default;
|
@@ -11,6 +35,9 @@
|
|
11 |
|
12 |
|
13 |
|
|
|
|
|
|
|
14 |
.postbox-container #donationbox {
|
15 |
background: #87BCE4;
|
16 |
border: 3px solid #227499;
|
@@ -34,76 +61,49 @@
|
|
34 |
|
35 |
/* sidemenu */
|
36 |
|
37 |
-
#
|
38 |
-
margin-left: 500px;
|
39 |
-
}
|
40 |
-
#sidemenu-holder #postbox-container-1 {
|
41 |
-
display: inline;
|
42 |
-
width: 470px;
|
43 |
-
margin-left: -500px;
|
44 |
-
clear: both;
|
45 |
-
float: left;
|
46 |
-
}
|
47 |
-
#sidemenu-holder #postbox-container-2 {
|
48 |
-
width: auto;
|
49 |
-
float: left;
|
50 |
-
min-width: 100%;
|
51 |
-
margin: 0 5% 0 0;
|
52 |
-
}
|
53 |
-
#sidemenu-holder .postbox .inside {
|
54 |
padding: 10px;
|
55 |
}
|
56 |
-
#
|
57 |
width: auto;
|
58 |
}
|
59 |
-
#
|
60 |
opacity: 0.7;
|
61 |
font-weight: normal;
|
62 |
}
|
63 |
-
#
|
64 |
margin-bottom: 12px;
|
65 |
}
|
66 |
-
#
|
67 |
padding: 5px 5px 20px 5px;
|
68 |
border: 1px solid #DFDFDF;
|
69 |
}
|
70 |
-
#
|
71 |
width: 300px;
|
72 |
}
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
#
|
77 |
-
#sidemenu-holder #postbox-container-1 .postbox .inside .widget.separator .widget-top .widget-title-action,
|
78 |
-
#sidemenu-holder #postbox-container-2 .postbox .inside .widget .widget-inside .submenu,
|
79 |
-
#sidemenu-holder #postbox-container-2 .postbox .inside .widget .widget-inside .widget-control-actions,
|
80 |
-
#sidemenu-holder #postbox-container-1 .postbox .inside .widget .widget-inside .submenu .widget .widget-inside .submenu {
|
81 |
display: none;
|
82 |
}
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
#sidemenu-holder #postbox-container-2 .postbox .inside h3 {
|
87 |
-
cursor: default;
|
88 |
-
border-bottom: none;
|
89 |
-
}
|
90 |
-
#sidemenu-holder #postbox-container-2 .postbox .inside .widget {
|
91 |
width: 170px;
|
92 |
float: left;
|
93 |
margin: 0 4px 4px 0;
|
94 |
}
|
95 |
|
96 |
-
|
97 |
-
#sidemenu-holder #postbox-container-1 .postbox .inside .settings ul.display_roles {
|
98 |
display: block;
|
99 |
}
|
100 |
-
#
|
101 |
display: inline-block;
|
102 |
-
color: #
|
|
|
103 |
}
|
104 |
-
#
|
105 |
font-weight: bold;
|
106 |
-
background: #eaeaea;
|
107 |
color: #000;
|
108 |
}
|
109 |
|
@@ -112,39 +112,34 @@
|
|
112 |
|
113 |
/* admin_bar */
|
114 |
|
115 |
-
|
116 |
-
#
|
|
|
117 |
padding: 10px;
|
118 |
}
|
119 |
-
#
|
120 |
width: auto;
|
121 |
}
|
122 |
-
#
|
123 |
opacity: 0.7;
|
124 |
font-weight: normal;
|
125 |
}
|
126 |
-
#
|
127 |
padding: 5px 5px 20px 5px;
|
128 |
border: 1px solid #DFDFDF;
|
129 |
margin: 8px 0 0 0;
|
130 |
}
|
131 |
-
#admin_bar-holder .postbox .inside .widget .widget-inside input.regular-text {
|
132 |
-
width: 90%;
|
133 |
-
}
|
134 |
|
135 |
-
#
|
136 |
height: auto;
|
137 |
}
|
138 |
-
#
|
139 |
line-height: 18px;
|
140 |
}
|
141 |
-
#
|
142 |
-
|
143 |
-
|
144 |
-
#
|
145 |
-
#admin_bar-holder .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
|
146 |
-
#admin_bar-holder .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
|
147 |
-
#admin_bar-holder .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon {
|
148 |
width: 20px;
|
149 |
height: 20px;
|
150 |
background-repeat: no-repeat;
|
@@ -152,34 +147,31 @@
|
|
152 |
float: left;
|
153 |
margin: 0 2px 0 0;
|
154 |
}
|
155 |
-
#
|
156 |
background-position: 0 -104px;
|
157 |
}
|
158 |
-
#
|
159 |
background-position: -2px -159px;
|
160 |
}
|
161 |
-
#
|
162 |
background-position: -2px -135px;
|
163 |
}
|
164 |
-
#
|
165 |
background-position: -2px -202px;
|
166 |
}
|
167 |
|
168 |
|
169 |
-
#
|
170 |
-
#
|
171 |
-
#waum_setting_admin_bar_menu .columns-1 .postbox .inside .widget .widget-inside .widget-control-actions,
|
172 |
-
#admin_bar-holder .postbox .inside .widget.separator .widget-top .widget-title-action,
|
173 |
-
#admin_bar-holder .postbox .inside .widget .widget-inside .submenu .widget .widget-inside .submenu {
|
174 |
display: none;
|
175 |
}
|
176 |
|
177 |
|
178 |
-
#
|
179 |
cursor: default;
|
180 |
border-bottom: none;
|
181 |
}
|
182 |
-
#
|
183 |
width: 170px;
|
184 |
float: left;
|
185 |
margin: 0 4px 4px 0;
|
1 |
+
/* layout */
|
2 |
+
|
3 |
+
|
4 |
+
#poststuff #post-body.columns-2 {
|
5 |
+
margin-right: 400px;
|
6 |
+
}
|
7 |
+
#post-body.columns-2 #postbox-container-1 {
|
8 |
+
margin-right: -400px;
|
9 |
+
width: 380px;
|
10 |
+
}
|
11 |
+
|
12 |
+
#wauc_setting_admin_bar_menu #poststuff #post-body.columns-2 {
|
13 |
+
margin-right: 50%;
|
14 |
+
}
|
15 |
+
#wauc_setting_admin_bar_menu #post-body.columns-2 #postbox-container-1 {
|
16 |
+
margin-right: -100%;
|
17 |
+
width: 98%;
|
18 |
+
}
|
19 |
+
|
20 |
+
#wauc_setting_sidemenu #poststuff #post-body {
|
21 |
+
margin-right: auto;
|
22 |
+
margin-left: 500px;
|
23 |
+
}
|
24 |
+
#wauc_setting_sidemenu #poststuff #post-body #postbox-container-1 {
|
25 |
+
margin-right: auto;
|
26 |
+
width: 100%;
|
27 |
}
|
28 |
+
#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 {
|
29 |
+
width: 480px;
|
30 |
+
margin-left: -500px
|
31 |
}
|
32 |
.postbox-container .postbox .hndle {
|
33 |
cursor: default;
|
35 |
|
36 |
|
37 |
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
.postbox-container #donationbox {
|
42 |
background: #87BCE4;
|
43 |
border: 3px solid #227499;
|
61 |
|
62 |
/* sidemenu */
|
63 |
|
64 |
+
#wauc_setting_sidemenu .postbox .inside {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
padding: 10px;
|
66 |
}
|
67 |
+
#wauc_setting_sidemenu .postbox .inside .widget-placeholder {
|
68 |
width: auto;
|
69 |
}
|
70 |
+
#wauc_setting_sidemenu .postbox .inside .widget .widget-top .widget-title .in-widget-title {
|
71 |
opacity: 0.7;
|
72 |
font-weight: normal;
|
73 |
}
|
74 |
+
#wauc_setting_sidemenu .postbox .inside .widget .widget-inside .settings {
|
75 |
margin-bottom: 12px;
|
76 |
}
|
77 |
+
#wauc_setting_sidemenu .postbox .inside .widget .widget-inside .submenu {
|
78 |
padding: 5px 5px 20px 5px;
|
79 |
border: 1px solid #DFDFDF;
|
80 |
}
|
81 |
+
#wauc_setting_sidemenu .postbox .inside .widget .widget-inside input.regular-text {
|
82 |
width: 300px;
|
83 |
}
|
84 |
|
85 |
+
#wauc_setting_sidemenu #can_menus .postbox .inside .widget .widget-top .widget-title-action,
|
86 |
+
#wauc_setting_sidemenu #setting_menus .postbox .inside .widget.separator .widget-top .widget-title-action,
|
87 |
+
#wauc_setting_sidemenu #setting_menus .postbox .inside .widget .widget-inside .submenu .widget .widget-inside .submenu {
|
|
|
|
|
|
|
|
|
88 |
display: none;
|
89 |
}
|
90 |
|
91 |
+
#wauc_setting_sidemenu #can_menus .postbox .inside .widget {
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
width: 170px;
|
93 |
float: left;
|
94 |
margin: 0 4px 4px 0;
|
95 |
}
|
96 |
|
97 |
+
#wauc_setting_sidemenu #setting_menus .postbox .inside .settings ul.display_roles {
|
|
|
98 |
display: block;
|
99 |
}
|
100 |
+
#wauc_setting_sidemenu #setting_menus .postbox .inside .settings ul.display_roles li {
|
101 |
display: inline-block;
|
102 |
+
color: #DDD;
|
103 |
+
margin-right: 6px;
|
104 |
}
|
105 |
+
#wauc_setting_sidemenu #setting_menus .postbox .inside .settings ul.display_roles li.has_cap {
|
106 |
font-weight: bold;
|
|
|
107 |
color: #000;
|
108 |
}
|
109 |
|
112 |
|
113 |
/* admin_bar */
|
114 |
|
115 |
+
|
116 |
+
#wauc_setting_admin_bar_menu {}
|
117 |
+
#wauc_setting_admin_bar_menu .postbox .inside {
|
118 |
padding: 10px;
|
119 |
}
|
120 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget-placeholder {
|
121 |
width: auto;
|
122 |
}
|
123 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget .widget-top .widget-title .in-widget-title {
|
124 |
opacity: 0.7;
|
125 |
font-weight: normal;
|
126 |
}
|
127 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget .widget-inside .submenu {
|
128 |
padding: 5px 5px 20px 5px;
|
129 |
border: 1px solid #DFDFDF;
|
130 |
margin: 8px 0 0 0;
|
131 |
}
|
|
|
|
|
|
|
132 |
|
133 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget .widget-top {
|
134 |
height: auto;
|
135 |
}
|
136 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget .widget-top .widget-title h4 {
|
137 |
line-height: 18px;
|
138 |
}
|
139 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon,
|
140 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
|
141 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
|
142 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon {
|
|
|
|
|
|
|
143 |
width: 20px;
|
144 |
height: 20px;
|
145 |
background-repeat: no-repeat;
|
147 |
float: left;
|
148 |
margin: 0 2px 0 0;
|
149 |
}
|
150 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon {
|
151 |
background-position: 0 -104px;
|
152 |
}
|
153 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon {
|
154 |
background-position: -2px -159px;
|
155 |
}
|
156 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon {
|
157 |
background-position: -2px -135px;
|
158 |
}
|
159 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon {
|
160 |
background-position: -2px -202px;
|
161 |
}
|
162 |
|
163 |
|
164 |
+
#wauc_setting_admin_bar_menu #can_menus .postbox .inside .widget .widget-top .widget-title-action,
|
165 |
+
#wauc_setting_admin_bar_menu .postbox .inside .widget .widget-inside .submenu .widget .widget-inside .submenu {
|
|
|
|
|
|
|
166 |
display: none;
|
167 |
}
|
168 |
|
169 |
|
170 |
+
#wauc_setting_admin_bar_menu .columns-1 .postbox .inside h3 {
|
171 |
cursor: default;
|
172 |
border-bottom: none;
|
173 |
}
|
174 |
+
#wauc_setting_admin_bar_menu .columns-1 .postbox .inside .widget {
|
175 |
width: 170px;
|
176 |
float: left;
|
177 |
margin: 0 4px 4px 0;
|
wp-admin-ui-customize.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
jQuery(document).ready(function($) {
|
2 |
|
3 |
-
var $Form = $(".
|
4 |
|
5 |
$('.handlediv' , $Form).live( 'click', function() {
|
6 |
$(this).parent().toggleClass('closed');
|
1 |
jQuery(document).ready(function($) {
|
2 |
|
3 |
+
var $Form = $(".wauc_form");
|
4 |
|
5 |
$('.handlediv' , $Form).live( 'click', function() {
|
6 |
$(this).parent().toggleClass('closed');
|
wp-admin-ui-customize.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
/*
|
3 |
Plugin Name: WP Admin UI Customize
|
4 |
Description: An excellent plugin to customize the management screens.
|
5 |
-
Plugin URI: http://wpadminuicustomize.com/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=
|
6 |
-
Version: 1.3.
|
7 |
Author: gqevu6bsiz
|
8 |
-
Author URI: http://gqevu6bsiz.chicappa.jp/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=
|
9 |
Text Domain: wauc
|
10 |
Domain Path: /languages
|
11 |
*/
|
@@ -39,17 +39,14 @@ class WP_Admin_UI_Customize
|
|
39 |
$ltd,
|
40 |
$Record,
|
41 |
$PageSlug,
|
|
|
42 |
$UPFN,
|
43 |
$DonateKey,
|
44 |
-
$Menu,
|
45 |
-
$SubMenu,
|
46 |
-
$Admin_bar,
|
47 |
-
$Roles,
|
48 |
$Msg;
|
49 |
|
50 |
|
51 |
function __construct() {
|
52 |
-
$this->Ver = '1.3.
|
53 |
$this->Name = 'WP Admin UI Customize';
|
54 |
$this->Dir = WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) . '/';
|
55 |
$this->Site = 'http://wpadminuicustomize.com/';
|
@@ -62,7 +59,9 @@ class WP_Admin_UI_Customize
|
|
62 |
"admin_general" => $this->ltd . '_admin_general_setting',
|
63 |
"dashboard" => $this->ltd . '_dashboard_setting',
|
64 |
"admin_bar_menu" => $this->ltd . '_admin_bar_menu_setting',
|
|
|
65 |
"sidemenu" => $this->ltd . '_sidemenu_setting',
|
|
|
66 |
"removemetabox" => $this->ltd . '_removemetabox_setting',
|
67 |
"regist_metabox" => $this->ltd . '_regist_metabox',
|
68 |
"post_add_edit" => $this->ltd . '_post_add_edit_setting',
|
@@ -71,6 +70,7 @@ class WP_Admin_UI_Customize
|
|
71 |
"donate" => $this->ltd . '_donated',
|
72 |
);
|
73 |
$this->PageSlug = 'wp_admin_ui_customize';
|
|
|
74 |
$this->UPFN = 'Y';
|
75 |
$this->DonateKey = 'd77aec9bc89d445fd54b4c988d090f03';
|
76 |
|
@@ -96,6 +96,9 @@ class WP_Admin_UI_Customize
|
|
96 |
|
97 |
// add menu
|
98 |
add_action( 'admin_menu' , array( $this , 'admin_menu' ) , 2 );
|
|
|
|
|
|
|
99 |
}
|
100 |
|
101 |
// PluginSetup
|
@@ -147,7 +150,6 @@ class WP_Admin_UI_Customize
|
|
147 |
// SettingPage
|
148 |
function setting_site() {
|
149 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
150 |
-
$this->settingCheck();
|
151 |
$this->DisplayDonation();
|
152 |
include_once 'inc/setting_site.php';
|
153 |
}
|
@@ -155,7 +157,6 @@ class WP_Admin_UI_Customize
|
|
155 |
// SettingPage
|
156 |
function setting_admin_general() {
|
157 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
158 |
-
$this->settingCheck();
|
159 |
$this->DisplayDonation();
|
160 |
include_once 'inc/setting_admin_general.php';
|
161 |
}
|
@@ -163,7 +164,6 @@ class WP_Admin_UI_Customize
|
|
163 |
// SettingPage
|
164 |
function setting_dashboard() {
|
165 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
166 |
-
$this->settingCheck();
|
167 |
$this->DisplayDonation();
|
168 |
include_once 'inc/setting_dashboard.php';
|
169 |
}
|
@@ -171,7 +171,6 @@ class WP_Admin_UI_Customize
|
|
171 |
// SettingPage
|
172 |
function setting_admin_bar_menu() {
|
173 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
174 |
-
$this->settingCheck();
|
175 |
$this->DisplayDonation();
|
176 |
include_once 'inc/setting_admin_bar_menu.php';
|
177 |
}
|
@@ -179,7 +178,6 @@ class WP_Admin_UI_Customize
|
|
179 |
// SettingPage
|
180 |
function setting_sidemenu() {
|
181 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
182 |
-
$this->settingCheck();
|
183 |
$this->DisplayDonation();
|
184 |
include_once 'inc/setting_sidemenu.php';
|
185 |
}
|
@@ -187,7 +185,6 @@ class WP_Admin_UI_Customize
|
|
187 |
// SettingPage
|
188 |
function setting_removemtabox() {
|
189 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
190 |
-
$this->settingCheck();
|
191 |
$this->DisplayDonation();
|
192 |
include_once 'inc/setting_removemtabox.php';
|
193 |
}
|
@@ -195,7 +192,6 @@ class WP_Admin_UI_Customize
|
|
195 |
// SettingPage
|
196 |
function setting_post_add_edit() {
|
197 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
198 |
-
$this->settingCheck();
|
199 |
$this->DisplayDonation();
|
200 |
include_once 'inc/setting_post_add_edit.php';
|
201 |
}
|
@@ -203,7 +199,6 @@ class WP_Admin_UI_Customize
|
|
203 |
// SettingPage
|
204 |
function setting_appearance_menus() {
|
205 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
206 |
-
$this->settingCheck();
|
207 |
$this->DisplayDonation();
|
208 |
include_once 'inc/setting_appearance_menus.php';
|
209 |
}
|
@@ -211,7 +206,6 @@ class WP_Admin_UI_Customize
|
|
211 |
// SettingPage
|
212 |
function setting_loginscreen() {
|
213 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
214 |
-
$this->settingCheck();
|
215 |
$this->DisplayDonation();
|
216 |
include_once 'inc/setting_loginscreen.php';
|
217 |
}
|
@@ -232,6 +226,7 @@ class WP_Admin_UI_Customize
|
|
232 |
// GetData
|
233 |
function get_data( $record ) {
|
234 |
$GetData = get_option( $this->Record[$record] );
|
|
|
235 |
|
236 |
$Data = array();
|
237 |
if( !empty( $GetData ) && !empty( $GetData["UPFN"] ) && $GetData["UPFN"] == $this->UPFN ) {
|
@@ -245,12 +240,16 @@ class WP_Admin_UI_Customize
|
|
245 |
|
246 |
// Settingcheck
|
247 |
function settingCheck() {
|
|
|
|
|
248 |
$Data = $this->get_data( 'user_role' );
|
249 |
if( !empty( $Data["UPFN"] ) ) {
|
250 |
unset( $Data["UPFN"] );
|
251 |
}
|
252 |
if( empty( $Data ) ) {
|
253 |
-
$
|
|
|
|
|
254 |
}
|
255 |
}
|
256 |
|
@@ -262,44 +261,110 @@ class WP_Admin_UI_Customize
|
|
262 |
function get_user_role() {
|
263 |
$editable_roles = get_editable_roles();
|
264 |
foreach ( $editable_roles as $role => $details ) {
|
265 |
-
$
|
266 |
}
|
267 |
|
268 |
-
return $
|
269 |
}
|
270 |
|
271 |
// SetList
|
272 |
-
function
|
273 |
-
|
274 |
-
$
|
275 |
-
|
276 |
-
$Roles[$u_role] = get_role( $u_role );
|
277 |
-
$Roles[$u_role]->label = $u_name;
|
278 |
-
}
|
279 |
|
280 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
}
|
282 |
|
283 |
// SetList
|
284 |
function sidemenu_default_load() {
|
285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
|
287 |
-
$this->Menu = $menu;
|
288 |
-
$this->SubMenu = $submenu;
|
289 |
-
|
290 |
}
|
291 |
|
292 |
// SetList
|
293 |
function admin_bar_default_load( $wp_admin_bar ) {
|
294 |
-
|
295 |
-
|
296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
|
298 |
}
|
299 |
|
300 |
// SetList
|
301 |
function admin_bar_filter_load() {
|
302 |
-
$
|
|
|
303 |
|
304 |
$Delete_bar = array( "user-actions" , "wp-logo-external" , "top-secondary" , "my-sites-super-admin" , "my-sites-list" );
|
305 |
foreach( $Delete_bar as $del_name ) {
|
@@ -307,12 +372,14 @@ class WP_Admin_UI_Customize
|
|
307 |
unset( $Default_bar[$del_name] );
|
308 |
}
|
309 |
}
|
310 |
-
|
311 |
-
|
312 |
-
|
|
|
|
|
313 |
}
|
314 |
}
|
315 |
-
|
316 |
// front
|
317 |
$Default_bar["dashboard"] = (object) array( "id" => "dashboard" , "title" => __( 'Dashboard' ) , "parent" => "site-name" , "href" => admin_url() );
|
318 |
|
@@ -370,8 +437,6 @@ class WP_Admin_UI_Customize
|
|
370 |
$Filter_bar[$menu_type]["sub"][$node_id] = $node;
|
371 |
unset( $Default_bar[$node_id] );
|
372 |
}
|
373 |
-
|
374 |
-
|
375 |
}
|
376 |
}
|
377 |
|
@@ -382,10 +447,7 @@ class WP_Admin_UI_Customize
|
|
382 |
function post_meta_boxes_load() {
|
383 |
global $current_screen;
|
384 |
|
385 |
-
$
|
386 |
-
if( !empty( $User->roles[0] ) ) {
|
387 |
-
$UserRole = $User->roles[0];
|
388 |
-
}
|
389 |
|
390 |
if( $current_screen->base == 'post' && $current_screen->action != 'add' && $UserRole == 'administrator' ) {
|
391 |
if( $current_screen->post_type == 'post' or $current_screen->post_type == 'page' ) {
|
@@ -438,217 +500,221 @@ class WP_Admin_UI_Customize
|
|
438 |
|
439 |
|
440 |
// SetList
|
441 |
-
function
|
|
|
442 |
$new_widget = '';
|
443 |
if( !empty( $menu_widget["new"] ) ) {
|
444 |
$new_widget = 'new';
|
445 |
}
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
</div>
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
557 |
}
|
558 |
|
559 |
// SetList
|
560 |
function admin_bar_menu_widget( $menu_widget ) {
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
<?php endif; ?>
|
641 |
-
</div>
|
642 |
-
<div class="widget-control-actions">
|
643 |
-
<div class="alignleft">
|
644 |
-
<a href="#remove"><?php _e( 'Remove' ); ?></a>
|
645 |
-
</div>
|
646 |
-
<div class="clear"></div>
|
647 |
-
</div>
|
648 |
-
</div>
|
649 |
-
|
650 |
-
</div>
|
651 |
-
<?php
|
652 |
}
|
653 |
|
654 |
// SetList
|
@@ -720,7 +786,7 @@ class WP_Admin_UI_Customize
|
|
720 |
}
|
721 |
|
722 |
// SetList
|
723 |
-
function
|
724 |
$UserRole = '';
|
725 |
$User = wp_get_current_user();
|
726 |
if( !empty( $User->roles ) ) {
|
@@ -732,6 +798,510 @@ class WP_Admin_UI_Customize
|
|
732 |
return $UserRole;
|
733 |
}
|
734 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
735 |
|
736 |
|
737 |
// DataUpdate
|
@@ -751,8 +1321,9 @@ class WP_Admin_UI_Customize
|
|
751 |
// DataUpdate
|
752 |
function update_reset( $record ) {
|
753 |
$Update = $this->update_validate();
|
754 |
-
if( !empty( $Update ) ) {
|
755 |
-
|
|
|
756 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
757 |
}
|
758 |
}
|
@@ -766,7 +1337,7 @@ class WP_Admin_UI_Customize
|
|
766 |
$SubmitKey = md5( strip_tags( $_POST["donate_key"] ) );
|
767 |
if( $this->DonateKey == $SubmitKey ) {
|
768 |
update_option( $this->Record["donate"] , $SubmitKey );
|
769 |
-
$this->Msg .= '<div class="updated"><p><strong>' . __( 'Thank you for your donation.' , $this->
|
770 |
}
|
771 |
}
|
772 |
}
|
@@ -776,7 +1347,7 @@ class WP_Admin_UI_Customize
|
|
776 |
// DataUpdate
|
777 |
function update_userrole() {
|
778 |
$Update = $this->update_validate();
|
779 |
-
if( !empty( $Update ) ) {
|
780 |
|
781 |
if( !empty( $_POST["data"]["user_role"] ) ) {
|
782 |
foreach($_POST["data"]["user_role"] as $key => $val) {
|
@@ -794,7 +1365,7 @@ class WP_Admin_UI_Customize
|
|
794 |
// DataUpdate
|
795 |
function update_site() {
|
796 |
$Update = $this->update_validate();
|
797 |
-
if( !empty( $Update ) ) {
|
798 |
|
799 |
if( !empty( $_POST["data"] ) ) {
|
800 |
foreach($_POST["data"] as $key => $val) {
|
@@ -804,7 +1375,8 @@ class WP_Admin_UI_Customize
|
|
804 |
}
|
805 |
}
|
806 |
|
807 |
-
|
|
|
808 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
809 |
}
|
810 |
}
|
@@ -812,7 +1384,7 @@ class WP_Admin_UI_Customize
|
|
812 |
// DataUpdate
|
813 |
function update_admin_general() {
|
814 |
$Update = $this->update_validate();
|
815 |
-
if( !empty( $Update ) ) {
|
816 |
|
817 |
if( !empty( $_POST["data"] ) ) {
|
818 |
foreach($_POST["data"] as $key => $val) {
|
@@ -822,7 +1394,8 @@ class WP_Admin_UI_Customize
|
|
822 |
}
|
823 |
}
|
824 |
|
825 |
-
|
|
|
826 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
827 |
}
|
828 |
}
|
@@ -830,7 +1403,7 @@ class WP_Admin_UI_Customize
|
|
830 |
// DataUpdate
|
831 |
function update_dashboard() {
|
832 |
$Update = $this->update_validate();
|
833 |
-
if( !empty( $Update ) ) {
|
834 |
|
835 |
if( !empty( $_POST["data"] ) ) {
|
836 |
foreach($_POST["data"] as $key => $val) {
|
@@ -840,7 +1413,8 @@ class WP_Admin_UI_Customize
|
|
840 |
}
|
841 |
}
|
842 |
|
843 |
-
|
|
|
844 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
845 |
}
|
846 |
}
|
@@ -848,7 +1422,7 @@ class WP_Admin_UI_Customize
|
|
848 |
// DataUpdate
|
849 |
function update_admin_bar_menu() {
|
850 |
$Update = $this->update_validate();
|
851 |
-
if( !empty( $Update ) ) {
|
852 |
|
853 |
if( !empty( $_POST["data"] ) ) {
|
854 |
foreach($_POST["data"] as $boxtype => $nodes) {
|
@@ -872,14 +1446,15 @@ class WP_Admin_UI_Customize
|
|
872 |
$parent = strip_tags( $node["parent"] );
|
873 |
$depth = 'sub';
|
874 |
}
|
875 |
-
|
876 |
$Update[$boxtype][$depth][] = array( "id" => $id , "title" => $title , "href" => $href , "parent" => $parent );
|
877 |
}
|
878 |
}
|
879 |
}
|
880 |
}
|
881 |
|
882 |
-
|
|
|
883 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
884 |
}
|
885 |
}
|
@@ -887,7 +1462,7 @@ class WP_Admin_UI_Customize
|
|
887 |
// DataUpdate
|
888 |
function update_sidemenu() {
|
889 |
$Update = $this->update_validate();
|
890 |
-
if( !empty( $Update ) ) {
|
891 |
|
892 |
if( !empty( $_POST["data"] ) ) {
|
893 |
foreach($_POST["data"] as $menu) {
|
@@ -901,13 +1476,14 @@ class WP_Admin_UI_Customize
|
|
901 |
$parent_slug = strip_tags( $menu["parent_slug"] );
|
902 |
$depth = 'sub';
|
903 |
}
|
904 |
-
|
905 |
$Update[$depth][] = array( "slug" => $slug , "title" => $title , "parent_slug" => $parent_slug );
|
906 |
}
|
907 |
}
|
908 |
}
|
909 |
|
910 |
-
|
|
|
911 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
912 |
}
|
913 |
}
|
@@ -915,7 +1491,7 @@ class WP_Admin_UI_Customize
|
|
915 |
// DataUpdate
|
916 |
function update_removemetabox() {
|
917 |
$Update = $this->update_validate();
|
918 |
-
if( !empty( $Update ) ) {
|
919 |
|
920 |
if( !empty( $_POST["data"] ) ) {
|
921 |
foreach($_POST["data"] as $post_type => $val) {
|
@@ -927,11 +1503,12 @@ class WP_Admin_UI_Customize
|
|
927 |
$Update[$post_type][$tmpK] = $tmpV;
|
928 |
}
|
929 |
}
|
930 |
-
|
931 |
}
|
932 |
}
|
933 |
|
934 |
-
|
|
|
935 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
936 |
}
|
937 |
}
|
@@ -939,7 +1516,7 @@ class WP_Admin_UI_Customize
|
|
939 |
// DataUpdate
|
940 |
function update_post_add_edit() {
|
941 |
$Update = $this->update_validate();
|
942 |
-
if( !empty( $Update ) ) {
|
943 |
|
944 |
if( !empty( $_POST["data"] ) ) {
|
945 |
foreach($_POST["data"] as $edited => $val) {
|
@@ -949,7 +1526,8 @@ class WP_Admin_UI_Customize
|
|
949 |
}
|
950 |
}
|
951 |
|
952 |
-
|
|
|
953 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
954 |
}
|
955 |
}
|
@@ -957,7 +1535,7 @@ class WP_Admin_UI_Customize
|
|
957 |
// DataUpdate
|
958 |
function update_appearance_menus() {
|
959 |
$Update = $this->update_validate();
|
960 |
-
if( !empty( $Update ) ) {
|
961 |
|
962 |
if( !empty( $_POST["data"] ) ) {
|
963 |
foreach($_POST["data"] as $edited => $val) {
|
@@ -967,7 +1545,8 @@ class WP_Admin_UI_Customize
|
|
967 |
}
|
968 |
}
|
969 |
|
970 |
-
|
|
|
971 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
972 |
}
|
973 |
}
|
@@ -975,7 +1554,7 @@ class WP_Admin_UI_Customize
|
|
975 |
// DataUpdate
|
976 |
function update_loginscreen() {
|
977 |
$Update = $this->update_validate();
|
978 |
-
if( !empty( $Update ) ) {
|
979 |
|
980 |
if( !empty( $_POST["data"] ) ) {
|
981 |
foreach($_POST["data"] as $key => $val) {
|
@@ -985,7 +1564,8 @@ class WP_Admin_UI_Customize
|
|
985 |
}
|
986 |
}
|
987 |
|
988 |
-
|
|
|
989 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
990 |
|
991 |
}
|
@@ -999,20 +1579,20 @@ class WP_Admin_UI_Customize
|
|
999 |
function FilterStart() {
|
1000 |
// site
|
1001 |
if( !is_admin() ) {
|
1002 |
-
add_action( '
|
1003 |
add_filter( 'login_headerurl' , array( $this , 'login_headerurl' ) );
|
1004 |
add_filter( 'login_headertitle' , array( $this , 'login_headertitle' ) );
|
1005 |
add_action( 'login_head' , array( $this , 'login_head' ) );
|
1006 |
add_action( 'login_footer' , array( $this , 'login_footer' ) );
|
1007 |
|
1008 |
// front init
|
1009 |
-
add_action( '
|
1010 |
}
|
|
|
1011 |
// admin UI
|
1012 |
-
if
|
1013 |
-
|
1014 |
// default side menu load.
|
1015 |
-
add_action( '
|
1016 |
|
1017 |
// default admin bar menu load.
|
1018 |
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_default_load' ) , 1 );
|
@@ -1021,8 +1601,7 @@ class WP_Admin_UI_Customize
|
|
1021 |
add_action( 'admin_head' , array( $this , 'post_meta_boxes_load' ) , 10 );
|
1022 |
|
1023 |
// admin init
|
1024 |
-
add_action( '
|
1025 |
-
|
1026 |
}
|
1027 |
}
|
1028 |
|
@@ -1030,15 +1609,17 @@ class WP_Admin_UI_Customize
|
|
1030 |
function admin_init() {
|
1031 |
|
1032 |
$SettingRole = $this->get_data( 'user_role' );
|
|
|
|
|
1033 |
if( !empty( $SettingRole ) ) {
|
1034 |
unset($SettingRole["UPFN"]);
|
1035 |
|
1036 |
-
$UserRole = $this->
|
1037 |
|
1038 |
-
if( !is_network_admin() && !empty( $UserRole) ) {
|
1039 |
if( array_key_exists( $UserRole , $SettingRole ) ) {
|
1040 |
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_menu') , 25 );
|
1041 |
-
add_action( '
|
1042 |
add_action( 'admin_head' , array( $this , 'remove_tab' ) );
|
1043 |
add_filter( 'admin_footer_text' , array( $this , 'admin_footer_text' ) );
|
1044 |
add_action( 'admin_print_styles' , array( $this , 'load_css' ) );
|
@@ -1058,10 +1639,12 @@ class WP_Admin_UI_Customize
|
|
1058 |
function front_init() {
|
1059 |
|
1060 |
$SettingRole = $this->get_data( 'user_role' );
|
|
|
|
|
1061 |
if( !empty( $SettingRole ) ) {
|
1062 |
unset($SettingRole["UPFN"]);
|
1063 |
|
1064 |
-
$UserRole = $this->
|
1065 |
|
1066 |
if( !is_network_admin() && !empty( $UserRole ) ) {
|
1067 |
if( array_key_exists( $UserRole , $SettingRole ) ) {
|
@@ -1069,7 +1652,7 @@ class WP_Admin_UI_Customize
|
|
1069 |
$GetData = $this->get_data( 'site' );
|
1070 |
|
1071 |
if( !empty( $GetData["admin_bar"] ) ) {
|
1072 |
-
if( $GetData["admin_bar"] == "
|
1073 |
add_filter( 'show_admin_bar' , '__return_false' );
|
1074 |
} elseif( $GetData["admin_bar"] == "front" ) {
|
1075 |
add_action( 'init' , array( $this , 'notice_dismiss' ) , 2 );
|
@@ -1083,7 +1666,7 @@ class WP_Admin_UI_Customize
|
|
1083 |
|
1084 |
// FilterStart
|
1085 |
function remove_action_front() {
|
1086 |
-
$GetData = $this->
|
1087 |
|
1088 |
if( !empty( $GetData["UPFN"] ) ) {
|
1089 |
unset( $GetData["UPFN"] );
|
@@ -1291,7 +1874,7 @@ class WP_Admin_UI_Customize
|
|
1291 |
|
1292 |
// FilterStart
|
1293 |
function remove_tab() {
|
1294 |
-
$GetData =
|
1295 |
|
1296 |
if( !empty( $GetData["UPFN"] ) ) {
|
1297 |
unset( $GetData["UPFN"] );
|
@@ -1324,7 +1907,7 @@ class WP_Admin_UI_Customize
|
|
1324 |
|
1325 |
// FilterStart
|
1326 |
function load_css() {
|
1327 |
-
$GetData =
|
1328 |
|
1329 |
if( !empty( $GetData["UPFN"] ) ) {
|
1330 |
unset( $GetData["UPFN"] );
|
@@ -1345,14 +1928,16 @@ class WP_Admin_UI_Customize
|
|
1345 |
function wp_dashboard_setup() {
|
1346 |
global $wp_meta_boxes;
|
1347 |
|
1348 |
-
$GetData =
|
1349 |
|
1350 |
if( !empty( $GetData ) && is_array( $GetData ) ) {
|
1351 |
unset($GetData["UPFN"]);
|
1352 |
$dashboard_widgets = array();
|
1353 |
foreach($wp_meta_boxes["dashboard"] as $ns => $core) {
|
1354 |
-
|
1355 |
-
$
|
|
|
|
|
1356 |
}
|
1357 |
}
|
1358 |
|
@@ -1365,7 +1950,7 @@ class WP_Admin_UI_Customize
|
|
1365 |
} elseif( array_key_exists( $id , $dashboard_widgets ) ){
|
1366 |
remove_meta_box( $id , 'dashboard' , $dashboard_widgets[$id] );
|
1367 |
} elseif( $id == 'metabox_move' ) {
|
1368 |
-
wp_enqueue_script( 'not-move' , $this->Dir . 'js/dashboard/not_move.js' , array( 'jquery' , 'jquery-ui-sortable' ) , $this->Ver , true );
|
1369 |
}
|
1370 |
}
|
1371 |
}
|
@@ -1377,7 +1962,7 @@ class WP_Admin_UI_Customize
|
|
1377 |
global $wp_meta_boxes;
|
1378 |
global $current_screen;
|
1379 |
|
1380 |
-
$GetData =
|
1381 |
|
1382 |
if( !empty( $GetData["UPFN"] ) ) {
|
1383 |
unset( $GetData["UPFN"] );
|
@@ -1422,8 +2007,9 @@ class WP_Admin_UI_Customize
|
|
1422 |
|
1423 |
// FilterStart
|
1424 |
function remove_postformats() {
|
1425 |
-
|
1426 |
-
|
|
|
1427 |
|
1428 |
if( !empty( $GetData["UPFN"] ) ) {
|
1429 |
unset( $GetData["UPFN"] );
|
@@ -1445,8 +2031,8 @@ class WP_Admin_UI_Customize
|
|
1445 |
global $menu;
|
1446 |
global $submenu;
|
1447 |
|
1448 |
-
$GetData =
|
1449 |
-
$General =
|
1450 |
|
1451 |
if( !empty( $GetData["UPFN"] ) ) {
|
1452 |
unset( $GetData["UPFN"] );
|
@@ -1586,7 +2172,7 @@ class WP_Admin_UI_Customize
|
|
1586 |
|
1587 |
// FilterStart
|
1588 |
function add_edit_post_change_permalink( $permalink_html ) {
|
1589 |
-
$GetData =
|
1590 |
|
1591 |
if( !empty( $GetData["UPFN"] ) ) {
|
1592 |
unset( $GetData["UPFN"] );
|
@@ -1607,7 +2193,7 @@ class WP_Admin_UI_Customize
|
|
1607 |
|
1608 |
// FilterStart
|
1609 |
function admin_title( $title ) {
|
1610 |
-
$GetData =
|
1611 |
|
1612 |
if( !empty( $GetData["UPFN"] ) ) {
|
1613 |
unset( $GetData["UPFN"] );
|
@@ -1624,12 +2210,13 @@ class WP_Admin_UI_Customize
|
|
1624 |
|
1625 |
// FilterStart
|
1626 |
function nav_menus() {
|
1627 |
-
$GetData =
|
1628 |
if( !empty( $GetData["UPFN"] ) ) {
|
1629 |
unset( $GetData["UPFN"] );
|
1630 |
|
1631 |
if( !empty( $GetData["add_new_menu"] ) ) {
|
1632 |
-
|
|
|
1633 |
echo '<style>.manage-menus .add-new-menu-action, .manage-menus .add-edit-menu-action, .locations-row-links .locations-add-menu-link { display: none; }</style>';
|
1634 |
} else {
|
1635 |
echo '<style>.nav-tabs .menu-add-new { display: none; }</style>';
|
2 |
/*
|
3 |
Plugin Name: WP Admin UI Customize
|
4 |
Description: An excellent plugin to customize the management screens.
|
5 |
+
Plugin URI: http://wpadminuicustomize.com/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=1_3_7
|
6 |
+
Version: 1.3.7
|
7 |
Author: gqevu6bsiz
|
8 |
+
Author URI: http://gqevu6bsiz.chicappa.jp/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=1_3_7
|
9 |
Text Domain: wauc
|
10 |
Domain Path: /languages
|
11 |
*/
|
39 |
$ltd,
|
40 |
$Record,
|
41 |
$PageSlug,
|
42 |
+
$Nonces,
|
43 |
$UPFN,
|
44 |
$DonateKey,
|
|
|
|
|
|
|
|
|
45 |
$Msg;
|
46 |
|
47 |
|
48 |
function __construct() {
|
49 |
+
$this->Ver = '1.3.7';
|
50 |
$this->Name = 'WP Admin UI Customize';
|
51 |
$this->Dir = WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) . '/';
|
52 |
$this->Site = 'http://wpadminuicustomize.com/';
|
59 |
"admin_general" => $this->ltd . '_admin_general_setting',
|
60 |
"dashboard" => $this->ltd . '_dashboard_setting',
|
61 |
"admin_bar_menu" => $this->ltd . '_admin_bar_menu_setting',
|
62 |
+
"regist_admin_bar" => $this->ltd . '_regist_admin_bar',
|
63 |
"sidemenu" => $this->ltd . '_sidemenu_setting',
|
64 |
+
"regist_sidemenu" => $this->ltd . '_regist_sidemenu',
|
65 |
"removemetabox" => $this->ltd . '_removemetabox_setting',
|
66 |
"regist_metabox" => $this->ltd . '_regist_metabox',
|
67 |
"post_add_edit" => $this->ltd . '_post_add_edit_setting',
|
70 |
"donate" => $this->ltd . '_donated',
|
71 |
);
|
72 |
$this->PageSlug = 'wp_admin_ui_customize';
|
73 |
+
$this->Nonces = array( "field" => $this->ltd . '_field' , "value" => $this->ltd . '_value' );
|
74 |
$this->UPFN = 'Y';
|
75 |
$this->DonateKey = 'd77aec9bc89d445fd54b4c988d090f03';
|
76 |
|
96 |
|
97 |
// add menu
|
98 |
add_action( 'admin_menu' , array( $this , 'admin_menu' ) , 2 );
|
99 |
+
|
100 |
+
// setting check user role
|
101 |
+
add_action( 'admin_notices' , array( $this , 'settingCheck' ) );
|
102 |
}
|
103 |
|
104 |
// PluginSetup
|
150 |
// SettingPage
|
151 |
function setting_site() {
|
152 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
|
|
153 |
$this->DisplayDonation();
|
154 |
include_once 'inc/setting_site.php';
|
155 |
}
|
157 |
// SettingPage
|
158 |
function setting_admin_general() {
|
159 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
|
|
160 |
$this->DisplayDonation();
|
161 |
include_once 'inc/setting_admin_general.php';
|
162 |
}
|
164 |
// SettingPage
|
165 |
function setting_dashboard() {
|
166 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
|
|
167 |
$this->DisplayDonation();
|
168 |
include_once 'inc/setting_dashboard.php';
|
169 |
}
|
171 |
// SettingPage
|
172 |
function setting_admin_bar_menu() {
|
173 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
|
|
174 |
$this->DisplayDonation();
|
175 |
include_once 'inc/setting_admin_bar_menu.php';
|
176 |
}
|
178 |
// SettingPage
|
179 |
function setting_sidemenu() {
|
180 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
|
|
181 |
$this->DisplayDonation();
|
182 |
include_once 'inc/setting_sidemenu.php';
|
183 |
}
|
185 |
// SettingPage
|
186 |
function setting_removemtabox() {
|
187 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
|
|
188 |
$this->DisplayDonation();
|
189 |
include_once 'inc/setting_removemtabox.php';
|
190 |
}
|
192 |
// SettingPage
|
193 |
function setting_post_add_edit() {
|
194 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
|
|
195 |
$this->DisplayDonation();
|
196 |
include_once 'inc/setting_post_add_edit.php';
|
197 |
}
|
199 |
// SettingPage
|
200 |
function setting_appearance_menus() {
|
201 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
|
|
202 |
$this->DisplayDonation();
|
203 |
include_once 'inc/setting_appearance_menus.php';
|
204 |
}
|
206 |
// SettingPage
|
207 |
function setting_loginscreen() {
|
208 |
add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
|
|
|
209 |
$this->DisplayDonation();
|
210 |
include_once 'inc/setting_loginscreen.php';
|
211 |
}
|
226 |
// GetData
|
227 |
function get_data( $record ) {
|
228 |
$GetData = get_option( $this->Record[$record] );
|
229 |
+
$GetData = apply_filters( 'wauc_pre_get_data' , $GetData , $record );
|
230 |
|
231 |
$Data = array();
|
232 |
if( !empty( $GetData ) && !empty( $GetData["UPFN"] ) && $GetData["UPFN"] == $this->UPFN ) {
|
240 |
|
241 |
// Settingcheck
|
242 |
function settingCheck() {
|
243 |
+
global $current_screen;
|
244 |
+
|
245 |
$Data = $this->get_data( 'user_role' );
|
246 |
if( !empty( $Data["UPFN"] ) ) {
|
247 |
unset( $Data["UPFN"] );
|
248 |
}
|
249 |
if( empty( $Data ) ) {
|
250 |
+
if( $current_screen->parent_base == $this->PageSlug && $current_screen->id != 'toplevel_page_' . $this->PageSlug ) {
|
251 |
+
echo '<div class="error"><p><strong>' . sprintf( __( 'Authority to apply the setting is not selected. <a href="%s">From here</a>, please select the permissions you want to set.' , $this->ltd ) , admin_url( 'admin.php?page=' . $this->PageSlug ) ) . '</strong></p></div>';
|
252 |
+
}
|
253 |
}
|
254 |
}
|
255 |
|
261 |
function get_user_role() {
|
262 |
$editable_roles = get_editable_roles();
|
263 |
foreach ( $editable_roles as $role => $details ) {
|
264 |
+
$editable_roles[$role]["label"] = translate_user_role( $details['name'] );
|
265 |
}
|
266 |
|
267 |
+
return $editable_roles;
|
268 |
}
|
269 |
|
270 |
// SetList
|
271 |
+
function get_apply_roles() {
|
272 |
+
|
273 |
+
$apply_user_roles = $this->get_data( 'user_role' );
|
274 |
+
unset( $apply_user_roles["UPFN"] );
|
|
|
|
|
|
|
275 |
|
276 |
+
$Contents = __( 'Apply user roles' , $this->ltd ) . ' : ';
|
277 |
+
|
278 |
+
if( !empty( $apply_user_roles ) ) {
|
279 |
+
$UserRoles = $this->get_user_role();
|
280 |
+
foreach( $apply_user_roles as $role => $v ) {
|
281 |
+
$Contents .= '[ ' . $UserRoles[$role]["label"] . ' ]';
|
282 |
+
}
|
283 |
+
} else {
|
284 |
+
$Contents .= __( 'None' );
|
285 |
+
}
|
286 |
+
|
287 |
+
$Contents = apply_filters( 'wauc_get_apply_roles' , $Contents );
|
288 |
+
|
289 |
+
return $Contents;
|
290 |
+
|
291 |
}
|
292 |
|
293 |
// SetList
|
294 |
function sidemenu_default_load() {
|
295 |
+
$UserRole = $this->current_user_role_group();
|
296 |
+
if( $UserRole == 'administrator' ) {
|
297 |
+
|
298 |
+
global $menu , $submenu;
|
299 |
+
$GetData = $this->get_data( "regist_sidemenu" );
|
300 |
+
|
301 |
+
$Update = array();
|
302 |
+
$Update["UPFN"] = $this->UPFN;
|
303 |
+
|
304 |
+
$Update["menu"] = $tmp_m = $menu;
|
305 |
+
$Update["submenu"] = $tmp_sm = $submenu;
|
306 |
+
|
307 |
+
if( !empty( $menu ) ) {
|
308 |
+
if( !empty( $GetData["menu"] ) ) {
|
309 |
+
foreach( $GetData["menu"] as $name => $v ) {
|
310 |
+
if( !empty( $tmp_m[$name] ) ) {
|
311 |
+
unset( $tmp_m[$name] );
|
312 |
+
}
|
313 |
+
}
|
314 |
+
if( !empty( $GetData["submenu"] ) ) {
|
315 |
+
foreach( $GetData["submenu"] as $name => $v ) {
|
316 |
+
if( !empty( $tmp_sm[$name] ) ) {
|
317 |
+
unset( $tmp_sm[$name] );
|
318 |
+
}
|
319 |
+
}
|
320 |
+
}
|
321 |
+
if( !empty( $tmp_m ) or !empty( $tmp_sm ) ) {
|
322 |
+
update_option( $this->Record["regist_sidemenu"] , $Update );
|
323 |
+
}
|
324 |
+
} else {
|
325 |
+
update_option( $this->Record["regist_sidemenu"] , $Update );
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
+
}
|
330 |
|
|
|
|
|
|
|
331 |
}
|
332 |
|
333 |
// SetList
|
334 |
function admin_bar_default_load( $wp_admin_bar ) {
|
335 |
+
$UserRole = $this->current_user_role_group();
|
336 |
+
if( $UserRole == 'administrator' ) {
|
337 |
+
global $wp_admin_bar;
|
338 |
+
|
339 |
+
$Admin_bar = $wp_admin_bar->get_nodes();
|
340 |
+
$GetData = $this->get_data( "regist_admin_bar" );
|
341 |
+
|
342 |
+
$Update = array();
|
343 |
+
$Update["UPFN"] = $this->UPFN;
|
344 |
+
$Update["admin_bar"] = $Admin_bar;
|
345 |
+
|
346 |
+
if( !empty( $Admin_bar ) ) {
|
347 |
+
if( !empty( $GetData["admin_bar"] ) ) {
|
348 |
+
foreach( $GetData["admin_bar"] as $name => $v ) {
|
349 |
+
if( !empty( $Admin_bar[$name] ) ) {
|
350 |
+
unset( $Admin_bar[$name] );
|
351 |
+
}
|
352 |
+
}
|
353 |
+
if( !empty( $Admin_bar ) ) {
|
354 |
+
update_option( $this->Record["regist_admin_bar"] , $Update );
|
355 |
+
}
|
356 |
+
} else {
|
357 |
+
update_option( $this->Record["regist_admin_bar"] , $Update );
|
358 |
+
}
|
359 |
+
}
|
360 |
+
}
|
361 |
|
362 |
}
|
363 |
|
364 |
// SetList
|
365 |
function admin_bar_filter_load() {
|
366 |
+
$GetData = $this->get_data( "regist_admin_bar" );
|
367 |
+
$Default_bar = $GetData["admin_bar"];
|
368 |
|
369 |
$Delete_bar = array( "user-actions" , "wp-logo-external" , "top-secondary" , "my-sites-super-admin" , "my-sites-list" );
|
370 |
foreach( $Delete_bar as $del_name ) {
|
372 |
unset( $Default_bar[$del_name] );
|
373 |
}
|
374 |
}
|
375 |
+
if( !empty( $Default_bar ) ) {
|
376 |
+
foreach( $Default_bar as $node_id => $node ) {
|
377 |
+
if( preg_match( "/blog-[0-9]/" , $node->parent ) ) {
|
378 |
+
unset( $Default_bar[$node_id] );
|
379 |
+
}
|
380 |
}
|
381 |
}
|
382 |
+
|
383 |
// front
|
384 |
$Default_bar["dashboard"] = (object) array( "id" => "dashboard" , "title" => __( 'Dashboard' ) , "parent" => "site-name" , "href" => admin_url() );
|
385 |
|
437 |
$Filter_bar[$menu_type]["sub"][$node_id] = $node;
|
438 |
unset( $Default_bar[$node_id] );
|
439 |
}
|
|
|
|
|
440 |
}
|
441 |
}
|
442 |
|
447 |
function post_meta_boxes_load() {
|
448 |
global $current_screen;
|
449 |
|
450 |
+
$UserRole = $this->current_user_role_group();
|
|
|
|
|
|
|
451 |
|
452 |
if( $current_screen->base == 'post' && $current_screen->action != 'add' && $UserRole == 'administrator' ) {
|
453 |
if( $current_screen->post_type == 'post' or $current_screen->post_type == 'page' ) {
|
500 |
|
501 |
|
502 |
// SetList
|
503 |
+
function sidebar_menu_widget( $menu_widget ) {
|
504 |
+
$UserRoles = $this->get_user_role();
|
505 |
$new_widget = '';
|
506 |
if( !empty( $menu_widget["new"] ) ) {
|
507 |
$new_widget = 'new';
|
508 |
}
|
509 |
+
|
510 |
+
$Contents = '';
|
511 |
+
$Contents .= sprintf( '<div class="widget %s">' , $menu_widget["slug"] . ' ' . $menu_widget["slug"] );
|
512 |
+
|
513 |
+
$Contents .= '<div class="widget-top">';
|
514 |
+
$Contents .= '<div class="widget-title-action"><a class="widget-action" href="#available"></a></div>';
|
515 |
+
$Contents .= '<div class="widget-title">';
|
516 |
+
$Contents .= sprintf( '<h4>%1$s : <span class="in-widget-title">%2$s</span></h4>' , $menu_widget["title"] , $menu_widget["slug"] );
|
517 |
+
$Contents .= '</div>';
|
518 |
+
$Contents .= '</div>';
|
519 |
+
|
520 |
+
$Contents .= '<div class="widget-inside">';
|
521 |
+
|
522 |
+
$Contents .= '<div class="settings">';
|
523 |
+
|
524 |
+
$Contents .= '<p class="description">';
|
525 |
+
|
526 |
+
$url = admin_url( $menu_widget["slug"] );
|
527 |
+
if( $menu_widget["slug"] != 'separator' ) {
|
528 |
+
if( ! strstr( $menu_widget["slug"] , '.php' ) ) {
|
529 |
+
$url = admin_url( 'admin.php?page=' . $menu_widget["slug"] );
|
530 |
+
}
|
531 |
+
}
|
532 |
+
$Contents .= sprintf( '<a href="%1$s" target="_blank">%2$s</a>' , $url , $menu_widget["slug"] );
|
533 |
+
$Contents .= '<input type="hidden" class="slugtext" value="' . $menu_widget["slug"] . '" name="data[][slug]">';
|
534 |
+
$Contents .= '</p>';
|
535 |
+
$Contents .= __( 'User Roles' ) . ' : <ul class="display_roles">';
|
536 |
+
foreach( $UserRoles as $role_name => $val ) {
|
537 |
+
$has_cap = false;
|
538 |
+
if( !empty( $val["capabilities"][$menu_widget["cap"]] ) or $role_name == $menu_widget["cap"] ) {
|
539 |
+
$has_cap = 'has_cap';
|
540 |
+
}
|
541 |
+
$Contents .= sprintf( '<li class="%1$s %2$s">%3$s</li>' , $role_name , $has_cap , $val["label"] );
|
542 |
+
}
|
543 |
+
$Contents .= '</ul>';
|
544 |
+
$Contents .= '<label>';
|
545 |
+
$Contents .= __( 'Title' ) . ' : ' . sprintf( '<input type="text" class="regular-text titletext" value="%s" name="data[][title]">' , esc_attr( $menu_widget["title"] ) );
|
546 |
+
$Contents .= '</label>';
|
547 |
+
$Contents .= sprintf( '<input type="hidden" class="parent_slugtext" value="%s" name="data[][parent_slug]">' , $menu_widget["parent_slug"] );
|
548 |
+
|
549 |
+
$Contents .= '</div>';
|
550 |
+
|
551 |
+
if( $menu_widget["slug"] != 'separator' ) {
|
552 |
+
$Contents .= '<div class="submenu">';
|
553 |
+
|
554 |
+
$Contents .= '<p class="description">' . __( 'Sub Menus' , $this->ltd ) . '</p>';
|
555 |
+
if( empty( $menu_widget["new"] ) && !empty( $menu_widget["submenu"] ) ) {
|
556 |
+
foreach( $menu_widget["submenu"] as $sm ) {
|
557 |
+
$sepalator_widget = '';
|
558 |
+
if( $sm["slug"] == 'separator' ) {
|
559 |
+
$sepalator_widget = $sm["slug"];
|
560 |
+
}
|
561 |
+
$Contents .= '<div class="widget ' . $sepalator_widget . '">';
|
562 |
+
|
563 |
+
$Contents .= '<div class="widget-top">';
|
564 |
+
$Contents .= '<div class="widget-title-action"><a class="widget-action" href="#available"></a></div>';
|
565 |
+
$Contents .= '<div class="widget-title">';
|
566 |
+
$Contents .= sprintf( '<h4>%1$s : <span class="in-widget-title">%2$s</span></h4>' , $sm["title"] , $sm["slug"] );
|
567 |
+
$Contents .= '</div>';
|
568 |
+
$Contents .= '</div>';
|
569 |
+
|
570 |
+
$Contents .= '<div class="widget-inside">';
|
571 |
+
|
572 |
+
$Contents .= '<div class="settings">';
|
573 |
+
|
574 |
+
$Contents .= '<p class="description">';
|
575 |
+
|
576 |
+
$url = admin_url( $sm["slug"] );
|
577 |
+
if( $sm["slug"] != 'separator' ) {
|
578 |
+
if( ! strstr( $sm["slug"] , '.php' ) ) {
|
579 |
+
if( ! strstr( $sm["parent_slug"] , '.php' ) ) {
|
580 |
+
$url = admin_url( 'admin.php?page=' . $sm["slug"] );
|
581 |
+
} else {
|
582 |
+
if( ! strstr( $sm["parent_slug"] , '=' ) ) {
|
583 |
+
$url = admin_url( $sm["parent_slug"] . '?page=' . $sm["slug"] );
|
584 |
+
} else {
|
585 |
+
$url = admin_url( $sm["parent_slug"] . '&page=' . $sm["slug"] );
|
586 |
+
}
|
587 |
+
}
|
588 |
+
}
|
589 |
+
}
|
590 |
+
$Contents .= sprintf( '<a href="%1$s" target="_blank">%2$s</a>' , $url , $sm["slug"] );
|
591 |
+
$Contents .= '<input type="hidden" class="slugtext" value="' . $sm["slug"] . '" name="data[][slug]">';
|
592 |
+
|
593 |
+
$Contents .= '</p>';
|
594 |
+
$Contents .= __( 'User Roles' ) . ' : <ul class="display_roles">';
|
595 |
+
foreach( $UserRoles as $role_name => $val ) {
|
596 |
+
$has_cap = false;
|
597 |
+
if( !empty( $val["capabilities"][$sm["cap"]] ) or $role_name == $sm["cap"] ) {
|
598 |
+
$has_cap = 'has_cap';
|
599 |
+
}
|
600 |
+
$Contents .= sprintf( '<li class="%1$s %2$s">%3$s</li>' , $role_name , $has_cap , $val["label"] );
|
601 |
+
}
|
602 |
+
$Contents .= '</ul>';
|
603 |
+
$Contents .= '<label>';
|
604 |
+
$Contents .= __( 'Title' ) . ' : ' . sprintf( '<input type="text" class="regular-text titletext" value="%s" name="data[][title]">' , esc_attr( $sm["title"] ) );
|
605 |
+
$Contents .= '</label>';
|
606 |
+
$Contents .= sprintf( '<input type="hidden" class="parent_slugtext" value="%s" name="data[][parent_slug]">' , $sm["parent_slug"] );
|
607 |
+
|
608 |
+
$Contents .= '</div>';
|
609 |
+
|
610 |
+
$Contents .= '<div class="widget-control-actions">';
|
611 |
+
$Contents .= '<div class="alignleft"><a href="#remove">' . __( 'Remove' ) . '</a></div>';
|
612 |
+
$Contents .= '<div class="clear"></div>';
|
613 |
+
$Contents .= '</div>';
|
614 |
+
|
615 |
+
$Contents .= '</div>';
|
616 |
+
|
617 |
+
$Contents .= '</div>';
|
618 |
+
}
|
619 |
+
}
|
620 |
+
|
621 |
+
$Contents .= '</div>';
|
622 |
+
}
|
623 |
+
|
624 |
+
$Contents .= '<div class="widget-control-actions">';
|
625 |
+
$Contents .= '<div class="alignleft"><a href="#remove">' . __( 'Remove' ) . '</a></div>';
|
626 |
+
$Contents .= '<div class="clear"></div>';
|
627 |
+
$Contents .= '</div>';
|
628 |
+
|
629 |
+
|
630 |
+
$Contents .= '</div>';
|
631 |
+
|
632 |
+
$Contents .= '</div>';
|
633 |
+
|
634 |
+
return $Contents;
|
635 |
}
|
636 |
|
637 |
// SetList
|
638 |
function admin_bar_menu_widget( $menu_widget ) {
|
639 |
+
$new_widget = '';
|
640 |
+
if( !empty( $menu_widget["new"] ) ) {
|
641 |
+
$new_widget = 'new';
|
642 |
+
}
|
643 |
+
|
644 |
+
$Contents = '';
|
645 |
+
$Contents .= sprintf( '<div class="widget %s">' , $new_widget . $menu_widget["id"] );
|
646 |
+
|
647 |
+
$Contents .= '<div class="widget-top">';
|
648 |
+
$Contents .= '<div class="widget-title-action"><a class="widget-action" href="#available"></a></div>';
|
649 |
+
$Contents .= '<div class="widget-title">';
|
650 |
+
$Contents .= sprintf( '<h4>%1$s : <span class="in-widget-title">%2$s</span></h4>' , $menu_widget["title"] , $menu_widget["id"] );
|
651 |
+
$Contents .= '</div>';
|
652 |
+
$Contents .= '</div>';
|
653 |
+
|
654 |
+
$Contents .= '<div class="widget-inside">';
|
655 |
+
|
656 |
+
$Contents .= '<div class="settings">';
|
657 |
+
$Contents .= '<p class="description">';
|
658 |
+
$Contents .= sprintf( '<input type="hidden" class="idtext" value="%s" name="data[][id]">' , $menu_widget["id"] );
|
659 |
+
|
660 |
+
if( $menu_widget["id"] == 'custom_node' ) {
|
661 |
+
$Contents .= 'URL: <input type="text" class="regular-text linktext" value="" name="data[][href]" placeholder="http://">';
|
662 |
+
} else {
|
663 |
+
$Contents .= sprintf( '<a href="%1$s" target="_blank">%2$s</a>' , $menu_widget["href"] , $menu_widget["id"] );
|
664 |
+
$Contents .= sprintf( '<input type="hidden" class="linktext" value="%s" name="data[][href]">' , $menu_widget["href"] );
|
665 |
+
}
|
666 |
+
$Contents .= '</p>';
|
667 |
+
|
668 |
+
$Contents .= sprintf( '<label>%1$s : <input type="text" class="regular-text titletext" value="%2$s" name="data[][title]"></label>' , __( 'Title' ) , esc_html( $menu_widget["title"] ) );
|
669 |
+
$Contents .= sprintf( '<input type="hidden" class="parent" value="%s" name="data[][parent]">', $menu_widget["parent"] );
|
670 |
+
|
671 |
+
$Contents .= '</div>';
|
672 |
+
|
673 |
+
$Contents .= '<div class="submenu">';
|
674 |
+
$Contents .= '<p class="description">' . __( 'Sub Menus' , $this->ltd ) . '</p>';
|
675 |
+
if( empty( $menu_widget["new"] ) && !empty( $menu_widget["subnode"] ) ) {
|
676 |
+
foreach($menu_widget["subnode"] as $sm ) {
|
677 |
+
$Contents .= '<div class="widget">';
|
678 |
+
|
679 |
+
$Contents .= '<div class="widget-top">';
|
680 |
+
$Contents .= '<div class="widget-title-action"><a class="widget-action" href="#available"></a></div>';
|
681 |
+
$Contents .= '<div class="widget-title">';
|
682 |
+
$Contents .= sprintf( '<h4>%1$s : <span class="in-widget-title">%2$s</span></h4>' , $sm["title"] , $sm["id"] );
|
683 |
+
$Contents .= '</div>';
|
684 |
+
$Contents .= '</div>';
|
685 |
+
|
686 |
+
$Contents .= '<div class="widget-inside">';
|
687 |
+
|
688 |
+
$Contents .= '<div class="settings">';
|
689 |
+
$Contents .= '<p class="description">';
|
690 |
+
$Contents .= sprintf( '<a href="%1$s" target="_blank">%2$s</a>' , $sm["href"] , $sm["id"] );
|
691 |
+
$Contents .= sprintf( '<input type="hidden" class="idtext" value="%s" name="data[][id]">' , $sm["id"] );
|
692 |
+
$Contents .= sprintf( '<input type="hidden" class="linktext" value="%s" name="data[][href]">' , $sm["href"] );
|
693 |
+
$Contents .= '</p>';
|
694 |
+
$Contents .= sprintf( '<label>%1$s : <input type="text" class="regular-text titletext" value="%2$s" name="data[][title]"></label>' , __( 'Title' ) , esc_html( $sm["title"] ) );
|
695 |
+
$Contents .= sprintf( '<input type="hidden" class="parent" value="%s" name="data[][parent]">' , $sm["parent"] );
|
696 |
+
$Contents .= '</div>';
|
697 |
+
|
698 |
+
$Contents .= '<div class="widget-control-actions">';
|
699 |
+
$Contents .= '<div class="alignleft"><a href="#remove">' . __( 'Remove' ) . '</a></div><div class="clear"></div>';
|
700 |
+
$Contents .= '</div>';
|
701 |
+
|
702 |
+
$Contents .= '</div>';
|
703 |
+
|
704 |
+
$Contents .= '</div>';
|
705 |
+
}
|
706 |
+
}
|
707 |
+
$Contents .= '</div>';
|
708 |
+
|
709 |
+
$Contents .= '<div class="widget-control-actions">';
|
710 |
+
$Contents .= '<div class="alignleft"><a href="#remove">' . __( 'Remove' ) . '</a></div><div class="clear"></div>';
|
711 |
+
$Contents .= '</div>';
|
712 |
+
|
713 |
+
$Contents .= '</div>';
|
714 |
+
|
715 |
+
$Contents .= '</div>';
|
716 |
+
|
717 |
+
return $Contents;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
718 |
}
|
719 |
|
720 |
// SetList
|
786 |
}
|
787 |
|
788 |
// SetList
|
789 |
+
function current_user_role_group() {
|
790 |
$UserRole = '';
|
791 |
$User = wp_get_current_user();
|
792 |
if( !empty( $User->roles ) ) {
|
798 |
return $UserRole;
|
799 |
}
|
800 |
|
801 |
+
// SetList
|
802 |
+
function set_setting_site_general( $Data ) {
|
803 |
+
$Contents = "";
|
804 |
+
$field = 'admin_bar';
|
805 |
+
|
806 |
+
$Contents .= '<div class="postbox">';
|
807 |
+
$Contents .= '<div class="handlediv" title="Click to toggle"><br></div>';
|
808 |
+
$Contents .= '<h3 class="hndle"><span>' . __( 'General' ) . '</span></h3>';
|
809 |
+
$Contents .= '<div class="inside">';
|
810 |
+
|
811 |
+
$Contents .= '<table class="form-table">';
|
812 |
+
$Contents .= '<tbody>';
|
813 |
+
|
814 |
+
$Contents .= '<tr>';
|
815 |
+
$Contents .= '<th>' . $field . '</th>';
|
816 |
+
$Contents .= '<td>';
|
817 |
+
|
818 |
+
$arr = array( "hide" => __( 'Hide the Admin bar on the front end' , $this->ltd ) , "front" => __( 'Apply WP Admin UI Customize settings on the front end admin bar also' , $this->ltd ) );
|
819 |
+
$Contents .= '<select name="data[' . $field . ']">';
|
820 |
+
$Contents .= '<option value="">-</option>';
|
821 |
+
foreach( $arr as $key => $label ) {
|
822 |
+
$Selected = '';
|
823 |
+
if( !empty( $Data[$field] ) ) {
|
824 |
+
$Selected = selected( $Data[$field] , $key , false );
|
825 |
+
}
|
826 |
+
$Contents .= sprintf( '<option value="%1$s" %2$s>%3$s</option>' , $key , $Selected , $label );
|
827 |
+
}
|
828 |
+
$Contents .= '</select'>
|
829 |
+
$Contents .= '</td>';
|
830 |
+
|
831 |
+
$Contents .= '</tbody>';
|
832 |
+
$Contents .= '</table>';
|
833 |
+
|
834 |
+
$Contents .= '</div>';
|
835 |
+
$Contents .= '</div>';
|
836 |
+
|
837 |
+
return $Contents;
|
838 |
+
}
|
839 |
+
|
840 |
+
// SetList
|
841 |
+
function set_setting_admin_general( $Data ) {
|
842 |
+
$Contents = "";
|
843 |
+
|
844 |
+
$arr = array(
|
845 |
+
'notice' => __( 'Notifications' , $this->ltd ) ,
|
846 |
+
'so' => __( 'Screen Options and Help Tab' , $this->ltd ) ,
|
847 |
+
'foot' => __( 'Footer' ) ,
|
848 |
+
'general' => __( 'General' )
|
849 |
+
);
|
850 |
+
|
851 |
+
foreach( $arr as $n => $k ) {
|
852 |
+
$Contents .= '<div class="postbox">';
|
853 |
+
$Contents .= '<div class="handlediv" title="Click to toggle"><br></div>';
|
854 |
+
$Contents .= '<h3 class="hndle"><span>' . $k . '</span></h3>';
|
855 |
+
$Contents .= '<div class="inside">';
|
856 |
+
|
857 |
+
$Contents .= '<table class="form-table">';
|
858 |
+
$Contents .= '<tbody>';
|
859 |
+
|
860 |
+
if( $n == 'notice' ) {
|
861 |
+
|
862 |
+
$sub = array(
|
863 |
+
'notice_update_core' => __( 'WordPress core update notice' , $this->ltd ),
|
864 |
+
'notice_update_plugin' => __( 'Plugin update notice' , $this->ltd ),
|
865 |
+
'notice_update_theme' => __( 'Theme update notice' , $this->ltd ),
|
866 |
+
);
|
867 |
+
|
868 |
+
foreach( $sub as $sn => $sk ) {
|
869 |
+
$Contents .= '<tr>';
|
870 |
+
$Contents .= '<th>' . $sk . '</th>';
|
871 |
+
$field = $sn;
|
872 |
+
$Checked = "";
|
873 |
+
if( !empty( $Data[$field] ) ) $Checked = checked( $Data[$field] , 1 , false );
|
874 |
+
$Contents .= '<td><label><input type="checkbox" name="data[' . $field . ']" value="1" ' . $Checked . ' /> ' . __ ( 'Not notified' , $this->ltd ) . '</label></td>';
|
875 |
+
$Contents .= '</tr>';
|
876 |
+
}
|
877 |
+
|
878 |
+
} elseif( $n == 'so' ) {
|
879 |
+
|
880 |
+
$sub = array(
|
881 |
+
'screen_option_tab' => __( 'Screen Options' ),
|
882 |
+
'help_tab' => __( 'Help' ),
|
883 |
+
);
|
884 |
+
|
885 |
+
foreach( $sub as $sn => $sk ) {
|
886 |
+
$Contents .= '<tr>';
|
887 |
+
$Contents .= '<th>' . $sk . '</th>';
|
888 |
+
$field = $sn;
|
889 |
+
$Checked = "";
|
890 |
+
if( !empty( $Data[$field] ) ) $Checked = checked( $Data[$field] , 1 , false );
|
891 |
+
$Contents .= '<td><label><input type="checkbox" name="data[' . $field . ']" value="1" ' . $Checked . ' /> ' . __ ( 'Hide' ) . '</label></td>';
|
892 |
+
$Contents .= '</tr>';
|
893 |
+
}
|
894 |
+
|
895 |
+
} elseif( $n == 'foot' ) {
|
896 |
+
|
897 |
+
$Contents .= '<tr>';
|
898 |
+
$Contents .= '<th>' . __( 'Footer text' , $this->ltd ) . '</th>';
|
899 |
+
$field = 'footer_text'; $Val = '';
|
900 |
+
if( !empty( $Data[$field] ) ) $Val = esc_html( stripslashes( $Data[$field] ) );
|
901 |
+
$Contents .= '<td>';
|
902 |
+
$Contents .= '<input type="text" name="data[' . $field . ']" value="' . $Val . '" class="large-text" />';
|
903 |
+
$Contents .= '<p class="description">' . __( 'Default' ) . ': ' . __( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ) . '</p>';
|
904 |
+
$Contents .= '<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="' . __( 'Variables' , $this->ltd ) . '" class="thickbox">' . __( 'Available Shortcodes' , $this->ltd ) . '</a>';
|
905 |
+
$Contents .= '</td>';
|
906 |
+
$Contents .= '</tr>';
|
907 |
+
|
908 |
+
} elseif( $n == 'general' ) {
|
909 |
+
|
910 |
+
$Contents .= '<tr>';
|
911 |
+
$Contents .= '<th>' . __( 'CSS file to load' , $this->ltd ) . '</th>';
|
912 |
+
$field = 'css'; $Val = '';
|
913 |
+
if( !empty( $Data[$field] ) ) $Val = strip_tags( $Data[$field] );
|
914 |
+
$Contents .= '<td><input type="text" name="data[' . $field . ']" value="' . $Val . '" class="regular-text" />';
|
915 |
+
$Contents .= '<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="' . __( 'Variables' , $this->ltd ) . '" class="thickbox">' . __( 'Available Shortcodes' , $this->ltd ) . '</a></td>';
|
916 |
+
$Contents .= '</tr>';
|
917 |
+
|
918 |
+
$Contents .= '<tr>';
|
919 |
+
$Contents .= '<th>' . __( 'Title tag for Admin screen' , $this->ltd ) . '</th>';
|
920 |
+
$field = 'title_tag'; $Checked = '';
|
921 |
+
if( !empty( $Data[$field] ) ) $Checked = checked( $Data[$field] , 1 , false );
|
922 |
+
$Contents .= '<td><label><input type="checkbox" name="data[' . $field . ']" value="1" ' . $Checked . ' /> ' . __( 'Remove "Wordpress" from the title tag of the Admin screen' , $this->ltd ) . '</label></td>';
|
923 |
+
$Contents .= '</tr>';
|
924 |
+
|
925 |
+
}
|
926 |
+
|
927 |
+
|
928 |
+
$Contents .= '</tbody>';
|
929 |
+
$Contents .= '</table>';
|
930 |
+
|
931 |
+
$Contents .= '</div>';
|
932 |
+
$Contents .= '</div>';
|
933 |
+
}
|
934 |
+
|
935 |
+
return $Contents;
|
936 |
+
}
|
937 |
+
|
938 |
+
// SetList
|
939 |
+
function set_setting_dashboard( $Data ) {
|
940 |
+
$Contents = "";
|
941 |
+
|
942 |
+
$arr = array(
|
943 |
+
'meta' => __( 'Meta boxes' , $this->ltd ) ,
|
944 |
+
'other' => __( 'Other' , $this->ltd ) ,
|
945 |
+
);
|
946 |
+
|
947 |
+
foreach( $arr as $n => $k ) {
|
948 |
+
$Contents .= '<div class="postbox">';
|
949 |
+
$Contents .= '<div class="handlediv" title="Click to toggle"><br></div>';
|
950 |
+
$Contents .= '<h3 class="hndle"><span>' . $k . '</span></h3>';
|
951 |
+
$Contents .= '<div class="inside">';
|
952 |
+
|
953 |
+
$Contents .= '<table class="form-table">';
|
954 |
+
$Contents .= '<tbody>';
|
955 |
+
|
956 |
+
if( $n == 'meta' ) {
|
957 |
+
|
958 |
+
$metaboxes = array(
|
959 |
+
"show_welcome_panel" => __( 'Welcome Panel' ),
|
960 |
+
"dashboard_right_now" => __( 'Right Now' ),
|
961 |
+
"dashboard_recent_comments" => __( 'Recent Comments' ),
|
962 |
+
"dashboard_incoming_links" => __( 'Incoming Links' ),
|
963 |
+
"dashboard_plugins" => __( 'Plugins' ),
|
964 |
+
"dashboard_quick_press" => __( 'QuickPress' ),
|
965 |
+
"dashboard_recent_drafts" => __( 'Recent Drafts' ),
|
966 |
+
"dashboard_primary" => __( 'WordPress Blog' ),
|
967 |
+
"dashboard_secondary" => __( 'Other WordPress News' ),
|
968 |
+
);
|
969 |
+
|
970 |
+
foreach( $metaboxes as $meta_key => $meta_label ) {
|
971 |
+
$Contents .= '<tr>';
|
972 |
+
$Contents .= '<th>' . $meta_label . '</th>';
|
973 |
+
$field = $meta_key; $Checked = '';
|
974 |
+
if( !empty( $Data[$field] ) ) $Checked = checked( $Data[$field] , 1 , false );
|
975 |
+
$Contents .= '<td><label><input type="checkbox" name="data[' . $field . ']" value="1" ' . $Checked . ' /> ' . __( 'Hide' ) . '</label></td>';
|
976 |
+
$Contents .= '</tr>';
|
977 |
+
}
|
978 |
+
|
979 |
+
} elseif( $n == 'other' ) {
|
980 |
+
|
981 |
+
$Contents .= '<tr>';
|
982 |
+
$Contents .= '<th>' . __( 'Meta box movement restriction' , $this->ltd ) . '</th>';
|
983 |
+
$field = 'metabox_move'; $Checked = '';
|
984 |
+
if( !empty( $Data[$field] ) ) $Checked = checked( $Data[$field] , 1 , false );
|
985 |
+
$Contents .= '<td><label><input type="checkbox" name="data[' . $field . ']" value="1" ' . $Checked . ' /> ' . __( 'Lock meta box positions' , $this->ltd ) . '</label></td>';
|
986 |
+
$Contents .= '</tr>';
|
987 |
+
|
988 |
+
}
|
989 |
+
|
990 |
+
$Contents .= '</tbody>';
|
991 |
+
$Contents .= '</table>';
|
992 |
+
|
993 |
+
$Contents .= '</div>';
|
994 |
+
$Contents .= '</div>';
|
995 |
+
}
|
996 |
+
|
997 |
+
return $Contents;
|
998 |
+
}
|
999 |
+
|
1000 |
+
// SetList
|
1001 |
+
function set_setting_admin_bar( $type , $Data ) {
|
1002 |
+
$AllDefaultNodes = $this->admin_bar_filter_load();
|
1003 |
+
$Contents = "";
|
1004 |
+
|
1005 |
+
$arr = array(
|
1006 |
+
'left' => __( 'Left' ) ,
|
1007 |
+
'right' => __( 'Right' ) ,
|
1008 |
+
);
|
1009 |
+
|
1010 |
+
foreach( $arr as $n => $k ) {
|
1011 |
+
if( $type == $n ) {
|
1012 |
+
|
1013 |
+
$Contents .= '<div class="postbox">';
|
1014 |
+
$Contents .= '<div class="handlediv" title="Click to toggle"><br></div>';
|
1015 |
+
$Contents .= '<h3 class="hndle"><span>' . $k . '</span></h3>';
|
1016 |
+
$Contents .= '<div class="inside">';
|
1017 |
+
|
1018 |
+
if( empty( $Data ) ) {
|
1019 |
+
foreach( $AllDefaultNodes[$n]["main"] as $main_node ) {
|
1020 |
+
$pnsn = array();
|
1021 |
+
if( !empty( $AllDefaultNodes[$n]["sub"] ) ) {
|
1022 |
+
foreach( $AllDefaultNodes[$n]["sub"] as $sub_node ) {
|
1023 |
+
if( $main_node->id == $sub_node->parent ) {
|
1024 |
+
$pnsn[] = array( 'id' => $sub_node->id , 'title' => stripslashes( $sub_node->title ) , 'parent' => $main_node->id , 'href' => $sub_node->href , 'group' => false , 'new' => false );
|
1025 |
+
}
|
1026 |
+
}
|
1027 |
+
}
|
1028 |
+
$menu_widget = array( 'id' => $main_node->id , 'title' => stripslashes( $main_node->title ) , 'parent' => '' , 'href' => $main_node->href , 'group' => false , 'new' => false , 'subnode' => $pnsn );
|
1029 |
+
|
1030 |
+
$Contents .= $this->admin_bar_menu_widget( $menu_widget );
|
1031 |
+
}
|
1032 |
+
} else {
|
1033 |
+
if( !empty( $Data[$n]["main"] ) ) {
|
1034 |
+
foreach( $Data[$n]["main"] as $main_node) {
|
1035 |
+
$pnsn = array();
|
1036 |
+
if( !empty( $Data[$n]["sub"] ) ) {
|
1037 |
+
foreach( $Data[$n]["sub"] as $sub_node) {
|
1038 |
+
if( $main_node["id"] == $sub_node["parent"] ) {
|
1039 |
+
$pnsn[] = array( 'id' => $sub_node["id"] , 'title' => stripslashes( $sub_node["title"] ) , 'parent' => $main_node["id"] , 'href' => $sub_node["href"] , 'group' => false , 'new' => false );
|
1040 |
+
}
|
1041 |
+
}
|
1042 |
+
}
|
1043 |
+
$menu_widget = array( 'id' => $main_node["id"] , 'title' => stripslashes( $main_node["title"] ) , 'parent' => '' , 'href' => $main_node["href"] , 'group' => false , 'new' => false , 'subnode' => $pnsn );
|
1044 |
+
$Contents .= $this->admin_bar_menu_widget( $menu_widget );
|
1045 |
+
}
|
1046 |
+
}
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
$Contents .= '</div>';
|
1050 |
+
$Contents .= '</div>';
|
1051 |
+
}
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
return $Contents;
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
// SetList
|
1058 |
+
function set_setting_sidemenu( $Data ) {
|
1059 |
+
$RegistMenus = $this->get_data( "regist_sidemenu" );
|
1060 |
+
$Contents = "";
|
1061 |
+
|
1062 |
+
$Contents .= '<div class="postbox">';
|
1063 |
+
$Contents .= '<h3 class="hndle"><span>' . __( 'Current menu' , $this->ltd ) . '</span></h3>';
|
1064 |
+
$Contents .= '<div class="inside">';
|
1065 |
+
|
1066 |
+
if( empty( $Data ) ) {
|
1067 |
+
|
1068 |
+
foreach( $RegistMenus["menu"] as $mm ) {
|
1069 |
+
if( isset( $mm[2] ) && strstr( $mm[2] , 'separator' ) ) {
|
1070 |
+
$menu_title = '-';
|
1071 |
+
$mm[2] = 'separator';
|
1072 |
+
$mwsm = array();
|
1073 |
+
} elseif( !empty( $mm[0] ) ) {
|
1074 |
+
$menu_title = $mm[0];
|
1075 |
+
if( !empty( $mm[5] ) ) {
|
1076 |
+
if( $mm[5] == 'menu-comments' ) {
|
1077 |
+
$menu_title = __( 'Comments' ) . ' [comment_count]';
|
1078 |
+
} elseif( $mm[5] == 'menu-appearance' ) {
|
1079 |
+
$menu_title = __( 'Appearance' ) . ' [update_themes]';
|
1080 |
+
} elseif( $mm[5] == 'menu-plugins' ) {
|
1081 |
+
$menu_title = __( 'Plugins' ) . ' [update_plugins]';
|
1082 |
+
}
|
1083 |
+
}
|
1084 |
+
$mwsm = array();
|
1085 |
+
foreach( $RegistMenus["submenu"] as $parent_slug => $sub ) {
|
1086 |
+
foreach( $sub as $sm ) {
|
1087 |
+
if( $mm[2] == $parent_slug ) {
|
1088 |
+
$submenu_title = $sm[0];
|
1089 |
+
if( $sm[1] == 'update_core' ) {
|
1090 |
+
$submenu_title = __( 'Update' ) . ' [update_total]';
|
1091 |
+
}
|
1092 |
+
$mwsm[] = array( 'title' => $submenu_title , 'slug' => $sm[2] , 'parent_slug' => $parent_slug , 'cap' => $sm[1] );
|
1093 |
+
}
|
1094 |
+
}
|
1095 |
+
}
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
$menu_widget = array( 'title' => $menu_title , 'slug' => $mm[2] , 'parent_slug' => '' , 'new' => false , 'cap' => $mm[1] , 'submenu' => $mwsm );
|
1099 |
+
$Contents .= $this->sidebar_menu_widget( $menu_widget );
|
1100 |
+
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
} else {
|
1104 |
+
|
1105 |
+
if( !empty( $Data["main"] ) ) {
|
1106 |
+
foreach($Data["main"] as $mm) {
|
1107 |
+
if( !empty( $mm["title"] ) ) {
|
1108 |
+
$mwsm = array();
|
1109 |
+
|
1110 |
+
if( !empty( $Data["sub"] ) ) {
|
1111 |
+
foreach( $Data["sub"] as $sm ) {
|
1112 |
+
if( $mm["slug"] == $sm["parent_slug"] ) {
|
1113 |
+
$cap = "";
|
1114 |
+
foreach( $RegistMenus["submenu"][$mm["slug"]] as $k => $tmp_sm ) {
|
1115 |
+
if( $tmp_sm[2] == $sm["slug"] ) {
|
1116 |
+
$cap = $tmp_sm[1];
|
1117 |
+
break;
|
1118 |
+
}
|
1119 |
+
}
|
1120 |
+
$mwsm[] = array( 'title' => $sm["title"] , 'slug' => $sm["slug"] , 'parent_slug' => $sm["parent_slug"] , 'cap' => $cap );
|
1121 |
+
}
|
1122 |
+
}
|
1123 |
+
}
|
1124 |
+
$cap = "";
|
1125 |
+
foreach( $RegistMenus["menu"] as $tmp_m ) {
|
1126 |
+
if( $tmp_m[2] == $mm["slug"] ) {
|
1127 |
+
if( $tmp_m[2] == $mm["slug"] ) {
|
1128 |
+
$cap = $tmp_m[1];
|
1129 |
+
break;
|
1130 |
+
}
|
1131 |
+
}
|
1132 |
+
}
|
1133 |
+
$menu_widget = array( 'title' => $mm["title"] , 'slug' => $mm["slug"] , 'parent_slug' => '' , 'new' => false , 'cap' =>$cap , 'submenu' => $mwsm );
|
1134 |
+
$Contents .= $this->sidebar_menu_widget( $menu_widget );
|
1135 |
+
}
|
1136 |
+
}
|
1137 |
+
}
|
1138 |
+
}
|
1139 |
+
|
1140 |
+
$Contents .= '</div>';
|
1141 |
+
$Contents .= '</div>';
|
1142 |
+
|
1143 |
+
$Contents .= '<p class="sidebar_setting_delete"><a href="#">' . __( 'Delete all' ) . '</a></p>';
|
1144 |
+
|
1145 |
+
return $Contents;
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
// SetList
|
1149 |
+
function set_setting_removemetabox( $type , $Data ) {
|
1150 |
+
$Metaboxes = $this->get_data( "regist_metabox" );
|
1151 |
+
$Contents = "";
|
1152 |
+
|
1153 |
+
$arr = array(
|
1154 |
+
'post' => __( 'Post' ) ,
|
1155 |
+
'page' => __( 'Page' ) ,
|
1156 |
+
);
|
1157 |
+
|
1158 |
+
foreach( $arr as $n => $k ) {
|
1159 |
+
if( $type == $n ) {
|
1160 |
+
|
1161 |
+
$Contents .= '<div class="postbox">';
|
1162 |
+
$Contents .= '<div class="handlediv" title="Click to toggle"><br></div>';
|
1163 |
+
$Contents .= '<h3 class="hndle"><span>' . $k . '</span></h3>';
|
1164 |
+
$Contents .= '<div class="inside">';
|
1165 |
+
|
1166 |
+
if( empty( $Metaboxes["metaboxes"][$type] ) ) {
|
1167 |
+
|
1168 |
+
$Contents .= '<p>' . __( 'Could not read the meta box.' , $this->ltd ) . '</p>';
|
1169 |
+
$Contents .= '<p>' . sprintf( __( 'Meta boxes will be loaded automatically when you Edit %s.' , $this->ltd ) , $k ) . '</p>';
|
1170 |
+
|
1171 |
+
} else {
|
1172 |
+
|
1173 |
+
$Contents .= '<table class="form-table">';
|
1174 |
+
$Contents .= '<tbody>';
|
1175 |
+
|
1176 |
+
foreach( $Metaboxes["metaboxes"][$type] as $context => $meta_box ) {
|
1177 |
+
foreach( $meta_box as $priority => $box ) {
|
1178 |
+
foreach( $box as $metabox_id => $metabox_title ) {
|
1179 |
+
if( $metabox_id != 'submitdiv' ) {
|
1180 |
+
$Contents .= '<tr>';
|
1181 |
+
$Contents .= '<th>' . $metabox_title . '</th>';
|
1182 |
+
$Checked = "";
|
1183 |
+
if( !empty( $Data[$type][$metabox_id] ) ) $Checked = checked( $Data[$type][$metabox_id] , 1 , false );
|
1184 |
+
$Contents .= '<td><label><input type="checkbox" name="data[' . $type . '][' . $metabox_id . ']" value="1" ' . $Checked . ' /> ' . __ ( 'Hide' ) . '</label></td>';
|
1185 |
+
$Contents .= '</tr>';
|
1186 |
+
}
|
1187 |
+
}
|
1188 |
+
}
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
if( $type == 'post' ) {
|
1192 |
+
global $wp_version;
|
1193 |
+
if ( version_compare( $wp_version , '3.6' , '>=' ) ) {
|
1194 |
+
$Contents .= '<tr>';
|
1195 |
+
$Contents .= '<th>' . __( 'Post Formats' ) . '</th>';
|
1196 |
+
$Checked = "";
|
1197 |
+
if( !empty( $Data[$type]["postformat"] ) ) $Checked = checked( $Data[$type]["postformat"] , 1 , false );
|
1198 |
+
$Contents .= '<td><label><input type="checkbox" name="data[' . $type . '][postformat]" value="1" ' . $Checked . ' /> ' . __ ( 'Hide' ) . '</label></td>';
|
1199 |
+
$Contents .= '</tr>';
|
1200 |
+
}
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
$Contents .= '</tbody>';
|
1204 |
+
$Contents .= '</table>';
|
1205 |
+
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
$Contents .= '</div>';
|
1209 |
+
$Contents .= '</div>';
|
1210 |
+
}
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
return $Contents;
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
// SetList
|
1217 |
+
function set_setting_post_add_edit( $Data ) {
|
1218 |
+
$Contents = "";
|
1219 |
+
|
1220 |
+
$Contents .= '<div class="postbox">';
|
1221 |
+
$Contents .= '<div class="handlediv" title="Click to toggle"><br></div>';
|
1222 |
+
$Contents .= '<h3 class="hndle"><span>' . __( 'Add New Post' ) . ' & ' . __( 'Edit Post' ) . '</span></h3>';
|
1223 |
+
$Contents .= '<div class="inside">';
|
1224 |
+
|
1225 |
+
$Contents .= '<table class="form-table">';
|
1226 |
+
$Contents .= '<tbody>';
|
1227 |
+
|
1228 |
+
$Contents .= '<tr>';
|
1229 |
+
$Contents .= '<th>' . __( 'Change Permalinks' ) . '</th>';
|
1230 |
+
$field = 'default_permalink';
|
1231 |
+
$Checked = "";
|
1232 |
+
if( !empty( $Data[$field] ) ) $Checked = checked( $Data[$field] , 1 , false );
|
1233 |
+
$Contents .= '<td>';
|
1234 |
+
$Contents .= '<label><input type="checkbox" name="data[' . $field . ']" value="1" ' . $Checked . ' /> ' . __ ( 'Hide' ) . '</label>';
|
1235 |
+
$Contents .= '<p class="description">' . __( 'Only appears when you have settings to the default permalink.' , $this->ltd ) . '</p>';
|
1236 |
+
$Contents .= '<p><img src="' . $this->Dir . 'images/post_add_edit_screen__edit_ppermalink.png" /></p>';
|
1237 |
+
|
1238 |
+
$Contents .= '</td>';
|
1239 |
+
$Contents .= '</tr>';
|
1240 |
+
|
1241 |
+
|
1242 |
+
$Contents .= '</tbody>';
|
1243 |
+
$Contents .= '</table>';
|
1244 |
+
|
1245 |
+
$Contents .= '</div>';
|
1246 |
+
$Contents .= '</div>';
|
1247 |
+
|
1248 |
+
return $Contents;
|
1249 |
+
}
|
1250 |
+
|
1251 |
+
// SetList
|
1252 |
+
function set_setting_appearance_menus( $Data ) {
|
1253 |
+
$Contents = "";
|
1254 |
+
|
1255 |
+
$Contents .= '<div class="postbox">';
|
1256 |
+
$Contents .= '<div class="handlediv" title="Click to toggle"><br></div>';
|
1257 |
+
$Contents .= '<h3 class="hndle"><span>' . __( 'Add New Post' ) . ' & ' . __( 'Edit Post' ) . '</span></h3>';
|
1258 |
+
$Contents .= '<div class="inside">';
|
1259 |
+
|
1260 |
+
$Contents .= '<table class="form-table">';
|
1261 |
+
$Contents .= '<tbody>';
|
1262 |
+
|
1263 |
+
$arr = array( "add_new_menu" => __( 'Add a new menu' , $this->ltd ) , "delete_menu" => __( 'Delete Menu' ) );
|
1264 |
+
foreach( $arr as $n => $k ) {
|
1265 |
+
$Contents .= '<tr>';
|
1266 |
+
$Contents .= '<th>' . $k . '</th>';
|
1267 |
+
$field = $n;
|
1268 |
+
$Checked = "";
|
1269 |
+
if( !empty( $Data[$field] ) ) $Checked = checked( $Data[$field] , 1 , false );
|
1270 |
+
$Contents .= '<td>';
|
1271 |
+
$Contents .= '<label><input type="checkbox" name="data[' . $field . ']" value="1" ' . $Checked . ' /> ' . __ ( 'Hide' ) . '</label>';
|
1272 |
+
$Contents .= '<p class="description">' . __( 'This is useful when you want to use only the menus have been created.' , $this->ltd ) . '</p>';
|
1273 |
+
|
1274 |
+
global $wp_version;
|
1275 |
+
if( $n == 'add_new_menu' ) {
|
1276 |
+
if( version_compare( $wp_version, '3.6', '>=' ) ) {
|
1277 |
+
$Contents .= '<p><img src="' . $this->Dir . 'images/appearance_menus_add_new_menu.png" /></p>';
|
1278 |
+
$Contents .= '<p><img src="' . $this->Dir . 'images/appearance_menus_add_new_menu_of_location.png" /></p>';
|
1279 |
+
} else {
|
1280 |
+
$Contents .= '<p><img src="' . $this->Dir . 'images/3.5.1/appearance_menus_add_new_menu.png" /></p>';
|
1281 |
+
}
|
1282 |
+
} elseif( $n == 'delete_menu' ) {
|
1283 |
+
if( version_compare( $wp_version, '3.6', '>=' ) ) {
|
1284 |
+
$Contents .= '<p><img src="' . $this->Dir . 'images/appearance_menus_delete_menu.png" /></p>';
|
1285 |
+
} else {
|
1286 |
+
$Contents .= '<p><img src="' . $this->Dir . 'images/3.5.1/appearance_menus_delete_menu.png" /></p>';
|
1287 |
+
}
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
$Contents .= '</td>';
|
1291 |
+
$Contents .= '</tr>';
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
$Contents .= '</tbody>';
|
1295 |
+
$Contents .= '</table>';
|
1296 |
+
|
1297 |
+
$Contents .= '</div>';
|
1298 |
+
$Contents .= '</div>';
|
1299 |
+
|
1300 |
+
return $Contents;
|
1301 |
+
}
|
1302 |
+
|
1303 |
+
|
1304 |
+
|
1305 |
|
1306 |
|
1307 |
// DataUpdate
|
1321 |
// DataUpdate
|
1322 |
function update_reset( $record ) {
|
1323 |
$Update = $this->update_validate();
|
1324 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1325 |
+
$record = apply_filters( 'wauc_pre_delete' , $this->Record[$record] );
|
1326 |
+
delete_option( $record );
|
1327 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1328 |
}
|
1329 |
}
|
1337 |
$SubmitKey = md5( strip_tags( $_POST["donate_key"] ) );
|
1338 |
if( $this->DonateKey == $SubmitKey ) {
|
1339 |
update_option( $this->Record["donate"] , $SubmitKey );
|
1340 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __( 'Thank you for your donation.' , $this->ltd_p ) . '</strong></p></div>';
|
1341 |
}
|
1342 |
}
|
1343 |
}
|
1347 |
// DataUpdate
|
1348 |
function update_userrole() {
|
1349 |
$Update = $this->update_validate();
|
1350 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1351 |
|
1352 |
if( !empty( $_POST["data"]["user_role"] ) ) {
|
1353 |
foreach($_POST["data"]["user_role"] as $key => $val) {
|
1365 |
// DataUpdate
|
1366 |
function update_site() {
|
1367 |
$Update = $this->update_validate();
|
1368 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1369 |
|
1370 |
if( !empty( $_POST["data"] ) ) {
|
1371 |
foreach($_POST["data"] as $key => $val) {
|
1375 |
}
|
1376 |
}
|
1377 |
|
1378 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["site"] );
|
1379 |
+
update_option( $Record , $Update );
|
1380 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1381 |
}
|
1382 |
}
|
1384 |
// DataUpdate
|
1385 |
function update_admin_general() {
|
1386 |
$Update = $this->update_validate();
|
1387 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1388 |
|
1389 |
if( !empty( $_POST["data"] ) ) {
|
1390 |
foreach($_POST["data"] as $key => $val) {
|
1394 |
}
|
1395 |
}
|
1396 |
|
1397 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["admin_general"] );
|
1398 |
+
update_option( $Record , $Update );
|
1399 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1400 |
}
|
1401 |
}
|
1403 |
// DataUpdate
|
1404 |
function update_dashboard() {
|
1405 |
$Update = $this->update_validate();
|
1406 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1407 |
|
1408 |
if( !empty( $_POST["data"] ) ) {
|
1409 |
foreach($_POST["data"] as $key => $val) {
|
1413 |
}
|
1414 |
}
|
1415 |
|
1416 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["dashboard"] );
|
1417 |
+
update_option( $Record , $Update );
|
1418 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1419 |
}
|
1420 |
}
|
1422 |
// DataUpdate
|
1423 |
function update_admin_bar_menu() {
|
1424 |
$Update = $this->update_validate();
|
1425 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1426 |
|
1427 |
if( !empty( $_POST["data"] ) ) {
|
1428 |
foreach($_POST["data"] as $boxtype => $nodes) {
|
1446 |
$parent = strip_tags( $node["parent"] );
|
1447 |
$depth = 'sub';
|
1448 |
}
|
1449 |
+
|
1450 |
$Update[$boxtype][$depth][] = array( "id" => $id , "title" => $title , "href" => $href , "parent" => $parent );
|
1451 |
}
|
1452 |
}
|
1453 |
}
|
1454 |
}
|
1455 |
|
1456 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["admin_bar_menu"] );
|
1457 |
+
update_option( $Record , $Update );
|
1458 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1459 |
}
|
1460 |
}
|
1462 |
// DataUpdate
|
1463 |
function update_sidemenu() {
|
1464 |
$Update = $this->update_validate();
|
1465 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1466 |
|
1467 |
if( !empty( $_POST["data"] ) ) {
|
1468 |
foreach($_POST["data"] as $menu) {
|
1476 |
$parent_slug = strip_tags( $menu["parent_slug"] );
|
1477 |
$depth = 'sub';
|
1478 |
}
|
1479 |
+
|
1480 |
$Update[$depth][] = array( "slug" => $slug , "title" => $title , "parent_slug" => $parent_slug );
|
1481 |
}
|
1482 |
}
|
1483 |
}
|
1484 |
|
1485 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["sidemenu"] );
|
1486 |
+
update_option( $Record , $Update );
|
1487 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1488 |
}
|
1489 |
}
|
1491 |
// DataUpdate
|
1492 |
function update_removemetabox() {
|
1493 |
$Update = $this->update_validate();
|
1494 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1495 |
|
1496 |
if( !empty( $_POST["data"] ) ) {
|
1497 |
foreach($_POST["data"] as $post_type => $val) {
|
1503 |
$Update[$post_type][$tmpK] = $tmpV;
|
1504 |
}
|
1505 |
}
|
1506 |
+
|
1507 |
}
|
1508 |
}
|
1509 |
|
1510 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["removemetabox"] );
|
1511 |
+
update_option( $Record , $Update );
|
1512 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1513 |
}
|
1514 |
}
|
1516 |
// DataUpdate
|
1517 |
function update_post_add_edit() {
|
1518 |
$Update = $this->update_validate();
|
1519 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1520 |
|
1521 |
if( !empty( $_POST["data"] ) ) {
|
1522 |
foreach($_POST["data"] as $edited => $val) {
|
1526 |
}
|
1527 |
}
|
1528 |
|
1529 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["post_add_edit"] );
|
1530 |
+
update_option( $Record , $Update );
|
1531 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1532 |
}
|
1533 |
}
|
1535 |
// DataUpdate
|
1536 |
function update_appearance_menus() {
|
1537 |
$Update = $this->update_validate();
|
1538 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1539 |
|
1540 |
if( !empty( $_POST["data"] ) ) {
|
1541 |
foreach($_POST["data"] as $edited => $val) {
|
1545 |
}
|
1546 |
}
|
1547 |
|
1548 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["appearance_menus"] );
|
1549 |
+
update_option( $Record , $Update );
|
1550 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1551 |
}
|
1552 |
}
|
1554 |
// DataUpdate
|
1555 |
function update_loginscreen() {
|
1556 |
$Update = $this->update_validate();
|
1557 |
+
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1558 |
|
1559 |
if( !empty( $_POST["data"] ) ) {
|
1560 |
foreach($_POST["data"] as $key => $val) {
|
1564 |
}
|
1565 |
}
|
1566 |
|
1567 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["loginscreen"] );
|
1568 |
+
update_option( $Record , $Update );
|
1569 |
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
1570 |
|
1571 |
}
|
1579 |
function FilterStart() {
|
1580 |
// site
|
1581 |
if( !is_admin() ) {
|
1582 |
+
add_action( 'wp_loaded' , array( $this , 'remove_action_front' ) ) ;
|
1583 |
add_filter( 'login_headerurl' , array( $this , 'login_headerurl' ) );
|
1584 |
add_filter( 'login_headertitle' , array( $this , 'login_headertitle' ) );
|
1585 |
add_action( 'login_head' , array( $this , 'login_head' ) );
|
1586 |
add_action( 'login_footer' , array( $this , 'login_footer' ) );
|
1587 |
|
1588 |
// front init
|
1589 |
+
add_action( 'wp_loaded' , array( $this , 'front_init' ) );
|
1590 |
}
|
1591 |
+
|
1592 |
// admin UI
|
1593 |
+
if( is_admin() && !is_network_admin () ) {
|
|
|
1594 |
// default side menu load.
|
1595 |
+
add_action( 'admin_init' , array( $this , 'sidemenu_default_load' ) );
|
1596 |
|
1597 |
// default admin bar menu load.
|
1598 |
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_default_load' ) , 1 );
|
1601 |
add_action( 'admin_head' , array( $this , 'post_meta_boxes_load' ) , 10 );
|
1602 |
|
1603 |
// admin init
|
1604 |
+
add_action( 'wp_loaded' , array( $this , 'admin_init' ) );
|
|
|
1605 |
}
|
1606 |
}
|
1607 |
|
1609 |
function admin_init() {
|
1610 |
|
1611 |
$SettingRole = $this->get_data( 'user_role' );
|
1612 |
+
$SettingRole = apply_filters( 'wauc_pre_setting_roles' , $SettingRole );
|
1613 |
+
|
1614 |
if( !empty( $SettingRole ) ) {
|
1615 |
unset($SettingRole["UPFN"]);
|
1616 |
|
1617 |
+
$UserRole = $this->current_user_role_group();
|
1618 |
|
1619 |
+
if( !is_network_admin() && !empty( $UserRole ) ) {
|
1620 |
if( array_key_exists( $UserRole , $SettingRole ) ) {
|
1621 |
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_menu') , 25 );
|
1622 |
+
add_action( 'wp_loaded' , array( $this , 'notice_dismiss' ) , 2 );
|
1623 |
add_action( 'admin_head' , array( $this , 'remove_tab' ) );
|
1624 |
add_filter( 'admin_footer_text' , array( $this , 'admin_footer_text' ) );
|
1625 |
add_action( 'admin_print_styles' , array( $this , 'load_css' ) );
|
1639 |
function front_init() {
|
1640 |
|
1641 |
$SettingRole = $this->get_data( 'user_role' );
|
1642 |
+
$SettingRole = apply_filters( 'wauc_pre_setting_roles' , $SettingRole );
|
1643 |
+
|
1644 |
if( !empty( $SettingRole ) ) {
|
1645 |
unset($SettingRole["UPFN"]);
|
1646 |
|
1647 |
+
$UserRole = $this->current_user_role_group();
|
1648 |
|
1649 |
if( !is_network_admin() && !empty( $UserRole ) ) {
|
1650 |
if( array_key_exists( $UserRole , $SettingRole ) ) {
|
1652 |
$GetData = $this->get_data( 'site' );
|
1653 |
|
1654 |
if( !empty( $GetData["admin_bar"] ) ) {
|
1655 |
+
if( $GetData["admin_bar"] == "hide" ) {
|
1656 |
add_filter( 'show_admin_bar' , '__return_false' );
|
1657 |
} elseif( $GetData["admin_bar"] == "front" ) {
|
1658 |
add_action( 'init' , array( $this , 'notice_dismiss' ) , 2 );
|
1666 |
|
1667 |
// FilterStart
|
1668 |
function remove_action_front() {
|
1669 |
+
$GetData = get_option( $this->Record['site'] );
|
1670 |
|
1671 |
if( !empty( $GetData["UPFN"] ) ) {
|
1672 |
unset( $GetData["UPFN"] );
|
1874 |
|
1875 |
// FilterStart
|
1876 |
function remove_tab() {
|
1877 |
+
$GetData = $this->get_data( 'admin_general' );
|
1878 |
|
1879 |
if( !empty( $GetData["UPFN"] ) ) {
|
1880 |
unset( $GetData["UPFN"] );
|
1907 |
|
1908 |
// FilterStart
|
1909 |
function load_css() {
|
1910 |
+
$GetData = $this->get_data( 'admin_general' );
|
1911 |
|
1912 |
if( !empty( $GetData["UPFN"] ) ) {
|
1913 |
unset( $GetData["UPFN"] );
|
1928 |
function wp_dashboard_setup() {
|
1929 |
global $wp_meta_boxes;
|
1930 |
|
1931 |
+
$GetData = $this->get_data( 'dashboard' );
|
1932 |
|
1933 |
if( !empty( $GetData ) && is_array( $GetData ) ) {
|
1934 |
unset($GetData["UPFN"]);
|
1935 |
$dashboard_widgets = array();
|
1936 |
foreach($wp_meta_boxes["dashboard"] as $ns => $core) {
|
1937 |
+
if( !empty( $core["core"] ) ) {
|
1938 |
+
foreach($core["core"] as $id => $val) {
|
1939 |
+
$dashboard_widgets[$id] = $ns;
|
1940 |
+
}
|
1941 |
}
|
1942 |
}
|
1943 |
|
1950 |
} elseif( array_key_exists( $id , $dashboard_widgets ) ){
|
1951 |
remove_meta_box( $id , 'dashboard' , $dashboard_widgets[$id] );
|
1952 |
} elseif( $id == 'metabox_move' ) {
|
1953 |
+
wp_enqueue_script( 'not-move' , $this->Dir . 'js/dashboard/not_move.js' , array( 'jquery' , 'jquery-ui-sortable' , 'dashboard' ) , $this->Ver , true );
|
1954 |
}
|
1955 |
}
|
1956 |
}
|
1962 |
global $wp_meta_boxes;
|
1963 |
global $current_screen;
|
1964 |
|
1965 |
+
$GetData = $this->get_data( 'removemetabox' );
|
1966 |
|
1967 |
if( !empty( $GetData["UPFN"] ) ) {
|
1968 |
unset( $GetData["UPFN"] );
|
2007 |
|
2008 |
// FilterStart
|
2009 |
function remove_postformats() {
|
2010 |
+
global $wp_version;
|
2011 |
+
if ( version_compare( $wp_version , '3.6' , '>=' ) ) {
|
2012 |
+
$GetData = $this->get_data( 'removemetabox' );
|
2013 |
|
2014 |
if( !empty( $GetData["UPFN"] ) ) {
|
2015 |
unset( $GetData["UPFN"] );
|
2031 |
global $menu;
|
2032 |
global $submenu;
|
2033 |
|
2034 |
+
$GetData = $this->get_data( 'sidemenu' );
|
2035 |
+
$General = $this->get_data( 'admin_general' );
|
2036 |
|
2037 |
if( !empty( $GetData["UPFN"] ) ) {
|
2038 |
unset( $GetData["UPFN"] );
|
2172 |
|
2173 |
// FilterStart
|
2174 |
function add_edit_post_change_permalink( $permalink_html ) {
|
2175 |
+
$GetData = $this->get_data( 'post_add_edit' );
|
2176 |
|
2177 |
if( !empty( $GetData["UPFN"] ) ) {
|
2178 |
unset( $GetData["UPFN"] );
|
2193 |
|
2194 |
// FilterStart
|
2195 |
function admin_title( $title ) {
|
2196 |
+
$GetData = $this->get_data( 'admin_general' );
|
2197 |
|
2198 |
if( !empty( $GetData["UPFN"] ) ) {
|
2199 |
unset( $GetData["UPFN"] );
|
2210 |
|
2211 |
// FilterStart
|
2212 |
function nav_menus() {
|
2213 |
+
$GetData = $this->get_data( 'appearance_menus' );
|
2214 |
if( !empty( $GetData["UPFN"] ) ) {
|
2215 |
unset( $GetData["UPFN"] );
|
2216 |
|
2217 |
if( !empty( $GetData["add_new_menu"] ) ) {
|
2218 |
+
global $wp_version;
|
2219 |
+
if ( version_compare( $wp_version , '3.6' , '>=' ) ) {
|
2220 |
echo '<style>.manage-menus .add-new-menu-action, .manage-menus .add-edit-menu-action, .locations-row-links .locations-add-menu-link { display: none; }</style>';
|
2221 |
} else {
|
2222 |
echo '<style>.nav-tabs .menu-add-new { display: none; }</style>';
|