Version Description
Possible to customize is the wp_admin_bar. will check whether the authority has been set.
Download this release
Release Info
Developer | gqevu6bsiz |
Plugin | WP Admin UI Customize |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.1
- inc/setting_admin_bar_menu.php +390 -0
- inc/setting_admin_general.php +0 -93
- inc/setting_default.php +31 -17
- inc/setting_sidemenu.php +2 -2
- languages/wauc-ja.mo +0 -0
- languages/wauc-ja.po +30 -15
- languages/wauc.pot +29 -14
- readme.txt +6 -2
- wp-admin-ui-customize.css +80 -0
- wp-admin-ui-customize.php +215 -41
inc/setting_admin_bar_menu.php
ADDED
@@ -0,0 +1,390 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( !empty( $_POST["update"] ) ) {
|
4 |
+
$this->update_admin_bar_menu();
|
5 |
+
} elseif( !empty( $_POST["reset"] ) ) {
|
6 |
+
$this->update_reset( 'admin_bar_menu' );
|
7 |
+
}
|
8 |
+
|
9 |
+
$Data = $this->get_data( 'admin_bar_menu' );
|
10 |
+
|
11 |
+
// include js css
|
12 |
+
$ReadedJs = array( 'jquery' , 'jquery-ui-draggable' , 'jquery-ui-droppable' , 'jquery-ui-sortable' );
|
13 |
+
wp_enqueue_script( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basename( __FILE__ ) ) ) . '.js', $ReadedJs , $this->Ver );
|
14 |
+
wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basename( __FILE__ ) ) ) . '.css', array() , $this->Ver );
|
15 |
+
|
16 |
+
?>
|
17 |
+
|
18 |
+
<div class="wrap">
|
19 |
+
<div class="icon32" id="icon-tools"></div>
|
20 |
+
<?php echo $this->Msg; ?>
|
21 |
+
<h2><?php _e( 'Admin bar Menu' , $this->ltd ); ?></h2>
|
22 |
+
<p><?php _e( 'Please change the menu by drag and drop.' , $this->ltd ); ?></p>
|
23 |
+
<p><strong><?php _e( 'Notice: When you set up the same menu more, you will not display properly.' , $this->ltd ); ?></strong></p>
|
24 |
+
<p class="description"><?php _e( 'can be more than one custom menu.' , $this->ltd ); ?></p>
|
25 |
+
|
26 |
+
<form id="waum_setting_admin_bar_menu" class="waum_form" method="post" action="">
|
27 |
+
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
28 |
+
<?php wp_nonce_field(); ?>
|
29 |
+
|
30 |
+
<div class="metabox-holder columns-2" id="admin_bar-holder">
|
31 |
+
|
32 |
+
<div id="postbox-container-1" class="postbox-container">
|
33 |
+
<div class="postbox">
|
34 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
35 |
+
<h3 class="hndle"><span><?php _e( 'Left' , $this->ltd ); ?></span></h3>
|
36 |
+
<div class="inside">
|
37 |
+
<?php if( empty( $Data ) ) : ?>
|
38 |
+
|
39 |
+
<?php $ParentNode = array(); ?>
|
40 |
+
<?php $ChildNode = array(); ?>
|
41 |
+
<?php foreach( $this->Admin_bar as $node_id => $node ) : ?>
|
42 |
+
|
43 |
+
<?php if( empty( $node->parent ) && $node_id != 'top-secondary' ) : ?>
|
44 |
+
|
45 |
+
<?php $ParentNode[$node_id] = $node; ?>
|
46 |
+
|
47 |
+
<?php endif; ?>
|
48 |
+
|
49 |
+
<?php endforeach; ?>
|
50 |
+
|
51 |
+
<?php foreach( $this->Admin_bar as $node_id => $node ) : ?>
|
52 |
+
|
53 |
+
<?php if( !empty( $node->parent ) && $node->parent != 'top-secondary' && $node->id != 'wp-logo-external' ) : ?>
|
54 |
+
|
55 |
+
<?php if( $node->parent == 'wp-logo-external' ) : ?>
|
56 |
+
<?php $ChildNode["wp-logo"][] = $node; ?>
|
57 |
+
<?php else: ?>
|
58 |
+
<?php $ChildNode[$node->parent][] = $node; ?>
|
59 |
+
<?php endif; ?>
|
60 |
+
|
61 |
+
<?php endif; ?>
|
62 |
+
|
63 |
+
<?php endforeach; ?>
|
64 |
+
|
65 |
+
<?php foreach( $ParentNode as $p_node_id => $p_node ) : ?>
|
66 |
+
|
67 |
+
<?php $pnsn = array(); ?>
|
68 |
+
<?php if( !empty( $ChildNode[$p_node_id] ) ) : ?>
|
69 |
+
|
70 |
+
<?php foreach( $ChildNode[$p_node_id] as $key => $c_node ) : ?>
|
71 |
+
|
72 |
+
<?php $pnsn[] = array( 'id' => $c_node->id , 'title' => $c_node->title , 'parent' => $p_node_id , 'href' => $c_node->href , 'group' => false , 'new' => false ); ?>
|
73 |
+
|
74 |
+
<?php endforeach; ?>
|
75 |
+
|
76 |
+
<?php endif; ?>
|
77 |
+
|
78 |
+
<?php $menu_widget = array( 'id' => $p_node->id , 'title' => $p_node->title , 'parent' => '' , 'href' => $p_node->href , 'group' => false , 'new' => false , 'subnode' => $pnsn ); ?>
|
79 |
+
|
80 |
+
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
81 |
+
|
82 |
+
<?php endforeach; ?>
|
83 |
+
|
84 |
+
<?php else : ?>
|
85 |
+
|
86 |
+
<?php if( !empty( $Data["left"]["main"] ) ) : ?>
|
87 |
+
|
88 |
+
<?php foreach($Data["left"]["main"] as $main_node) : ?>
|
89 |
+
|
90 |
+
<?php $pnsn = array(); ?>
|
91 |
+
<?php if( !empty( $Data["left"]["sub"] ) ) : ?>
|
92 |
+
<?php foreach($Data["left"]["sub"] as $sub_node) : ?>
|
93 |
+
|
94 |
+
<?php if( $main_node["id"] == $sub_node["parent"] ) : ?>
|
95 |
+
|
96 |
+
<?php $pnsn[] = array( 'id' => $sub_node["id"] , 'title' => stripslashes( $sub_node["title"] ) , 'parent' => $main_node["id"] , 'href' => $sub_node["href"] , 'group' => false , 'new' => false ); ?>
|
97 |
+
|
98 |
+
<?php endif; ?>
|
99 |
+
|
100 |
+
<?php endforeach; ?>
|
101 |
+
<?php endif; ?>
|
102 |
+
|
103 |
+
<?php $menu_widget = array( 'id' => $main_node["id"] , 'title' => stripslashes( $main_node["title"] ) , 'parent' => '' , 'href' => $main_node["href"] , 'group' => false , 'new' => false , 'subnode' => $pnsn ); ?>
|
104 |
+
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
105 |
+
|
106 |
+
<?php endforeach; ?>
|
107 |
+
|
108 |
+
<?php endif; ?>
|
109 |
+
|
110 |
+
<?php endif; ?>
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<div id="postbox-container-2" class="postbox-container">
|
116 |
+
<div class="postbox">
|
117 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
118 |
+
<h3 class="hndle"><span><?php _e( 'Right' , $this->ltd ); ?></span></h3>
|
119 |
+
<div class="inside">
|
120 |
+
|
121 |
+
<?php if( empty( $Data ) ) : ?>
|
122 |
+
|
123 |
+
<?php $ParentNode = array(); ?>
|
124 |
+
<?php $ChildNode = array(); ?>
|
125 |
+
<?php foreach( $this->Admin_bar as $node_id => $node ) : ?>
|
126 |
+
|
127 |
+
<?php if( !empty( $node->parent ) && $node->parent == 'top-secondary' ) : ?>
|
128 |
+
|
129 |
+
<?php $ParentNode[$node_id] = $node; ?>
|
130 |
+
|
131 |
+
<?php endif; ?>
|
132 |
+
|
133 |
+
<?php endforeach; ?>
|
134 |
+
|
135 |
+
<?php foreach( $this->Admin_bar as $node_id => $node ) : ?>
|
136 |
+
|
137 |
+
<?php if( !empty( $node->parent ) && $node->parent == 'user-actions' ) : ?>
|
138 |
+
|
139 |
+
<?php $ChildNode["my-account"][] = $node; ?>
|
140 |
+
|
141 |
+
<?php endif; ?>
|
142 |
+
|
143 |
+
<?php endforeach; ?>
|
144 |
+
|
145 |
+
<?php foreach( $ParentNode as $p_node_id => $p_node ) : ?>
|
146 |
+
|
147 |
+
<?php $pnsn = array(); ?>
|
148 |
+
<?php if( !empty( $ChildNode[$p_node_id] ) ) : ?>
|
149 |
+
|
150 |
+
<?php foreach( $ChildNode[$p_node_id] as $key => $c_node ) : ?>
|
151 |
+
|
152 |
+
<?php $pnsn[] = array( 'id' => $c_node->id , 'title' => $c_node->title , 'parent' => $p_node_id , 'href' => $c_node->href , 'group' => false , 'new' => false ); ?>
|
153 |
+
|
154 |
+
<?php endforeach; ?>
|
155 |
+
|
156 |
+
<?php endif; ?>
|
157 |
+
|
158 |
+
<?php $menu_widget = array( 'id' => $p_node->id , 'title' => $p_node->title , 'parent' => '' , 'href' => $p_node->href , 'group' => false , 'new' => false , 'subnode' => $pnsn ); ?>
|
159 |
+
|
160 |
+
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
161 |
+
|
162 |
+
<?php endforeach; ?>
|
163 |
+
|
164 |
+
<?php else : ?>
|
165 |
+
|
166 |
+
<?php if( !empty( $Data["right"]["main"] ) ) : ?>
|
167 |
+
|
168 |
+
<?php foreach($Data["right"]["main"] as $main_node) : ?>
|
169 |
+
|
170 |
+
<?php $pnsn = array(); ?>
|
171 |
+
<?php if( !empty( $Data["right"]["sub"] ) ) : ?>
|
172 |
+
|
173 |
+
<?php foreach($Data["right"]["sub"] as $sub_node) : ?>
|
174 |
+
|
175 |
+
<?php if( $main_node["id"] == $sub_node["parent"] ) : ?>
|
176 |
+
|
177 |
+
<?php $pnsn[] = array( 'id' => $sub_node["id"] , 'title' => stripslashes( $sub_node["title"] ) , 'parent' => $main_node["id"] , 'href' => $sub_node["href"] , 'group' => false , 'new' => false ); ?>
|
178 |
+
|
179 |
+
<?php endif; ?>
|
180 |
+
|
181 |
+
<?php endforeach; ?>
|
182 |
+
<?php endif; ?>
|
183 |
+
|
184 |
+
<?php $menu_widget = array( 'id' => $main_node["id"] , 'title' => stripslashes( $main_node["title"] ) , 'parent' => '' , 'href' => $main_node["href"] , 'group' => false , 'new' => false , 'subnode' => $pnsn ); ?>
|
185 |
+
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
186 |
+
|
187 |
+
<?php endforeach; ?>
|
188 |
+
|
189 |
+
<?php endif; ?>
|
190 |
+
|
191 |
+
<?php endif; ?>
|
192 |
+
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
+
</div>
|
196 |
+
|
197 |
+
<div class="clear"></div>
|
198 |
+
|
199 |
+
</div>
|
200 |
+
|
201 |
+
<div class="metabox-holder columns-1">
|
202 |
+
|
203 |
+
<div class="postbox">
|
204 |
+
<h3 class="hndle"><span><?php _e ( 'Menu that can be added' , $this->ltd ); ?></span></h3>
|
205 |
+
<div class="inside">
|
206 |
+
|
207 |
+
<p class="description">Custom Menu</p>
|
208 |
+
<?php $menu_widget = array( 'id' => "custom_node" , 'title' => "" , 'parent' => '' , 'href' => "" , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
209 |
+
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
210 |
+
<div class="clear"></div>
|
211 |
+
|
212 |
+
<p class="description"><?php _e ( 'Menu that can be added' , $this->ltd ); ?></p>
|
213 |
+
<?php foreach( $this->Admin_bar as $node_id => $node ) : ?>
|
214 |
+
|
215 |
+
<?php if( $node_id != 'top-secondary' ) : ?>
|
216 |
+
<?php if( empty( $node->parent ) or $node->parent == 'top-secondary' ) : ?>
|
217 |
+
|
218 |
+
<?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
219 |
+
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
220 |
+
|
221 |
+
<?php endif; ?>
|
222 |
+
<?php endif; ?>
|
223 |
+
|
224 |
+
<?php endforeach; ?>
|
225 |
+
|
226 |
+
<div class="clear"></div>
|
227 |
+
|
228 |
+
<?php foreach( $this->Admin_bar as $node_id => $node ) : ?>
|
229 |
+
|
230 |
+
<?php if( !empty( $node->parent ) && $node->parent != 'top-secondary' && $node->id != 'user-info' && $node->id != 'user-actions' && $node->id != 'wp-logo-external' ) : ?>
|
231 |
+
|
232 |
+
<?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'new' => true , 'subnode' => false ); ?>
|
233 |
+
<?php $this->admin_bar_menu_widget( $menu_widget ); ?>
|
234 |
+
|
235 |
+
<?php endif; ?>
|
236 |
+
|
237 |
+
<?php endforeach; ?>
|
238 |
+
|
239 |
+
<div class="clear"></div>
|
240 |
+
|
241 |
+
</div>
|
242 |
+
</div>
|
243 |
+
|
244 |
+
</div>
|
245 |
+
|
246 |
+
<p class="submit">
|
247 |
+
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
|
248 |
+
</p>
|
249 |
+
|
250 |
+
<p class="submit reset">
|
251 |
+
<span class="description"><?php _e( 'Would initialize?' , $this->ltd ); ?></span>
|
252 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
|
253 |
+
</p>
|
254 |
+
|
255 |
+
</form>
|
256 |
+
|
257 |
+
</div>
|
258 |
+
|
259 |
+
<style>
|
260 |
+
#admin_bar-holder .item-edit { background-image: url(<?php echo admin_url(); ?>images/arrows.png); }
|
261 |
+
#admin_bar-holder .item-edit:hover { background-image: url(<?php echo admin_url(); ?>images/arrows-dark.png); }
|
262 |
+
|
263 |
+
#admin_bar-holder .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon,
|
264 |
+
#admin_bar-holder .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
|
265 |
+
#admin_bar-holder .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
|
266 |
+
#admin_bar-holder .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon
|
267 |
+
{ background-image: url(../wp-includes/images/admin-bar-sprite.png); }
|
268 |
+
</style>
|
269 |
+
|
270 |
+
<script type="text/javascript">
|
271 |
+
jQuery(document).ready(function($) {
|
272 |
+
|
273 |
+
var $Form = $("#waum_setting_admin_bar_menu");
|
274 |
+
var $AddInside = $('.columns-1 .postbox .inside', $Form);
|
275 |
+
var $SettingInside = $('#admin_bar-holder .postbox .inside', $Form);
|
276 |
+
|
277 |
+
$AddInside.children('.widget').draggable({
|
278 |
+
connectToSortable: '#admin_bar-holder .postbox .inside',
|
279 |
+
handle: '> .widget-top > .widget-title',
|
280 |
+
distance: 2,
|
281 |
+
helper: 'clone',
|
282 |
+
zIndex: 5,
|
283 |
+
containment: 'document',
|
284 |
+
stop: function(e,ui) {
|
285 |
+
widget_each();
|
286 |
+
}
|
287 |
+
});
|
288 |
+
|
289 |
+
$SettingInside.live( "mouseover" , function() {
|
290 |
+
$('#admin_bar-holder .postbox .inside, #admin_bar-holder .postbox .inside .widget .widget-inside .submenu', $Form).sortable({
|
291 |
+
placeholder: "widget-placeholder",
|
292 |
+
items: '> .widget',
|
293 |
+
connectWith: "#admin_bar-holder .postbox .inside, #admin_bar-holder .postbox .inside .widget .widget-inside .submenu",
|
294 |
+
handle: '> .widget-top > .widget-title',
|
295 |
+
cursor: 'move',
|
296 |
+
distance: 2,
|
297 |
+
containment: 'document',
|
298 |
+
change: function(e,ui) {
|
299 |
+
var $height = ui.helper.height();
|
300 |
+
$('#admin_bar-holder .postbox .inside .widget-placeholder').height($height);
|
301 |
+
},
|
302 |
+
stop: function(e,ui) {
|
303 |
+
if ( ui.item.hasClass('deleting') ) {
|
304 |
+
ui.item.remove();
|
305 |
+
}
|
306 |
+
widget_each();
|
307 |
+
}
|
308 |
+
});
|
309 |
+
});
|
310 |
+
|
311 |
+
$('.columns-1', $Form).droppable({
|
312 |
+
tolerance: 'pointer',
|
313 |
+
accept: function(o){
|
314 |
+
return $(o).parent().parent().parent().parent().parent().parent().parent().attr('class') != 'columns-1';
|
315 |
+
},
|
316 |
+
drop: function(e,ui) {
|
317 |
+
ui.draggable.addClass('deleting');
|
318 |
+
},
|
319 |
+
over: function(e,ui) {
|
320 |
+
ui.draggable.addClass('deleting');
|
321 |
+
$('div.widget-placeholder').hide();
|
322 |
+
},
|
323 |
+
out: function(e,ui) {
|
324 |
+
ui.draggable.removeClass('deleting');
|
325 |
+
$('div.widget-placeholder').show();
|
326 |
+
}
|
327 |
+
});
|
328 |
+
|
329 |
+
|
330 |
+
var $AvailableAction = $('#admin_bar-holder .postbox .inside .widget .widget-top .widget-title-action a[href=#available]', $Form);
|
331 |
+
$AvailableAction.live( 'click', function() {
|
332 |
+
$(this).parent().parent().parent().children(".widget-inside").slideToggle();
|
333 |
+
return false;
|
334 |
+
});
|
335 |
+
|
336 |
+
var $RemoveAction = $('#admin_bar-holder .postbox .inside .widget .widget-inside .widget-control-actions .alignleft a[href=#remove]', $Form);
|
337 |
+
$RemoveAction.live( 'click', function() {
|
338 |
+
$(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
|
339 |
+
return false;
|
340 |
+
});
|
341 |
+
|
342 |
+
function widget_each() {
|
343 |
+
var $Count = 0;
|
344 |
+
$('#admin_bar-holder .postbox .inside .widget', $Form).each(function() {
|
345 |
+
var $InputId = $(this).children(".widget-inside").children(".settings").children(".description").children(".idtext");
|
346 |
+
var $InputLink = $(this).children(".widget-inside").children(".settings").children(".description").children(".linktext");
|
347 |
+
var $InputTitle = $(this).children(".widget-inside").children(".settings").children("label").children(".titletext");
|
348 |
+
var $InputParentName = $(this).children(".widget-inside").children(".settings").children(".parent");
|
349 |
+
|
350 |
+
var $BoxName = "";
|
351 |
+
if( $(this).parent().hasClass("submenu") ) {
|
352 |
+
$BoxName = $(this).parent().parent().parent().parent().parent().parent().attr("id");
|
353 |
+
} else {
|
354 |
+
$BoxName = $(this).parent().parent().parent().attr("id");
|
355 |
+
}
|
356 |
+
var $BarType = '';
|
357 |
+
if( $BoxName == 'postbox-container-1' ) {
|
358 |
+
$BarType = 'left';
|
359 |
+
} else if( $BoxName == 'postbox-container-2' ) {
|
360 |
+
$BarType = 'right';
|
361 |
+
}
|
362 |
+
|
363 |
+
if( $(this).hasClass("custom_node") ) {
|
364 |
+
var $CustomVal = $InputId.val();
|
365 |
+
$InputId.val( $CustomVal + Math.ceil( Math.random() * 1000 ) );
|
366 |
+
}
|
367 |
+
|
368 |
+
var $Name = 'data' + '[' + $BarType + ']['+$Count+']';
|
369 |
+
$InputId.attr("name", $Name+'[id]');
|
370 |
+
$InputLink.attr("name", $Name+'[href]');
|
371 |
+
$InputTitle.attr("name", $Name+'[title]');
|
372 |
+
$InputParentName.attr("name", $Name+'[parent]');
|
373 |
+
|
374 |
+
if ( $(this).parent().parent().parent().parent().hasClass("submenu") ) {
|
375 |
+
// None three
|
376 |
+
$(this).remove();
|
377 |
+
} else if ( $(this).parent().hasClass("submenu") ) {
|
378 |
+
var $ParentId = $(this).parent().parent().children(".settings").children(".description").children(".idtext").val();
|
379 |
+
$InputParentName.val($ParentId);
|
380 |
+
} else {
|
381 |
+
$InputParentName.val('');
|
382 |
+
}
|
383 |
+
|
384 |
+
$Count++;
|
385 |
+
});
|
386 |
+
}
|
387 |
+
widget_each();
|
388 |
+
|
389 |
+
});
|
390 |
+
</script>
|
inc/setting_admin_general.php
CHANGED
@@ -28,99 +28,6 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
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>Admin bar <?php _e( 'Upper left menu' , $this->ltd ); ?></span></h3>
|
34 |
-
<div class="inside">
|
35 |
-
<table class="form-table">
|
36 |
-
<tbody>
|
37 |
-
<?php $field = 'wp-logo'; ?>
|
38 |
-
<tr>
|
39 |
-
<th>
|
40 |
-
<?php _e( 'Wordpress Logo' , $this->ltd ); ?>
|
41 |
-
</th>
|
42 |
-
<td>
|
43 |
-
<?php $Checked = ''; ?>
|
44 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
45 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?>> <?php _e ( 'Hide' ); ?></label>
|
46 |
-
</td>
|
47 |
-
</tr>
|
48 |
-
<?php $field = 'comment'; ?>
|
49 |
-
<tr>
|
50 |
-
<th>
|
51 |
-
<?php _e( 'Comment' ); ?>
|
52 |
-
</th>
|
53 |
-
<td>
|
54 |
-
<?php $Checked = ''; ?>
|
55 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
56 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?>> <?php _e ( 'Hide' ); ?></label>
|
57 |
-
</td>
|
58 |
-
</tr>
|
59 |
-
<?php $field = 'new_content'; ?>
|
60 |
-
<tr>
|
61 |
-
<th>
|
62 |
-
<?php _e( 'Add New' , $this->ltd ); ?>
|
63 |
-
</th>
|
64 |
-
<td>
|
65 |
-
<?php $Checked = ''; ?>
|
66 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
67 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?>> <?php _e ( 'Hide' ); ?></label>
|
68 |
-
</td>
|
69 |
-
</tr>
|
70 |
-
<?php $field = 'update_menu'; ?>
|
71 |
-
<tr>
|
72 |
-
<th>
|
73 |
-
<?php _e( 'Update Menu' , $this->ltd ); ?>
|
74 |
-
</th>
|
75 |
-
<td>
|
76 |
-
<?php $Checked = ''; ?>
|
77 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
78 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?>> <?php _e ( 'Hide' ); ?></label>
|
79 |
-
</td>
|
80 |
-
</tr>
|
81 |
-
</tbody>
|
82 |
-
</table>
|
83 |
-
|
84 |
-
</div>
|
85 |
-
</div>
|
86 |
-
|
87 |
-
<div class="postbox">
|
88 |
-
<div class="handlediv" title="Click to toggle"><br></div>
|
89 |
-
<h3 class="hndle"><span>Admin bar <?php _e( 'Upper right menu' , $this->ltd ); ?></span></h3>
|
90 |
-
<div class="inside">
|
91 |
-
<table class="form-table">
|
92 |
-
<tbody>
|
93 |
-
<?php $field = 'my-account-title'; ?>
|
94 |
-
<tr>
|
95 |
-
<th>
|
96 |
-
<label for=""><?php _e( 'Account Title' , $this->ltd ); ?></label>
|
97 |
-
</th>
|
98 |
-
<td>
|
99 |
-
<?php $Val = ''; ?>
|
100 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
101 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
102 |
-
<code>[AcountName]</code>
|
103 |
-
<p class="description">Default: <?php echo sprintf( __('Howdy, %1$s'), $User->data->display_name ); ?></p>
|
104 |
-
<p class="description">Ex: Hello! My Name is [AcountName]. => <strong>Hello! My Name is <?php echo $User->data->display_name; ?>.</strong></p>
|
105 |
-
</td>
|
106 |
-
</tr>
|
107 |
-
<?php $field = 'edit-profile'; ?>
|
108 |
-
<tr>
|
109 |
-
<th>
|
110 |
-
<?php _e( 'Profile Edit' , $this->ltd ); ?>
|
111 |
-
</th>
|
112 |
-
<td>
|
113 |
-
<?php $Checked = ''; ?>
|
114 |
-
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
115 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?>> <?php _e ( 'Hide' ); ?></label>
|
116 |
-
</td>
|
117 |
-
</tr>
|
118 |
-
</tbody>
|
119 |
-
</table>
|
120 |
-
|
121 |
-
</div>
|
122 |
-
</div>
|
123 |
-
|
124 |
<div class="postbox">
|
125 |
<div class="handlediv" title="Click to toggle"><br></div>
|
126 |
<h3 class="hndle"><span><?php echo _e( 'Notice' , $this->ltd ); ?></span></h3>
|
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 echo _e( 'Notice' , $this->ltd ); ?></span></h3>
|
inc/setting_default.php
CHANGED
@@ -26,26 +26,40 @@ wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basena
|
|
26 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
27 |
<?php wp_nonce_field(); ?>
|
28 |
|
29 |
-
<div class="metabox-holder columns-
|
30 |
-
|
31 |
-
<div class="postbox">
|
32 |
-
<div class="
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
46 |
</div>
|
47 |
</div>
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
</div>
|
50 |
|
51 |
<p class="submit">
|
26 |
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
27 |
<?php wp_nonce_field(); ?>
|
28 |
|
29 |
+
<div class="metabox-holder columns-2">
|
30 |
+
|
31 |
+
<div id="postbox-container-1" class="postbox-container">
|
32 |
+
<div class="postbox">
|
33 |
+
<h3 class="hndle"><span><?php _e( 'Role' ); ?></span></h3>
|
34 |
+
<div class="inside">
|
35 |
+
<?php $field = 'user_role'; ?>
|
36 |
+
<?php foreach($UserRoles as $key => $val) : ?>
|
37 |
+
<?php $Checked = ''; ?>
|
38 |
+
<?php if( !empty( $Data[$key] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
39 |
+
<p>
|
40 |
+
<label>
|
41 |
+
<input type="checkbox" name="data[<?php echo $field; ?>][<?php echo $key; ?>]" value="1" <?php echo $Checked; ?> />
|
42 |
+
<?php echo $val; ?>
|
43 |
+
</label>
|
44 |
+
</p>
|
45 |
+
<?php endforeach; ?>
|
46 |
+
</div>
|
47 |
</div>
|
48 |
</div>
|
49 |
|
50 |
+
<div id="postbox-container-2" class="postbox-container">
|
51 |
+
<div class="postbox">
|
52 |
+
<h3 class="hndle"><span><?php _e( 'Please Donation' , $this->ltd ); ?></span></h3>
|
53 |
+
<div class="inside">
|
54 |
+
<p><?php _e( 'When you are satisfied with my plugin,<br />I\'m want a gift card.<br />Thanks!' , $this->ltd ); ?></p>
|
55 |
+
<p><img src="http://gqevu6bsiz.chicappa.jp/wp-content/uploads/2013/01/email.gif" /></p>
|
56 |
+
<p><a href="<?php _e( 'http://www.amazon.com/gp/gc' , $this->ltd ); ?>" target="_blank">Amazon Gift Card</a></p>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
|
61 |
+
<div class="clear"></div>
|
62 |
+
|
63 |
</div>
|
64 |
|
65 |
<p class="submit">
|
inc/setting_sidemenu.php
CHANGED
@@ -251,8 +251,8 @@ jQuery(document).ready(function($) {
|
|
251 |
return false;
|
252 |
});
|
253 |
|
254 |
-
var $
|
255 |
-
$
|
256 |
$(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
|
257 |
return false;
|
258 |
});
|
251 |
return false;
|
252 |
});
|
253 |
|
254 |
+
var $RemoveAction = $('#postbox-container-1 .postbox .inside .widget .widget-inside .widget-control-actions .alignleft a[href=#remove]', $Form);
|
255 |
+
$RemoveAction.live( 'click', function() {
|
256 |
$(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
|
257 |
return false;
|
258 |
});
|
languages/wauc-ja.mo
CHANGED
Binary file
|
languages/wauc-ja.po
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: 1.0.0\n"
|
4 |
"POT-Creation-Date: \n"
|
5 |
-
"PO-Revision-Date:
|
6 |
"Language-Team: \n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=utf-8\n"
|
@@ -16,9 +16,18 @@ msgstr ""
|
|
16 |
msgid "It is an excellent plug-in to customize the management screen."
|
17 |
msgstr "管理画面のカスタマイズに優れたプラグインです。"
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgid "Customize the UI of the management screen for all users."
|
20 |
msgstr "全てのユーザーの管理画面UIをカスタマイズします。"
|
21 |
|
|
|
|
|
|
|
22 |
msgid "Please select the user role you want to apply the settings."
|
23 |
msgstr "設定を適用する権限を選んでください。"
|
24 |
|
@@ -43,18 +52,9 @@ msgstr "サイト全体のフィードリンク"
|
|
43 |
msgid "Extra feed"
|
44 |
msgstr "その他のフィードリンク"
|
45 |
|
46 |
-
msgid "Admin bar Customize"
|
47 |
-
msgstr "管理画面バーのカスタマイズ"
|
48 |
-
|
49 |
msgid "Account Title"
|
50 |
msgstr "アカウント表記"
|
51 |
|
52 |
-
msgid "Upper left menu"
|
53 |
-
msgstr "左上メニュー"
|
54 |
-
|
55 |
-
msgid "Upper right menu"
|
56 |
-
msgstr "右上メニュー"
|
57 |
-
|
58 |
msgid "Wordpress Logo"
|
59 |
msgstr "Wordpress のロゴ"
|
60 |
|
@@ -91,8 +91,26 @@ msgstr "フッターテキスト"
|
|
91 |
msgid "Screen Options and Help tab"
|
92 |
msgstr "表示オプションとヘルプタブ"
|
93 |
|
94 |
-
msgid "
|
95 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
msgid "Side Menu"
|
98 |
msgstr "サイドメニュー"
|
@@ -103,9 +121,6 @@ msgstr "ドラッグ&ドロップでメニューを変更してください。"
|
|
103 |
msgid "The current menu"
|
104 |
msgstr "現在のメニュー"
|
105 |
|
106 |
-
msgid "Menu that can be added"
|
107 |
-
msgstr "追加できるメニュー一覧"
|
108 |
-
|
109 |
msgid "Sepalator"
|
110 |
msgstr "区切り線"
|
111 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: 1.0.0\n"
|
4 |
"POT-Creation-Date: \n"
|
5 |
+
"PO-Revision-Date: 2013-01-29 22:16+0900\n"
|
6 |
"Language-Team: \n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=utf-8\n"
|
16 |
msgid "It is an excellent plug-in to customize the management screen."
|
17 |
msgstr "管理画面のカスタマイズに優れたプラグインです。"
|
18 |
|
19 |
+
msgid "When you are satisfied with my plugin,<br />I'm want a gift card.<br />Thanks!"
|
20 |
+
msgstr "あなたがこのプラグインに満足できたら、私にギフトカードをプレゼントして欲しいです。<br />よろしくお願いします。"
|
21 |
+
|
22 |
+
msgid "http://www.amazon.com/gp/gc"
|
23 |
+
msgstr "http://www.amazon.co.jp/gp/gc/"
|
24 |
+
|
25 |
msgid "Customize the UI of the management screen for all users."
|
26 |
msgstr "全てのユーザーの管理画面UIをカスタマイズします。"
|
27 |
|
28 |
+
msgid "Authority to apply the setting is not selected. <a href=\"%s\">From here</a>, please select the permissions you want to set."
|
29 |
+
msgstr "設定を適用する権限が選択されていません。<a href=\"%s\">こちら</a>から設定する権限を選んでください。"
|
30 |
+
|
31 |
msgid "Please select the user role you want to apply the settings."
|
32 |
msgstr "設定を適用する権限を選んでください。"
|
33 |
|
52 |
msgid "Extra feed"
|
53 |
msgstr "その他のフィードリンク"
|
54 |
|
|
|
|
|
|
|
55 |
msgid "Account Title"
|
56 |
msgstr "アカウント表記"
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
msgid "Wordpress Logo"
|
59 |
msgstr "Wordpress のロゴ"
|
60 |
|
91 |
msgid "Screen Options and Help tab"
|
92 |
msgstr "表示オプションとヘルプタブ"
|
93 |
|
94 |
+
msgid "Admin bar Menu"
|
95 |
+
msgstr "管理バー"
|
96 |
+
|
97 |
+
msgid "Notice: When you set up the same menu more, you will not display properly."
|
98 |
+
msgstr "同じメニューを複数設置すると、うまく表示されません。"
|
99 |
+
|
100 |
+
msgid "can be more than one custom menu."
|
101 |
+
msgstr "カスタムメニューは複数できます。"
|
102 |
+
|
103 |
+
msgid "Left"
|
104 |
+
msgstr "左"
|
105 |
+
|
106 |
+
msgid "Right"
|
107 |
+
msgstr "右"
|
108 |
+
|
109 |
+
msgid "Menu that can be added"
|
110 |
+
msgstr "追加できるメニュー一覧"
|
111 |
+
|
112 |
+
msgid "Custom Menu"
|
113 |
+
msgstr "カスタムメニュー"
|
114 |
|
115 |
msgid "Side Menu"
|
116 |
msgstr "サイドメニュー"
|
121 |
msgid "The current menu"
|
122 |
msgstr "現在のメニュー"
|
123 |
|
|
|
|
|
|
|
124 |
msgid "Sepalator"
|
125 |
msgstr "区切り線"
|
126 |
|
languages/wauc.pot
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: 1.0.0\n"
|
4 |
"POT-Creation-Date: \n"
|
5 |
-
"PO-Revision-Date:
|
6 |
"Language-Team: \n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=utf-8\n"
|
@@ -16,9 +16,18 @@ msgstr ""
|
|
16 |
msgid "It is an excellent plug-in to customize the management screen."
|
17 |
msgstr ""
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgid "Customize the UI of the management screen for all users."
|
20 |
msgstr ""
|
21 |
|
|
|
|
|
|
|
22 |
msgid "Please select the user role you want to apply the settings."
|
23 |
msgstr ""
|
24 |
|
@@ -43,18 +52,9 @@ msgstr ""
|
|
43 |
msgid "Extra feed"
|
44 |
msgstr ""
|
45 |
|
46 |
-
msgid "Admin bar Customize"
|
47 |
-
msgstr ""
|
48 |
-
|
49 |
msgid "Account Title"
|
50 |
msgstr ""
|
51 |
|
52 |
-
msgid "Upper left menu"
|
53 |
-
msgstr ""
|
54 |
-
|
55 |
-
msgid "Upper right menu"
|
56 |
-
msgstr ""
|
57 |
-
|
58 |
msgid "Wordpress Logo"
|
59 |
msgstr ""
|
60 |
|
@@ -91,21 +91,36 @@ msgstr ""
|
|
91 |
msgid "Screen Options and Help tab"
|
92 |
msgstr ""
|
93 |
|
94 |
-
msgid "
|
95 |
msgstr ""
|
96 |
|
97 |
-
msgid "
|
98 |
msgstr ""
|
99 |
|
100 |
-
msgid "
|
101 |
msgstr ""
|
102 |
|
103 |
-
msgid "
|
|
|
|
|
|
|
104 |
msgstr ""
|
105 |
|
106 |
msgid "Menu that can be added"
|
107 |
msgstr ""
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
msgid "Sepalator"
|
110 |
msgstr ""
|
111 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: 1.0.0\n"
|
4 |
"POT-Creation-Date: \n"
|
5 |
+
"PO-Revision-Date: 2013-01-29 22:16+0900\n"
|
6 |
"Language-Team: \n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=utf-8\n"
|
16 |
msgid "It is an excellent plug-in to customize the management screen."
|
17 |
msgstr ""
|
18 |
|
19 |
+
msgid "When you are satisfied with my plugin,<br />I'm want a gift card.<br />Thanks!"
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
msgid "http://www.amazon.com/gp/gc"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
msgid "Customize the UI of the management screen for all users."
|
26 |
msgstr ""
|
27 |
|
28 |
+
msgid "Authority to apply the setting is not selected. <a href=\"%s\">From here</a>, please select the permissions you want to set."
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
msgid "Please select the user role you want to apply the settings."
|
32 |
msgstr ""
|
33 |
|
52 |
msgid "Extra feed"
|
53 |
msgstr ""
|
54 |
|
|
|
|
|
|
|
55 |
msgid "Account Title"
|
56 |
msgstr ""
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
msgid "Wordpress Logo"
|
59 |
msgstr ""
|
60 |
|
91 |
msgid "Screen Options and Help tab"
|
92 |
msgstr ""
|
93 |
|
94 |
+
msgid "Admin bar Menu"
|
95 |
msgstr ""
|
96 |
|
97 |
+
msgid "Notice: When you set up the same menu more, you will not display properly."
|
98 |
msgstr ""
|
99 |
|
100 |
+
msgid "can be more than one custom menu."
|
101 |
msgstr ""
|
102 |
|
103 |
+
msgid "Left"
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
msgid "Right"
|
107 |
msgstr ""
|
108 |
|
109 |
msgid "Menu that can be added"
|
110 |
msgstr ""
|
111 |
|
112 |
+
msgid "Custom Menu"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
msgid "Side Menu"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
msgid "Please change the menu by drag and drop."
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
msgid "The current menu"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
msgid "Sepalator"
|
125 |
msgstr ""
|
126 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: gqevu6bsiz
|
|
3 |
Donate link:
|
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
|
7 |
-
Stable tag: 1.
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
@@ -49,6 +49,10 @@ These to Customization is possible.
|
|
49 |
|
50 |
== Changelog ==
|
51 |
|
|
|
|
|
|
|
|
|
52 |
= 1.0.1 =
|
53 |
bug that did not contain the separator line to the initial value of the side menu.
|
54 |
|
3 |
Donate link:
|
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.1
|
7 |
+
Stable tag: 1.1
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
49 |
|
50 |
== Changelog ==
|
51 |
|
52 |
+
= 1.1 =
|
53 |
+
Possible to customize is the wp_admin_bar.
|
54 |
+
will check whether the authority has been set.
|
55 |
+
|
56 |
= 1.0.1 =
|
57 |
bug that did not contain the separator line to the initial value of the side menu.
|
58 |
|
wp-admin-ui-customize.css
CHANGED
@@ -69,3 +69,83 @@ form.waum_form .postbox .hndle {
|
|
69 |
float: left;
|
70 |
margin: 0 4px 4px 0;
|
71 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
float: left;
|
70 |
margin: 0 4px 4px 0;
|
71 |
}
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
|
76 |
+
|
77 |
+
|
78 |
+
/* admin_bar */
|
79 |
+
|
80 |
+
#admin_bar-holder {}
|
81 |
+
#admin_bar-holder .postbox .inside {
|
82 |
+
padding: 10px;
|
83 |
+
}
|
84 |
+
#admin_bar-holder .postbox .inside .widget-placeholder {
|
85 |
+
width: auto;
|
86 |
+
}
|
87 |
+
#admin_bar-holder .postbox .inside .widget .widget-top .widget-title .in-widget-title {
|
88 |
+
opacity: 0.7;
|
89 |
+
font-weight: normal;
|
90 |
+
}
|
91 |
+
#admin_bar-holder .postbox .inside .widget .widget-inside .submenu {
|
92 |
+
padding: 5px 5px 20px 5px;
|
93 |
+
border: 1px solid #DFDFDF;
|
94 |
+
margin: 8px 0 0 0;
|
95 |
+
}
|
96 |
+
#admin_bar-holder .postbox .inside .widget .widget-inside input.regular-text {
|
97 |
+
width: 90%;
|
98 |
+
}
|
99 |
+
|
100 |
+
#admin_bar-holder .postbox .inside .widget .widget-top {
|
101 |
+
height: auto;
|
102 |
+
}
|
103 |
+
#admin_bar-holder .postbox .inside .widget .widget-top .widget-title h4 {
|
104 |
+
line-height: 18px;
|
105 |
+
}
|
106 |
+
#admin_bar-holder .postbox .inside .widget .widget-inside input.linktext {
|
107 |
+
width: 90%;
|
108 |
+
}
|
109 |
+
#admin_bar-holder .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon,
|
110 |
+
#admin_bar-holder .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
|
111 |
+
#admin_bar-holder .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
|
112 |
+
#admin_bar-holder .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon {
|
113 |
+
width: 20px;
|
114 |
+
height: 20px;
|
115 |
+
background-repeat: no-repeat;
|
116 |
+
display: block;
|
117 |
+
float: left;
|
118 |
+
margin: 0 2px 0 0;
|
119 |
+
}
|
120 |
+
#admin_bar-holder .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon {
|
121 |
+
background-position: 0 -104px;
|
122 |
+
}
|
123 |
+
#admin_bar-holder .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon {
|
124 |
+
background-position: -2px -159px;
|
125 |
+
}
|
126 |
+
#admin_bar-holder .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon {
|
127 |
+
background-position: -2px -135px;
|
128 |
+
}
|
129 |
+
#admin_bar-holder .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon {
|
130 |
+
background-position: -2px -202px;
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
#waum_setting_admin_bar_menu .columns-1 .postbox .inside .widget.new .widget-top .widget-title-action,
|
135 |
+
#waum_setting_admin_bar_menu .columns-1 .postbox .inside .widget .widget-inside .submenu,
|
136 |
+
#waum_setting_admin_bar_menu .columns-1 .postbox .inside .widget .widget-inside .widget-control-actions,
|
137 |
+
#admin_bar-holder .postbox .inside .widget.separator .widget-top .widget-title-action,
|
138 |
+
#admin_bar-holder .postbox .inside .widget .widget-inside .submenu .widget .widget-inside .submenu {
|
139 |
+
display: none;
|
140 |
+
}
|
141 |
+
|
142 |
+
|
143 |
+
#waum_setting_admin_bar_menu .columns-1 .postbox .inside h3 {
|
144 |
+
cursor: default;
|
145 |
+
border-bottom: none;
|
146 |
+
}
|
147 |
+
#waum_setting_admin_bar_menu .columns-1 .postbox .inside .widget {
|
148 |
+
width: 170px;
|
149 |
+
float: left;
|
150 |
+
margin: 0 4px 4px 0;
|
151 |
+
}
|
wp-admin-ui-customize.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Admin UI Customize
|
4 |
Description: Customize the management screen UI.
|
5 |
Plugin URI: http://gqevu6bsiz.chicappa.jp
|
6 |
-
Version: 1.
|
7 |
Author: gqevu6bsiz
|
8 |
Author URI: http://gqevu6bsiz.chicappa.jp/author/admin/
|
9 |
Text Domain: wauc
|
@@ -40,11 +40,12 @@ class WP_Admin_UI_Customize
|
|
40 |
$UPFN,
|
41 |
$Menu,
|
42 |
$SubMenu,
|
|
|
43 |
$Msg;
|
44 |
|
45 |
|
46 |
function __construct() {
|
47 |
-
$this->Ver = '1.
|
48 |
$this->Name = 'WP Admin UI Customize';
|
49 |
$this->Dir = WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) . '/';
|
50 |
$this->ltd = 'wauc';
|
@@ -53,6 +54,7 @@ class WP_Admin_UI_Customize
|
|
53 |
"site" => $this->ltd . '_site_setting',
|
54 |
"admin_general" => $this->ltd . '_admin_general_setting',
|
55 |
"dashboard" => $this->ltd . '_dashboard_setting',
|
|
|
56 |
"sidemenu" => $this->ltd . '_sidemenu_setting',
|
57 |
"removemetabox" => $this->ltd . '_removemetabox_setting',
|
58 |
"loginscreen" => $this->ltd . '_loginscreen_setting',
|
@@ -95,6 +97,7 @@ class WP_Admin_UI_Customize
|
|
95 |
add_submenu_page( $this->PageSlug , __( 'Site Settings' , $this->ltd ) , __( 'Site Settings' , $this->ltd ) , 'administrator' , $this->PageSlug . '_setting_site' , array( $this , 'setting_site' ) );
|
96 |
add_submenu_page( $this->PageSlug , __( 'Admin screen setting' , $this->ltd ) , __( 'Admin screen setting' , $this->ltd ) , 'administrator' , $this->PageSlug . '_admin_general_setting' , array( $this , 'setting_admin_general' ) );
|
97 |
add_submenu_page( $this->PageSlug , __( 'Dashboard' ) , __( 'Dashboard' ) , 'administrator' , $this->PageSlug . '_dashboard' , array( $this , 'setting_dashboard' ) );
|
|
|
98 |
add_submenu_page( $this->PageSlug , __( 'Side Menu' , $this->ltd ) , __( 'Side Menu' , $this->ltd ) , 'administrator' , $this->PageSlug . '_sidemenu' , array( $this , 'setting_sidemenu' ) );
|
99 |
add_submenu_page( $this->PageSlug , __( 'Remove meta box' , $this->ltd ) , __( 'Remove meta box' , $this->ltd ) , 'administrator' , $this->PageSlug . '_removemtabox' , array( $this , 'setting_removemtabox' ) );
|
100 |
add_submenu_page( $this->PageSlug , __( 'Login Screen' , $this->ltd ) , __( 'Login Screen' , $this->ltd ) , 'administrator' , $this->PageSlug . '_loginscreen' , array( $this , 'setting_loginscreen' ) );
|
@@ -116,26 +119,37 @@ class WP_Admin_UI_Customize
|
|
116 |
|
117 |
// SettingPage
|
118 |
function setting_admin_general() {
|
|
|
119 |
include_once 'inc/setting_admin_general.php';
|
120 |
}
|
121 |
|
122 |
// SettingPage
|
123 |
function setting_dashboard() {
|
|
|
124 |
include_once 'inc/setting_dashboard.php';
|
125 |
}
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
// SettingPage
|
128 |
function setting_sidemenu() {
|
|
|
129 |
include_once 'inc/setting_sidemenu.php';
|
130 |
}
|
131 |
|
132 |
// SettingPage
|
133 |
function setting_removemtabox() {
|
|
|
134 |
include_once 'inc/setting_removemtabox.php';
|
135 |
}
|
136 |
|
137 |
// SettingPage
|
138 |
function setting_loginscreen() {
|
|
|
139 |
include_once 'inc/setting_loginscreen.php';
|
140 |
}
|
141 |
|
@@ -157,6 +171,17 @@ class WP_Admin_UI_Customize
|
|
157 |
|
158 |
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
|
161 |
|
162 |
// SetList
|
@@ -177,18 +202,21 @@ class WP_Admin_UI_Customize
|
|
177 |
$this->SubMenu = $submenu;
|
178 |
}
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
// SetList
|
181 |
function menu_widget( $menu_widget ) {
|
182 |
-
$sepalator_widget = '';
|
183 |
-
if( $menu_widget["slug"] == 'separator' ) {
|
184 |
-
$sepalator_widget = $menu_widget["slug"];
|
185 |
-
}
|
186 |
$new_widget = '';
|
187 |
if( !empty( $menu_widget["new"] ) ) {
|
188 |
$new_widget = 'new';
|
189 |
}
|
190 |
?>
|
191 |
-
<div class="widget <?php echo $
|
192 |
|
193 |
<div class="widget-top">
|
194 |
<div class="widget-title-action">
|
@@ -205,8 +233,13 @@ class WP_Admin_UI_Customize
|
|
205 |
<div class="widget-inside">
|
206 |
<div class="settings">
|
207 |
<p class="description">
|
208 |
-
<?php
|
209 |
-
|
|
|
|
|
|
|
|
|
|
|
210 |
</p>
|
211 |
<label>
|
212 |
<?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo $menu_widget["title"]; ?>" name="data[][title]">
|
@@ -273,6 +306,100 @@ class WP_Admin_UI_Customize
|
|
273 |
<?php
|
274 |
}
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
|
277 |
|
278 |
|
@@ -295,7 +422,7 @@ class WP_Admin_UI_Customize
|
|
295 |
$Update = $this->update_validate();
|
296 |
if( !empty( $Update ) ) {
|
297 |
delete_option( $this->Record[$record] );
|
298 |
-
$this->Msg
|
299 |
}
|
300 |
}
|
301 |
|
@@ -313,7 +440,7 @@ class WP_Admin_UI_Customize
|
|
313 |
}
|
314 |
|
315 |
update_option( $this->Record["user_role"] , $Update );
|
316 |
-
$this->Msg
|
317 |
}
|
318 |
}
|
319 |
|
@@ -331,7 +458,7 @@ class WP_Admin_UI_Customize
|
|
331 |
}
|
332 |
|
333 |
update_option( $this->Record["site"] , $Update );
|
334 |
-
$this->Msg
|
335 |
}
|
336 |
}
|
337 |
|
@@ -349,7 +476,7 @@ class WP_Admin_UI_Customize
|
|
349 |
}
|
350 |
|
351 |
update_option( $this->Record["admin_general"] , $Update );
|
352 |
-
$this->Msg
|
353 |
}
|
354 |
}
|
355 |
|
@@ -367,7 +494,44 @@ class WP_Admin_UI_Customize
|
|
367 |
}
|
368 |
|
369 |
update_option( $this->Record["dashboard"] , $Update );
|
370 |
-
$this->Msg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
}
|
372 |
}
|
373 |
|
@@ -395,7 +559,7 @@ class WP_Admin_UI_Customize
|
|
395 |
}
|
396 |
|
397 |
update_option( $this->Record["sidemenu"] , $Update );
|
398 |
-
$this->Msg
|
399 |
}
|
400 |
}
|
401 |
|
@@ -419,7 +583,7 @@ class WP_Admin_UI_Customize
|
|
419 |
}
|
420 |
|
421 |
update_option( $this->Record["removemetabox"] , $Update );
|
422 |
-
$this->Msg
|
423 |
}
|
424 |
}
|
425 |
|
@@ -437,7 +601,7 @@ class WP_Admin_UI_Customize
|
|
437 |
}
|
438 |
|
439 |
update_option( $this->Record["loginscreen"] , $Update );
|
440 |
-
$this->Msg
|
441 |
|
442 |
}
|
443 |
}
|
@@ -446,7 +610,6 @@ class WP_Admin_UI_Customize
|
|
446 |
|
447 |
|
448 |
|
449 |
-
|
450 |
// FilterStart
|
451 |
function FilterStart() {
|
452 |
// site
|
@@ -461,6 +624,8 @@ class WP_Admin_UI_Customize
|
|
461 |
if ( is_admin() ) {
|
462 |
// default side menu load.
|
463 |
add_action( 'admin_menu' , array( $this , 'sidemenu_default_load' ) );
|
|
|
|
|
464 |
|
465 |
$SettingRole = $this->get_data( 'user_role' );
|
466 |
if( !empty( $SettingRole ) ) {
|
@@ -481,7 +646,7 @@ class WP_Admin_UI_Customize
|
|
481 |
$UserRole = $User->roles[0];
|
482 |
|
483 |
if( array_key_exists( $UserRole , $SettingRole ) ){
|
484 |
-
|
485 |
add_action( 'init' , array( $this , 'notice_dismiss' ) , 2 );
|
486 |
add_action( 'admin_head' , array( $this , 'remove_tab' ) );
|
487 |
add_filter( 'admin_footer_text' , array( $this , 'admin_footer_text' ) );
|
@@ -593,35 +758,43 @@ class WP_Admin_UI_Customize
|
|
593 |
}
|
594 |
|
595 |
// FilterStart
|
596 |
-
function admin_bar_menu(
|
597 |
-
|
|
|
|
|
598 |
|
599 |
if( !empty( $GetData["UPFN"] ) ) {
|
600 |
unset( $GetData["UPFN"] );
|
|
|
601 |
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
617 |
}
|
618 |
}
|
619 |
-
}
|
620 |
|
621 |
-
|
622 |
-
$title = strip_tags( $GetData["my-account-title"] );
|
623 |
-
$title = str_replace( '[AcountName]' , $User->data->display_name , $title );
|
624 |
-
$wp_admin_bar->add_node( array( 'id' => 'my-account' , 'title' => $title , 'meta' => array() ) );
|
625 |
}
|
626 |
}
|
627 |
|
@@ -818,6 +991,7 @@ class WP_Admin_UI_Customize
|
|
818 |
|
819 |
$submenu[$gsm_parent_slug][$gsm_pos][0] = $mm["title"];
|
820 |
$SetMain_menu[] = $submenu[$gsm_parent_slug][$gsm_pos];
|
|
|
821 |
}
|
822 |
}
|
823 |
}
|
3 |
Plugin Name: WP Admin UI Customize
|
4 |
Description: Customize the management screen UI.
|
5 |
Plugin URI: http://gqevu6bsiz.chicappa.jp
|
6 |
+
Version: 1.1
|
7 |
Author: gqevu6bsiz
|
8 |
Author URI: http://gqevu6bsiz.chicappa.jp/author/admin/
|
9 |
Text Domain: wauc
|
40 |
$UPFN,
|
41 |
$Menu,
|
42 |
$SubMenu,
|
43 |
+
$Admin_bar,
|
44 |
$Msg;
|
45 |
|
46 |
|
47 |
function __construct() {
|
48 |
+
$this->Ver = '1.1';
|
49 |
$this->Name = 'WP Admin UI Customize';
|
50 |
$this->Dir = WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) . '/';
|
51 |
$this->ltd = 'wauc';
|
54 |
"site" => $this->ltd . '_site_setting',
|
55 |
"admin_general" => $this->ltd . '_admin_general_setting',
|
56 |
"dashboard" => $this->ltd . '_dashboard_setting',
|
57 |
+
"admin_bar_menu" => $this->ltd . '_admin_bar_menu_setting',
|
58 |
"sidemenu" => $this->ltd . '_sidemenu_setting',
|
59 |
"removemetabox" => $this->ltd . '_removemetabox_setting',
|
60 |
"loginscreen" => $this->ltd . '_loginscreen_setting',
|
97 |
add_submenu_page( $this->PageSlug , __( 'Site Settings' , $this->ltd ) , __( 'Site Settings' , $this->ltd ) , 'administrator' , $this->PageSlug . '_setting_site' , array( $this , 'setting_site' ) );
|
98 |
add_submenu_page( $this->PageSlug , __( 'Admin screen setting' , $this->ltd ) , __( 'Admin screen setting' , $this->ltd ) , 'administrator' , $this->PageSlug . '_admin_general_setting' , array( $this , 'setting_admin_general' ) );
|
99 |
add_submenu_page( $this->PageSlug , __( 'Dashboard' ) , __( 'Dashboard' ) , 'administrator' , $this->PageSlug . '_dashboard' , array( $this , 'setting_dashboard' ) );
|
100 |
+
add_submenu_page( $this->PageSlug , __( 'Admin bar Menu' , $this->ltd ) , __( 'Admin bar Menu' , $this->ltd ) , 'administrator' , $this->PageSlug . '_admin_bar' , array( $this , 'setting_admin_bar_menu' ) );
|
101 |
add_submenu_page( $this->PageSlug , __( 'Side Menu' , $this->ltd ) , __( 'Side Menu' , $this->ltd ) , 'administrator' , $this->PageSlug . '_sidemenu' , array( $this , 'setting_sidemenu' ) );
|
102 |
add_submenu_page( $this->PageSlug , __( 'Remove meta box' , $this->ltd ) , __( 'Remove meta box' , $this->ltd ) , 'administrator' , $this->PageSlug . '_removemtabox' , array( $this , 'setting_removemtabox' ) );
|
103 |
add_submenu_page( $this->PageSlug , __( 'Login Screen' , $this->ltd ) , __( 'Login Screen' , $this->ltd ) , 'administrator' , $this->PageSlug . '_loginscreen' , array( $this , 'setting_loginscreen' ) );
|
119 |
|
120 |
// SettingPage
|
121 |
function setting_admin_general() {
|
122 |
+
$this->settingCheck();
|
123 |
include_once 'inc/setting_admin_general.php';
|
124 |
}
|
125 |
|
126 |
// SettingPage
|
127 |
function setting_dashboard() {
|
128 |
+
$this->settingCheck();
|
129 |
include_once 'inc/setting_dashboard.php';
|
130 |
}
|
131 |
|
132 |
+
// SettingPage
|
133 |
+
function setting_admin_bar_menu() {
|
134 |
+
$this->settingCheck();
|
135 |
+
include_once 'inc/setting_admin_bar_menu.php';
|
136 |
+
}
|
137 |
+
|
138 |
// SettingPage
|
139 |
function setting_sidemenu() {
|
140 |
+
$this->settingCheck();
|
141 |
include_once 'inc/setting_sidemenu.php';
|
142 |
}
|
143 |
|
144 |
// SettingPage
|
145 |
function setting_removemtabox() {
|
146 |
+
$this->settingCheck();
|
147 |
include_once 'inc/setting_removemtabox.php';
|
148 |
}
|
149 |
|
150 |
// SettingPage
|
151 |
function setting_loginscreen() {
|
152 |
+
$this->settingCheck();
|
153 |
include_once 'inc/setting_loginscreen.php';
|
154 |
}
|
155 |
|
171 |
|
172 |
|
173 |
|
174 |
+
// Settingcheck
|
175 |
+
function settingCheck() {
|
176 |
+
$Data = $this->get_data( 'user_role' );
|
177 |
+
if( !empty( $Data["UPFN"] ) ) {
|
178 |
+
unset( $Data["UPFN"] );
|
179 |
+
}
|
180 |
+
if( empty( $Data ) ) {
|
181 |
+
$this->Msg = '<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 ) , self_admin_url( 'admin.php?page=' . $this->PageSlug ) ) . '</strong></p></div>';
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
|
186 |
|
187 |
// SetList
|
202 |
$this->SubMenu = $submenu;
|
203 |
}
|
204 |
|
205 |
+
// SetList
|
206 |
+
function admin_bar_default_load( $wp_admin_bar ) {
|
207 |
+
global $wp_admin_bar;
|
208 |
+
$this->Admin_bar = $wp_admin_bar->get_nodes();
|
209 |
+
|
210 |
+
}
|
211 |
+
|
212 |
// SetList
|
213 |
function menu_widget( $menu_widget ) {
|
|
|
|
|
|
|
|
|
214 |
$new_widget = '';
|
215 |
if( !empty( $menu_widget["new"] ) ) {
|
216 |
$new_widget = 'new';
|
217 |
}
|
218 |
?>
|
219 |
+
<div class="widget <?php echo $menu_widget["slug"]; ?> <?php echo $new_widget; ?>">
|
220 |
|
221 |
<div class="widget-top">
|
222 |
<div class="widget-title-action">
|
233 |
<div class="widget-inside">
|
234 |
<div class="settings">
|
235 |
<p class="description">
|
236 |
+
<?php if( $menu_widget["slug"] == 'custom_menu' ) : ?>
|
237 |
+
<?php _e( 'Url' ); ?>:
|
238 |
+
<input type="text" class="slugtext" value="" name="data[][slug]">
|
239 |
+
<?php else : ?>
|
240 |
+
<?php _e( 'Slug' ); ?>: <?php echo $menu_widget["slug"]; ?>
|
241 |
+
<input type="hidden" class="slugtext" value="<?php echo $menu_widget["slug"]; ?>" name="data[][slug]">
|
242 |
+
<?php endif; ?>
|
243 |
</p>
|
244 |
<label>
|
245 |
<?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo $menu_widget["title"]; ?>" name="data[][title]">
|
306 |
<?php
|
307 |
}
|
308 |
|
309 |
+
// SetList
|
310 |
+
function admin_bar_menu_widget( $menu_widget ) {
|
311 |
+
$new_widget = '';
|
312 |
+
if( !empty( $menu_widget["new"] ) ) {
|
313 |
+
$new_widget = 'new';
|
314 |
+
}
|
315 |
+
?>
|
316 |
+
<div class="widget <?php echo $new_widget; ?> <?php echo $menu_widget["id"]; ?>">
|
317 |
+
|
318 |
+
<div class="widget-top">
|
319 |
+
<div class="widget-title-action">
|
320 |
+
<a class="widget-action" href="#available"></a>
|
321 |
+
</div>
|
322 |
+
<div class="widget-title">
|
323 |
+
<h4>
|
324 |
+
<?php echo $menu_widget["title"]; ?>
|
325 |
+
: <span class="in-widget-title"><?php echo $menu_widget["id"]; ?></span>
|
326 |
+
</h4>
|
327 |
+
</div>
|
328 |
+
</div>
|
329 |
+
|
330 |
+
<div class="widget-inside">
|
331 |
+
<div class="settings">
|
332 |
+
<p class="description">
|
333 |
+
ID: <?php echo $menu_widget["id"]; ?>
|
334 |
+
<input type="hidden" class="idtext" value="<?php echo $menu_widget["id"]; ?>" name="data[][id]"><br />
|
335 |
+
<?php if( $menu_widget["id"] == 'custom_node' ) : ?>
|
336 |
+
link: <input type="text" class="linktext" value="" name="data[][href]">
|
337 |
+
<?php else: ?>
|
338 |
+
link: <a href="<?php echo $menu_widget["href"]; ?>" target="_blank"><?php echo $menu_widget["href"]; ?></a>
|
339 |
+
<input type="hidden" class="linktext" value="<?php echo $menu_widget["href"]; ?>" name="data[][href]">
|
340 |
+
<?php endif; ?>
|
341 |
+
</p>
|
342 |
+
<label>
|
343 |
+
<?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]">
|
344 |
+
</label>
|
345 |
+
<input type="hidden" class="parent" value="<?php echo $menu_widget["parent"]; ?>" name="data[][parent]">
|
346 |
+
</div>
|
347 |
+
|
348 |
+
<div class="submenu">
|
349 |
+
<p class="description"><?php _e( 'Sub Menus' , $this->ltd ); ?></p>
|
350 |
+
<?php if( empty( $menu_widget["new"] ) && !empty( $menu_widget["subnode"] ) ) : ?>
|
351 |
+
<?php foreach($menu_widget["subnode"] as $sm) : ?>
|
352 |
+
|
353 |
+
<div class="widget">
|
354 |
+
|
355 |
+
<div class="widget-top">
|
356 |
+
<div class="widget-title-action">
|
357 |
+
<a class="widget-action" href="#available"></a>
|
358 |
+
</div>
|
359 |
+
<div class="widget-title">
|
360 |
+
<h4>
|
361 |
+
<?php echo $sm["title"]; ?>
|
362 |
+
: <span class="in-widget-title"><?php echo $sm["id"]; ?></span>
|
363 |
+
</h4>
|
364 |
+
</div>
|
365 |
+
</div>
|
366 |
+
|
367 |
+
<div class="widget-inside">
|
368 |
+
<div class="settings">
|
369 |
+
<p class="description">
|
370 |
+
ID: <?php echo $sm["id"]; ?>
|
371 |
+
<input type="hidden" class="idtext" value="<?php echo $sm["id"]; ?>" name="data[][id]"><br />
|
372 |
+
link: <a href="<?php echo $sm["href"]; ?>" target="_blank"><?php echo $sm["href"]; ?></a>
|
373 |
+
<input type="hidden" class="linktext" value="<?php echo $sm["href"]; ?>" name="data[][href]">
|
374 |
+
</p>
|
375 |
+
<label>
|
376 |
+
<?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo $sm["title"]; ?>" name="data[][title]">
|
377 |
+
</label>
|
378 |
+
<input type="hidden" class="parent" value="<?php echo $sm["parent"]; ?>" name="data[][parent]">
|
379 |
+
</div>
|
380 |
+
<div class="widget-control-actions">
|
381 |
+
<div class="alignleft">
|
382 |
+
<a href="#remove"><?php _e( 'Remove' ); ?></a>
|
383 |
+
</div>
|
384 |
+
<div class="clear"></div>
|
385 |
+
</div>
|
386 |
+
</div>
|
387 |
+
</div>
|
388 |
+
|
389 |
+
<?php endforeach; ?>
|
390 |
+
<?php endif; ?>
|
391 |
+
</div>
|
392 |
+
<div class="widget-control-actions">
|
393 |
+
<div class="alignleft">
|
394 |
+
<a href="#remove"><?php _e( 'Remove' ); ?></a>
|
395 |
+
</div>
|
396 |
+
<div class="clear"></div>
|
397 |
+
</div>
|
398 |
+
</div>
|
399 |
+
|
400 |
+
</div>
|
401 |
+
<?php
|
402 |
+
}
|
403 |
|
404 |
|
405 |
|
422 |
$Update = $this->update_validate();
|
423 |
if( !empty( $Update ) ) {
|
424 |
delete_option( $this->Record[$record] );
|
425 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
426 |
}
|
427 |
}
|
428 |
|
440 |
}
|
441 |
|
442 |
update_option( $this->Record["user_role"] , $Update );
|
443 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
444 |
}
|
445 |
}
|
446 |
|
458 |
}
|
459 |
|
460 |
update_option( $this->Record["site"] , $Update );
|
461 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
462 |
}
|
463 |
}
|
464 |
|
476 |
}
|
477 |
|
478 |
update_option( $this->Record["admin_general"] , $Update );
|
479 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
480 |
}
|
481 |
}
|
482 |
|
494 |
}
|
495 |
|
496 |
update_option( $this->Record["dashboard"] , $Update );
|
497 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
// DataUpdate
|
502 |
+
function update_admin_bar_menu() {
|
503 |
+
$Update = $this->update_validate();
|
504 |
+
if( !empty( $Update ) ) {
|
505 |
+
|
506 |
+
if( !empty( $_POST["data"] ) ) {
|
507 |
+
foreach($_POST["data"] as $boxtype => $nodes) {
|
508 |
+
foreach($nodes as $key => $node) {
|
509 |
+
$id = "";
|
510 |
+
if( !empty( $node["id"] ) ) {
|
511 |
+
$id = strip_tags( $node["id"] );
|
512 |
+
}
|
513 |
+
$title = "";
|
514 |
+
if( !empty( $node["title"] ) ) {
|
515 |
+
$title = $node["title"];
|
516 |
+
}
|
517 |
+
$href = "";
|
518 |
+
if( !empty( $node["href"] ) ) {
|
519 |
+
$href = strip_tags( $node["href"] );
|
520 |
+
}
|
521 |
+
$parent = "";
|
522 |
+
$depth = "main";
|
523 |
+
if( !empty( $node["parent"] ) ) {
|
524 |
+
$parent = strip_tags( $node["parent"] );
|
525 |
+
$depth = 'sub';
|
526 |
+
}
|
527 |
+
|
528 |
+
$Update[$boxtype][$depth][] = array( "id" => $id , "title" => $title , "href" => $href , "parent" => $parent );
|
529 |
+
}
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
update_option( $this->Record["admin_bar_menu"] , $Update );
|
534 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
535 |
}
|
536 |
}
|
537 |
|
559 |
}
|
560 |
|
561 |
update_option( $this->Record["sidemenu"] , $Update );
|
562 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
563 |
}
|
564 |
}
|
565 |
|
583 |
}
|
584 |
|
585 |
update_option( $this->Record["removemetabox"] , $Update );
|
586 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
587 |
}
|
588 |
}
|
589 |
|
601 |
}
|
602 |
|
603 |
update_option( $this->Record["loginscreen"] , $Update );
|
604 |
+
$this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
|
605 |
|
606 |
}
|
607 |
}
|
610 |
|
611 |
|
612 |
|
|
|
613 |
// FilterStart
|
614 |
function FilterStart() {
|
615 |
// site
|
624 |
if ( is_admin() ) {
|
625 |
// default side menu load.
|
626 |
add_action( 'admin_menu' , array( $this , 'sidemenu_default_load' ) );
|
627 |
+
// default admin bar menu load.
|
628 |
+
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_default_load' ) , 1 );
|
629 |
|
630 |
$SettingRole = $this->get_data( 'user_role' );
|
631 |
if( !empty( $SettingRole ) ) {
|
646 |
$UserRole = $User->roles[0];
|
647 |
|
648 |
if( array_key_exists( $UserRole , $SettingRole ) ){
|
649 |
+
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_menu') , 25 );
|
650 |
add_action( 'init' , array( $this , 'notice_dismiss' ) , 2 );
|
651 |
add_action( 'admin_head' , array( $this , 'remove_tab' ) );
|
652 |
add_filter( 'admin_footer_text' , array( $this , 'admin_footer_text' ) );
|
758 |
}
|
759 |
|
760 |
// FilterStart
|
761 |
+
function admin_bar_menu() {
|
762 |
+
global $wp_admin_bar;
|
763 |
+
|
764 |
+
$GetData = $this->get_data( 'admin_bar_menu' );
|
765 |
|
766 |
if( !empty( $GetData["UPFN"] ) ) {
|
767 |
unset( $GetData["UPFN"] );
|
768 |
+
if( !empty( $GetData ) ) {
|
769 |
|
770 |
+
$remove_menu = array( 'wp-logo' , 'site-name' , 'user-actions' , 'user-info' , 'edit-profile' , 'logout' , 'my-account' , 'about' , 'wporg' , 'documentation' , 'support-forums' , 'feedback' , 'comments' , 'updates' , 'new-content' , 'new-post' , 'new-media' , 'new-link' , 'new-page' , 'new-user' , 'view-site' );
|
771 |
+
|
772 |
+
$cpts = (array) get_post_types( array( 'show_in_admin_bar' => true , '_builtin' => false ), 'names' );
|
773 |
+
foreach($cpts as $cpt) {
|
774 |
+
$remove_menu[] = 'new-' . $cpt;
|
775 |
+
}
|
776 |
+
|
777 |
+
// remove all nodes
|
778 |
+
foreach( $remove_menu as $nid ) {
|
779 |
+
$wp_admin_bar->remove_menu( $nid );
|
780 |
+
}
|
781 |
+
|
782 |
+
foreach($GetData as $Boxtype => $allnodes) {
|
783 |
+
foreach($allnodes as $depth => $nodes) {
|
784 |
+
foreach($nodes as $node) {
|
785 |
+
$args = array( "id" => $node["id"] , "title" => stripslashes( $node["title"] ) , "href" => $node["href"] , "parent" => "" );
|
786 |
+
if( $depth == 'sub' ) {
|
787 |
+
$args["parent"] = $node["parent"];
|
788 |
+
}
|
789 |
+
if( $Boxtype == 'right' && $depth == 'main' ) {
|
790 |
+
$args["parent"] = "top-secondary";
|
791 |
+
}
|
792 |
+
$wp_admin_bar->add_menu( $args );
|
793 |
+
}
|
794 |
}
|
795 |
}
|
|
|
796 |
|
797 |
+
}
|
|
|
|
|
|
|
798 |
}
|
799 |
}
|
800 |
|
991 |
|
992 |
$submenu[$gsm_parent_slug][$gsm_pos][0] = $mm["title"];
|
993 |
$SetMain_menu[] = $submenu[$gsm_parent_slug][$gsm_pos];
|
994 |
+
|
995 |
}
|
996 |
}
|
997 |
}
|