Version Description
2022-11-04 = * Security updated: Some values escape.
Download this release
Release Info
Developer | gqevu6bsiz |
Plugin | WP Admin UI Customize |
Version | 1.5.13 |
Comparing to | |
See all releases |
Code changes from version 1.5.12 to 1.5.13
- inc/reset_userrole.php +5 -5
- inc/setting_admin_bar_menu.php +24 -24
- inc/setting_admin_general.php +18 -18
- inc/setting_appearance_menus.php +9 -9
- inc/setting_dashboard.php +16 -16
- inc/setting_default.php +10 -11
- inc/setting_loginscreen.php +15 -15
- inc/setting_manage_metabox.php +49 -49
- inc/setting_plugin_cap.php +8 -8
- inc/setting_post_add_edit.php +10 -10
- inc/setting_sidemenu.php +57 -57
- inc/setting_site.php +13 -13
- readme.txt +5 -2
- wp-admin-ui-customize.php +183 -182
inc/reset_userrole.php
CHANGED
@@ -16,7 +16,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
16 |
<p> </p>
|
17 |
|
18 |
<form id="wauc_reset_userrole" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
19 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
20 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
21 |
<input type="hidden" name="record_field" value="user_role" />
|
22 |
|
@@ -32,16 +32,16 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
32 |
|
33 |
<p><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'User Roles Settings' , 'wp-admin-ui-customize' ) ); ?></p>
|
34 |
<p class="submit">
|
35 |
-
<input type="submit" class="button-primary" name="reset" value="<?php
|
36 |
</p>
|
37 |
|
38 |
</form>
|
39 |
-
|
40 |
<p> </p>
|
41 |
|
42 |
<h2><?php _e( 'Reset all settings' , 'wp-admin-ui-customize' ); ?></h2>
|
43 |
<form id="wauc_reset_all_settings" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
44 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
45 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
46 |
<input type="hidden" name="record_field" value="all_settings" />
|
47 |
<p><?php _e( 'All settings below will be deleted.' , 'wp-admin-ui-customize' ); ?></p>
|
@@ -61,7 +61,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
61 |
|
62 |
<p><?php _e( 'Are you sure you want to delete all settings?' , 'wp-admin-ui-customize' ); ?></p>
|
63 |
<p class="submit">
|
64 |
-
<input type="submit" class="button-primary" name="reset" value="<?php
|
65 |
</p>
|
66 |
|
67 |
</form>
|
16 |
<p> </p>
|
17 |
|
18 |
<form id="wauc_reset_userrole" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
19 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
20 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
21 |
<input type="hidden" name="record_field" value="user_role" />
|
22 |
|
32 |
|
33 |
<p><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'User Roles Settings' , 'wp-admin-ui-customize' ) ); ?></p>
|
34 |
<p class="submit">
|
35 |
+
<input type="submit" class="button-primary" name="reset" value="<?php echo esc_attr( __( 'Reset User Roles Settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
36 |
</p>
|
37 |
|
38 |
</form>
|
39 |
+
|
40 |
<p> </p>
|
41 |
|
42 |
<h2><?php _e( 'Reset all settings' , 'wp-admin-ui-customize' ); ?></h2>
|
43 |
<form id="wauc_reset_all_settings" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
44 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
45 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
46 |
<input type="hidden" name="record_field" value="all_settings" />
|
47 |
<p><?php _e( 'All settings below will be deleted.' , 'wp-admin-ui-customize' ); ?></p>
|
61 |
|
62 |
<p><?php _e( 'Are you sure you want to delete all settings?' , 'wp-admin-ui-customize' ); ?></p>
|
63 |
<p class="submit">
|
64 |
+
<input type="submit" class="button-primary" name="reset" value="<?php echo esc_attr( __( 'Reset all settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
65 |
</p>
|
66 |
|
67 |
</form>
|
inc/setting_admin_bar_menu.php
CHANGED
@@ -25,13 +25,13 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
25 |
<p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a></p>
|
26 |
|
27 |
<form id="wauc_setting_admin_bar_menu" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
28 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
29 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
30 |
<input type="hidden" name="record_field" value="admin_bar_menu" />
|
31 |
|
32 |
<p></p>
|
33 |
<p><?php _e( 'Sub menus can be a maximum of four levels deep.' , 'wp-admin-ui-customize' ); ?></p>
|
34 |
-
<p><a href="<?php $this->get_document_link( 'admin_bar' ); ?>" target="_blank" class="button-secondary"><?php _e( 'Additional documentation' , 'wp-admin-ui-customize' ); ?></a></p>
|
35 |
|
36 |
<div id="poststuff">
|
37 |
|
@@ -80,12 +80,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
80 |
</div>
|
81 |
|
82 |
<p class="submit">
|
83 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
84 |
</p>
|
85 |
|
86 |
<p class="submit reset">
|
87 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Admin bar' , 'wp-admin-ui-customize' ) . __( 'Settings' ) ); ?></span>
|
88 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
89 |
</p>
|
90 |
|
91 |
</form>
|
@@ -120,55 +120,55 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
120 |
|
121 |
<?php if( !empty( $AllDefaultNodes[$place] ) ) : ?>
|
122 |
<?php foreach( $AllDefaultNodes[$place]["main"] as $main_node_id => $main_node ) : ?>
|
123 |
-
|
124 |
<p class="description"><?php echo $main_node_id; ?></p>
|
125 |
<?php $menu_widget = array( 'id' => $main_node_id , 'title' => stripslashes( $main_node->title ) , 'parent' => '' , 'href' => $main_node->href , 'group' => $main_node->group , 'meta' => $main_node->meta , 'new' => true ); ?>
|
126 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'main' ); ?>
|
127 |
-
|
128 |
<?php foreach( $AllDefaultNodes[$place]["sub"] as $sub_node_id => $sub_node ) : ?>
|
129 |
<?php if( $sub_node->parent == $main_node_id ) : ?>
|
130 |
-
|
131 |
<?php $menu_widget = array( 'id' => $sub_node_id , 'title' => stripslashes( $sub_node->title ) , 'parent' => '' , 'href' => $sub_node->href , 'group' => $sub_node->group , 'meta' => $sub_node->meta , 'new' => true ); ?>
|
132 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'sub' ); ?>
|
133 |
-
|
134 |
<?php if( !empty( $AllDefaultNodes[$place]["sub2"] ) ) : ?>
|
135 |
<?php foreach( $AllDefaultNodes[$place]["sub2"] as $sub_node_id2 => $sub_node2 ) : ?>
|
136 |
<?php if( $sub_node2->parent == $sub_node_id ) : ?>
|
137 |
-
|
138 |
<?php $menu_widget = array( 'id' => $sub_node_id2 , 'title' => stripslashes( $sub_node2->title ) , 'parent' => '' , 'href' => $sub_node2->href , 'group' => $sub_node2->group , 'meta' => $sub_node2->meta , 'new' => true ); ?>
|
139 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'sub2' ); ?>
|
140 |
-
|
141 |
<?php if( !empty( $AllDefaultNodes[$place]["sub3"] ) ) : ?>
|
142 |
<?php foreach( $AllDefaultNodes[$place]["sub3"] as $sub_node_id3 => $sub_node3 ) : ?>
|
143 |
<?php if( $sub_node3->parent == $sub_node_id2 ) : ?>
|
144 |
-
|
145 |
<?php $menu_widget = array( 'id' => $sub_node_id3 , 'title' => stripslashes( $sub_node3->title ) , 'parent' => '' , 'href' => $sub_node3->href , 'group' => $sub_node3->group , 'meta' => $sub_node3->meta , 'new' => true ); ?>
|
146 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'sub3' ); ?>
|
147 |
-
|
148 |
<?php if( !empty( $AllDefaultNodes[$place]["sub4"] ) ) : ?>
|
149 |
<?php foreach( $AllDefaultNodes[$place]["sub4"] as $sub_node_id4 => $sub_node4 ) : ?>
|
150 |
<?php if( $sub_node4->parent == $sub_node_id3 ) : ?>
|
151 |
-
|
152 |
<?php $menu_widget = array( 'id' => $sub_node_id4 , 'title' => stripslashes( $sub_node4->title ) , 'parent' => '' , 'href' => $sub_node4->href , 'group' => $sub_node4->group , 'meta' => $sub_node4->meta , 'new' => true ); ?>
|
153 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'sub4' ); ?>
|
154 |
-
|
155 |
<?php endif; ?>
|
156 |
<?php endforeach; ?>
|
157 |
<?php endif; ?>
|
158 |
-
|
159 |
<?php endif; ?>
|
160 |
<?php endforeach; ?>
|
161 |
<?php endif; ?>
|
162 |
-
|
163 |
<?php endif; ?>
|
164 |
<?php endforeach; ?>
|
165 |
<?php endif; ?>
|
166 |
-
|
167 |
<?php endif; ?>
|
168 |
<?php endforeach; ?>
|
169 |
-
|
170 |
<div class="clear"></div>
|
171 |
-
|
172 |
<?php endforeach; ?>
|
173 |
<?php endif; ?>
|
174 |
|
@@ -247,14 +247,14 @@ jQuery(document).ready(function($) {
|
|
247 |
});
|
248 |
|
249 |
$(document).on('click', '.widget .widget-top .widget-title-action', function() {
|
250 |
-
|
251 |
$(this).parent().parent().children('.widget-inside').slideToggle( 300 );
|
252 |
return false;
|
253 |
|
254 |
});
|
255 |
|
256 |
$(document).on('click', '.widget .widget-inside .widget-control-actions .alignleft a[href="#remove"]', function() {
|
257 |
-
|
258 |
$(this).parent().parent().parent().parent().slideUp('normal', function() { $(this).remove(); } );
|
259 |
return false;
|
260 |
|
@@ -315,7 +315,7 @@ jQuery(document).ready(function($) {
|
|
315 |
$BoxName = $(this).parent().parent().parent().attr("id");
|
316 |
$NodeType = "main";
|
317 |
}
|
318 |
-
|
319 |
if( $BoxName ) {
|
320 |
var $BarType = $BoxName.replace( '_menus' , '');
|
321 |
}
|
@@ -353,6 +353,6 @@ jQuery(document).ready(function($) {
|
|
353 |
});
|
354 |
}
|
355 |
wauc_widget_each();
|
356 |
-
|
357 |
});
|
358 |
-
</script>
|
25 |
<p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a></p>
|
26 |
|
27 |
<form id="wauc_setting_admin_bar_menu" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
28 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
29 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
30 |
<input type="hidden" name="record_field" value="admin_bar_menu" />
|
31 |
|
32 |
<p></p>
|
33 |
<p><?php _e( 'Sub menus can be a maximum of four levels deep.' , 'wp-admin-ui-customize' ); ?></p>
|
34 |
+
<p><a href="<?php esc_url( $this->get_document_link( 'admin_bar' ) ); ?>" target="_blank" class="button-secondary"><?php _e( 'Additional documentation' , 'wp-admin-ui-customize' ); ?></a></p>
|
35 |
|
36 |
<div id="poststuff">
|
37 |
|
80 |
</div>
|
81 |
|
82 |
<p class="submit">
|
83 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
84 |
</p>
|
85 |
|
86 |
<p class="submit reset">
|
87 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Admin bar' , 'wp-admin-ui-customize' ) . __( 'Settings' ) ); ?></span>
|
88 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
89 |
</p>
|
90 |
|
91 |
</form>
|
120 |
|
121 |
<?php if( !empty( $AllDefaultNodes[$place] ) ) : ?>
|
122 |
<?php foreach( $AllDefaultNodes[$place]["main"] as $main_node_id => $main_node ) : ?>
|
123 |
+
|
124 |
<p class="description"><?php echo $main_node_id; ?></p>
|
125 |
<?php $menu_widget = array( 'id' => $main_node_id , 'title' => stripslashes( $main_node->title ) , 'parent' => '' , 'href' => $main_node->href , 'group' => $main_node->group , 'meta' => $main_node->meta , 'new' => true ); ?>
|
126 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'main' ); ?>
|
127 |
+
|
128 |
<?php foreach( $AllDefaultNodes[$place]["sub"] as $sub_node_id => $sub_node ) : ?>
|
129 |
<?php if( $sub_node->parent == $main_node_id ) : ?>
|
130 |
+
|
131 |
<?php $menu_widget = array( 'id' => $sub_node_id , 'title' => stripslashes( $sub_node->title ) , 'parent' => '' , 'href' => $sub_node->href , 'group' => $sub_node->group , 'meta' => $sub_node->meta , 'new' => true ); ?>
|
132 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'sub' ); ?>
|
133 |
+
|
134 |
<?php if( !empty( $AllDefaultNodes[$place]["sub2"] ) ) : ?>
|
135 |
<?php foreach( $AllDefaultNodes[$place]["sub2"] as $sub_node_id2 => $sub_node2 ) : ?>
|
136 |
<?php if( $sub_node2->parent == $sub_node_id ) : ?>
|
137 |
+
|
138 |
<?php $menu_widget = array( 'id' => $sub_node_id2 , 'title' => stripslashes( $sub_node2->title ) , 'parent' => '' , 'href' => $sub_node2->href , 'group' => $sub_node2->group , 'meta' => $sub_node2->meta , 'new' => true ); ?>
|
139 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'sub2' ); ?>
|
140 |
+
|
141 |
<?php if( !empty( $AllDefaultNodes[$place]["sub3"] ) ) : ?>
|
142 |
<?php foreach( $AllDefaultNodes[$place]["sub3"] as $sub_node_id3 => $sub_node3 ) : ?>
|
143 |
<?php if( $sub_node3->parent == $sub_node_id2 ) : ?>
|
144 |
+
|
145 |
<?php $menu_widget = array( 'id' => $sub_node_id3 , 'title' => stripslashes( $sub_node3->title ) , 'parent' => '' , 'href' => $sub_node3->href , 'group' => $sub_node3->group , 'meta' => $sub_node3->meta , 'new' => true ); ?>
|
146 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'sub3' ); ?>
|
147 |
+
|
148 |
<?php if( !empty( $AllDefaultNodes[$place]["sub4"] ) ) : ?>
|
149 |
<?php foreach( $AllDefaultNodes[$place]["sub4"] as $sub_node_id4 => $sub_node4 ) : ?>
|
150 |
<?php if( $sub_node4->parent == $sub_node_id3 ) : ?>
|
151 |
+
|
152 |
<?php $menu_widget = array( 'id' => $sub_node_id4 , 'title' => stripslashes( $sub_node4->title ) , 'parent' => '' , 'href' => $sub_node4->href , 'group' => $sub_node4->group , 'meta' => $sub_node4->meta , 'new' => true ); ?>
|
153 |
<?php $this->admin_bar_menu_widget( $AllDefaultNodes[$place] , $menu_widget , 'sub4' ); ?>
|
154 |
+
|
155 |
<?php endif; ?>
|
156 |
<?php endforeach; ?>
|
157 |
<?php endif; ?>
|
158 |
+
|
159 |
<?php endif; ?>
|
160 |
<?php endforeach; ?>
|
161 |
<?php endif; ?>
|
162 |
+
|
163 |
<?php endif; ?>
|
164 |
<?php endforeach; ?>
|
165 |
<?php endif; ?>
|
166 |
+
|
167 |
<?php endif; ?>
|
168 |
<?php endforeach; ?>
|
169 |
+
|
170 |
<div class="clear"></div>
|
171 |
+
|
172 |
<?php endforeach; ?>
|
173 |
<?php endif; ?>
|
174 |
|
247 |
});
|
248 |
|
249 |
$(document).on('click', '.widget .widget-top .widget-title-action', function() {
|
250 |
+
|
251 |
$(this).parent().parent().children('.widget-inside').slideToggle( 300 );
|
252 |
return false;
|
253 |
|
254 |
});
|
255 |
|
256 |
$(document).on('click', '.widget .widget-inside .widget-control-actions .alignleft a[href="#remove"]', function() {
|
257 |
+
|
258 |
$(this).parent().parent().parent().parent().slideUp('normal', function() { $(this).remove(); } );
|
259 |
return false;
|
260 |
|
315 |
$BoxName = $(this).parent().parent().parent().attr("id");
|
316 |
$NodeType = "main";
|
317 |
}
|
318 |
+
|
319 |
if( $BoxName ) {
|
320 |
var $BarType = $BoxName.replace( '_menus' , '');
|
321 |
}
|
353 |
});
|
354 |
}
|
355 |
wauc_widget_each();
|
356 |
+
|
357 |
});
|
358 |
+
</script>
|
inc/setting_admin_general.php
CHANGED
@@ -19,7 +19,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
19 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
20 |
|
21 |
<form id="wauc_setting_admin_general" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
22 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
23 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
24 |
<input type="hidden" name="record_field" value="admin_general" />
|
25 |
|
@@ -43,7 +43,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
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 ( 'Hide notifications' , 'wp-admin-ui-customize' ); ?></label>
|
47 |
</td>
|
48 |
</tr>
|
49 |
<tr>
|
@@ -54,7 +54,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
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 ( 'Hide notifications' , 'wp-admin-ui-customize' ); ?></label>
|
58 |
</td>
|
59 |
</tr>
|
60 |
<tr>
|
@@ -65,14 +65,14 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
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 ( 'Hide notifications' , 'wp-admin-ui-customize' ); ?></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' , 'wp-admin-ui-customize' ); ?></span></h3>
|
@@ -87,7 +87,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
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>
|
@@ -98,14 +98,14 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
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 |
<div class="postbox">
|
110 |
<div class="handlediv" title="Click to toggle"><br></div>
|
111 |
<h3 class="hndle"><span><?php echo _e( 'Footer' , 'wp-admin-ui-customize' ); ?></span></h3>
|
@@ -119,8 +119,8 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
119 |
<td>
|
120 |
<?php $field = 'footer_text'; ?>
|
121 |
<?php $Val = ''; ?>
|
122 |
-
<?php if( !empty( $Data[$field] ) ) : $Val =
|
123 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" />
|
124 |
<p class="description"><?php _e( 'Default' ); ?>: <?php _e( 'Thank you for creating with <a href="%s">WordPress</a>.' ); ?></p>
|
125 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
126 |
</td>
|
@@ -129,7 +129,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
129 |
</table>
|
130 |
</div>
|
131 |
</div>
|
132 |
-
|
133 |
<div class="postbox">
|
134 |
<div class="handlediv" title="Click to toggle"><br></div>
|
135 |
<h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
|
@@ -143,8 +143,8 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
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">
|
148 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
149 |
</td>
|
150 |
</tr>
|
@@ -156,7 +156,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
156 |
<td>
|
157 |
<?php $Checked = ''; ?>
|
158 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
159 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Remove "Wordpress" from title tag' , 'wp-admin-ui-customize' ); ?></label>
|
160 |
</td>
|
161 |
</tr>
|
162 |
<?php $field = 'resize_admin_bar'; ?>
|
@@ -167,7 +167,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
167 |
<td>
|
168 |
<?php $Checked = ''; ?>
|
169 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
170 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Disable resizing' , 'wp-admin-ui-customize' ); ?></label>
|
171 |
</td>
|
172 |
</tr>
|
173 |
</tbody>
|
@@ -176,7 +176,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
176 |
</div>
|
177 |
</div>
|
178 |
</div>
|
179 |
-
|
180 |
<br class="clear">
|
181 |
|
182 |
</div>
|
@@ -184,12 +184,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
184 |
</div>
|
185 |
|
186 |
<p class="submit">
|
187 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
188 |
</p>
|
189 |
|
190 |
<p class="submit reset">
|
191 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , sprintf( __( '%1$s %2$s' , 'wp-admin-ui-customize' ) , __( 'General' ) , __( 'Settings' ) ) ); ?></span>
|
192 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
193 |
</p>
|
194 |
|
195 |
</form>
|
19 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
20 |
|
21 |
<form id="wauc_setting_admin_general" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
22 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
23 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
24 |
<input type="hidden" name="record_field" value="admin_general" />
|
25 |
|
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 esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide notifications' , 'wp-admin-ui-customize' ); ?></label>
|
47 |
</td>
|
48 |
</tr>
|
49 |
<tr>
|
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 esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide notifications' , 'wp-admin-ui-customize' ); ?></label>
|
58 |
</td>
|
59 |
</tr>
|
60 |
<tr>
|
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 esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide notifications' , 'wp-admin-ui-customize' ); ?></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' , 'wp-admin-ui-customize' ); ?></span></h3>
|
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 esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
91 |
</td>
|
92 |
</tr>
|
93 |
<tr>
|
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 esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
102 |
</td>
|
103 |
</tr>
|
104 |
</tbody>
|
105 |
</table>
|
106 |
</div>
|
107 |
</div>
|
108 |
+
|
109 |
<div class="postbox">
|
110 |
<div class="handlediv" title="Click to toggle"><br></div>
|
111 |
<h3 class="hndle"><span><?php echo _e( 'Footer' , 'wp-admin-ui-customize' ); ?></span></h3>
|
119 |
<td>
|
120 |
<?php $field = 'footer_text'; ?>
|
121 |
<?php $Val = ''; ?>
|
122 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = stripslashes( $Data[$field] ); endif; ?>
|
123 |
+
<input type="text" name="data[<?php echo esc_attr( $field ); ?>]" value="<?php echo esc_attr( $Val ); ?>" class="large-text" />
|
124 |
<p class="description"><?php _e( 'Default' ); ?>: <?php _e( 'Thank you for creating with <a href="%s">WordPress</a>.' ); ?></p>
|
125 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
126 |
</td>
|
129 |
</table>
|
130 |
</div>
|
131 |
</div>
|
132 |
+
|
133 |
<div class="postbox">
|
134 |
<div class="handlediv" title="Click to toggle"><br></div>
|
135 |
<h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
|
143 |
</th>
|
144 |
<td>
|
145 |
<?php $Val = ''; ?>
|
146 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( stripslashes( $Data[$field] ) ); endif; ?>
|
147 |
+
<input type="text" name="data[<?php echo esc_attr( $field ); ?>]" value="<?php echo esc_attr( $Val ); ?>" class="regular-text">
|
148 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
149 |
</td>
|
150 |
</tr>
|
156 |
<td>
|
157 |
<?php $Checked = ''; ?>
|
158 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
159 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Remove "Wordpress" from title tag' , 'wp-admin-ui-customize' ); ?></label>
|
160 |
</td>
|
161 |
</tr>
|
162 |
<?php $field = 'resize_admin_bar'; ?>
|
167 |
<td>
|
168 |
<?php $Checked = ''; ?>
|
169 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
170 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Disable resizing' , 'wp-admin-ui-customize' ); ?></label>
|
171 |
</td>
|
172 |
</tr>
|
173 |
</tbody>
|
176 |
</div>
|
177 |
</div>
|
178 |
</div>
|
179 |
+
|
180 |
<br class="clear">
|
181 |
|
182 |
</div>
|
184 |
</div>
|
185 |
|
186 |
<p class="submit">
|
187 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
188 |
</p>
|
189 |
|
190 |
<p class="submit reset">
|
191 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , sprintf( __( '%1$s %2$s' , 'wp-admin-ui-customize' ) , __( 'General' ) , __( 'Settings' ) ) ); ?></span>
|
192 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
193 |
</p>
|
194 |
|
195 |
</form>
|
inc/setting_appearance_menus.php
CHANGED
@@ -17,7 +17,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
17 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
18 |
|
19 |
<form id="wauc_setting_appearance_menus" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
20 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
21 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
22 |
<input type="hidden" name="record_field" value="appearance_menus" />
|
23 |
|
@@ -41,10 +41,10 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
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 $
|
45 |
<p class="description"><?php _e( 'This is useful when you want to use only the menus that have already been created.' , 'wp-admin-ui-customize' ); ?></p>
|
46 |
-
<p><img src="<?php echo $this->Url
|
47 |
-
<p><img src="<?php echo $this->Url
|
48 |
</td>
|
49 |
</tr>
|
50 |
<?php $field = 'delete_menu'; ?>
|
@@ -55,9 +55,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
55 |
<td>
|
56 |
<?php $Checked = ''; ?>
|
57 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
58 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
59 |
<p class="description"><?php _e( 'This is useful when you want to use only the menus that have already been created.' , 'wp-admin-ui-customize' ); ?></p>
|
60 |
-
<p><img src="<?php echo $this->Url
|
61 |
</td>
|
62 |
</tr>
|
63 |
</tbody>
|
@@ -66,7 +66,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
66 |
</div>
|
67 |
</div>
|
68 |
</div>
|
69 |
-
|
70 |
<br class="clear">
|
71 |
|
72 |
</div>
|
@@ -74,12 +74,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
74 |
</div>
|
75 |
|
76 |
<p class="submit">
|
77 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
78 |
</p>
|
79 |
|
80 |
<p class="submit reset">
|
81 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Appearance Menus' , 'wp-admin-ui-customize' ) ); ?></span>
|
82 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
83 |
</p>
|
84 |
|
85 |
</form>
|
17 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
18 |
|
19 |
<form id="wauc_setting_appearance_menus" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
20 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
21 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
22 |
<input type="hidden" name="record_field" value="appearance_menus" />
|
23 |
|
41 |
<td>
|
42 |
<?php $Checked = ''; ?>
|
43 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
44 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
45 |
<p class="description"><?php _e( 'This is useful when you want to use only the menus that have already been created.' , 'wp-admin-ui-customize' ); ?></p>
|
46 |
+
<p><img src="<?php echo esc_url( $this->Url . 'images/appearance_menus_add_new_menu.png' ); ?>" /></p>
|
47 |
+
<p><img src="<?php echo esc_url( $this->Url . 'images/appearance_menus_add_new_menu_of_location.png' ); ?>" /></p>
|
48 |
</td>
|
49 |
</tr>
|
50 |
<?php $field = 'delete_menu'; ?>
|
55 |
<td>
|
56 |
<?php $Checked = ''; ?>
|
57 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
58 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
59 |
<p class="description"><?php _e( 'This is useful when you want to use only the menus that have already been created.' , 'wp-admin-ui-customize' ); ?></p>
|
60 |
+
<p><img src="<?php echo esc_url( $this->Url . 'images/appearance_menus_delete_menu.png' ); ?>" /></p>
|
61 |
</td>
|
62 |
</tr>
|
63 |
</tbody>
|
66 |
</div>
|
67 |
</div>
|
68 |
</div>
|
69 |
+
|
70 |
<br class="clear">
|
71 |
|
72 |
</div>
|
74 |
</div>
|
75 |
|
76 |
<p class="submit">
|
77 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
78 |
</p>
|
79 |
|
80 |
<p class="submit reset">
|
81 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Appearance Menus' , 'wp-admin-ui-customize' ) ); ?></span>
|
82 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
83 |
</p>
|
84 |
|
85 |
</form>
|
inc/setting_dashboard.php
CHANGED
@@ -19,7 +19,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
19 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
20 |
|
21 |
<form id="wauc_setting_dashboard" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
22 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
23 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
24 |
<input type="hidden" name="record_field" value="dashboard" />
|
25 |
|
@@ -33,9 +33,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
33 |
<div class="handlediv" title="Click to toggle"><br></div>
|
34 |
<h3 class="hndle"><span><?php _e( 'Meta boxes' , 'wp-admin-ui-customize' ); ?></span></h3>
|
35 |
<div class="inside">
|
36 |
-
|
37 |
<?php if( !empty( $Metaboxes["metaboxes"]["dashboard"] ) ) : ?>
|
38 |
-
|
39 |
<table class="form-table">
|
40 |
<thead>
|
41 |
<tr>
|
@@ -56,7 +56,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
56 |
<td>
|
57 |
<?php $Checked = ''; ?>
|
58 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
59 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>][remove]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
60 |
</td>
|
61 |
<td></td>
|
62 |
</tr>
|
@@ -71,12 +71,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
71 |
<td>
|
72 |
<?php $Checked = ''; ?>
|
73 |
<?php if( !empty( $Data[$metabox_id]["remove"] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
74 |
-
<label><input type="checkbox" name="data[<?php echo $metabox_id; ?>][remove]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
75 |
</td>
|
76 |
<td>
|
77 |
<?php $Val = ''; ?>
|
78 |
-
<?php if( !empty( $Data[$metabox_id]["name"] ) ) : $Val =
|
79 |
-
<input type="text" name="data[<?php echo $metabox_id; ?>][name]" class="regular-text" value="<?php echo $Val; ?>" placeholder="<?php
|
80 |
</td>
|
81 |
</tr>
|
82 |
<?php endif; ?>
|
@@ -91,7 +91,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
91 |
<?php $load_link = self_admin_url( 'index.php' ); ?>
|
92 |
|
93 |
<p>
|
94 |
-
<a href="<?php echo $load_link; ?>" class="button button-primary column_load">
|
95 |
<span class="dashicons dashicons-update"></span>
|
96 |
<?php echo sprintf( __( 'Refresh meta boxes for %s', 'wp-admin-ui-customize' ) , __( 'Dashboard' ) ); ?>
|
97 |
</a>
|
@@ -103,7 +103,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
103 |
|
104 |
</div>
|
105 |
</div>
|
106 |
-
|
107 |
<div class="postbox">
|
108 |
<div class="handlediv" title="Click to toggle"><br></div>
|
109 |
<h3 class="hndle"><span><?php _e( 'Other' , 'wp-admin-ui-customize' ); ?></span></h3>
|
@@ -118,7 +118,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
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( "Prevent selected roles from re-arrange meta boxes" , 'wp-admin-ui-customize' ); ?></label>
|
122 |
</td>
|
123 |
</tr>
|
124 |
</tbody>
|
@@ -127,7 +127,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
127 |
</div>
|
128 |
</div>
|
129 |
</div>
|
130 |
-
|
131 |
<br class="clear">
|
132 |
|
133 |
</div>
|
@@ -135,12 +135,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
135 |
</div>
|
136 |
|
137 |
<p class="submit">
|
138 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
139 |
</p>
|
140 |
|
141 |
<p class="submit reset">
|
142 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Dashboard' ) . __( 'Settings' ) ); ?></span>
|
143 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
144 |
</p>
|
145 |
|
146 |
</form>
|
@@ -175,7 +175,7 @@ jQuery(document).ready(function($) {
|
|
175 |
|
176 |
$('.wauc_form .column_load').on('click', function( ev ) {
|
177 |
var load_url = $(ev.target).prop('href');
|
178 |
-
|
179 |
$.ajax({
|
180 |
url: load_url,
|
181 |
beforeSend: function( xhr ) {
|
@@ -185,9 +185,9 @@ jQuery(document).ready(function($) {
|
|
185 |
}).done(function( data ) {
|
186 |
location.reload();
|
187 |
});
|
188 |
-
|
189 |
return false;
|
190 |
}).disableSelection();
|
191 |
|
192 |
});
|
193 |
-
</script>
|
19 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
20 |
|
21 |
<form id="wauc_setting_dashboard" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
22 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
23 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
24 |
<input type="hidden" name="record_field" value="dashboard" />
|
25 |
|
33 |
<div class="handlediv" title="Click to toggle"><br></div>
|
34 |
<h3 class="hndle"><span><?php _e( 'Meta boxes' , 'wp-admin-ui-customize' ); ?></span></h3>
|
35 |
<div class="inside">
|
36 |
+
|
37 |
<?php if( !empty( $Metaboxes["metaboxes"]["dashboard"] ) ) : ?>
|
38 |
+
|
39 |
<table class="form-table">
|
40 |
<thead>
|
41 |
<tr>
|
56 |
<td>
|
57 |
<?php $Checked = ''; ?>
|
58 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
59 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>][remove]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
60 |
</td>
|
61 |
<td></td>
|
62 |
</tr>
|
71 |
<td>
|
72 |
<?php $Checked = ''; ?>
|
73 |
<?php if( !empty( $Data[$metabox_id]["remove"] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
74 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $metabox_id ); ?>][remove]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
75 |
</td>
|
76 |
<td>
|
77 |
<?php $Val = ''; ?>
|
78 |
+
<?php if( !empty( $Data[$metabox_id]["name"] ) ) : $Val = stripslashes( $Data[$metabox_id]["name"] ); endif; ?>
|
79 |
+
<input type="text" name="data[<?php echo esc_attr( $metabox_id ); ?>][name]" class="regular-text" value="<?php echo esc_html( $Val ); ?>" placeholder="<?php echo esc_attr( __( $metabox_title ) ); ?>" />
|
80 |
</td>
|
81 |
</tr>
|
82 |
<?php endif; ?>
|
91 |
<?php $load_link = self_admin_url( 'index.php' ); ?>
|
92 |
|
93 |
<p>
|
94 |
+
<a href="<?php echo esc_url( $load_link ); ?>" class="button button-primary column_load">
|
95 |
<span class="dashicons dashicons-update"></span>
|
96 |
<?php echo sprintf( __( 'Refresh meta boxes for %s', 'wp-admin-ui-customize' ) , __( 'Dashboard' ) ); ?>
|
97 |
</a>
|
103 |
|
104 |
</div>
|
105 |
</div>
|
106 |
+
|
107 |
<div class="postbox">
|
108 |
<div class="handlediv" title="Click to toggle"><br></div>
|
109 |
<h3 class="hndle"><span><?php _e( 'Other' , 'wp-admin-ui-customize' ); ?></span></h3>
|
118 |
<td>
|
119 |
<?php $Checked = ''; ?>
|
120 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
121 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e( "Prevent selected roles from re-arrange meta boxes" , 'wp-admin-ui-customize' ); ?></label>
|
122 |
</td>
|
123 |
</tr>
|
124 |
</tbody>
|
127 |
</div>
|
128 |
</div>
|
129 |
</div>
|
130 |
+
|
131 |
<br class="clear">
|
132 |
|
133 |
</div>
|
135 |
</div>
|
136 |
|
137 |
<p class="submit">
|
138 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
139 |
</p>
|
140 |
|
141 |
<p class="submit reset">
|
142 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Dashboard' ) . __( 'Settings' ) ); ?></span>
|
143 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
144 |
</p>
|
145 |
|
146 |
</form>
|
175 |
|
176 |
$('.wauc_form .column_load').on('click', function( ev ) {
|
177 |
var load_url = $(ev.target).prop('href');
|
178 |
+
|
179 |
$.ajax({
|
180 |
url: load_url,
|
181 |
beforeSend: function( xhr ) {
|
185 |
}).done(function( data ) {
|
186 |
location.reload();
|
187 |
});
|
188 |
+
|
189 |
return false;
|
190 |
}).disableSelection();
|
191 |
|
192 |
});
|
193 |
+
</script>
|
inc/setting_default.php
CHANGED
@@ -33,12 +33,11 @@ WP Admin UI Customize allows the management UI for different user roles to be cu
|
|
33 |
<div class="inside">
|
34 |
<p><?php _e( 'Tested with WordPress versions' , 'wp-admin-ui-customize' ); ?> : 4.2 - 4.9</p>
|
35 |
<ul>
|
36 |
-
<li><a href="<?php echo
|
37 |
-
<li><a href="<?php echo
|
38 |
<li><a href="http://wordpress.org/support/plugin/<?php echo $this->PluginSlug; ?>" target="_blank"><?php _e( 'Support Forums' ); ?></a></li>
|
39 |
<li><a href="http://wordpress.org/support/view/plugin-reviews/<?php echo $this->PluginSlug; ?>" target="_blank"><?php _e( 'Reviews' , 'wp-admin-ui-customize' ); ?></a></li>
|
40 |
<li><a href="https://twitter.com/gqevu6bsiz" target="_blank">twitter</a></li>
|
41 |
-
<li><a href="http://www.facebook.com/pages/Gqevu6bsiz/499584376749601" target="_blank">facebook</a></li>
|
42 |
</ul>
|
43 |
</div>
|
44 |
</div>
|
@@ -65,7 +64,7 @@ WP Admin UI Customize allows the management UI for different user roles to be cu
|
|
65 |
<div id="user_role">
|
66 |
|
67 |
<form id="wauc_setting_default" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
68 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
69 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
70 |
<input type="hidden" name="record_field" value="user_role" />
|
71 |
|
@@ -78,7 +77,7 @@ WP Admin UI Customize allows the management UI for different user roles to be cu
|
|
78 |
<?php if( !empty( $Data[$role_name] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
79 |
<p>
|
80 |
<label>
|
81 |
-
<input type="checkbox" name="data[<?php echo $field; ?>][<?php echo $role_name; ?>]" value="1" <?php echo $Checked; ?> />
|
82 |
<?php echo $val["label"]; ?>
|
83 |
</label>
|
84 |
</p>
|
@@ -87,12 +86,12 @@ WP Admin UI Customize allows the management UI for different user roles to be cu
|
|
87 |
</div>
|
88 |
|
89 |
<p class="submit">
|
90 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
91 |
</p>
|
92 |
|
93 |
<p class="submit reset">
|
94 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'User Roles Settings' , 'wp-admin-ui-customize' ) ); ?></span>
|
95 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
96 |
</p>
|
97 |
|
98 |
<p> </p>
|
@@ -105,14 +104,14 @@ WP Admin UI Customize allows the management UI for different user roles to be cu
|
|
105 |
<h3 style="background: #FFF2D0; border-color: #FFC426;"><span class="hndle"><?php _e( 'Do you need professional setup and customization?' , 'wp-admin-ui-customize' ); ?></span></h3>
|
106 |
<div class="inside">
|
107 |
<p style="float: right;">
|
108 |
-
<img src="<?php echo $this->Schema
|
109 |
-
<a href="<?php echo $this->AuthorUrl
|
110 |
</p>
|
111 |
<p><?php _e( 'I provide full service customization for WP Admin UI Customize.' , 'wp-admin-ui-customize' ); ?></p>
|
112 |
<p><?php _e( 'Please contact me if you are interested.' , 'wp-admin-ui-customize' ); ?></p>
|
113 |
<p>
|
114 |
-
<a href="<?php echo $this->Site
|
115 |
-
|
116 |
</div>
|
117 |
</div>
|
118 |
|
33 |
<div class="inside">
|
34 |
<p><?php _e( 'Tested with WordPress versions' , 'wp-admin-ui-customize' ); ?> : 4.2 - 4.9</p>
|
35 |
<ul>
|
36 |
+
<li><a href="<?php echo esc_url( $this->Site ); ?>" target="_blank"><?php _e( 'Plugin site' , 'wp-admin-ui-customize' ); ?></a></li>
|
37 |
+
<li><a href="<?php echo esc_url( $this->AuthorUrl ); ?>" target="_blank"><?php _e( 'Developer site' , 'wp-admin-ui-customize' ); ?></a></li>
|
38 |
<li><a href="http://wordpress.org/support/plugin/<?php echo $this->PluginSlug; ?>" target="_blank"><?php _e( 'Support Forums' ); ?></a></li>
|
39 |
<li><a href="http://wordpress.org/support/view/plugin-reviews/<?php echo $this->PluginSlug; ?>" target="_blank"><?php _e( 'Reviews' , 'wp-admin-ui-customize' ); ?></a></li>
|
40 |
<li><a href="https://twitter.com/gqevu6bsiz" target="_blank">twitter</a></li>
|
|
|
41 |
</ul>
|
42 |
</div>
|
43 |
</div>
|
64 |
<div id="user_role">
|
65 |
|
66 |
<form id="wauc_setting_default" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
67 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
68 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
69 |
<input type="hidden" name="record_field" value="user_role" />
|
70 |
|
77 |
<?php if( !empty( $Data[$role_name] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
78 |
<p>
|
79 |
<label>
|
80 |
+
<input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>][<?php echo esc_attr( $role_name ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> />
|
81 |
<?php echo $val["label"]; ?>
|
82 |
</label>
|
83 |
</p>
|
86 |
</div>
|
87 |
|
88 |
<p class="submit">
|
89 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
90 |
</p>
|
91 |
|
92 |
<p class="submit reset">
|
93 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'User Roles Settings' , 'wp-admin-ui-customize' ) ); ?></span>
|
94 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
95 |
</p>
|
96 |
|
97 |
<p> </p>
|
104 |
<h3 style="background: #FFF2D0; border-color: #FFC426;"><span class="hndle"><?php _e( 'Do you need professional setup and customization?' , 'wp-admin-ui-customize' ); ?></span></h3>
|
105 |
<div class="inside">
|
106 |
<p style="float: right;">
|
107 |
+
<img src="<?php echo esc_url( $this->Schema . 'www.gravatar.com/avatar/7e05137c5a859aa987a809190b979ed4?s=46' ); ?>" width="46" /><br />
|
108 |
+
<a href="<?php echo esc_url( $this->AuthorUrl . 'contact-us/' ); ?>" target="_blank">gqevu6bsiz</a>
|
109 |
</p>
|
110 |
<p><?php _e( 'I provide full service customization for WP Admin UI Customize.' , 'wp-admin-ui-customize' ); ?></p>
|
111 |
<p><?php _e( 'Please contact me if you are interested.' , 'wp-admin-ui-customize' ); ?></p>
|
112 |
<p>
|
113 |
+
<a href="<?php echo esc_url( $this->Site . 'contact/' ); ?>" target="_blank"><?php _e( 'Contact me' , 'wp-admin-ui-customize' ); ?></a>
|
114 |
+
</p>
|
115 |
</div>
|
116 |
</div>
|
117 |
|
inc/setting_loginscreen.php
CHANGED
@@ -17,14 +17,14 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
17 |
<p> </p>
|
18 |
|
19 |
<form id="wauc_setting_loginscreen" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
20 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
21 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
22 |
<input type="hidden" name="record_field" value="loginscreen" />
|
23 |
|
24 |
<?php if( is_multisite() ) : ?>
|
25 |
<p class="description"><?php _e( 'Is not possible to check the login form if you do not log out in the case of MultiSite.' , 'wp-admin-ui-customize' ); ?></p>
|
26 |
<?php endif; ?>
|
27 |
-
<p><a title="<?php _e( 'Login Screen' , 'wp-admin-ui-customize' ); ?>" href="<?php echo get_option( 'siteurl' ); ?>/wp-login.php?TB_iframe=1&width=520&height=520" class="thickbox button button-secondary"><?php _e( 'Show Current Login Screen' , 'wp-admin-ui-customize' ); ?></a></p>
|
28 |
|
29 |
<div id="poststuff">
|
30 |
|
@@ -46,8 +46,8 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
46 |
</th>
|
47 |
<td>
|
48 |
<?php $Val = ''; ?>
|
49 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
50 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
51 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
52 |
|
53 |
</td>
|
@@ -59,8 +59,8 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
59 |
</th>
|
60 |
<td>
|
61 |
<?php $Val = ''; ?>
|
62 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
63 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
64 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
65 |
</td>
|
66 |
</tr>
|
@@ -71,12 +71,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
71 |
</th>
|
72 |
<td>
|
73 |
<?php $Val = ''; ?>
|
74 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
75 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
76 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
77 |
<?php if( !empty( $Val ) ) : ?>
|
78 |
<?php $img = $this->val_replace( $Val ); ?>
|
79 |
-
<p><img src="<?php echo $img; ?>" style="max-width: 100%;" alt="Login Logo" /></p>
|
80 |
<?php endif; ?>
|
81 |
</td>
|
82 |
</tr>
|
@@ -98,8 +98,8 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
98 |
</th>
|
99 |
<td>
|
100 |
<?php $Val = ''; ?>
|
101 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
|
102 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
|
103 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
104 |
</td>
|
105 |
</tr>
|
@@ -110,8 +110,8 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
110 |
</th>
|
111 |
<td>
|
112 |
<?php $Val = ''; ?>
|
113 |
-
<?php if( !empty( $Data[$field] ) ) : $Val = stripslashes(
|
114 |
-
<input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" id="<?php echo $field; ?>">
|
115 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
116 |
</td>
|
117 |
</tr>
|
@@ -131,12 +131,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
131 |
</div>
|
132 |
|
133 |
<p class="submit">
|
134 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
135 |
</p>
|
136 |
|
137 |
<p class="submit reset">
|
138 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Login Form' , 'wp-admin-ui-customize' ) ); ?></span>
|
139 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
140 |
</p>
|
141 |
|
142 |
</form>
|
17 |
<p> </p>
|
18 |
|
19 |
<form id="wauc_setting_loginscreen" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
20 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
21 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
22 |
<input type="hidden" name="record_field" value="loginscreen" />
|
23 |
|
24 |
<?php if( is_multisite() ) : ?>
|
25 |
<p class="description"><?php _e( 'Is not possible to check the login form if you do not log out in the case of MultiSite.' , 'wp-admin-ui-customize' ); ?></p>
|
26 |
<?php endif; ?>
|
27 |
+
<p><a title="<?php _e( 'Login Screen' , 'wp-admin-ui-customize' ); ?>" href="<?php echo esc_url( get_option( 'siteurl' ) ); ?>/wp-login.php?TB_iframe=1&width=520&height=520" class="thickbox button button-secondary"><?php _e( 'Show Current Login Screen' , 'wp-admin-ui-customize' ); ?></a></p>
|
28 |
|
29 |
<div id="poststuff">
|
30 |
|
46 |
</th>
|
47 |
<td>
|
48 |
<?php $Val = ''; ?>
|
49 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( stripslashes( $Data[$field] ) ); endif; ?>
|
50 |
+
<input type="text" name="data[<?php echo esc_attr( $field ); ?>]" value="<?php echo esc_attr( $Val ); ?>" class="regular-text" id="<?php echo esc_attr( $field ); ?>">
|
51 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
52 |
|
53 |
</td>
|
59 |
</th>
|
60 |
<td>
|
61 |
<?php $Val = ''; ?>
|
62 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( stripslashes( $Data[$field] ) ); endif; ?>
|
63 |
+
<input type="text" name="data[<?php echo esc_attr( $field ); ?>]" value="<?php echo esc_attr( $Val ); ?>" class="regular-text" id="<?php echo esc_attr( $field ); ?>">
|
64 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
65 |
</td>
|
66 |
</tr>
|
71 |
</th>
|
72 |
<td>
|
73 |
<?php $Val = ''; ?>
|
74 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( stripslashes( $Data[$field] ) ); endif; ?>
|
75 |
+
<input type="text" name="data[<?php echo esc_attr( $field ); ?>]" value="<?php echo esc_attr( $Val ); ?>" class="regular-text" id="<?php echo esc_attr( $field ); ?>">
|
76 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
77 |
<?php if( !empty( $Val ) ) : ?>
|
78 |
<?php $img = $this->val_replace( $Val ); ?>
|
79 |
+
<p><img src="<?php echo esc_url( $img ); ?>" style="max-width: 100%;" alt="Login Logo" /></p>
|
80 |
<?php endif; ?>
|
81 |
</td>
|
82 |
</tr>
|
98 |
</th>
|
99 |
<td>
|
100 |
<?php $Val = ''; ?>
|
101 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( stripslashes( $Data[$field] ) ); endif; ?>
|
102 |
+
<input type="text" name="data[<?php echo esc_attr( $field ); ?>]" value="<?php echo esc_attr( $Val ); ?>" class="regular-text" id="<?php echo esc_attr( $field ); ?>">
|
103 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
104 |
</td>
|
105 |
</tr>
|
110 |
</th>
|
111 |
<td>
|
112 |
<?php $Val = ''; ?>
|
113 |
+
<?php if( !empty( $Data[$field] ) ) : $Val = stripslashes( $Data[$field] ); endif; ?>
|
114 |
+
<input type="text" name="data[<?php echo esc_attr( $field ); ?>]" value="<?php echo esc_attr( $Val ); ?>" class="large-text" id="<?php echo esc_attr( $field ); ?>">
|
115 |
<a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a>
|
116 |
</td>
|
117 |
</tr>
|
131 |
</div>
|
132 |
|
133 |
<p class="submit">
|
134 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
135 |
</p>
|
136 |
|
137 |
<p class="submit reset">
|
138 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Login Form' , 'wp-admin-ui-customize' ) ); ?></span>
|
139 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
140 |
</p>
|
141 |
|
142 |
</form>
|
inc/setting_manage_metabox.php
CHANGED
@@ -22,7 +22,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
22 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
23 |
|
24 |
<form id="wauc_setting_manage_metabox" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
25 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
26 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
27 |
<input type="hidden" name="record_field" value="manage_metabox" />
|
28 |
|
@@ -37,9 +37,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
37 |
<div class="handlediv" title="Click to toggle"><br></div>
|
38 |
<h3 class="hndle"><span><?php _e( 'Posts' ); ?></span></h3>
|
39 |
<div class="inside">
|
40 |
-
|
41 |
<?php if( !empty( $Metaboxes["metaboxes"]["post"] ) ) : ?>
|
42 |
-
|
43 |
<table class="form-table">
|
44 |
<thead>
|
45 |
<tr>
|
@@ -69,7 +69,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
69 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
70 |
<?php $Checked = ''; ?>
|
71 |
<?php if( !empty( $Data["post"][$metabox_id]["remove"] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
72 |
-
<label><input type="checkbox" name="data[post][<?php echo $metabox_id; ?>][remove]" value="1" class="show_check" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
73 |
<?php else : ?>
|
74 |
<?php _e( 'Show' ); ?>
|
75 |
<?php endif; ?>
|
@@ -78,7 +78,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
78 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
79 |
<?php $Selected = 0; ?>
|
80 |
<?php if( !empty( $Data["post"][$metabox_id]["toggle"] ) ) : $Selected = true; endif; ?>
|
81 |
-
<select name="data[post][<?php echo $metabox_id; ?>][toggle]" class="select_toggle">
|
82 |
<option value="0" <?php Selected( $Selected , 0 ); ?>><?php _e( 'Expanded' , 'wp-admin-ui-customize' ); ?></option>
|
83 |
<option value="1" <?php Selected( $Selected , 1 ); ?>><?php _e( 'Collapsed' , 'wp-admin-ui-customize' ); ?></option>
|
84 |
</select>
|
@@ -88,12 +88,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
88 |
</td>
|
89 |
<td>
|
90 |
<?php $Val = ''; ?>
|
91 |
-
<?php if( !empty( $Data["post"][$metabox_id]["name"] ) ) : $Val =
|
92 |
-
<input type="text" name="data[post][<?php echo $metabox_id; ?>][name]" class="regular-text metabox_rename" value="<?php echo $Val; ?>" placeholder="<?php
|
93 |
<?php if( $metabox_id == 'commentstatusdiv' ) : ?>
|
94 |
<p class="description"><?php _e( 'If the discussion meta box is hidden comments will not be displayed on new posts for the selected role.' , 'wp-admin-ui-customize' ); ?></p>
|
95 |
-
<p><img src="<?php echo $this->Url
|
96 |
-
<p><a href="<?php echo admin_url( 'admin.php?page=' . $this->PageSlug . '_post_add_edit_screen' ); ?>"><?php _e( 'Change this setting to allow comments on new posts' , 'wp-admin-ui-customize' ); ?></a></p>
|
97 |
<?php endif; ?>
|
98 |
</td>
|
99 |
</tr>
|
@@ -104,9 +104,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
104 |
</table>
|
105 |
|
106 |
<?php endif; ?>
|
107 |
-
|
108 |
<?php $post = get_posts( array( 'post_type' => 'post' , 'order' => 'DESC' , 'orderby' => 'post_date' , 'numberposts' => 1 ) ); ?>
|
109 |
-
|
110 |
<?php if( !empty( $post ) ) : ?>
|
111 |
|
112 |
<?php $load_link = self_admin_url( 'post.php?post=' . $post[0]->ID . '&action=edit' ); ?>
|
@@ -118,7 +118,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
118 |
<?php endif; ?>
|
119 |
|
120 |
<p>
|
121 |
-
<a href="<?php echo $load_link; ?>" class="button button-primary column_load">
|
122 |
<span class="dashicons dashicons-update"></span>
|
123 |
<?php echo sprintf( __( 'Refresh meta boxes for %s', 'wp-admin-ui-customize' ) , __( 'Posts' ) ); ?>
|
124 |
</a>
|
@@ -134,9 +134,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
134 |
<div class="handlediv" title="Click to toggle"><br></div>
|
135 |
<h3 class="hndle"><span><?php _e( 'Pages' ); ?></span></h3>
|
136 |
<div class="inside">
|
137 |
-
|
138 |
<?php if( !empty( $Metaboxes["metaboxes"]["page"] ) ) : ?>
|
139 |
-
|
140 |
<table class="form-table">
|
141 |
<thead>
|
142 |
<tr>
|
@@ -165,7 +165,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
165 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
166 |
<?php $Checked = ''; ?>
|
167 |
<?php if( !empty( $Data["page"][$metabox_id]["remove"] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
168 |
-
<label><input type="checkbox" name="data[page][<?php echo $metabox_id; ?>][remove]" value="1" class="show_check" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
169 |
<?php else : ?>
|
170 |
<?php _e( 'Show' ); ?>
|
171 |
<?php endif; ?>
|
@@ -174,7 +174,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
174 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
175 |
<?php $Selected = 0; ?>
|
176 |
<?php if( !empty( $Data["page"][$metabox_id]["toggle"] ) ) : $Selected = true; endif; ?>
|
177 |
-
<select name="data[page][<?php echo $metabox_id; ?>][toggle]" class="select_toggle">
|
178 |
<option value="0" <?php Selected( $Selected , 0 ); ?>><?php _e( 'Expanded' , 'wp-admin-ui-customize' ); ?></option>
|
179 |
<option value="1" <?php Selected( $Selected , 1 ); ?>><?php _e( 'Collapsed' , 'wp-admin-ui-customize' ); ?></option>
|
180 |
</select>
|
@@ -184,12 +184,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
184 |
</td>
|
185 |
<td>
|
186 |
<?php $Val = ''; ?>
|
187 |
-
<?php if( !empty( $Data["page"][$metabox_id]["name"] ) ) : $Val =
|
188 |
-
<input type="text" name="data[page][<?php echo $metabox_id; ?>][name]" class="regular-text metabox_rename" value="<?php echo $Val; ?>" placeholder="<?php
|
189 |
<?php if( $metabox_id == 'commentstatusdiv' ) : ?>
|
190 |
<p class="description"><?php _e( 'If the discussion meta box is hidden comments will not be displayed on new posts for the selected role.' , 'wp-admin-ui-customize' ); ?></p>
|
191 |
-
<p><img src="<?php echo $this->Url
|
192 |
-
<p><a href="<?php echo admin_url( 'admin.php?page=' . $this->PageSlug . '_post_add_edit_screen' ); ?>"><?php _e( 'Change this setting to allow comments on new posts' , 'wp-admin-ui-customize' ); ?></a></p>
|
193 |
<?php endif; ?>
|
194 |
</td>
|
195 |
</tr>
|
@@ -198,11 +198,11 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
198 |
<?php endforeach; ?>
|
199 |
</tbody>
|
200 |
</table>
|
201 |
-
|
202 |
<?php endif; ?>
|
203 |
-
|
204 |
<?php $post = get_posts( array( 'post_type' => 'page' , 'order' => 'DESC' , 'orderby' => 'post_date' , 'numberposts' => 1 ) ); ?>
|
205 |
-
|
206 |
<?php if( !empty( $post ) ) : ?>
|
207 |
|
208 |
<?php $load_link = self_admin_url( 'post.php?post=' . $post[0]->ID . '&action=edit' ); ?>
|
@@ -214,7 +214,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
214 |
<?php endif; ?>
|
215 |
|
216 |
<p>
|
217 |
-
<a href="<?php echo $load_link; ?>" class="button button-primary column_load">
|
218 |
<span class="dashicons dashicons-update"></span>
|
219 |
<?php echo sprintf( __( 'Refresh meta boxes for %s', 'wp-admin-ui-customize' ) , __( 'Pages' ) ); ?>
|
220 |
</a>
|
@@ -228,18 +228,18 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
228 |
|
229 |
</div>
|
230 |
</div>
|
231 |
-
|
232 |
<?php if ( !empty( $CustomPosts ) ) : ?>
|
233 |
-
|
234 |
<div id="postbox-container-2" class="postbox-container">
|
235 |
<div id="custom_post">
|
236 |
-
|
237 |
<?php foreach( $CustomPosts as $post_name => $cpt ) : ?>
|
238 |
<div class="postbox">
|
239 |
<div class="handlediv" title="Click to toggle"><br></div>
|
240 |
<h3 class="hndle"><span><?php echo strip_tags( $cpt->labels->name ); ?></span></h3>
|
241 |
<div class="inside">
|
242 |
-
|
243 |
<?php if( !empty( $Metaboxes["metaboxes"][$post_name] ) ) : ?>
|
244 |
|
245 |
<table class="form-table">
|
@@ -269,7 +269,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
269 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
270 |
<?php $Checked = ''; ?>
|
271 |
<?php if( !empty( $Data[$post_name][$metabox_id]["remove"] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
272 |
-
<label><input type="checkbox" name="data[<?php echo $post_name; ?>][<?php echo $metabox_id; ?>][remove]" value="1" class="show_check" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
273 |
<?php else : ?>
|
274 |
<?php _e( 'Show' ); ?>
|
275 |
<?php endif; ?>
|
@@ -278,7 +278,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
278 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
279 |
<?php $Selected = 0; ?>
|
280 |
<?php if( !empty( $Data[$post_name][$metabox_id]["toggle"] ) ) : $Selected = true; endif; ?>
|
281 |
-
<select name="data[<?php echo $post_name; ?>][<?php echo $metabox_id; ?>][toggle]" class="select_toggle">
|
282 |
<option value="0" <?php Selected( $Selected , 0 ); ?>><?php _e( 'Expanded' , 'wp-admin-ui-customize' ); ?></option>
|
283 |
<option value="1" <?php Selected( $Selected , 1 ); ?>><?php _e( 'Collapsed' , 'wp-admin-ui-customize' ); ?></option>
|
284 |
</select>
|
@@ -288,8 +288,8 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
288 |
</td>
|
289 |
<td>
|
290 |
<?php $Val = ''; ?>
|
291 |
-
<?php if( !empty( $Data[$post_name][$metabox_id]["name"] ) ) : $Val =
|
292 |
-
<input type="text" name="data[<?php echo $post_name; ?>][<?php echo $metabox_id; ?>][name]" class="regular-text metabox_rename" value="<?php echo $Val; ?>" placeholder="<?php
|
293 |
</td>
|
294 |
</tr>
|
295 |
<?php endif; ?>
|
@@ -298,9 +298,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
298 |
<?php endforeach; ?>
|
299 |
</tbody>
|
300 |
</table>
|
301 |
-
|
302 |
<?php endif; ?>
|
303 |
-
|
304 |
<?php $args = array( 'post_type' => $post_name , 'order' => 'DESC' , 'orderby' => 'post_date' , 'numberposts' => 1 ); ?>
|
305 |
|
306 |
<?php if( !empty( $activated_plugin['woocommerce'] ) && $post_name == 'shop_order' ) : ?>
|
@@ -308,9 +308,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
308 |
<?php $args['post_status'] = array( 'wc-processing', 'wc-completed' ); ?>
|
309 |
|
310 |
<?php endif; ?>
|
311 |
-
|
312 |
<?php $post = get_posts( $args ); ?>
|
313 |
-
|
314 |
<?php if( !empty( $post ) ) : ?>
|
315 |
|
316 |
<?php $load_link = self_admin_url( 'post.php?post=' . $post[0]->ID . '&action=edit' ); ?>
|
@@ -322,7 +322,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
322 |
<?php endif; ?>
|
323 |
|
324 |
<p>
|
325 |
-
<a href="<?php echo $load_link; ?>" class="button button-primary column_load">
|
326 |
<span class="dashicons dashicons-update"></span>
|
327 |
<?php echo sprintf( __( 'Refresh meta boxes for %s', 'wp-admin-ui-customize' ) , $cpt->label ); ?>
|
328 |
</a>
|
@@ -337,9 +337,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
337 |
|
338 |
</div>
|
339 |
</div>
|
340 |
-
|
341 |
<?php endif; ?>
|
342 |
-
|
343 |
<br class="clear">
|
344 |
|
345 |
</div>
|
@@ -347,12 +347,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
347 |
</div>
|
348 |
|
349 |
<p class="submit">
|
350 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
351 |
</p>
|
352 |
|
353 |
<p class="submit reset">
|
354 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Management of meta boxes' , 'wp-admin-ui-customize' ) . __( 'Settings' ) ); ?></span>
|
355 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
356 |
</p>
|
357 |
|
358 |
</form>
|
@@ -393,7 +393,7 @@ jQuery(document).ready(function($) {
|
|
393 |
}
|
394 |
});
|
395 |
});
|
396 |
-
|
397 |
$('.postbox .inside .form-table').each(function( key, el ) {
|
398 |
$(el).find('tbody tr').each(function( tr_key , tr_el ) {
|
399 |
if( $(tr_el).find('.show_check').size() > 0 ) {
|
@@ -404,7 +404,7 @@ jQuery(document).ready(function($) {
|
|
404 |
}
|
405 |
});
|
406 |
});
|
407 |
-
|
408 |
$('.postbox .inside .form-table tbody tr td .show_check').on('click', function( ev ) {
|
409 |
var Tr = $(ev.target).parent().parent().parent();
|
410 |
if( $(ev.target).prop('checked') ) {
|
@@ -418,9 +418,9 @@ jQuery(document).ready(function($) {
|
|
418 |
|
419 |
$('.wauc_form .column_load').on('click', function( ev ) {
|
420 |
var load_url = $(ev.target).prop('href');
|
421 |
-
|
422 |
load_url += '&<?php echo $this->ltd; ?>_metabox_load=1';
|
423 |
-
|
424 |
$.ajax({
|
425 |
url: load_url,
|
426 |
beforeSend: function( xhr ) {
|
@@ -428,18 +428,18 @@ jQuery(document).ready(function($) {
|
|
428 |
$(ev.target).parent().parent().find('.spinner').show();
|
429 |
}
|
430 |
}).done(function( post_html_el ) {
|
431 |
-
|
432 |
if( post_html_el.indexOf( "adminpage = 'post-php'" ) != -1 || post_html_el.indexOf( "adminpage = 'post-new-php'" ) != -1 ) {
|
433 |
|
434 |
location.reload();
|
435 |
|
436 |
}
|
437 |
-
|
438 |
});
|
439 |
|
440 |
return false;
|
441 |
-
|
442 |
}).disableSelection();
|
443 |
|
444 |
});
|
445 |
-
</script>
|
22 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
23 |
|
24 |
<form id="wauc_setting_manage_metabox" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
25 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
26 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
27 |
<input type="hidden" name="record_field" value="manage_metabox" />
|
28 |
|
37 |
<div class="handlediv" title="Click to toggle"><br></div>
|
38 |
<h3 class="hndle"><span><?php _e( 'Posts' ); ?></span></h3>
|
39 |
<div class="inside">
|
40 |
+
|
41 |
<?php if( !empty( $Metaboxes["metaboxes"]["post"] ) ) : ?>
|
42 |
+
|
43 |
<table class="form-table">
|
44 |
<thead>
|
45 |
<tr>
|
69 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
70 |
<?php $Checked = ''; ?>
|
71 |
<?php if( !empty( $Data["post"][$metabox_id]["remove"] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
72 |
+
<label><input type="checkbox" name="data[post][<?php echo esc_attr( $metabox_id ); ?>][remove]" value="1" class="show_check" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
73 |
<?php else : ?>
|
74 |
<?php _e( 'Show' ); ?>
|
75 |
<?php endif; ?>
|
78 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
79 |
<?php $Selected = 0; ?>
|
80 |
<?php if( !empty( $Data["post"][$metabox_id]["toggle"] ) ) : $Selected = true; endif; ?>
|
81 |
+
<select name="data[post][<?php echo esc_attr( $metabox_id ); ?>][toggle]" class="select_toggle">
|
82 |
<option value="0" <?php Selected( $Selected , 0 ); ?>><?php _e( 'Expanded' , 'wp-admin-ui-customize' ); ?></option>
|
83 |
<option value="1" <?php Selected( $Selected , 1 ); ?>><?php _e( 'Collapsed' , 'wp-admin-ui-customize' ); ?></option>
|
84 |
</select>
|
88 |
</td>
|
89 |
<td>
|
90 |
<?php $Val = ''; ?>
|
91 |
+
<?php if( !empty( $Data["post"][$metabox_id]["name"] ) ) : $Val = stripslashes( $Data["post"][$metabox_id]["name"] ); endif; ?>
|
92 |
+
<input type="text" name="data[post][<?php echo esc_attr( $metabox_id ); ?>][name]" class="regular-text metabox_rename" value="<?php echo esc_html( $Val ); ?>" placeholder="<?php echo esc_attr( __( $metabox_title ) ); ?>" />
|
93 |
<?php if( $metabox_id == 'commentstatusdiv' ) : ?>
|
94 |
<p class="description"><?php _e( 'If the discussion meta box is hidden comments will not be displayed on new posts for the selected role.' , 'wp-admin-ui-customize' ); ?></p>
|
95 |
+
<p><img src="<?php echo esc_url( $this->Url . 'images/discussion_allow_comments.png' ); ?>" /></p>
|
96 |
+
<p><a href="<?php echo esc_url( admin_url( 'admin.php?page=' . $this->PageSlug . '_post_add_edit_screen' ) ); ?>"><?php _e( 'Change this setting to allow comments on new posts' , 'wp-admin-ui-customize' ); ?></a></p>
|
97 |
<?php endif; ?>
|
98 |
</td>
|
99 |
</tr>
|
104 |
</table>
|
105 |
|
106 |
<?php endif; ?>
|
107 |
+
|
108 |
<?php $post = get_posts( array( 'post_type' => 'post' , 'order' => 'DESC' , 'orderby' => 'post_date' , 'numberposts' => 1 ) ); ?>
|
109 |
+
|
110 |
<?php if( !empty( $post ) ) : ?>
|
111 |
|
112 |
<?php $load_link = self_admin_url( 'post.php?post=' . $post[0]->ID . '&action=edit' ); ?>
|
118 |
<?php endif; ?>
|
119 |
|
120 |
<p>
|
121 |
+
<a href="<?php echo esc_url( $load_link ); ?>" class="button button-primary column_load">
|
122 |
<span class="dashicons dashicons-update"></span>
|
123 |
<?php echo sprintf( __( 'Refresh meta boxes for %s', 'wp-admin-ui-customize' ) , __( 'Posts' ) ); ?>
|
124 |
</a>
|
134 |
<div class="handlediv" title="Click to toggle"><br></div>
|
135 |
<h3 class="hndle"><span><?php _e( 'Pages' ); ?></span></h3>
|
136 |
<div class="inside">
|
137 |
+
|
138 |
<?php if( !empty( $Metaboxes["metaboxes"]["page"] ) ) : ?>
|
139 |
+
|
140 |
<table class="form-table">
|
141 |
<thead>
|
142 |
<tr>
|
165 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
166 |
<?php $Checked = ''; ?>
|
167 |
<?php if( !empty( $Data["page"][$metabox_id]["remove"] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
168 |
+
<label><input type="checkbox" name="data[page][<?php echo esc_attr( $metabox_id ); ?>][remove]" value="1" class="show_check" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
169 |
<?php else : ?>
|
170 |
<?php _e( 'Show' ); ?>
|
171 |
<?php endif; ?>
|
174 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
175 |
<?php $Selected = 0; ?>
|
176 |
<?php if( !empty( $Data["page"][$metabox_id]["toggle"] ) ) : $Selected = true; endif; ?>
|
177 |
+
<select name="data[page][<?php echo esc_attr( $metabox_id ); ?>][toggle]" class="select_toggle">
|
178 |
<option value="0" <?php Selected( $Selected , 0 ); ?>><?php _e( 'Expanded' , 'wp-admin-ui-customize' ); ?></option>
|
179 |
<option value="1" <?php Selected( $Selected , 1 ); ?>><?php _e( 'Collapsed' , 'wp-admin-ui-customize' ); ?></option>
|
180 |
</select>
|
184 |
</td>
|
185 |
<td>
|
186 |
<?php $Val = ''; ?>
|
187 |
+
<?php if( !empty( $Data["page"][$metabox_id]["name"] ) ) : $Val = stripslashes( $Data["page"][$metabox_id]["name"] ); endif; ?>
|
188 |
+
<input type="text" name="data[page][<?php echo esc_attr( $metabox_id ); ?>][name]" class="regular-text metabox_rename" value="<?php echo esc_html( $Val ); ?>" placeholder="<?php echo esc_attr( __( $metabox_title ) ); ?>" />
|
189 |
<?php if( $metabox_id == 'commentstatusdiv' ) : ?>
|
190 |
<p class="description"><?php _e( 'If the discussion meta box is hidden comments will not be displayed on new posts for the selected role.' , 'wp-admin-ui-customize' ); ?></p>
|
191 |
+
<p><img src="<?php echo esc_url( $this->Url . 'images/discussion_allow_comments.png' ); ?>" /></p>
|
192 |
+
<p><a href="<?php echo esc_url( admin_url( 'admin.php?page=' . $this->PageSlug . '_post_add_edit_screen' ) ); ?>"><?php _e( 'Change this setting to allow comments on new posts' , 'wp-admin-ui-customize' ); ?></a></p>
|
193 |
<?php endif; ?>
|
194 |
</td>
|
195 |
</tr>
|
198 |
<?php endforeach; ?>
|
199 |
</tbody>
|
200 |
</table>
|
201 |
+
|
202 |
<?php endif; ?>
|
203 |
+
|
204 |
<?php $post = get_posts( array( 'post_type' => 'page' , 'order' => 'DESC' , 'orderby' => 'post_date' , 'numberposts' => 1 ) ); ?>
|
205 |
+
|
206 |
<?php if( !empty( $post ) ) : ?>
|
207 |
|
208 |
<?php $load_link = self_admin_url( 'post.php?post=' . $post[0]->ID . '&action=edit' ); ?>
|
214 |
<?php endif; ?>
|
215 |
|
216 |
<p>
|
217 |
+
<a href="<?php echo esc_url( $load_link ); ?>" class="button button-primary column_load">
|
218 |
<span class="dashicons dashicons-update"></span>
|
219 |
<?php echo sprintf( __( 'Refresh meta boxes for %s', 'wp-admin-ui-customize' ) , __( 'Pages' ) ); ?>
|
220 |
</a>
|
228 |
|
229 |
</div>
|
230 |
</div>
|
231 |
+
|
232 |
<?php if ( !empty( $CustomPosts ) ) : ?>
|
233 |
+
|
234 |
<div id="postbox-container-2" class="postbox-container">
|
235 |
<div id="custom_post">
|
236 |
+
|
237 |
<?php foreach( $CustomPosts as $post_name => $cpt ) : ?>
|
238 |
<div class="postbox">
|
239 |
<div class="handlediv" title="Click to toggle"><br></div>
|
240 |
<h3 class="hndle"><span><?php echo strip_tags( $cpt->labels->name ); ?></span></h3>
|
241 |
<div class="inside">
|
242 |
+
|
243 |
<?php if( !empty( $Metaboxes["metaboxes"][$post_name] ) ) : ?>
|
244 |
|
245 |
<table class="form-table">
|
269 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
270 |
<?php $Checked = ''; ?>
|
271 |
<?php if( !empty( $Data[$post_name][$metabox_id]["remove"] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
272 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $post_name ); ?>][<?php echo esc_attr( $metabox_id ); ?>][remove]" value="1" class="show_check" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
273 |
<?php else : ?>
|
274 |
<?php _e( 'Show' ); ?>
|
275 |
<?php endif; ?>
|
278 |
<?php if( $metabox_id != 'submitdiv' ) : ?>
|
279 |
<?php $Selected = 0; ?>
|
280 |
<?php if( !empty( $Data[$post_name][$metabox_id]["toggle"] ) ) : $Selected = true; endif; ?>
|
281 |
+
<select name="data[<?php echo esc_attr( $post_name ); ?>][<?php echo esc_attr( $metabox_id ); ?>][toggle]" class="select_toggle">
|
282 |
<option value="0" <?php Selected( $Selected , 0 ); ?>><?php _e( 'Expanded' , 'wp-admin-ui-customize' ); ?></option>
|
283 |
<option value="1" <?php Selected( $Selected , 1 ); ?>><?php _e( 'Collapsed' , 'wp-admin-ui-customize' ); ?></option>
|
284 |
</select>
|
288 |
</td>
|
289 |
<td>
|
290 |
<?php $Val = ''; ?>
|
291 |
+
<?php if( !empty( $Data[$post_name][$metabox_id]["name"] ) ) : $Val = stripslashes( $Data[$post_name][$metabox_id]["name"] ); endif; ?>
|
292 |
+
<input type="text" name="data[<?php echo esc_attr( $post_name ); ?>][<?php echo esc_attr( $metabox_id ); ?>][name]" class="regular-text metabox_rename" value="<?php echo esc_html( $Val ); ?>" placeholder="<?php echo esc_attr( __( $metabox_title ) ); ?>" />
|
293 |
</td>
|
294 |
</tr>
|
295 |
<?php endif; ?>
|
298 |
<?php endforeach; ?>
|
299 |
</tbody>
|
300 |
</table>
|
301 |
+
|
302 |
<?php endif; ?>
|
303 |
+
|
304 |
<?php $args = array( 'post_type' => $post_name , 'order' => 'DESC' , 'orderby' => 'post_date' , 'numberposts' => 1 ); ?>
|
305 |
|
306 |
<?php if( !empty( $activated_plugin['woocommerce'] ) && $post_name == 'shop_order' ) : ?>
|
308 |
<?php $args['post_status'] = array( 'wc-processing', 'wc-completed' ); ?>
|
309 |
|
310 |
<?php endif; ?>
|
311 |
+
|
312 |
<?php $post = get_posts( $args ); ?>
|
313 |
+
|
314 |
<?php if( !empty( $post ) ) : ?>
|
315 |
|
316 |
<?php $load_link = self_admin_url( 'post.php?post=' . $post[0]->ID . '&action=edit' ); ?>
|
322 |
<?php endif; ?>
|
323 |
|
324 |
<p>
|
325 |
+
<a href="<?php echo esc_url( $load_link ); ?>" class="button button-primary column_load">
|
326 |
<span class="dashicons dashicons-update"></span>
|
327 |
<?php echo sprintf( __( 'Refresh meta boxes for %s', 'wp-admin-ui-customize' ) , $cpt->label ); ?>
|
328 |
</a>
|
337 |
|
338 |
</div>
|
339 |
</div>
|
340 |
+
|
341 |
<?php endif; ?>
|
342 |
+
|
343 |
<br class="clear">
|
344 |
|
345 |
</div>
|
347 |
</div>
|
348 |
|
349 |
<p class="submit">
|
350 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
351 |
</p>
|
352 |
|
353 |
<p class="submit reset">
|
354 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Management of meta boxes' , 'wp-admin-ui-customize' ) . __( 'Settings' ) ); ?></span>
|
355 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
356 |
</p>
|
357 |
|
358 |
</form>
|
393 |
}
|
394 |
});
|
395 |
});
|
396 |
+
|
397 |
$('.postbox .inside .form-table').each(function( key, el ) {
|
398 |
$(el).find('tbody tr').each(function( tr_key , tr_el ) {
|
399 |
if( $(tr_el).find('.show_check').size() > 0 ) {
|
404 |
}
|
405 |
});
|
406 |
});
|
407 |
+
|
408 |
$('.postbox .inside .form-table tbody tr td .show_check').on('click', function( ev ) {
|
409 |
var Tr = $(ev.target).parent().parent().parent();
|
410 |
if( $(ev.target).prop('checked') ) {
|
418 |
|
419 |
$('.wauc_form .column_load').on('click', function( ev ) {
|
420 |
var load_url = $(ev.target).prop('href');
|
421 |
+
|
422 |
load_url += '&<?php echo $this->ltd; ?>_metabox_load=1';
|
423 |
+
|
424 |
$.ajax({
|
425 |
url: load_url,
|
426 |
beforeSend: function( xhr ) {
|
428 |
$(ev.target).parent().parent().find('.spinner').show();
|
429 |
}
|
430 |
}).done(function( post_html_el ) {
|
431 |
+
|
432 |
if( post_html_el.indexOf( "adminpage = 'post-php'" ) != -1 || post_html_el.indexOf( "adminpage = 'post-new-php'" ) != -1 ) {
|
433 |
|
434 |
location.reload();
|
435 |
|
436 |
}
|
437 |
+
|
438 |
});
|
439 |
|
440 |
return false;
|
441 |
+
|
442 |
}).disableSelection();
|
443 |
|
444 |
});
|
445 |
+
</script>
|
inc/setting_plugin_cap.php
CHANGED
@@ -17,11 +17,11 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
17 |
<h2><?php echo sprintf( __( '%1$s of %2$s %3$s' , 'wp-admin-ui-customize' ) , __( 'Change' ) , __( 'Plugin' ) , __( 'Capabilities' ) ); ?></h2>
|
18 |
<p><?php echo sprintf( __( 'You can change the user role %2$s of %1$s settings.' , 'wp-admin-ui-customize' ) , $this->Name , __( 'Capabilities' ) ); ?></p>
|
19 |
<p><?php echo sprintf( __( 'Select the capability required to modify %s settings.' , 'wp-admin-ui-customize' ) , $this->Name ); ?></p>
|
20 |
-
|
21 |
<p> </p>
|
22 |
|
23 |
<form id="wauc_setting_plugin_cap" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
24 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
25 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
26 |
<input type="hidden" name="record_field" value="plugin_cap" />
|
27 |
|
@@ -43,7 +43,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
43 |
<label><?php _e( 'Capabilities' ); ?></label>
|
44 |
</th>
|
45 |
<td>
|
46 |
-
<select name="data[<?php echo $field; ?>]">
|
47 |
<?php $SelectedCap = 'manage_options'; ?>
|
48 |
<?php if( !empty( $Data[$field] ) ) : ?>
|
49 |
<?php $SelectedCap = strip_tags( $Data[$field] ); ?>
|
@@ -54,7 +54,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
54 |
<?php if( !empty( $SelectedCap ) ) : ?>
|
55 |
<?php if( $SelectedCap == $cap ) $Selected = 'selected="selected"'; ?>
|
56 |
<?php endif; ?>
|
57 |
-
<option value="<?php echo $cap; ?>" <?php echo $Selected; ?>><?php echo $cap; ?></option>
|
58 |
<?php endforeach; ?>
|
59 |
<?php endif; ?>
|
60 |
</select>
|
@@ -67,7 +67,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
67 |
</div>
|
68 |
</div>
|
69 |
</div>
|
70 |
-
|
71 |
<br class="clear">
|
72 |
|
73 |
</div>
|
@@ -75,12 +75,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
75 |
</div>
|
76 |
|
77 |
<p class="submit">
|
78 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
79 |
</p>
|
80 |
|
81 |
<p class="submit reset">
|
82 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , sprintf( __( '%1$s of %2$s %3$s' , 'wp-admin-ui-customize' ) , __( 'Change' ) , __( 'Plugin' ) , __( 'Capabilities' ) ) . __( 'Settings' ) ); ?></span>
|
83 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
84 |
</p>
|
85 |
|
86 |
</form>
|
@@ -93,4 +93,4 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
93 |
jQuery(document).ready( function($) {
|
94 |
|
95 |
});
|
96 |
-
</script>
|
17 |
<h2><?php echo sprintf( __( '%1$s of %2$s %3$s' , 'wp-admin-ui-customize' ) , __( 'Change' ) , __( 'Plugin' ) , __( 'Capabilities' ) ); ?></h2>
|
18 |
<p><?php echo sprintf( __( 'You can change the user role %2$s of %1$s settings.' , 'wp-admin-ui-customize' ) , $this->Name , __( 'Capabilities' ) ); ?></p>
|
19 |
<p><?php echo sprintf( __( 'Select the capability required to modify %s settings.' , 'wp-admin-ui-customize' ) , $this->Name ); ?></p>
|
20 |
+
|
21 |
<p> </p>
|
22 |
|
23 |
<form id="wauc_setting_plugin_cap" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
24 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
25 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
26 |
<input type="hidden" name="record_field" value="plugin_cap" />
|
27 |
|
43 |
<label><?php _e( 'Capabilities' ); ?></label>
|
44 |
</th>
|
45 |
<td>
|
46 |
+
<select name="data[<?php echo esc_attr( $field ); ?>]">
|
47 |
<?php $SelectedCap = 'manage_options'; ?>
|
48 |
<?php if( !empty( $Data[$field] ) ) : ?>
|
49 |
<?php $SelectedCap = strip_tags( $Data[$field] ); ?>
|
54 |
<?php if( !empty( $SelectedCap ) ) : ?>
|
55 |
<?php if( $SelectedCap == $cap ) $Selected = 'selected="selected"'; ?>
|
56 |
<?php endif; ?>
|
57 |
+
<option value="<?php echo esc_attr( $cap ); ?>" <?php echo esc_attr( $Selected ); ?>><?php echo esc_attr( $cap ); ?></option>
|
58 |
<?php endforeach; ?>
|
59 |
<?php endif; ?>
|
60 |
</select>
|
67 |
</div>
|
68 |
</div>
|
69 |
</div>
|
70 |
+
|
71 |
<br class="clear">
|
72 |
|
73 |
</div>
|
75 |
</div>
|
76 |
|
77 |
<p class="submit">
|
78 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
79 |
</p>
|
80 |
|
81 |
<p class="submit reset">
|
82 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , sprintf( __( '%1$s of %2$s %3$s' , 'wp-admin-ui-customize' ) , __( 'Change' ) , __( 'Plugin' ) , __( 'Capabilities' ) ) . __( 'Settings' ) ); ?></span>
|
83 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
84 |
</p>
|
85 |
|
86 |
</form>
|
93 |
jQuery(document).ready( function($) {
|
94 |
|
95 |
});
|
96 |
+
</script>
|
inc/setting_post_add_edit.php
CHANGED
@@ -19,7 +19,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
19 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
20 |
|
21 |
<form id="wauc_setting_post_add_edit" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
22 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
23 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
24 |
<input type="hidden" name="record_field" value="post_add_edit" />
|
25 |
|
@@ -44,12 +44,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
44 |
<?php if( $comment_status == 'open' ) : ?>
|
45 |
<?php $Checked = ''; ?>
|
46 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
47 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Allow' ); ?></label>
|
48 |
<p class="description"><?php _e( 'If the discussion meta box is hidden comments will not be displayed on new posts for the selected role.' , 'wp-admin-ui-customize' ); ?></p>
|
49 |
<p><?php _e( 'Check \'Allow\' to allow comments on new posts.' , 'wp-admin-ui-customize' ); ?></p>
|
50 |
-
<p><a href="<?php echo admin_url( 'options-discussion.php' ); ?>"><?php echo sprintf( __( 'The %s in WordPress will override this setting.' , 'wp-admin-ui-customize' ) , __( 'Default article settings' ) ); ?></a></p>
|
51 |
<?php else : ?>
|
52 |
-
<p><a href="<?php echo admin_url( 'options-discussion.php' ); ?>"><?php echo sprintf( __( 'Please select the <strong>%s</strong>' , 'wp-admin-ui-customize' ) , __( 'Allow people to post comments on new articles' ) ); ?></a></p>
|
53 |
<?php endif; ?>
|
54 |
|
55 |
</td>
|
@@ -74,9 +74,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
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 |
<p class="description"><?php _e( 'Only appears when the permalinks are set to the default setting.' , 'wp-admin-ui-customize' ); ?></p>
|
79 |
-
<p><img src="<?php echo $this->Url
|
80 |
</td>
|
81 |
</tr>
|
82 |
</tbody>
|
@@ -86,7 +86,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
86 |
</div>
|
87 |
|
88 |
</div>
|
89 |
-
|
90 |
<br class="clear">
|
91 |
|
92 |
</div>
|
@@ -94,12 +94,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
94 |
</div>
|
95 |
|
96 |
<p class="submit">
|
97 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
98 |
</p>
|
99 |
|
100 |
<p class="submit reset">
|
101 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Add New Post and Edit Post Screen Setting' , 'wp-admin-ui-customize' ) ); ?></span>
|
102 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
103 |
</p>
|
104 |
|
105 |
</form>
|
@@ -112,4 +112,4 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
112 |
jQuery(document).ready( function($) {
|
113 |
|
114 |
});
|
115 |
-
</script>
|
19 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
20 |
|
21 |
<form id="wauc_setting_post_add_edit" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
22 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
23 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
24 |
<input type="hidden" name="record_field" value="post_add_edit" />
|
25 |
|
44 |
<?php if( $comment_status == 'open' ) : ?>
|
45 |
<?php $Checked = ''; ?>
|
46 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
47 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Allow' ); ?></label>
|
48 |
<p class="description"><?php _e( 'If the discussion meta box is hidden comments will not be displayed on new posts for the selected role.' , 'wp-admin-ui-customize' ); ?></p>
|
49 |
<p><?php _e( 'Check \'Allow\' to allow comments on new posts.' , 'wp-admin-ui-customize' ); ?></p>
|
50 |
+
<p><a href="<?php echo esc_url( admin_url( 'options-discussion.php' ) ); ?>"><?php echo sprintf( __( 'The %s in WordPress will override this setting.' , 'wp-admin-ui-customize' ) , __( 'Default article settings' ) ); ?></a></p>
|
51 |
<?php else : ?>
|
52 |
+
<p><a href="<?php echo esc_url( admin_url( 'options-discussion.php' ) ); ?>"><?php echo sprintf( __( 'Please select the <strong>%s</strong>' , 'wp-admin-ui-customize' ) , __( 'Allow people to post comments on new articles' ) ); ?></a></p>
|
53 |
<?php endif; ?>
|
54 |
|
55 |
</td>
|
74 |
<td>
|
75 |
<?php $Checked = ''; ?>
|
76 |
<?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
77 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
78 |
<p class="description"><?php _e( 'Only appears when the permalinks are set to the default setting.' , 'wp-admin-ui-customize' ); ?></p>
|
79 |
+
<p><img src="<?php echo esc_url( $this->Url . 'images/post_add_edit_screen__edit_ppermalink.png' ); ?>" /></p>
|
80 |
</td>
|
81 |
</tr>
|
82 |
</tbody>
|
86 |
</div>
|
87 |
|
88 |
</div>
|
89 |
+
|
90 |
<br class="clear">
|
91 |
|
92 |
</div>
|
94 |
</div>
|
95 |
|
96 |
<p class="submit">
|
97 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
98 |
</p>
|
99 |
|
100 |
<p class="submit reset">
|
101 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Add New Post and Edit Post Screen Setting' , 'wp-admin-ui-customize' ) ); ?></span>
|
102 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
103 |
</p>
|
104 |
|
105 |
</form>
|
112 |
jQuery(document).ready( function($) {
|
113 |
|
114 |
});
|
115 |
+
</script>
|
inc/setting_sidemenu.php
CHANGED
@@ -24,7 +24,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
24 |
<p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a></p>
|
25 |
|
26 |
<form id="wauc_setting_sidemenu" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
27 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
28 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
29 |
<input type="hidden" name="record_field" value="sidemenu" />
|
30 |
|
@@ -39,16 +39,16 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
39 |
<div class="postbox">
|
40 |
<h3 class="hndle"><span><?php _e( 'Available menu items' , 'wp-admin-ui-customize' ); ?></span></h3>
|
41 |
<div class="inside">
|
42 |
-
|
43 |
<p class="description"><?php _e( 'Sepalator' , 'wp-admin-ui-customize' ); ?></p>
|
44 |
<?php $menu_widget = array( 'title' => '-' , 'slug' => 'separator' , 'parent_slug' => '' , 'new' => true , 'cap' => 'read' ); ?>
|
45 |
<?php $this->sidebar_menu_widget( $menu_widget ); ?>
|
46 |
<div class="clear"></div>
|
47 |
-
|
48 |
<?php foreach($this->Menu as $mm) : ?>
|
49 |
-
|
50 |
<?php if( !empty( $mm[0] ) ) : ?>
|
51 |
-
|
52 |
<?php $menu_title = $mm[0]; ?>
|
53 |
<?php if( $mm[5] == 'menu-comments' ) : ?>
|
54 |
<?php $menu_title = __( 'Comments' ); ?>
|
@@ -67,9 +67,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
67 |
<?php else: ?>
|
68 |
|
69 |
<?php foreach($this->SubMenu as $parent_slug => $sub) : ?>
|
70 |
-
|
71 |
<?php foreach($sub as $sm) : ?>
|
72 |
-
|
73 |
<?php if( $mm[2] == $parent_slug ) : ?>
|
74 |
<?php $menu_title = $sm[0]; ?>
|
75 |
<?php if( $sm[1] == 'update_core' ) : ?>
|
@@ -84,27 +84,27 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
84 |
<?php $menu_widget = array( 'title' => $menu_title , 'slug' => $sm[2] , 'parent_slug' => '' , 'new' => true , 'cap' => $sm[1] , 'submenu' => '' ); ?>
|
85 |
<?php $this->sidebar_menu_widget( $menu_widget ); ?>
|
86 |
<?php endif; ?>
|
87 |
-
|
88 |
<?php endforeach; ?>
|
89 |
-
|
90 |
<?php endforeach; ?>
|
91 |
|
92 |
<?php endif; ?>
|
93 |
|
94 |
<div class="clear"></div>
|
95 |
-
|
96 |
<?php endif; ?>
|
97 |
-
|
98 |
<?php endforeach; ?>
|
99 |
-
|
100 |
</div>
|
101 |
-
|
102 |
</div>
|
103 |
|
104 |
</div>
|
105 |
-
|
106 |
</div>
|
107 |
-
|
108 |
<div id="postbox-container-2" class="postbox-container">
|
109 |
|
110 |
<div id="setting_menus">
|
@@ -114,19 +114,19 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
114 |
<span><?php _e( 'Current menu' , 'wp-admin-ui-customize' ); ?></span>
|
115 |
</h3>
|
116 |
<div class="inside widgets-holder-wrap">
|
117 |
-
|
118 |
<?php if( empty( $Data ) ) : ?>
|
119 |
-
|
120 |
<?php foreach($this->Menu as $mm) : ?>
|
121 |
-
|
122 |
<?php if( isset( $mm[2] ) && strstr( $mm[2] , 'separator' ) ) : ?>
|
123 |
-
|
124 |
<?php $menu_title = '-'; ?>
|
125 |
<?php $mm[2] = 'separator'; ?>
|
126 |
<?php $mwsm = array(); ?>
|
127 |
-
|
128 |
<?php elseif( !empty( $mm[0] ) ) : ?>
|
129 |
-
|
130 |
<?php $menu_title = $mm[0]; ?>
|
131 |
<?php if( !empty( $mm[5] ) ) : ?>
|
132 |
<?php if( $mm[5] == 'menu-comments' ) : ?>
|
@@ -137,13 +137,13 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
137 |
<?php $menu_title = __( 'Plugins' ) . ' [update_plugins]'; ?>
|
138 |
<?php endif; ?>
|
139 |
<?php endif; ?>
|
140 |
-
|
141 |
<?php $mwsm = array(); ?>
|
142 |
<?php foreach($this->SubMenu as $parent_slug => $sub) : ?>
|
143 |
<?php foreach($sub as $sm) : ?>
|
144 |
<?php if( $mm[2] == $parent_slug ) : ?>
|
145 |
<?php $submenu_title = $sm[0]; ?>
|
146 |
-
|
147 |
<?php if( $sm[1] == 'update_core' ) : ?>
|
148 |
<?php $submenu_title = __( 'Update' ) . ' [update_total]'; ?>
|
149 |
<?php endif; ?>
|
@@ -151,31 +151,31 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
151 |
<?php endif; ?>
|
152 |
<?php endforeach; ?>
|
153 |
<?php endforeach; ?>
|
154 |
-
|
155 |
<?php endif; ?>
|
156 |
-
|
157 |
<?php $menu_widget = array( 'title' => $menu_title , 'slug' => $mm[2] , 'parent_slug' => '' , 'new' => false , 'cap' => $mm[1] , 'submenu' => $mwsm ); ?>
|
158 |
<?php $this->sidebar_menu_widget( $menu_widget ); ?>
|
159 |
-
|
160 |
<?php endforeach; ?>
|
161 |
-
|
162 |
<?php else: ?>
|
163 |
-
|
164 |
<?php if( !empty( $Data["main"] ) ) : ?>
|
165 |
-
|
166 |
<?php foreach($Data["main"] as $mm) : ?>
|
167 |
-
|
168 |
<?php if( !empty( $mm["title"] ) ) : ?>
|
169 |
-
|
170 |
<?php $mm_slug = htmlspecialchars_decode( $mm["slug"] ); ?>
|
171 |
-
|
172 |
<?php $mwsm = array(); ?>
|
173 |
<?php if( !empty( $Data["sub"] ) ) : ?>
|
174 |
<?php foreach($Data["sub"] as $sm) : ?>
|
175 |
-
|
176 |
<?php $sm_slug = htmlspecialchars_decode( $sm["slug"] ); ?>
|
177 |
<?php $sm_parent_slug = htmlspecialchars_decode( $sm["parent_slug"] ); ?>
|
178 |
-
|
179 |
<?php if( $mm_slug == $sm_parent_slug ) : ?>
|
180 |
|
181 |
<?php $cap = ""; ?>
|
@@ -187,14 +187,14 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
187 |
<?php endif; ?>
|
188 |
<?php endforeach; ?>
|
189 |
<?php endif; ?>
|
190 |
-
|
191 |
<?php $mwsm[] = array( 'title' => $sm["title"] , 'slug' => $sm["slug"] , 'parent_slug' => $sm["parent_slug"] , 'cap' => $cap ); ?>
|
192 |
-
|
193 |
<?php endif; ?>
|
194 |
-
|
195 |
<?php endforeach; ?>
|
196 |
<?php endif; ?>
|
197 |
-
|
198 |
<?php $cap = ""; ?>
|
199 |
<?php foreach( $this->Menu as $tmp_m ) : ?>
|
200 |
<?php if( $tmp_m[2] == $mm_slug ) : ?>
|
@@ -205,37 +205,37 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
205 |
|
206 |
<?php $menu_widget = array( 'title' => $mm["title"] , 'slug' => $mm["slug"] , 'parent_slug' => '' , 'new' => false , 'cap' =>$cap , 'submenu' => $mwsm ); ?>
|
207 |
<?php $this->sidebar_menu_widget( $menu_widget ); ?>
|
208 |
-
|
209 |
<?php endif; ?>
|
210 |
-
|
211 |
<?php endforeach; ?>
|
212 |
-
|
213 |
<?php endif; ?>
|
214 |
-
|
215 |
<?php endif; ?>
|
216 |
-
|
217 |
</div>
|
218 |
|
219 |
</div>
|
220 |
-
|
221 |
<p class="sidebar_setting_delete"><a href="#"><?php _e( 'Remove all items from the current menu' , 'wp-admin-ui-customize' ); ?></a></p>
|
222 |
|
223 |
</div>
|
224 |
</div>
|
225 |
-
|
226 |
<br class="clear">
|
227 |
-
|
228 |
</div>
|
229 |
-
|
230 |
</div>
|
231 |
|
232 |
<p class="submit">
|
233 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
234 |
</p>
|
235 |
|
236 |
<p class="submit reset">
|
237 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Sidebar' , 'wp-admin-ui-customize' ) . __( 'Settings' ) ); ?></span>
|
238 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
239 |
</p>
|
240 |
|
241 |
</form>
|
@@ -302,17 +302,17 @@ jQuery(document).ready(function($) {
|
|
302 |
});
|
303 |
|
304 |
$(document).on('click', '.widget .widget-top .widget-title-action', function() {
|
305 |
-
|
306 |
$(this).parent().parent().children(".widget-inside").slideToggle();
|
307 |
return false;
|
308 |
-
|
309 |
});
|
310 |
|
311 |
$(document).on('click', '.widget .widget-inside .widget-control-actions .alignleft a[href="#remove"]', function() {
|
312 |
-
|
313 |
$(this).parent().parent().parent().parent().slideUp('normal', function() { $(this).remove(); } );
|
314 |
return false;
|
315 |
-
|
316 |
});
|
317 |
|
318 |
wauc_menu_sortable = function menu_sortable() {
|
@@ -367,18 +367,18 @@ jQuery(document).ready(function($) {
|
|
367 |
wauc_widget_each();
|
368 |
|
369 |
$('#setting_menus .sidebar_setting_delete a').on('click', function() {
|
370 |
-
|
371 |
$('#setting_menus .postbox .inside').html('');
|
372 |
return false;
|
373 |
|
374 |
});
|
375 |
|
376 |
$('#wauc_setting_sidemenu').on('submit', function() {
|
377 |
-
|
378 |
$('#can_menus').remove();
|
379 |
return true;
|
380 |
-
|
381 |
});
|
382 |
|
383 |
});
|
384 |
-
</script>
|
24 |
<p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , 'wp-admin-ui-customize' ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , 'wp-admin-ui-customize' ); ?></a></p>
|
25 |
|
26 |
<form id="wauc_setting_sidemenu" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
27 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
28 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
29 |
<input type="hidden" name="record_field" value="sidemenu" />
|
30 |
|
39 |
<div class="postbox">
|
40 |
<h3 class="hndle"><span><?php _e( 'Available menu items' , 'wp-admin-ui-customize' ); ?></span></h3>
|
41 |
<div class="inside">
|
42 |
+
|
43 |
<p class="description"><?php _e( 'Sepalator' , 'wp-admin-ui-customize' ); ?></p>
|
44 |
<?php $menu_widget = array( 'title' => '-' , 'slug' => 'separator' , 'parent_slug' => '' , 'new' => true , 'cap' => 'read' ); ?>
|
45 |
<?php $this->sidebar_menu_widget( $menu_widget ); ?>
|
46 |
<div class="clear"></div>
|
47 |
+
|
48 |
<?php foreach($this->Menu as $mm) : ?>
|
49 |
+
|
50 |
<?php if( !empty( $mm[0] ) ) : ?>
|
51 |
+
|
52 |
<?php $menu_title = $mm[0]; ?>
|
53 |
<?php if( $mm[5] == 'menu-comments' ) : ?>
|
54 |
<?php $menu_title = __( 'Comments' ); ?>
|
67 |
<?php else: ?>
|
68 |
|
69 |
<?php foreach($this->SubMenu as $parent_slug => $sub) : ?>
|
70 |
+
|
71 |
<?php foreach($sub as $sm) : ?>
|
72 |
+
|
73 |
<?php if( $mm[2] == $parent_slug ) : ?>
|
74 |
<?php $menu_title = $sm[0]; ?>
|
75 |
<?php if( $sm[1] == 'update_core' ) : ?>
|
84 |
<?php $menu_widget = array( 'title' => $menu_title , 'slug' => $sm[2] , 'parent_slug' => '' , 'new' => true , 'cap' => $sm[1] , 'submenu' => '' ); ?>
|
85 |
<?php $this->sidebar_menu_widget( $menu_widget ); ?>
|
86 |
<?php endif; ?>
|
87 |
+
|
88 |
<?php endforeach; ?>
|
89 |
+
|
90 |
<?php endforeach; ?>
|
91 |
|
92 |
<?php endif; ?>
|
93 |
|
94 |
<div class="clear"></div>
|
95 |
+
|
96 |
<?php endif; ?>
|
97 |
+
|
98 |
<?php endforeach; ?>
|
99 |
+
|
100 |
</div>
|
101 |
+
|
102 |
</div>
|
103 |
|
104 |
</div>
|
105 |
+
|
106 |
</div>
|
107 |
+
|
108 |
<div id="postbox-container-2" class="postbox-container">
|
109 |
|
110 |
<div id="setting_menus">
|
114 |
<span><?php _e( 'Current menu' , 'wp-admin-ui-customize' ); ?></span>
|
115 |
</h3>
|
116 |
<div class="inside widgets-holder-wrap">
|
117 |
+
|
118 |
<?php if( empty( $Data ) ) : ?>
|
119 |
+
|
120 |
<?php foreach($this->Menu as $mm) : ?>
|
121 |
+
|
122 |
<?php if( isset( $mm[2] ) && strstr( $mm[2] , 'separator' ) ) : ?>
|
123 |
+
|
124 |
<?php $menu_title = '-'; ?>
|
125 |
<?php $mm[2] = 'separator'; ?>
|
126 |
<?php $mwsm = array(); ?>
|
127 |
+
|
128 |
<?php elseif( !empty( $mm[0] ) ) : ?>
|
129 |
+
|
130 |
<?php $menu_title = $mm[0]; ?>
|
131 |
<?php if( !empty( $mm[5] ) ) : ?>
|
132 |
<?php if( $mm[5] == 'menu-comments' ) : ?>
|
137 |
<?php $menu_title = __( 'Plugins' ) . ' [update_plugins]'; ?>
|
138 |
<?php endif; ?>
|
139 |
<?php endif; ?>
|
140 |
+
|
141 |
<?php $mwsm = array(); ?>
|
142 |
<?php foreach($this->SubMenu as $parent_slug => $sub) : ?>
|
143 |
<?php foreach($sub as $sm) : ?>
|
144 |
<?php if( $mm[2] == $parent_slug ) : ?>
|
145 |
<?php $submenu_title = $sm[0]; ?>
|
146 |
+
|
147 |
<?php if( $sm[1] == 'update_core' ) : ?>
|
148 |
<?php $submenu_title = __( 'Update' ) . ' [update_total]'; ?>
|
149 |
<?php endif; ?>
|
151 |
<?php endif; ?>
|
152 |
<?php endforeach; ?>
|
153 |
<?php endforeach; ?>
|
154 |
+
|
155 |
<?php endif; ?>
|
156 |
+
|
157 |
<?php $menu_widget = array( 'title' => $menu_title , 'slug' => $mm[2] , 'parent_slug' => '' , 'new' => false , 'cap' => $mm[1] , 'submenu' => $mwsm ); ?>
|
158 |
<?php $this->sidebar_menu_widget( $menu_widget ); ?>
|
159 |
+
|
160 |
<?php endforeach; ?>
|
161 |
+
|
162 |
<?php else: ?>
|
163 |
+
|
164 |
<?php if( !empty( $Data["main"] ) ) : ?>
|
165 |
+
|
166 |
<?php foreach($Data["main"] as $mm) : ?>
|
167 |
+
|
168 |
<?php if( !empty( $mm["title"] ) ) : ?>
|
169 |
+
|
170 |
<?php $mm_slug = htmlspecialchars_decode( $mm["slug"] ); ?>
|
171 |
+
|
172 |
<?php $mwsm = array(); ?>
|
173 |
<?php if( !empty( $Data["sub"] ) ) : ?>
|
174 |
<?php foreach($Data["sub"] as $sm) : ?>
|
175 |
+
|
176 |
<?php $sm_slug = htmlspecialchars_decode( $sm["slug"] ); ?>
|
177 |
<?php $sm_parent_slug = htmlspecialchars_decode( $sm["parent_slug"] ); ?>
|
178 |
+
|
179 |
<?php if( $mm_slug == $sm_parent_slug ) : ?>
|
180 |
|
181 |
<?php $cap = ""; ?>
|
187 |
<?php endif; ?>
|
188 |
<?php endforeach; ?>
|
189 |
<?php endif; ?>
|
190 |
+
|
191 |
<?php $mwsm[] = array( 'title' => $sm["title"] , 'slug' => $sm["slug"] , 'parent_slug' => $sm["parent_slug"] , 'cap' => $cap ); ?>
|
192 |
+
|
193 |
<?php endif; ?>
|
194 |
+
|
195 |
<?php endforeach; ?>
|
196 |
<?php endif; ?>
|
197 |
+
|
198 |
<?php $cap = ""; ?>
|
199 |
<?php foreach( $this->Menu as $tmp_m ) : ?>
|
200 |
<?php if( $tmp_m[2] == $mm_slug ) : ?>
|
205 |
|
206 |
<?php $menu_widget = array( 'title' => $mm["title"] , 'slug' => $mm["slug"] , 'parent_slug' => '' , 'new' => false , 'cap' =>$cap , 'submenu' => $mwsm ); ?>
|
207 |
<?php $this->sidebar_menu_widget( $menu_widget ); ?>
|
208 |
+
|
209 |
<?php endif; ?>
|
210 |
+
|
211 |
<?php endforeach; ?>
|
212 |
+
|
213 |
<?php endif; ?>
|
214 |
+
|
215 |
<?php endif; ?>
|
216 |
+
|
217 |
</div>
|
218 |
|
219 |
</div>
|
220 |
+
|
221 |
<p class="sidebar_setting_delete"><a href="#"><?php _e( 'Remove all items from the current menu' , 'wp-admin-ui-customize' ); ?></a></p>
|
222 |
|
223 |
</div>
|
224 |
</div>
|
225 |
+
|
226 |
<br class="clear">
|
227 |
+
|
228 |
</div>
|
229 |
+
|
230 |
</div>
|
231 |
|
232 |
<p class="submit">
|
233 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
234 |
</p>
|
235 |
|
236 |
<p class="submit reset">
|
237 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Sidebar' , 'wp-admin-ui-customize' ) . __( 'Settings' ) ); ?></span>
|
238 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
239 |
</p>
|
240 |
|
241 |
</form>
|
302 |
});
|
303 |
|
304 |
$(document).on('click', '.widget .widget-top .widget-title-action', function() {
|
305 |
+
|
306 |
$(this).parent().parent().children(".widget-inside").slideToggle();
|
307 |
return false;
|
308 |
+
|
309 |
});
|
310 |
|
311 |
$(document).on('click', '.widget .widget-inside .widget-control-actions .alignleft a[href="#remove"]', function() {
|
312 |
+
|
313 |
$(this).parent().parent().parent().parent().slideUp('normal', function() { $(this).remove(); } );
|
314 |
return false;
|
315 |
+
|
316 |
});
|
317 |
|
318 |
wauc_menu_sortable = function menu_sortable() {
|
367 |
wauc_widget_each();
|
368 |
|
369 |
$('#setting_menus .sidebar_setting_delete a').on('click', function() {
|
370 |
+
|
371 |
$('#setting_menus .postbox .inside').html('');
|
372 |
return false;
|
373 |
|
374 |
});
|
375 |
|
376 |
$('#wauc_setting_sidemenu').on('submit', function() {
|
377 |
+
|
378 |
$('#can_menus').remove();
|
379 |
return true;
|
380 |
+
|
381 |
});
|
382 |
|
383 |
});
|
384 |
+
</script>
|
inc/setting_site.php
CHANGED
@@ -19,7 +19,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
19 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
20 |
|
21 |
<form id="wauc_setting_site" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
22 |
-
<input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
|
23 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
24 |
<input type="hidden" name="record_field" value="site" />
|
25 |
|
@@ -44,7 +44,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
44 |
<td>
|
45 |
<?php $Checked = ''; ?>
|
46 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
47 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
48 |
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <code><?php echo esc_html( get_the_generator( 'xhtml' ) ); ?></code></p>
|
49 |
</td>
|
50 |
</tr>
|
@@ -56,9 +56,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
56 |
<td>
|
57 |
<?php $Checked = ''; ?>
|
58 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
59 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
60 |
<p class="description"><?php _e( 'Required if you are using Windows Live Writer.' , 'wp-admin-ui-customize' ); ?></p>
|
61 |
-
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <code><?php echo esc_html( '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="' . get_bloginfo('wpurl') . '/wp-includes/wlwmanifest.xml" />' ); ?></code></p>
|
62 |
</td>
|
63 |
</tr>
|
64 |
<?php $field = 'rsd_link'; ?>
|
@@ -69,9 +69,9 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
69 |
<td>
|
70 |
<?php $Checked = ''; ?>
|
71 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
72 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
73 |
<p class="description"><?php _e( 'Required if you are using pingbacks.' , 'wp-admin-ui-customize' ); ?></p>
|
74 |
-
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <code><?php echo esc_html( '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_bloginfo('wpurl') . '"/xmlrpc.php?rsd" />' ); ?></code></p>
|
75 |
</td>
|
76 |
</tr>
|
77 |
<?php $field = 'feed_links'; ?>
|
@@ -82,7 +82,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
82 |
<td>
|
83 |
<?php $Checked = ''; ?>
|
84 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
85 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
86 |
<p class="description"><?php _e( 'Adds RSS feed links to the HTML <head>' , 'wp-admin-ui-customize' ); ?></p>
|
87 |
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <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>
|
88 |
</td>
|
@@ -95,7 +95,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
95 |
<td>
|
96 |
<?php $Checked = ''; ?>
|
97 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
98 |
-
<label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
|
99 |
<p class="description"><?php _e( 'Adds RSS feed links for other feeds such as category feeds' , 'wp-admin-ui-customize' ); ?></p>
|
100 |
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <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>
|
101 |
</td>
|
@@ -125,7 +125,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
125 |
</th>
|
126 |
<td>
|
127 |
<?php $arr = array( "hide" => __( 'Hide admin bar on the front end' , 'wp-admin-ui-customize' ) , "front" => __( 'Apply WP Admin UI Customize settings to the front end admin bar' , 'wp-admin-ui-customize' ) ); ?>
|
128 |
-
<select name="data[<?php echo $field; ?>]">
|
129 |
<option value="">-</option>
|
130 |
<?php foreach( $arr as $key => $label ) : ?>
|
131 |
<?php $Selected = ''; ?>
|
@@ -133,7 +133,7 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
133 |
<?php if( $Data[$field] == $key ) : $Selected = 'selected="selected"'; endif; ?>
|
134 |
<?php if( $key == "hide" && $Data[$field] == "1" ) : $Selected = 'selected="selected"'; endif; ?>
|
135 |
<?php endif; ?>
|
136 |
-
<option value="<?php echo $key; ?>" <?php echo $Selected; ?>><?php echo $label; ?></option>
|
137 |
<?php endforeach; ?>
|
138 |
</select>
|
139 |
</td>
|
@@ -153,12 +153,12 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
153 |
</div>
|
154 |
|
155 |
<p class="submit">
|
156 |
-
<input type="submit" class="button-primary" name="update" value="<?php
|
157 |
</p>
|
158 |
|
159 |
<p class="submit reset">
|
160 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Site Settings' , 'wp-admin-ui-customize' ) ); ?></span>
|
161 |
-
<input type="submit" class="button-secondary" name="reset" value="<?php
|
162 |
</p>
|
163 |
|
164 |
</form>
|
@@ -171,4 +171,4 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
171 |
jQuery(document).ready( function($) {
|
172 |
|
173 |
});
|
174 |
-
</script>
|
19 |
<h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
|
20 |
|
21 |
<form id="wauc_setting_site" class="wauc_form" method="post" action="<?php echo esc_url( remove_query_arg( 'wauc_msg' , add_query_arg( array( 'page' => $this->PageSlug ) ) ) ); ?>">
|
22 |
+
<input type="hidden" name="<?php echo esc_attr( $this->UPFN ); ?>" value="Y" />
|
23 |
<?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
|
24 |
<input type="hidden" name="record_field" value="site" />
|
25 |
|
44 |
<td>
|
45 |
<?php $Checked = ''; ?>
|
46 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
47 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
48 |
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <code><?php echo esc_html( get_the_generator( 'xhtml' ) ); ?></code></p>
|
49 |
</td>
|
50 |
</tr>
|
56 |
<td>
|
57 |
<?php $Checked = ''; ?>
|
58 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
59 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
60 |
<p class="description"><?php _e( 'Required if you are using Windows Live Writer.' , 'wp-admin-ui-customize' ); ?></p>
|
61 |
+
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <code><?php echo esc_html( '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="' . esc_url( get_bloginfo('wpurl') ) . '/wp-includes/wlwmanifest.xml" />' ); ?></code></p>
|
62 |
</td>
|
63 |
</tr>
|
64 |
<?php $field = 'rsd_link'; ?>
|
69 |
<td>
|
70 |
<?php $Checked = ''; ?>
|
71 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
72 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
73 |
<p class="description"><?php _e( 'Required if you are using pingbacks.' , 'wp-admin-ui-customize' ); ?></p>
|
74 |
+
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <code><?php echo esc_html( '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . esc_url( get_bloginfo('wpurl') ) . '"/xmlrpc.php?rsd" />' ); ?></code></p>
|
75 |
</td>
|
76 |
</tr>
|
77 |
<?php $field = 'feed_links'; ?>
|
82 |
<td>
|
83 |
<?php $Checked = ''; ?>
|
84 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
85 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
86 |
<p class="description"><?php _e( 'Adds RSS feed links to the HTML <head>' , 'wp-admin-ui-customize' ); ?></p>
|
87 |
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <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>
|
88 |
</td>
|
95 |
<td>
|
96 |
<?php $Checked = ''; ?>
|
97 |
<?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
|
98 |
+
<label><input type="checkbox" name="data[<?php echo esc_attr( $field ); ?>]" value="1" <?php echo esc_attr( $Checked ); ?> /> <?php _e ( 'Hide' ); ?></label>
|
99 |
<p class="description"><?php _e( 'Adds RSS feed links for other feeds such as category feeds' , 'wp-admin-ui-customize' ); ?></p>
|
100 |
<p class="description"><?php _e( 'Tag' , 'wp-admin-ui-customize' ); ?> : <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>
|
101 |
</td>
|
125 |
</th>
|
126 |
<td>
|
127 |
<?php $arr = array( "hide" => __( 'Hide admin bar on the front end' , 'wp-admin-ui-customize' ) , "front" => __( 'Apply WP Admin UI Customize settings to the front end admin bar' , 'wp-admin-ui-customize' ) ); ?>
|
128 |
+
<select name="data[<?php echo esc_attr( $field ); ?>]">
|
129 |
<option value="">-</option>
|
130 |
<?php foreach( $arr as $key => $label ) : ?>
|
131 |
<?php $Selected = ''; ?>
|
133 |
<?php if( $Data[$field] == $key ) : $Selected = 'selected="selected"'; endif; ?>
|
134 |
<?php if( $key == "hide" && $Data[$field] == "1" ) : $Selected = 'selected="selected"'; endif; ?>
|
135 |
<?php endif; ?>
|
136 |
+
<option value="<?php echo esc_attr( $key ); ?>" <?php echo esc_attr( $Selected ); ?>><?php echo esc_attr( $label ); ?></option>
|
137 |
<?php endforeach; ?>
|
138 |
</select>
|
139 |
</td>
|
153 |
</div>
|
154 |
|
155 |
<p class="submit">
|
156 |
+
<input type="submit" class="button-primary" name="update" value="<?php echo esc_attr( __( 'Save' ) ); ?>" />
|
157 |
</p>
|
158 |
|
159 |
<p class="submit reset">
|
160 |
<span class="description"><?php printf( __( 'Reset the %s?' , 'wp-admin-ui-customize' ) , __( 'Site Settings' , 'wp-admin-ui-customize' ) ); ?></span>
|
161 |
+
<input type="submit" class="button-secondary" name="reset" value="<?php echo esc_attr( __( 'Reset settings' , 'wp-admin-ui-customize' ) ); ?>" />
|
162 |
</p>
|
163 |
|
164 |
</form>
|
171 |
jQuery(document).ready( function($) {
|
172 |
|
173 |
});
|
174 |
+
</script>
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WP Admin UI Customize ===
|
2 |
Contributors: gqevu6bsiz
|
3 |
-
Donate link: http://gqevu6bsiz.chicappa.jp/please-donation
|
4 |
Tags: admin, post, posts, page, option, sitemenu, menu, custom, customize, dashboard, admin_bar, multisite, network, metabox
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
@@ -50,6 +50,9 @@ These to Customization is possible.
|
|
50 |
|
51 |
== Changelog ==
|
52 |
|
|
|
|
|
|
|
53 |
= 1.5.12 =
|
54 |
* Added: Filter to menu_widget of admin bar.
|
55 |
* Changed: update_option to not auto load.
|
1 |
=== WP Admin UI Customize ===
|
2 |
Contributors: gqevu6bsiz
|
3 |
+
Donate link: http://gqevu6bsiz.chicappa.jp/please-donation/
|
4 |
Tags: admin, post, posts, page, option, sitemenu, menu, custom, customize, dashboard, admin_bar, multisite, network, metabox
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 1.5.13
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
50 |
|
51 |
== Changelog ==
|
52 |
|
53 |
+
= 1.5.13 2022-11-04 =
|
54 |
+
* Security updated: Some values escape.
|
55 |
+
|
56 |
= 1.5.12 =
|
57 |
* Added: Filter to menu_widget of admin bar.
|
58 |
* Changed: update_option to not auto load.
|
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 Wordpress management UI.
|
5 |
-
Plugin URI: http://wpadminuicustomize.com
|
6 |
-
Version: 1.5.
|
7 |
Author: gqevu6bsiz
|
8 |
-
Author URI: http://gqevu6bsiz.chicappa.jp
|
9 |
Text Domain: wp-admin-ui-customize
|
10 |
Domain Path: /languages
|
11 |
*/
|
@@ -57,7 +57,7 @@ class WP_Admin_UI_Customize
|
|
57 |
|
58 |
|
59 |
function __construct() {
|
60 |
-
$this->Ver = '1.5.
|
61 |
$this->Name = 'WP Admin UI Customize';
|
62 |
$this->Dir = plugin_dir_path( __FILE__ );
|
63 |
$this->Url = plugin_dir_url( __FILE__ );
|
@@ -87,7 +87,7 @@ class WP_Admin_UI_Customize
|
|
87 |
$this->OtherPluginMenu = array();
|
88 |
$this->UPFN = 'Y';
|
89 |
$this->MsgQ = $this->ltd . '_msg';
|
90 |
-
|
91 |
$this->PluginSetup();
|
92 |
$this->FilterStart();
|
93 |
}
|
@@ -100,9 +100,9 @@ class WP_Admin_UI_Customize
|
|
100 |
function PluginSetup() {
|
101 |
// load text domain
|
102 |
load_plugin_textdomain( 'wp-admin-ui-customize' , false , $this->PluginSlug . '/languages' );
|
103 |
-
|
104 |
add_action( 'plugins_loaded' , array( $this , 'plugins_loaded' ) );
|
105 |
-
|
106 |
// plugin links
|
107 |
add_filter( 'plugin_action_links' , array( $this , 'plugin_action_links' ) , 10 , 2 );
|
108 |
|
@@ -120,7 +120,7 @@ class WP_Admin_UI_Customize
|
|
120 |
|
121 |
// data update
|
122 |
add_action( 'admin_init' , array( $this , 'dataUpdate') );
|
123 |
-
|
124 |
// default admin bar menu load.
|
125 |
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_default_load' ) , 1 );
|
126 |
|
@@ -134,19 +134,19 @@ class WP_Admin_UI_Customize
|
|
134 |
add_action( 'wp_dashboard_setup' , array( $this , 'post_meta_boxes_dashboard_load' ) , 10000 );
|
135 |
|
136 |
}
|
137 |
-
|
138 |
function plugins_loaded() {
|
139 |
-
|
140 |
do_action( $this->ltd . '_plugins_loaded' );
|
141 |
-
|
142 |
}
|
143 |
|
144 |
// PluginSetup
|
145 |
function plugin_action_links( $links , $file ) {
|
146 |
if( plugin_basename(__FILE__) == $file ) {
|
147 |
-
$link = '<a href="' . self_admin_url( 'admin.php?page=' . $this->PageSlug ) . '">' . __( 'Settings' ) . '</a>';
|
148 |
-
$support_link = '<a href="http://wordpress.org/support/plugin/' . $this->PluginSlug . '" target="_blank">' . __( 'Support Forums' ) . '</a>';
|
149 |
-
$delete_userrole_link = '<a href="' . self_admin_url( 'admin.php?page=' . $this->PageSlug . '_reset_userrole' ) . '">' . __( 'Reset User Roles' , 'wp-admin-ui-customize' ) . '</a>';
|
150 |
array_unshift( $links, $link , $delete_userrole_link , $support_link );
|
151 |
}
|
152 |
return $links;
|
@@ -155,7 +155,7 @@ class WP_Admin_UI_Customize
|
|
155 |
// PluginSetup
|
156 |
function network_admin_plugin_action_links( $links , $file ) {
|
157 |
if( plugin_basename(__FILE__) == $file ) {
|
158 |
-
$support_link = '<a href="' . $this->Site . 'multisite_about
|
159 |
array_unshift( $links, $support_link );
|
160 |
}
|
161 |
|
@@ -171,7 +171,7 @@ class WP_Admin_UI_Customize
|
|
171 |
@header("X-XSS-Protection: 0");
|
172 |
}
|
173 |
}
|
174 |
-
|
175 |
$capability = $this->get_plugin_cap();
|
176 |
|
177 |
add_menu_page( $this->Name , $this->Name , $capability, $this->PageSlug , array( $this , 'setting_default') );
|
@@ -207,7 +207,7 @@ class WP_Admin_UI_Customize
|
|
207 |
if( is_plugin_active( 'polylang/polylang.php' ) ) {
|
208 |
$this->ActivatedPlugin["polylang"] = true;
|
209 |
}
|
210 |
-
|
211 |
}
|
212 |
|
213 |
|
@@ -327,7 +327,9 @@ class WP_Admin_UI_Customize
|
|
327 |
}
|
328 |
if( empty( $Data ) ) {
|
329 |
if( $current_screen->parent_base == $this->PageSlug && $current_screen->id != 'toplevel_page_' . $this->PageSlug ) {
|
330 |
-
echo '<div class="error"><p><strong>'
|
|
|
|
|
331 |
}
|
332 |
}
|
333 |
}
|
@@ -351,9 +353,9 @@ class WP_Admin_UI_Customize
|
|
351 |
|
352 |
$apply_user_roles = $this->get_data( 'user_role' );
|
353 |
unset( $apply_user_roles["UPFN"] );
|
354 |
-
|
355 |
$Contents = __( 'User Roles' ) . ' : ';
|
356 |
-
|
357 |
if( !empty( $apply_user_roles ) ) {
|
358 |
$UserRoles = $this->get_user_role();
|
359 |
foreach( $apply_user_roles as $role => $v ) {
|
@@ -374,7 +376,7 @@ class WP_Admin_UI_Customize
|
|
374 |
// SetList
|
375 |
function sidemenu_default_load() {
|
376 |
global $menu , $submenu;
|
377 |
-
|
378 |
if ( !get_option( 'link_manager_enabled' ) ) {
|
379 |
foreach( $menu as $key => $val ) {
|
380 |
if( !empty( $val[1] ) && $val[1] == 'manage_links' ) {
|
@@ -382,29 +384,29 @@ class WP_Admin_UI_Customize
|
|
382 |
}
|
383 |
}
|
384 |
}
|
385 |
-
|
386 |
$this->Menu = $menu;
|
387 |
$this->SubMenu = $submenu;
|
388 |
-
|
389 |
if( !empty( $submenu ) ) {
|
390 |
-
|
391 |
foreach( $submenu as $submenu_key => $sm ) {
|
392 |
-
|
393 |
if( !empty( $sm ) ) {
|
394 |
-
|
395 |
foreach( $sm as $sm_key => $sm_set ) {
|
396 |
-
|
397 |
if( preg_match("/^customize.php/", $sm_set[2] ) )
|
398 |
$this->SubMenu[$submenu_key][$sm_key][2] = esc_url( remove_query_arg( array( 'return' ) , $sm_set[2] ) );
|
399 |
-
|
400 |
}
|
401 |
-
|
402 |
}
|
403 |
-
|
404 |
}
|
405 |
-
|
406 |
}
|
407 |
-
|
408 |
}
|
409 |
|
410 |
// SetList
|
@@ -428,7 +430,7 @@ class WP_Admin_UI_Customize
|
|
428 |
}
|
429 |
}
|
430 |
}
|
431 |
-
|
432 |
if( !empty( $this->ActivatedPlugin["post_edit_toolbar"] ) ) {
|
433 |
$plugin_slug = 'post_item_';
|
434 |
foreach( $this->Admin_bar as $node_id => $node ) {
|
@@ -493,7 +495,7 @@ class WP_Admin_UI_Customize
|
|
493 |
// SetList
|
494 |
function admin_bar_filter_load() {
|
495 |
$Default_bar = $this->Admin_bar;
|
496 |
-
|
497 |
$Delete_bar = array( "top-secondary" );
|
498 |
foreach( $Delete_bar as $del_name ) {
|
499 |
if( !empty( $Default_bar[$del_name] ) ) {
|
@@ -534,7 +536,7 @@ class WP_Admin_UI_Customize
|
|
534 |
unset( $Default_bar[$node_id] );
|
535 |
}
|
536 |
}
|
537 |
-
|
538 |
// meta field add
|
539 |
foreach( $Default_bar as $node_id => $node ) {
|
540 |
if( !isset( $node->meta ) ) {
|
@@ -551,7 +553,7 @@ class WP_Admin_UI_Customize
|
|
551 |
}
|
552 |
}
|
553 |
}
|
554 |
-
|
555 |
$Place_types = $this->admin_bar_places();
|
556 |
|
557 |
// sub2 node
|
@@ -612,12 +614,12 @@ class WP_Admin_UI_Customize
|
|
612 |
$Filter_bar["front"]["main"]["search"] = (object) array( 'id' => 'search' , 'title' => '' , 'href' => '' , 'group' => '' , 'meta' => array() );
|
613 |
$Filter_bar["front"]["main"]["search"]->title = __( 'Search' );
|
614 |
$Filter_bar["front"]["main"]["search"]->href = get_search_link();
|
615 |
-
|
616 |
// admin field
|
617 |
$Filter_bar['left']['main']['view-post_type'] = new stdClass;
|
618 |
$Filter_bar['left']['main']['view-post_type'] = (object) array( 'id' => 'view-post_type' , 'title' => '' , 'href' => '' , 'group' => '' , 'meta' => array() );
|
619 |
$Filter_bar['left']['main']['view-post_type']->title = sprintf( '%1$s [post_type]' , __( 'View' ) );
|
620 |
-
|
621 |
if( !empty( $this->ActivatedPlugin ) ) {
|
622 |
|
623 |
if( !empty( $this->ActivatedPlugin["post_edit_toolbar"] ) ) {
|
@@ -662,16 +664,16 @@ class WP_Admin_UI_Customize
|
|
662 |
global $current_screen;
|
663 |
|
664 |
$capability = $this->get_plugin_cap();
|
665 |
-
|
666 |
if( !empty( $current_screen ) && $current_screen->id == 'dashboard' && current_user_can( $capability ) ) {
|
667 |
global $wp_meta_boxes;
|
668 |
|
669 |
$post_type = 'dashboard';
|
670 |
$Metaboxes = $wp_meta_boxes[$post_type];
|
671 |
-
|
672 |
$Update = array();
|
673 |
$Update["UPFN"] = $this->UPFN;
|
674 |
-
|
675 |
if( !empty( $Metaboxes ) ) {
|
676 |
foreach( $Metaboxes as $context => $meta_box ) {
|
677 |
foreach( $meta_box as $priority => $box ) {
|
@@ -697,37 +699,37 @@ class WP_Admin_UI_Customize
|
|
697 |
global $current_screen;
|
698 |
|
699 |
$capability = $this->get_plugin_cap();
|
700 |
-
|
701 |
if( !empty( $current_screen ) && $current_screen->base == 'post' && current_user_can( $capability ) ) {
|
702 |
global $wp_meta_boxes;
|
703 |
-
|
704 |
$regist_meta_boxes = $this->get_data( "regist_metabox" );
|
705 |
-
|
706 |
$post_type = $current_screen->post_type;
|
707 |
$Metaboxes = $wp_meta_boxes[$post_type];
|
708 |
|
709 |
$regist_meta_boxes['UPFN'] = $this->UPFN;
|
710 |
-
|
711 |
if( empty( $regist_meta_boxes['metaboxes'][$post_type] ) or !empty( $_GET[$this->ltd . '_metabox_load'] ) ) {
|
712 |
-
|
713 |
$regist_meta_boxes['metaboxes'][$post_type] = array();
|
714 |
-
|
715 |
}
|
716 |
|
717 |
if( !empty( $Metaboxes ) ) {
|
718 |
-
|
719 |
foreach( $Metaboxes as $context => $meta_box ) {
|
720 |
-
|
721 |
foreach( $meta_box as $priority => $box ) {
|
722 |
|
723 |
if( is_array( $box ) ) {
|
724 |
-
|
725 |
foreach( $box as $metabox_id => $metabox_detail ) {
|
726 |
-
|
727 |
if( !empty( $metabox_detail ) ) {
|
728 |
|
729 |
$regist_meta_boxes['metaboxes'][$post_type][$context][$priority][$metabox_id] = strip_tags( $metabox_detail['title'] );
|
730 |
-
|
731 |
}
|
732 |
|
733 |
}
|
@@ -778,10 +780,10 @@ class WP_Admin_UI_Customize
|
|
778 |
<input type="text" class="slugtext" value="" name="data[][slug]">
|
779 |
<?php else : ?>
|
780 |
<?php _e( 'Slug' ); ?>: <?php echo $menu_widget["slug"]; ?>
|
781 |
-
<input type="hidden" class="slugtext" value="<?php echo $menu_widget["slug"]; ?>" name="data[][slug]">
|
782 |
<?php endif; ?>
|
783 |
</p>
|
784 |
-
<?php _e( 'User Roles' ); ?> :
|
785 |
<ul class="display_roles">
|
786 |
<?php foreach( $UserRoles as $role_name => $val ) : ?>
|
787 |
<?php $has_cap = false; ?>
|
@@ -794,7 +796,7 @@ class WP_Admin_UI_Customize
|
|
794 |
<label>
|
795 |
<?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_attr( $menu_widget["title"] ); ?>" name="data[][title]">
|
796 |
</label>
|
797 |
-
<input type="hidden" class="parent_slugtext" value="<?php echo $menu_widget["parent_slug"]; ?>" name="data[][parent_slug]">
|
798 |
</div>
|
799 |
|
800 |
<?php if( $menu_widget["slug"] != 'separator' ) : ?>
|
@@ -823,9 +825,9 @@ class WP_Admin_UI_Customize
|
|
823 |
<div class="settings">
|
824 |
<p class="description">
|
825 |
<?php _e( 'Slug' ); ?>: <?php echo $sm["slug"]; ?>
|
826 |
-
<input type="hidden" class="slugtext" value="<?php echo $sm["slug"]; ?>" name="data[][slug]">
|
827 |
</p>
|
828 |
-
<?php _e( 'User Roles' ); ?> :
|
829 |
<ul class="display_roles">
|
830 |
<?php foreach( $UserRoles as $role_name => $val ) : ?>
|
831 |
<?php $has_cap = false; ?>
|
@@ -838,7 +840,7 @@ class WP_Admin_UI_Customize
|
|
838 |
<label>
|
839 |
<?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_attr( $sm["title"] ); ?>" name="data[][title]">
|
840 |
</label>
|
841 |
-
<input type="hidden" class="parent_slugtext" value="<?php echo $sm["parent_slug"]; ?>" name="data[][parent_slug]">
|
842 |
</div>
|
843 |
<div class="widget-control-actions">
|
844 |
<div class="alignleft">
|
@@ -918,9 +920,9 @@ class WP_Admin_UI_Customize
|
|
918 |
<div class="widget-inside">
|
919 |
<div class="settings">
|
920 |
<p class="field-url description">
|
921 |
-
<input type="hidden" class="idtext" value="<?php echo $menu_widget["id"]; ?>" name="data[][id]" />
|
922 |
<?php if( strstr( $menu_widget["id"] , 'custom_node' ) && empty( $menu_widget["group"] ) ) : ?>
|
923 |
-
URL: <input type="text" class="regular-text linktext" value="<?php echo $menu_widget["href"]; ?>" name="data[][href]" placeholder="http://" />
|
924 |
<?php else: ?>
|
925 |
<?php if( $menu_widget["id"] == 'edit-post_type' ) : ?>
|
926 |
<strong><?php _e( 'Show only on front end.' , 'wp-admin-ui-customize' ); ?></strong>
|
@@ -929,9 +931,9 @@ class WP_Admin_UI_Customize
|
|
929 |
<?php elseif( $menu_widget["id"] == 'menu-toggle' ) : ?>
|
930 |
<strong><?php echo $menu_widget["id"]; ?></strong>
|
931 |
<?php else: ?>
|
932 |
-
<a href="<?php echo $menu_widget["href"]; ?>" target="_blank"><?php echo $menu_widget["id"]; ?></a>
|
933 |
<?php endif; ?>
|
934 |
-
<input type="hidden" class="linktext" value="<?php echo $menu_widget["href"]; ?>" name="data[][href]" />
|
935 |
<?php endif; ?>
|
936 |
</p>
|
937 |
<p class="field-title description">
|
@@ -939,8 +941,8 @@ class WP_Admin_UI_Customize
|
|
939 |
<?php if( !empty( $menu_widget["group"] ) ) : ?>
|
940 |
<input type="hidden" class="regular-text titletext" value="" name="data[][title]" />
|
941 |
<?php else : ?>
|
942 |
-
<?php _e( 'Title' ); ?> :
|
943 |
-
|
944 |
<?php $readonly_field = false; ?>
|
945 |
<?php if( in_array( $menu_widget["id"] , $no_submenu ) ) : ?>
|
946 |
<?php $readonly_field = true; ?>
|
@@ -1002,21 +1004,21 @@ class WP_Admin_UI_Customize
|
|
1002 |
<?php if( !empty( $menu_widget["meta"]["target"] ) ) : ?>
|
1003 |
<?php $checked = checked( $menu_widget["meta"]["target"] , '_blank' , 0 ); ?>
|
1004 |
<?php endif; ?>
|
1005 |
-
<input type="checkbox" class="meta_target" value="_blank" name="data[][meta][target]" <?php echo $checked; ?> />
|
1006 |
<?php _e( 'Open link in a new tab' ); ?>
|
1007 |
<?php endif; ?>
|
1008 |
</label>
|
1009 |
-
<input type="hidden" class="meta_class" value="<?php echo $menu_widget["meta"]["class"]; ?>" name="data[][meta][class]" />
|
1010 |
</p>
|
1011 |
-
<input type="hidden" class="parent" value="<?php echo $menu_widget["parent"]; ?>" name="data[][parent]" />
|
1012 |
-
<input type="hidden" class="group" value="<?php echo $menu_widget["group"]; ?>" name="data[][group]" />
|
1013 |
<input type="hidden" class="node_type" value="" name="data[][node_type]" />
|
1014 |
</div>
|
1015 |
|
1016 |
<?php if( !in_array( $menu_widget["id"] , $no_submenu ) ) : ?>
|
1017 |
<div class="submenu">
|
1018 |
<p class="description"><?php _e( 'Sub Menus' , 'wp-admin-ui-customize' ); ?></p>
|
1019 |
-
|
1020 |
<?php if( empty( $new_widget ) && !empty( $node_type ) ) : ?>
|
1021 |
|
1022 |
<?php $subnode_type = ''; ?>
|
@@ -1060,7 +1062,7 @@ class WP_Admin_UI_Customize
|
|
1060 |
function get_custom_posts() {
|
1061 |
$args = array( );
|
1062 |
$all_custom_posts = get_post_types( $args , 'objects' );
|
1063 |
-
|
1064 |
$exclusion = array( "post" , "page" , "attachment" , "revision" , "nav_menu_item");
|
1065 |
|
1066 |
/**
|
@@ -1079,13 +1081,13 @@ class WP_Admin_UI_Customize
|
|
1079 |
}
|
1080 |
}
|
1081 |
}
|
1082 |
-
|
1083 |
return $custom_posts;
|
1084 |
}
|
1085 |
|
1086 |
// SetList
|
1087 |
function val_replace( $str ) {
|
1088 |
-
|
1089 |
if( !empty( $str ) ) {
|
1090 |
|
1091 |
$update_data = wp_get_update_data();
|
@@ -1149,58 +1151,58 @@ class WP_Admin_UI_Customize
|
|
1149 |
$post_name = '';
|
1150 |
|
1151 |
if( is_admin() ) {
|
1152 |
-
|
1153 |
global $current_screen;
|
1154 |
global $typenow;
|
1155 |
global $tax;
|
1156 |
-
|
1157 |
if( $current_screen->base == 'edit' or $current_screen->base == 'post' && !empty( $typenow ) ) {
|
1158 |
-
|
1159 |
$post_type_object = get_post_type_object( $typenow );
|
1160 |
-
|
1161 |
if( !empty( $post_type_object->public ) ) {
|
1162 |
|
1163 |
$post_name = $post_type_object->labels->singular_name;
|
1164 |
-
|
1165 |
}
|
1166 |
-
|
1167 |
} elseif( $current_screen->base == 'edit-tags' && !empty( $tax ) ) {
|
1168 |
-
|
1169 |
if( !empty( $tax->public ) ) {
|
1170 |
|
1171 |
$post_name = $tax->labels->singular_name;
|
1172 |
-
|
1173 |
}
|
1174 |
-
|
1175 |
}
|
1176 |
-
|
1177 |
-
|
1178 |
} else {
|
1179 |
-
|
1180 |
$queried_object = get_queried_object();
|
1181 |
|
1182 |
if( !empty( $queried_object->post_type ) ) {
|
1183 |
-
|
1184 |
$post_type_object = get_post_type_object( $queried_object->post_type );
|
1185 |
|
1186 |
if( !empty( $post_type_object->public ) ) {
|
1187 |
|
1188 |
$post_name = $post_type_object->labels->singular_name;
|
1189 |
-
|
1190 |
}
|
1191 |
-
|
1192 |
} elseif( !empty( $queried_object->taxonomy ) ) {
|
1193 |
-
|
1194 |
$tax = get_taxonomy( $queried_object->taxonomy );
|
1195 |
|
1196 |
if( !empty( $tax->public ) ) {
|
1197 |
|
1198 |
$post_name = $tax->labels->singular_name;
|
1199 |
-
|
1200 |
}
|
1201 |
|
1202 |
}
|
1203 |
-
|
1204 |
}
|
1205 |
|
1206 |
$str = str_replace( '[post_type]' , $post_name , $str );
|
@@ -1215,29 +1217,29 @@ class WP_Admin_UI_Customize
|
|
1215 |
$str = str_replace( '[site_url]' , $this->Schema . esc_attr( $current_site->domain . $current_site->path ) , $str );
|
1216 |
}
|
1217 |
}
|
1218 |
-
|
1219 |
if( !empty( $this->ActivatedPlugin ) ) {
|
1220 |
-
|
1221 |
$activated_plugins = $this->ActivatedPlugin;
|
1222 |
-
|
1223 |
if( !empty( $activated_plugins['woocommerce'] ) ) {
|
1224 |
-
|
1225 |
if( strstr( $str , '[woocommerce_order_process_count]') ) {
|
1226 |
-
|
1227 |
$woocommerce_order_process_count = '';
|
1228 |
if( function_exists( 'wc_processing_order_count' ) ) {
|
1229 |
-
|
1230 |
$order_count = intval( wc_processing_order_count() );
|
1231 |
if ( !empty( $order_count ) ) {
|
1232 |
$woocommerce_order_process_count = ' <span class="awaiting-mod update-plugins count-' . $order_count . '"><span class="processing-count">' . number_format_i18n( $order_count ) . '</span></span>';
|
1233 |
}
|
1234 |
}
|
1235 |
-
|
1236 |
$str = str_replace( '[woocommerce_order_process_count]' , $woocommerce_order_process_count , $str );
|
1237 |
}
|
1238 |
-
|
1239 |
}
|
1240 |
-
|
1241 |
}
|
1242 |
|
1243 |
/**
|
@@ -1284,22 +1286,22 @@ class WP_Admin_UI_Customize
|
|
1284 |
function admin_bar_places() {
|
1285 |
return $Place_types = array( "left" => __( 'Left' ) , "right" => __( 'Right' ) , "front" => __( 'Frontend' , 'wp-admin-ui-customize' ) );
|
1286 |
}
|
1287 |
-
|
1288 |
// SetList
|
1289 |
function get_plugin_cap() {
|
1290 |
$capability = 'manage_options';
|
1291 |
-
|
1292 |
$Data = $this->get_data( 'plugin_cap' );
|
1293 |
if( !empty( $Data["edit_cap"] ) ) {
|
1294 |
$capability = $Data["edit_cap"];
|
1295 |
}
|
1296 |
-
|
1297 |
return $capability;
|
1298 |
}
|
1299 |
-
|
1300 |
// SetList
|
1301 |
function get_document_link( $document_type ) {
|
1302 |
-
|
1303 |
$link = $this->Site;
|
1304 |
$locale = get_locale();
|
1305 |
|
@@ -1310,13 +1312,13 @@ class WP_Admin_UI_Customize
|
|
1310 |
} else {
|
1311 |
$link .= 'blog/';
|
1312 |
}
|
1313 |
-
|
1314 |
if( $document_type == 'admin_bar' ) {
|
1315 |
$link .= 'admin-bar-toolbar-settings/';
|
1316 |
}
|
1317 |
-
|
1318 |
}
|
1319 |
-
|
1320 |
echo $link;
|
1321 |
|
1322 |
}
|
@@ -1328,7 +1330,7 @@ class WP_Admin_UI_Customize
|
|
1328 |
function dataUpdate() {
|
1329 |
|
1330 |
$RecordField = false;
|
1331 |
-
|
1332 |
if( !empty( $_POST[$this->Nonces["field"]] ) ) {
|
1333 |
|
1334 |
if( !empty( $_POST["record_field"] ) ) {
|
@@ -1360,10 +1362,10 @@ class WP_Admin_UI_Customize
|
|
1360 |
} elseif( $RecordField == 'plugin_cap' ) {
|
1361 |
$this->update_plugincap();
|
1362 |
}
|
1363 |
-
|
1364 |
}
|
1365 |
|
1366 |
-
|
1367 |
if( !empty( $RecordField ) && !empty( $_POST["reset"] ) ) {
|
1368 |
|
1369 |
if( $RecordField == 'manage_metabox' ) {
|
@@ -1371,14 +1373,14 @@ class WP_Admin_UI_Customize
|
|
1371 |
} elseif( $RecordField == 'dashboard' ) {
|
1372 |
delete_option( $this->Record["regist_dashboard_metabox"] );
|
1373 |
}
|
1374 |
-
|
1375 |
if( $RecordField == 'all_settings' ) {
|
1376 |
$this->update_reset_all();
|
1377 |
} else {
|
1378 |
$this->update_reset( $RecordField );
|
1379 |
}
|
1380 |
}
|
1381 |
-
|
1382 |
}
|
1383 |
|
1384 |
}
|
@@ -1412,7 +1414,7 @@ class WP_Admin_UI_Customize
|
|
1412 |
function update_reset_all() {
|
1413 |
$Update = $this->update_validate();
|
1414 |
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1415 |
-
|
1416 |
foreach( $this->Record as $key => $record ) {
|
1417 |
delete_option( $record );
|
1418 |
}
|
@@ -1748,7 +1750,7 @@ class WP_Admin_UI_Customize
|
|
1748 |
}
|
1749 |
|
1750 |
}
|
1751 |
-
|
1752 |
// FilterStart
|
1753 |
function admin_init() {
|
1754 |
|
@@ -1798,7 +1800,7 @@ class WP_Admin_UI_Customize
|
|
1798 |
add_action( 'wp_loaded' , array( $this , 'notice_dismiss' ) , 2 );
|
1799 |
|
1800 |
$GetData = $this->get_flit_data( 'site' );
|
1801 |
-
|
1802 |
if( !empty( $GetData["admin_bar"] ) ) {
|
1803 |
if( $GetData["admin_bar"] == "hide" ) {
|
1804 |
add_filter( 'show_admin_bar' , '__return_false' );
|
@@ -1814,7 +1816,7 @@ class WP_Admin_UI_Customize
|
|
1814 |
// FilterStart
|
1815 |
function remove_action_front() {
|
1816 |
$GetData = get_option( $this->Record['site'] );
|
1817 |
-
|
1818 |
if( !empty( $GetData["UPFN"] ) ) {
|
1819 |
unset( $GetData["UPFN"] );
|
1820 |
foreach($GetData as $key => $val) {
|
@@ -1907,15 +1909,15 @@ class WP_Admin_UI_Customize
|
|
1907 |
// FilterStart
|
1908 |
function admin_bar_menu() {
|
1909 |
global $wp_admin_bar;
|
1910 |
-
|
1911 |
if( empty( $wp_admin_bar ) ) {
|
1912 |
-
|
1913 |
return false;
|
1914 |
-
|
1915 |
}
|
1916 |
-
|
1917 |
$GetData = $this->get_flit_data( 'admin_bar_menu' );
|
1918 |
-
|
1919 |
if( !empty( $GetData["UPFN"] ) ) {
|
1920 |
unset( $GetData["UPFN"] );
|
1921 |
if( is_array( $GetData ) ) {
|
@@ -1935,12 +1937,12 @@ class WP_Admin_UI_Customize
|
|
1935 |
$update_data = wp_get_update_data();
|
1936 |
$activated_plugin = $this->ActivatedPlugin;
|
1937 |
$other_plugin = $this->OtherPluginMenu;
|
1938 |
-
|
1939 |
// all nodes adjustment
|
1940 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
1941 |
foreach($allnodes as $node_type => $nodes) {
|
1942 |
foreach($nodes as $key => $node) {
|
1943 |
-
|
1944 |
if( strstr( $node["id"] , 'custom_node' ) ) {
|
1945 |
if( !empty( $node["group"] ) ) {
|
1946 |
$node["meta"]["class"] = 'ab-sub-secondary';
|
@@ -1948,31 +1950,31 @@ class WP_Admin_UI_Customize
|
|
1948 |
$node["href"] = $this->val_replace( $node["href"] );
|
1949 |
}
|
1950 |
} elseif( $node["id"] == 'view-post_type' ) {
|
1951 |
-
|
1952 |
if( is_admin() ) {
|
1953 |
-
|
1954 |
if( !empty( $All_Nodes['preview'] ) ) {
|
1955 |
|
1956 |
$node["href"] = $All_Nodes['preview']->href;
|
1957 |
$node["meta"] = $All_Nodes['preview']->meta;
|
1958 |
-
|
1959 |
} elseif( !empty( $All_Nodes['view'] ) ) {
|
1960 |
-
|
1961 |
$node["href"] = $All_Nodes['view']->href;
|
1962 |
$node["meta"] = $All_Nodes['view']->meta;
|
1963 |
-
|
1964 |
} else {
|
1965 |
-
|
1966 |
unset( $SettingNodes[$Boxtype][$node_type][$key] );
|
1967 |
continue;
|
1968 |
-
|
1969 |
}
|
1970 |
|
1971 |
} else {
|
1972 |
-
|
1973 |
unset( $SettingNodes[$Boxtype][$node_type][$key] );
|
1974 |
continue;
|
1975 |
-
|
1976 |
}
|
1977 |
|
1978 |
} elseif( $node["id"] == 'edit-post_type' ) {
|
@@ -2068,7 +2070,7 @@ class WP_Admin_UI_Customize
|
|
2068 |
}
|
2069 |
}
|
2070 |
}
|
2071 |
-
|
2072 |
// other plugin nodes
|
2073 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
2074 |
foreach($allnodes as $node_type => $nodes) {
|
@@ -2247,7 +2249,7 @@ class WP_Admin_UI_Customize
|
|
2247 |
if( !empty( $site_transient_update_core ) && !empty( $site_transient_update_core->updates[0] ) && !empty( $site_transient_update_core->updates[0]->response ) ) {
|
2248 |
$site_transient_update_core->updates[0]->response = 'latest';
|
2249 |
}
|
2250 |
-
|
2251 |
return $site_transient_update_core;
|
2252 |
}
|
2253 |
|
@@ -2256,7 +2258,7 @@ class WP_Admin_UI_Customize
|
|
2256 |
if( isset( $site_transient_update_plugins->response ) ) {
|
2257 |
unset( $site_transient_update_plugins->response );
|
2258 |
}
|
2259 |
-
|
2260 |
return $site_transient_update_plugins;
|
2261 |
}
|
2262 |
|
@@ -2265,7 +2267,7 @@ class WP_Admin_UI_Customize
|
|
2265 |
if( isset( $site_transient_update_themes->response ) ) {
|
2266 |
unset( $site_transient_update_themes->response );
|
2267 |
}
|
2268 |
-
|
2269 |
return $site_transient_update_themes;
|
2270 |
}
|
2271 |
|
@@ -2282,7 +2284,7 @@ class WP_Admin_UI_Customize
|
|
2282 |
$screen->remove_help_tabs();
|
2283 |
}
|
2284 |
}
|
2285 |
-
|
2286 |
if( !empty( $GetData["screen_option_tab"] ) ) {
|
2287 |
add_filter( 'screen_options_show_screen' , '__return_false' );
|
2288 |
}
|
@@ -2317,18 +2319,18 @@ class WP_Admin_UI_Customize
|
|
2317 |
|
2318 |
wp_enqueue_style( $this->PageSlug . '-custom' , strip_tags( $css ) , array() , $this->Ver );
|
2319 |
}
|
2320 |
-
|
2321 |
}
|
2322 |
}
|
2323 |
|
2324 |
// FilterStart
|
2325 |
function wp_dashboard_setup() {
|
2326 |
global $wp_meta_boxes;
|
2327 |
-
|
2328 |
if( empty( $wp_meta_boxes ) ) {
|
2329 |
-
|
2330 |
return false;
|
2331 |
-
|
2332 |
}
|
2333 |
|
2334 |
$Data = $this->get_flit_data( 'dashboard' );
|
@@ -2366,15 +2368,15 @@ class WP_Admin_UI_Customize
|
|
2366 |
// FilterStart
|
2367 |
function manage_metabox() {
|
2368 |
global $wp_meta_boxes, $current_screen, $post_type;
|
2369 |
-
|
2370 |
if( empty( $current_screen ) or empty( $wp_meta_boxes ) or empty( $post_type ) ) {
|
2371 |
-
|
2372 |
return false;
|
2373 |
-
|
2374 |
}
|
2375 |
|
2376 |
$GetData = $this->get_flit_data( 'manage_metabox' );
|
2377 |
-
|
2378 |
if( !empty( $GetData["UPFN"] ) ) {
|
2379 |
unset( $GetData["UPFN"] );
|
2380 |
|
@@ -2386,7 +2388,7 @@ class WP_Admin_UI_Customize
|
|
2386 |
|
2387 |
$Metaboxes = $wp_meta_boxes[$post_type];
|
2388 |
$Data = $GetData[$post_type];
|
2389 |
-
|
2390 |
$Remove_metaboxes = array();
|
2391 |
foreach( $Metaboxes as $context => $meta_box ) {
|
2392 |
foreach( $meta_box as $priority => $box ) {
|
@@ -2436,38 +2438,38 @@ class WP_Admin_UI_Customize
|
|
2436 |
function sidemenu() {
|
2437 |
global $menu;
|
2438 |
global $submenu;
|
2439 |
-
|
2440 |
if( empty( $menu ) ) {
|
2441 |
-
|
2442 |
return false;
|
2443 |
-
|
2444 |
}
|
2445 |
|
2446 |
$GetData = $this->get_flit_data( 'sidemenu' );
|
2447 |
$General = $this->get_flit_data( 'admin_general' );
|
2448 |
-
|
2449 |
if( !empty( $GetData["UPFN"] ) ) {
|
2450 |
unset( $GetData["UPFN"] );
|
2451 |
|
2452 |
if( !empty( $GetData ) && is_array( $GetData ) && !empty( $GetData["main"] ) ) {
|
2453 |
$SetMain_menu = array();
|
2454 |
$SetMain_submenu = array();
|
2455 |
-
|
2456 |
$separator_menu = array( 0 => "" , 1 => 'read' , 2 => 'separator1' , 3 => "" , 4 => 'wp-menu-separator' );
|
2457 |
$customize_url = esc_url( add_query_arg( 'return', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'customize.php' ) );
|
2458 |
-
|
2459 |
if( !empty( $GetData["main"] ) ) {
|
2460 |
-
|
2461 |
foreach( $GetData["main"] as $mm_pos => $mm ) {
|
2462 |
-
|
2463 |
if( $mm["slug"] == 'customize.php' ) {
|
2464 |
-
|
2465 |
$GetData["main"][$mm_pos]["slug"] = $customize_url;
|
2466 |
-
|
2467 |
} elseif( strstr( $mm["slug"] , 'customize.php?autofocus') ) {
|
2468 |
|
2469 |
$controll = str_replace( 'customize.php?autofocus%5Bcontrol%5D=' , '' , $mm["slug"] );
|
2470 |
-
|
2471 |
if( !empty( $controll ) )
|
2472 |
$GetData["main"][$mm_pos]["slug"] = esc_url( add_query_arg( 'autofocus[control]' , $controll , $customize_url ) );
|
2473 |
|
@@ -2485,23 +2487,23 @@ class WP_Admin_UI_Customize
|
|
2485 |
if( strstr( $mm["title"] , '[update_themes]') ) {
|
2486 |
$GetData["main"][$mm_pos]["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $mm["title"] );
|
2487 |
}
|
2488 |
-
|
2489 |
}
|
2490 |
-
|
2491 |
}
|
2492 |
|
2493 |
if( !empty( $GetData["sub"] ) ) {
|
2494 |
-
|
2495 |
foreach( $GetData["sub"] as $sm_pos => $sm ) {
|
2496 |
-
|
2497 |
if( $sm["slug"] == 'customize.php' ) {
|
2498 |
-
|
2499 |
$GetData["sub"][$sm_pos]["slug"] = $customize_url;
|
2500 |
-
|
2501 |
} elseif( strstr( $sm["slug"] , 'customize.php?autofocus%5Bcontrol%5D=') ) {
|
2502 |
|
2503 |
$controll = str_replace( 'customize.php?autofocus%5Bcontrol%5D=' , '' , $sm["slug"] );
|
2504 |
-
|
2505 |
if( !empty( $controll ) )
|
2506 |
$GetData["sub"][$sm_pos]["slug"] = esc_url( add_query_arg( 'autofocus[control]' , $controll , $customize_url ) );
|
2507 |
|
@@ -2519,11 +2521,11 @@ class WP_Admin_UI_Customize
|
|
2519 |
if( strstr( $sm["title"] , '[update_themes]') ) {
|
2520 |
$GetData["sub"][$sm_pos]["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $sm["title"] );
|
2521 |
}
|
2522 |
-
|
2523 |
}
|
2524 |
-
|
2525 |
}
|
2526 |
-
|
2527 |
foreach($GetData["main"] as $mm_pos => $mm) {
|
2528 |
if($mm["slug"] == 'separator') {
|
2529 |
$SetMain_menu[] = $separator_menu;
|
@@ -2588,17 +2590,17 @@ class WP_Admin_UI_Customize
|
|
2588 |
}
|
2589 |
|
2590 |
$menu = $SetMain_menu;
|
2591 |
-
|
2592 |
foreach( $SetMain_submenu as $slug => $menu_set ) {
|
2593 |
-
|
2594 |
foreach( $menu_set as $key => $sm ) {
|
2595 |
-
|
2596 |
if( !empty( $SetMain_submenu[$slug][$key][4] ) && strstr( $SetMain_submenu[$slug][$key][4] , 'menu-top' ) ) {
|
2597 |
$SetMain_submenu[$slug][$key][4] = str_replace( 'menu-top' , '' , $SetMain_submenu[$slug][$key][4] );
|
2598 |
}
|
2599 |
-
|
2600 |
}
|
2601 |
-
|
2602 |
}
|
2603 |
$submenu = $SetMain_submenu;
|
2604 |
|
@@ -2623,7 +2625,7 @@ class WP_Admin_UI_Customize
|
|
2623 |
$menu = array();
|
2624 |
}
|
2625 |
}
|
2626 |
-
|
2627 |
}
|
2628 |
|
2629 |
// FilterStart
|
@@ -2643,17 +2645,17 @@ class WP_Admin_UI_Customize
|
|
2643 |
}
|
2644 |
}
|
2645 |
}
|
2646 |
-
|
2647 |
return $permalink_html;
|
2648 |
}
|
2649 |
|
2650 |
// FilterStart
|
2651 |
function allow_comments() {
|
2652 |
global $current_screen;
|
2653 |
-
|
2654 |
$PostAddEdit = $this->get_flit_data( 'post_add_edit' );
|
2655 |
$RemoveMetaBox = $this->get_flit_data( 'manage_metabox' );
|
2656 |
-
|
2657 |
if( !empty( $PostAddEdit["UPFN"] ) && !empty( $RemoveMetaBox["UPFN"] ) ) {
|
2658 |
if( $current_screen->action == 'add' ) {
|
2659 |
if( !empty( $RemoveMetaBox[$current_screen->id]["commentstatusdiv"] ) && !empty( $PostAddEdit["allow_comments"] ) ) {
|
@@ -2664,7 +2666,7 @@ class WP_Admin_UI_Customize
|
|
2664 |
}
|
2665 |
}
|
2666 |
}
|
2667 |
-
|
2668 |
}
|
2669 |
|
2670 |
}
|
@@ -2682,7 +2684,7 @@ class WP_Admin_UI_Customize
|
|
2682 |
}
|
2683 |
}
|
2684 |
}
|
2685 |
-
|
2686 |
return $title;
|
2687 |
}
|
2688 |
|
@@ -2691,7 +2693,7 @@ class WP_Admin_UI_Customize
|
|
2691 |
$GetData = $this->get_flit_data( 'appearance_menus' );
|
2692 |
if( !empty( $GetData["UPFN"] ) ) {
|
2693 |
unset( $GetData["UPFN"] );
|
2694 |
-
|
2695 |
$nav_menus = wp_get_nav_menus();
|
2696 |
|
2697 |
if( !empty( $GetData["add_new_menu"] ) ) {
|
@@ -2699,9 +2701,9 @@ class WP_Admin_UI_Customize
|
|
2699 |
if( count( $nav_menus ) > 1 ) {
|
2700 |
|
2701 |
echo '<style>.wrap > .manage-menus .add-new-menu-action, .locations-row-links .locations-add-menu-link { display: none; }</style>';
|
2702 |
-
|
2703 |
} else {
|
2704 |
-
|
2705 |
echo '<style>.wrap > .manage-menus, .locations-row-links .locations-add-menu-link { display: none; }</style>';
|
2706 |
|
2707 |
}
|
@@ -2746,4 +2748,3 @@ class WP_Admin_UI_Customize
|
|
2746 |
$wauc = new WP_Admin_UI_Customize();
|
2747 |
|
2748 |
endif;
|
2749 |
-
|
2 |
/*
|
3 |
Plugin Name: WP Admin UI Customize
|
4 |
Description: An excellent plugin to customize the Wordpress management UI.
|
5 |
+
Plugin URI: http://wpadminuicustomize.com/
|
6 |
+
Version: 1.5.13
|
7 |
Author: gqevu6bsiz
|
8 |
+
Author URI: http://gqevu6bsiz.chicappa.jp/
|
9 |
Text Domain: wp-admin-ui-customize
|
10 |
Domain Path: /languages
|
11 |
*/
|
57 |
|
58 |
|
59 |
function __construct() {
|
60 |
+
$this->Ver = '1.5.13';
|
61 |
$this->Name = 'WP Admin UI Customize';
|
62 |
$this->Dir = plugin_dir_path( __FILE__ );
|
63 |
$this->Url = plugin_dir_url( __FILE__ );
|
87 |
$this->OtherPluginMenu = array();
|
88 |
$this->UPFN = 'Y';
|
89 |
$this->MsgQ = $this->ltd . '_msg';
|
90 |
+
|
91 |
$this->PluginSetup();
|
92 |
$this->FilterStart();
|
93 |
}
|
100 |
function PluginSetup() {
|
101 |
// load text domain
|
102 |
load_plugin_textdomain( 'wp-admin-ui-customize' , false , $this->PluginSlug . '/languages' );
|
103 |
+
|
104 |
add_action( 'plugins_loaded' , array( $this , 'plugins_loaded' ) );
|
105 |
+
|
106 |
// plugin links
|
107 |
add_filter( 'plugin_action_links' , array( $this , 'plugin_action_links' ) , 10 , 2 );
|
108 |
|
120 |
|
121 |
// data update
|
122 |
add_action( 'admin_init' , array( $this , 'dataUpdate') );
|
123 |
+
|
124 |
// default admin bar menu load.
|
125 |
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_default_load' ) , 1 );
|
126 |
|
134 |
add_action( 'wp_dashboard_setup' , array( $this , 'post_meta_boxes_dashboard_load' ) , 10000 );
|
135 |
|
136 |
}
|
137 |
+
|
138 |
function plugins_loaded() {
|
139 |
+
|
140 |
do_action( $this->ltd . '_plugins_loaded' );
|
141 |
+
|
142 |
}
|
143 |
|
144 |
// PluginSetup
|
145 |
function plugin_action_links( $links , $file ) {
|
146 |
if( plugin_basename(__FILE__) == $file ) {
|
147 |
+
$link = '<a href="' . esc_url( self_admin_url( 'admin.php?page=' . $this->PageSlug ) ) . '">' . __( 'Settings' ) . '</a>';
|
148 |
+
$support_link = '<a href="' . esc_url( 'http://wordpress.org/support/plugin/' . $this->PluginSlug ) . '" target="_blank">' . __( 'Support Forums' ) . '</a>';
|
149 |
+
$delete_userrole_link = '<a href="' . esc_url( self_admin_url( 'admin.php?page=' . $this->PageSlug . '_reset_userrole' ) ) . '">' . __( 'Reset User Roles' , 'wp-admin-ui-customize' ) . '</a>';
|
150 |
array_unshift( $links, $link , $delete_userrole_link , $support_link );
|
151 |
}
|
152 |
return $links;
|
155 |
// PluginSetup
|
156 |
function network_admin_plugin_action_links( $links , $file ) {
|
157 |
if( plugin_basename(__FILE__) == $file ) {
|
158 |
+
$support_link = '<a href="' . esc_url( $this->Site . 'multisite_about/' ) . '" target="_blank">Multisite Add-on</a>';
|
159 |
array_unshift( $links, $support_link );
|
160 |
}
|
161 |
|
171 |
@header("X-XSS-Protection: 0");
|
172 |
}
|
173 |
}
|
174 |
+
|
175 |
$capability = $this->get_plugin_cap();
|
176 |
|
177 |
add_menu_page( $this->Name , $this->Name , $capability, $this->PageSlug , array( $this , 'setting_default') );
|
207 |
if( is_plugin_active( 'polylang/polylang.php' ) ) {
|
208 |
$this->ActivatedPlugin["polylang"] = true;
|
209 |
}
|
210 |
+
|
211 |
}
|
212 |
|
213 |
|
327 |
}
|
328 |
if( empty( $Data ) ) {
|
329 |
if( $current_screen->parent_base == $this->PageSlug && $current_screen->id != 'toplevel_page_' . $this->PageSlug ) {
|
330 |
+
echo '<div class="error"><p><strong>';
|
331 |
+
printf( __( 'You must <a href="%s">select a user role</a> before settings can be applied.' , 'wp-admin-ui-customize' ) , esc_url( admin_url( 'admin.php?page=' . $this->PageSlug ) ) );
|
332 |
+
echo '</strong></p></div>';
|
333 |
}
|
334 |
}
|
335 |
}
|
353 |
|
354 |
$apply_user_roles = $this->get_data( 'user_role' );
|
355 |
unset( $apply_user_roles["UPFN"] );
|
356 |
+
|
357 |
$Contents = __( 'User Roles' ) . ' : ';
|
358 |
+
|
359 |
if( !empty( $apply_user_roles ) ) {
|
360 |
$UserRoles = $this->get_user_role();
|
361 |
foreach( $apply_user_roles as $role => $v ) {
|
376 |
// SetList
|
377 |
function sidemenu_default_load() {
|
378 |
global $menu , $submenu;
|
379 |
+
|
380 |
if ( !get_option( 'link_manager_enabled' ) ) {
|
381 |
foreach( $menu as $key => $val ) {
|
382 |
if( !empty( $val[1] ) && $val[1] == 'manage_links' ) {
|
384 |
}
|
385 |
}
|
386 |
}
|
387 |
+
|
388 |
$this->Menu = $menu;
|
389 |
$this->SubMenu = $submenu;
|
390 |
+
|
391 |
if( !empty( $submenu ) ) {
|
392 |
+
|
393 |
foreach( $submenu as $submenu_key => $sm ) {
|
394 |
+
|
395 |
if( !empty( $sm ) ) {
|
396 |
+
|
397 |
foreach( $sm as $sm_key => $sm_set ) {
|
398 |
+
|
399 |
if( preg_match("/^customize.php/", $sm_set[2] ) )
|
400 |
$this->SubMenu[$submenu_key][$sm_key][2] = esc_url( remove_query_arg( array( 'return' ) , $sm_set[2] ) );
|
401 |
+
|
402 |
}
|
403 |
+
|
404 |
}
|
405 |
+
|
406 |
}
|
407 |
+
|
408 |
}
|
409 |
+
|
410 |
}
|
411 |
|
412 |
// SetList
|
430 |
}
|
431 |
}
|
432 |
}
|
433 |
+
|
434 |
if( !empty( $this->ActivatedPlugin["post_edit_toolbar"] ) ) {
|
435 |
$plugin_slug = 'post_item_';
|
436 |
foreach( $this->Admin_bar as $node_id => $node ) {
|
495 |
// SetList
|
496 |
function admin_bar_filter_load() {
|
497 |
$Default_bar = $this->Admin_bar;
|
498 |
+
|
499 |
$Delete_bar = array( "top-secondary" );
|
500 |
foreach( $Delete_bar as $del_name ) {
|
501 |
if( !empty( $Default_bar[$del_name] ) ) {
|
536 |
unset( $Default_bar[$node_id] );
|
537 |
}
|
538 |
}
|
539 |
+
|
540 |
// meta field add
|
541 |
foreach( $Default_bar as $node_id => $node ) {
|
542 |
if( !isset( $node->meta ) ) {
|
553 |
}
|
554 |
}
|
555 |
}
|
556 |
+
|
557 |
$Place_types = $this->admin_bar_places();
|
558 |
|
559 |
// sub2 node
|
614 |
$Filter_bar["front"]["main"]["search"] = (object) array( 'id' => 'search' , 'title' => '' , 'href' => '' , 'group' => '' , 'meta' => array() );
|
615 |
$Filter_bar["front"]["main"]["search"]->title = __( 'Search' );
|
616 |
$Filter_bar["front"]["main"]["search"]->href = get_search_link();
|
617 |
+
|
618 |
// admin field
|
619 |
$Filter_bar['left']['main']['view-post_type'] = new stdClass;
|
620 |
$Filter_bar['left']['main']['view-post_type'] = (object) array( 'id' => 'view-post_type' , 'title' => '' , 'href' => '' , 'group' => '' , 'meta' => array() );
|
621 |
$Filter_bar['left']['main']['view-post_type']->title = sprintf( '%1$s [post_type]' , __( 'View' ) );
|
622 |
+
|
623 |
if( !empty( $this->ActivatedPlugin ) ) {
|
624 |
|
625 |
if( !empty( $this->ActivatedPlugin["post_edit_toolbar"] ) ) {
|
664 |
global $current_screen;
|
665 |
|
666 |
$capability = $this->get_plugin_cap();
|
667 |
+
|
668 |
if( !empty( $current_screen ) && $current_screen->id == 'dashboard' && current_user_can( $capability ) ) {
|
669 |
global $wp_meta_boxes;
|
670 |
|
671 |
$post_type = 'dashboard';
|
672 |
$Metaboxes = $wp_meta_boxes[$post_type];
|
673 |
+
|
674 |
$Update = array();
|
675 |
$Update["UPFN"] = $this->UPFN;
|
676 |
+
|
677 |
if( !empty( $Metaboxes ) ) {
|
678 |
foreach( $Metaboxes as $context => $meta_box ) {
|
679 |
foreach( $meta_box as $priority => $box ) {
|
699 |
global $current_screen;
|
700 |
|
701 |
$capability = $this->get_plugin_cap();
|
702 |
+
|
703 |
if( !empty( $current_screen ) && $current_screen->base == 'post' && current_user_can( $capability ) ) {
|
704 |
global $wp_meta_boxes;
|
705 |
+
|
706 |
$regist_meta_boxes = $this->get_data( "regist_metabox" );
|
707 |
+
|
708 |
$post_type = $current_screen->post_type;
|
709 |
$Metaboxes = $wp_meta_boxes[$post_type];
|
710 |
|
711 |
$regist_meta_boxes['UPFN'] = $this->UPFN;
|
712 |
+
|
713 |
if( empty( $regist_meta_boxes['metaboxes'][$post_type] ) or !empty( $_GET[$this->ltd . '_metabox_load'] ) ) {
|
714 |
+
|
715 |
$regist_meta_boxes['metaboxes'][$post_type] = array();
|
716 |
+
|
717 |
}
|
718 |
|
719 |
if( !empty( $Metaboxes ) ) {
|
720 |
+
|
721 |
foreach( $Metaboxes as $context => $meta_box ) {
|
722 |
+
|
723 |
foreach( $meta_box as $priority => $box ) {
|
724 |
|
725 |
if( is_array( $box ) ) {
|
726 |
+
|
727 |
foreach( $box as $metabox_id => $metabox_detail ) {
|
728 |
+
|
729 |
if( !empty( $metabox_detail ) ) {
|
730 |
|
731 |
$regist_meta_boxes['metaboxes'][$post_type][$context][$priority][$metabox_id] = strip_tags( $metabox_detail['title'] );
|
732 |
+
|
733 |
}
|
734 |
|
735 |
}
|
780 |
<input type="text" class="slugtext" value="" name="data[][slug]">
|
781 |
<?php else : ?>
|
782 |
<?php _e( 'Slug' ); ?>: <?php echo $menu_widget["slug"]; ?>
|
783 |
+
<input type="hidden" class="slugtext" value="<?php echo esc_attr( $menu_widget["slug"] ); ?>" name="data[][slug]">
|
784 |
<?php endif; ?>
|
785 |
</p>
|
786 |
+
<?php _e( 'User Roles' ); ?> :
|
787 |
<ul class="display_roles">
|
788 |
<?php foreach( $UserRoles as $role_name => $val ) : ?>
|
789 |
<?php $has_cap = false; ?>
|
796 |
<label>
|
797 |
<?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_attr( $menu_widget["title"] ); ?>" name="data[][title]">
|
798 |
</label>
|
799 |
+
<input type="hidden" class="parent_slugtext" value="<?php echo esc_attr( $menu_widget["parent_slug"] ); ?>" name="data[][parent_slug]">
|
800 |
</div>
|
801 |
|
802 |
<?php if( $menu_widget["slug"] != 'separator' ) : ?>
|
825 |
<div class="settings">
|
826 |
<p class="description">
|
827 |
<?php _e( 'Slug' ); ?>: <?php echo $sm["slug"]; ?>
|
828 |
+
<input type="hidden" class="slugtext" value="<?php echo esc_attr( $sm["slug"] ); ?>" name="data[][slug]">
|
829 |
</p>
|
830 |
+
<?php _e( 'User Roles' ); ?> :
|
831 |
<ul class="display_roles">
|
832 |
<?php foreach( $UserRoles as $role_name => $val ) : ?>
|
833 |
<?php $has_cap = false; ?>
|
840 |
<label>
|
841 |
<?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_attr( $sm["title"] ); ?>" name="data[][title]">
|
842 |
</label>
|
843 |
+
<input type="hidden" class="parent_slugtext" value="<?php echo esc_attr( $sm["parent_slug"] ); ?>" name="data[][parent_slug]">
|
844 |
</div>
|
845 |
<div class="widget-control-actions">
|
846 |
<div class="alignleft">
|
920 |
<div class="widget-inside">
|
921 |
<div class="settings">
|
922 |
<p class="field-url description">
|
923 |
+
<input type="hidden" class="idtext" value="<?php echo esc_attr( $menu_widget["id"] ); ?>" name="data[][id]" />
|
924 |
<?php if( strstr( $menu_widget["id"] , 'custom_node' ) && empty( $menu_widget["group"] ) ) : ?>
|
925 |
+
URL: <input type="text" class="regular-text linktext" value="<?php echo esc_attr( $menu_widget["href"] ); ?>" name="data[][href]" placeholder="http://" />
|
926 |
<?php else: ?>
|
927 |
<?php if( $menu_widget["id"] == 'edit-post_type' ) : ?>
|
928 |
<strong><?php _e( 'Show only on front end.' , 'wp-admin-ui-customize' ); ?></strong>
|
931 |
<?php elseif( $menu_widget["id"] == 'menu-toggle' ) : ?>
|
932 |
<strong><?php echo $menu_widget["id"]; ?></strong>
|
933 |
<?php else: ?>
|
934 |
+
<a href="<?php echo esc_url( $menu_widget["href"] ); ?>" target="_blank"><?php echo $menu_widget["id"]; ?></a>
|
935 |
<?php endif; ?>
|
936 |
+
<input type="hidden" class="linktext" value="<?php echo esc_attr( $menu_widget["href"] ); ?>" name="data[][href]" />
|
937 |
<?php endif; ?>
|
938 |
</p>
|
939 |
<p class="field-title description">
|
941 |
<?php if( !empty( $menu_widget["group"] ) ) : ?>
|
942 |
<input type="hidden" class="regular-text titletext" value="" name="data[][title]" />
|
943 |
<?php else : ?>
|
944 |
+
<?php _e( 'Title' ); ?> :
|
945 |
+
|
946 |
<?php $readonly_field = false; ?>
|
947 |
<?php if( in_array( $menu_widget["id"] , $no_submenu ) ) : ?>
|
948 |
<?php $readonly_field = true; ?>
|
1004 |
<?php if( !empty( $menu_widget["meta"]["target"] ) ) : ?>
|
1005 |
<?php $checked = checked( $menu_widget["meta"]["target"] , '_blank' , 0 ); ?>
|
1006 |
<?php endif; ?>
|
1007 |
+
<input type="checkbox" class="meta_target" value="_blank" name="data[][meta][target]" <?php echo esc_attr( $checked ); ?> />
|
1008 |
<?php _e( 'Open link in a new tab' ); ?>
|
1009 |
<?php endif; ?>
|
1010 |
</label>
|
1011 |
+
<input type="hidden" class="meta_class" value="<?php echo esc_attr( $menu_widget["meta"]["class"] ); ?>" name="data[][meta][class]" />
|
1012 |
</p>
|
1013 |
+
<input type="hidden" class="parent" value="<?php echo esc_attr( $menu_widget["parent"] ); ?>" name="data[][parent]" />
|
1014 |
+
<input type="hidden" class="group" value="<?php echo esc_attr( $menu_widget["group"] ); ?>" name="data[][group]" />
|
1015 |
<input type="hidden" class="node_type" value="" name="data[][node_type]" />
|
1016 |
</div>
|
1017 |
|
1018 |
<?php if( !in_array( $menu_widget["id"] , $no_submenu ) ) : ?>
|
1019 |
<div class="submenu">
|
1020 |
<p class="description"><?php _e( 'Sub Menus' , 'wp-admin-ui-customize' ); ?></p>
|
1021 |
+
|
1022 |
<?php if( empty( $new_widget ) && !empty( $node_type ) ) : ?>
|
1023 |
|
1024 |
<?php $subnode_type = ''; ?>
|
1062 |
function get_custom_posts() {
|
1063 |
$args = array( );
|
1064 |
$all_custom_posts = get_post_types( $args , 'objects' );
|
1065 |
+
|
1066 |
$exclusion = array( "post" , "page" , "attachment" , "revision" , "nav_menu_item");
|
1067 |
|
1068 |
/**
|
1081 |
}
|
1082 |
}
|
1083 |
}
|
1084 |
+
|
1085 |
return $custom_posts;
|
1086 |
}
|
1087 |
|
1088 |
// SetList
|
1089 |
function val_replace( $str ) {
|
1090 |
+
|
1091 |
if( !empty( $str ) ) {
|
1092 |
|
1093 |
$update_data = wp_get_update_data();
|
1151 |
$post_name = '';
|
1152 |
|
1153 |
if( is_admin() ) {
|
1154 |
+
|
1155 |
global $current_screen;
|
1156 |
global $typenow;
|
1157 |
global $tax;
|
1158 |
+
|
1159 |
if( $current_screen->base == 'edit' or $current_screen->base == 'post' && !empty( $typenow ) ) {
|
1160 |
+
|
1161 |
$post_type_object = get_post_type_object( $typenow );
|
1162 |
+
|
1163 |
if( !empty( $post_type_object->public ) ) {
|
1164 |
|
1165 |
$post_name = $post_type_object->labels->singular_name;
|
1166 |
+
|
1167 |
}
|
1168 |
+
|
1169 |
} elseif( $current_screen->base == 'edit-tags' && !empty( $tax ) ) {
|
1170 |
+
|
1171 |
if( !empty( $tax->public ) ) {
|
1172 |
|
1173 |
$post_name = $tax->labels->singular_name;
|
1174 |
+
|
1175 |
}
|
1176 |
+
|
1177 |
}
|
1178 |
+
|
1179 |
+
|
1180 |
} else {
|
1181 |
+
|
1182 |
$queried_object = get_queried_object();
|
1183 |
|
1184 |
if( !empty( $queried_object->post_type ) ) {
|
1185 |
+
|
1186 |
$post_type_object = get_post_type_object( $queried_object->post_type );
|
1187 |
|
1188 |
if( !empty( $post_type_object->public ) ) {
|
1189 |
|
1190 |
$post_name = $post_type_object->labels->singular_name;
|
1191 |
+
|
1192 |
}
|
1193 |
+
|
1194 |
} elseif( !empty( $queried_object->taxonomy ) ) {
|
1195 |
+
|
1196 |
$tax = get_taxonomy( $queried_object->taxonomy );
|
1197 |
|
1198 |
if( !empty( $tax->public ) ) {
|
1199 |
|
1200 |
$post_name = $tax->labels->singular_name;
|
1201 |
+
|
1202 |
}
|
1203 |
|
1204 |
}
|
1205 |
+
|
1206 |
}
|
1207 |
|
1208 |
$str = str_replace( '[post_type]' , $post_name , $str );
|
1217 |
$str = str_replace( '[site_url]' , $this->Schema . esc_attr( $current_site->domain . $current_site->path ) , $str );
|
1218 |
}
|
1219 |
}
|
1220 |
+
|
1221 |
if( !empty( $this->ActivatedPlugin ) ) {
|
1222 |
+
|
1223 |
$activated_plugins = $this->ActivatedPlugin;
|
1224 |
+
|
1225 |
if( !empty( $activated_plugins['woocommerce'] ) ) {
|
1226 |
+
|
1227 |
if( strstr( $str , '[woocommerce_order_process_count]') ) {
|
1228 |
+
|
1229 |
$woocommerce_order_process_count = '';
|
1230 |
if( function_exists( 'wc_processing_order_count' ) ) {
|
1231 |
+
|
1232 |
$order_count = intval( wc_processing_order_count() );
|
1233 |
if ( !empty( $order_count ) ) {
|
1234 |
$woocommerce_order_process_count = ' <span class="awaiting-mod update-plugins count-' . $order_count . '"><span class="processing-count">' . number_format_i18n( $order_count ) . '</span></span>';
|
1235 |
}
|
1236 |
}
|
1237 |
+
|
1238 |
$str = str_replace( '[woocommerce_order_process_count]' , $woocommerce_order_process_count , $str );
|
1239 |
}
|
1240 |
+
|
1241 |
}
|
1242 |
+
|
1243 |
}
|
1244 |
|
1245 |
/**
|
1286 |
function admin_bar_places() {
|
1287 |
return $Place_types = array( "left" => __( 'Left' ) , "right" => __( 'Right' ) , "front" => __( 'Frontend' , 'wp-admin-ui-customize' ) );
|
1288 |
}
|
1289 |
+
|
1290 |
// SetList
|
1291 |
function get_plugin_cap() {
|
1292 |
$capability = 'manage_options';
|
1293 |
+
|
1294 |
$Data = $this->get_data( 'plugin_cap' );
|
1295 |
if( !empty( $Data["edit_cap"] ) ) {
|
1296 |
$capability = $Data["edit_cap"];
|
1297 |
}
|
1298 |
+
|
1299 |
return $capability;
|
1300 |
}
|
1301 |
+
|
1302 |
// SetList
|
1303 |
function get_document_link( $document_type ) {
|
1304 |
+
|
1305 |
$link = $this->Site;
|
1306 |
$locale = get_locale();
|
1307 |
|
1312 |
} else {
|
1313 |
$link .= 'blog/';
|
1314 |
}
|
1315 |
+
|
1316 |
if( $document_type == 'admin_bar' ) {
|
1317 |
$link .= 'admin-bar-toolbar-settings/';
|
1318 |
}
|
1319 |
+
|
1320 |
}
|
1321 |
+
|
1322 |
echo $link;
|
1323 |
|
1324 |
}
|
1330 |
function dataUpdate() {
|
1331 |
|
1332 |
$RecordField = false;
|
1333 |
+
|
1334 |
if( !empty( $_POST[$this->Nonces["field"]] ) ) {
|
1335 |
|
1336 |
if( !empty( $_POST["record_field"] ) ) {
|
1362 |
} elseif( $RecordField == 'plugin_cap' ) {
|
1363 |
$this->update_plugincap();
|
1364 |
}
|
1365 |
+
|
1366 |
}
|
1367 |
|
1368 |
+
|
1369 |
if( !empty( $RecordField ) && !empty( $_POST["reset"] ) ) {
|
1370 |
|
1371 |
if( $RecordField == 'manage_metabox' ) {
|
1373 |
} elseif( $RecordField == 'dashboard' ) {
|
1374 |
delete_option( $this->Record["regist_dashboard_metabox"] );
|
1375 |
}
|
1376 |
+
|
1377 |
if( $RecordField == 'all_settings' ) {
|
1378 |
$this->update_reset_all();
|
1379 |
} else {
|
1380 |
$this->update_reset( $RecordField );
|
1381 |
}
|
1382 |
}
|
1383 |
+
|
1384 |
}
|
1385 |
|
1386 |
}
|
1414 |
function update_reset_all() {
|
1415 |
$Update = $this->update_validate();
|
1416 |
if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
|
1417 |
+
|
1418 |
foreach( $this->Record as $key => $record ) {
|
1419 |
delete_option( $record );
|
1420 |
}
|
1750 |
}
|
1751 |
|
1752 |
}
|
1753 |
+
|
1754 |
// FilterStart
|
1755 |
function admin_init() {
|
1756 |
|
1800 |
add_action( 'wp_loaded' , array( $this , 'notice_dismiss' ) , 2 );
|
1801 |
|
1802 |
$GetData = $this->get_flit_data( 'site' );
|
1803 |
+
|
1804 |
if( !empty( $GetData["admin_bar"] ) ) {
|
1805 |
if( $GetData["admin_bar"] == "hide" ) {
|
1806 |
add_filter( 'show_admin_bar' , '__return_false' );
|
1816 |
// FilterStart
|
1817 |
function remove_action_front() {
|
1818 |
$GetData = get_option( $this->Record['site'] );
|
1819 |
+
|
1820 |
if( !empty( $GetData["UPFN"] ) ) {
|
1821 |
unset( $GetData["UPFN"] );
|
1822 |
foreach($GetData as $key => $val) {
|
1909 |
// FilterStart
|
1910 |
function admin_bar_menu() {
|
1911 |
global $wp_admin_bar;
|
1912 |
+
|
1913 |
if( empty( $wp_admin_bar ) ) {
|
1914 |
+
|
1915 |
return false;
|
1916 |
+
|
1917 |
}
|
1918 |
+
|
1919 |
$GetData = $this->get_flit_data( 'admin_bar_menu' );
|
1920 |
+
|
1921 |
if( !empty( $GetData["UPFN"] ) ) {
|
1922 |
unset( $GetData["UPFN"] );
|
1923 |
if( is_array( $GetData ) ) {
|
1937 |
$update_data = wp_get_update_data();
|
1938 |
$activated_plugin = $this->ActivatedPlugin;
|
1939 |
$other_plugin = $this->OtherPluginMenu;
|
1940 |
+
|
1941 |
// all nodes adjustment
|
1942 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
1943 |
foreach($allnodes as $node_type => $nodes) {
|
1944 |
foreach($nodes as $key => $node) {
|
1945 |
+
|
1946 |
if( strstr( $node["id"] , 'custom_node' ) ) {
|
1947 |
if( !empty( $node["group"] ) ) {
|
1948 |
$node["meta"]["class"] = 'ab-sub-secondary';
|
1950 |
$node["href"] = $this->val_replace( $node["href"] );
|
1951 |
}
|
1952 |
} elseif( $node["id"] == 'view-post_type' ) {
|
1953 |
+
|
1954 |
if( is_admin() ) {
|
1955 |
+
|
1956 |
if( !empty( $All_Nodes['preview'] ) ) {
|
1957 |
|
1958 |
$node["href"] = $All_Nodes['preview']->href;
|
1959 |
$node["meta"] = $All_Nodes['preview']->meta;
|
1960 |
+
|
1961 |
} elseif( !empty( $All_Nodes['view'] ) ) {
|
1962 |
+
|
1963 |
$node["href"] = $All_Nodes['view']->href;
|
1964 |
$node["meta"] = $All_Nodes['view']->meta;
|
1965 |
+
|
1966 |
} else {
|
1967 |
+
|
1968 |
unset( $SettingNodes[$Boxtype][$node_type][$key] );
|
1969 |
continue;
|
1970 |
+
|
1971 |
}
|
1972 |
|
1973 |
} else {
|
1974 |
+
|
1975 |
unset( $SettingNodes[$Boxtype][$node_type][$key] );
|
1976 |
continue;
|
1977 |
+
|
1978 |
}
|
1979 |
|
1980 |
} elseif( $node["id"] == 'edit-post_type' ) {
|
2070 |
}
|
2071 |
}
|
2072 |
}
|
2073 |
+
|
2074 |
// other plugin nodes
|
2075 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
2076 |
foreach($allnodes as $node_type => $nodes) {
|
2249 |
if( !empty( $site_transient_update_core ) && !empty( $site_transient_update_core->updates[0] ) && !empty( $site_transient_update_core->updates[0]->response ) ) {
|
2250 |
$site_transient_update_core->updates[0]->response = 'latest';
|
2251 |
}
|
2252 |
+
|
2253 |
return $site_transient_update_core;
|
2254 |
}
|
2255 |
|
2258 |
if( isset( $site_transient_update_plugins->response ) ) {
|
2259 |
unset( $site_transient_update_plugins->response );
|
2260 |
}
|
2261 |
+
|
2262 |
return $site_transient_update_plugins;
|
2263 |
}
|
2264 |
|
2267 |
if( isset( $site_transient_update_themes->response ) ) {
|
2268 |
unset( $site_transient_update_themes->response );
|
2269 |
}
|
2270 |
+
|
2271 |
return $site_transient_update_themes;
|
2272 |
}
|
2273 |
|
2284 |
$screen->remove_help_tabs();
|
2285 |
}
|
2286 |
}
|
2287 |
+
|
2288 |
if( !empty( $GetData["screen_option_tab"] ) ) {
|
2289 |
add_filter( 'screen_options_show_screen' , '__return_false' );
|
2290 |
}
|
2319 |
|
2320 |
wp_enqueue_style( $this->PageSlug . '-custom' , strip_tags( $css ) , array() , $this->Ver );
|
2321 |
}
|
2322 |
+
|
2323 |
}
|
2324 |
}
|
2325 |
|
2326 |
// FilterStart
|
2327 |
function wp_dashboard_setup() {
|
2328 |
global $wp_meta_boxes;
|
2329 |
+
|
2330 |
if( empty( $wp_meta_boxes ) ) {
|
2331 |
+
|
2332 |
return false;
|
2333 |
+
|
2334 |
}
|
2335 |
|
2336 |
$Data = $this->get_flit_data( 'dashboard' );
|
2368 |
// FilterStart
|
2369 |
function manage_metabox() {
|
2370 |
global $wp_meta_boxes, $current_screen, $post_type;
|
2371 |
+
|
2372 |
if( empty( $current_screen ) or empty( $wp_meta_boxes ) or empty( $post_type ) ) {
|
2373 |
+
|
2374 |
return false;
|
2375 |
+
|
2376 |
}
|
2377 |
|
2378 |
$GetData = $this->get_flit_data( 'manage_metabox' );
|
2379 |
+
|
2380 |
if( !empty( $GetData["UPFN"] ) ) {
|
2381 |
unset( $GetData["UPFN"] );
|
2382 |
|
2388 |
|
2389 |
$Metaboxes = $wp_meta_boxes[$post_type];
|
2390 |
$Data = $GetData[$post_type];
|
2391 |
+
|
2392 |
$Remove_metaboxes = array();
|
2393 |
foreach( $Metaboxes as $context => $meta_box ) {
|
2394 |
foreach( $meta_box as $priority => $box ) {
|
2438 |
function sidemenu() {
|
2439 |
global $menu;
|
2440 |
global $submenu;
|
2441 |
+
|
2442 |
if( empty( $menu ) ) {
|
2443 |
+
|
2444 |
return false;
|
2445 |
+
|
2446 |
}
|
2447 |
|
2448 |
$GetData = $this->get_flit_data( 'sidemenu' );
|
2449 |
$General = $this->get_flit_data( 'admin_general' );
|
2450 |
+
|
2451 |
if( !empty( $GetData["UPFN"] ) ) {
|
2452 |
unset( $GetData["UPFN"] );
|
2453 |
|
2454 |
if( !empty( $GetData ) && is_array( $GetData ) && !empty( $GetData["main"] ) ) {
|
2455 |
$SetMain_menu = array();
|
2456 |
$SetMain_submenu = array();
|
2457 |
+
|
2458 |
$separator_menu = array( 0 => "" , 1 => 'read' , 2 => 'separator1' , 3 => "" , 4 => 'wp-menu-separator' );
|
2459 |
$customize_url = esc_url( add_query_arg( 'return', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'customize.php' ) );
|
2460 |
+
|
2461 |
if( !empty( $GetData["main"] ) ) {
|
2462 |
+
|
2463 |
foreach( $GetData["main"] as $mm_pos => $mm ) {
|
2464 |
+
|
2465 |
if( $mm["slug"] == 'customize.php' ) {
|
2466 |
+
|
2467 |
$GetData["main"][$mm_pos]["slug"] = $customize_url;
|
2468 |
+
|
2469 |
} elseif( strstr( $mm["slug"] , 'customize.php?autofocus') ) {
|
2470 |
|
2471 |
$controll = str_replace( 'customize.php?autofocus%5Bcontrol%5D=' , '' , $mm["slug"] );
|
2472 |
+
|
2473 |
if( !empty( $controll ) )
|
2474 |
$GetData["main"][$mm_pos]["slug"] = esc_url( add_query_arg( 'autofocus[control]' , $controll , $customize_url ) );
|
2475 |
|
2487 |
if( strstr( $mm["title"] , '[update_themes]') ) {
|
2488 |
$GetData["main"][$mm_pos]["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $mm["title"] );
|
2489 |
}
|
2490 |
+
|
2491 |
}
|
2492 |
+
|
2493 |
}
|
2494 |
|
2495 |
if( !empty( $GetData["sub"] ) ) {
|
2496 |
+
|
2497 |
foreach( $GetData["sub"] as $sm_pos => $sm ) {
|
2498 |
+
|
2499 |
if( $sm["slug"] == 'customize.php' ) {
|
2500 |
+
|
2501 |
$GetData["sub"][$sm_pos]["slug"] = $customize_url;
|
2502 |
+
|
2503 |
} elseif( strstr( $sm["slug"] , 'customize.php?autofocus%5Bcontrol%5D=') ) {
|
2504 |
|
2505 |
$controll = str_replace( 'customize.php?autofocus%5Bcontrol%5D=' , '' , $sm["slug"] );
|
2506 |
+
|
2507 |
if( !empty( $controll ) )
|
2508 |
$GetData["sub"][$sm_pos]["slug"] = esc_url( add_query_arg( 'autofocus[control]' , $controll , $customize_url ) );
|
2509 |
|
2521 |
if( strstr( $sm["title"] , '[update_themes]') ) {
|
2522 |
$GetData["sub"][$sm_pos]["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $sm["title"] );
|
2523 |
}
|
2524 |
+
|
2525 |
}
|
2526 |
+
|
2527 |
}
|
2528 |
+
|
2529 |
foreach($GetData["main"] as $mm_pos => $mm) {
|
2530 |
if($mm["slug"] == 'separator') {
|
2531 |
$SetMain_menu[] = $separator_menu;
|
2590 |
}
|
2591 |
|
2592 |
$menu = $SetMain_menu;
|
2593 |
+
|
2594 |
foreach( $SetMain_submenu as $slug => $menu_set ) {
|
2595 |
+
|
2596 |
foreach( $menu_set as $key => $sm ) {
|
2597 |
+
|
2598 |
if( !empty( $SetMain_submenu[$slug][$key][4] ) && strstr( $SetMain_submenu[$slug][$key][4] , 'menu-top' ) ) {
|
2599 |
$SetMain_submenu[$slug][$key][4] = str_replace( 'menu-top' , '' , $SetMain_submenu[$slug][$key][4] );
|
2600 |
}
|
2601 |
+
|
2602 |
}
|
2603 |
+
|
2604 |
}
|
2605 |
$submenu = $SetMain_submenu;
|
2606 |
|
2625 |
$menu = array();
|
2626 |
}
|
2627 |
}
|
2628 |
+
|
2629 |
}
|
2630 |
|
2631 |
// FilterStart
|
2645 |
}
|
2646 |
}
|
2647 |
}
|
2648 |
+
|
2649 |
return $permalink_html;
|
2650 |
}
|
2651 |
|
2652 |
// FilterStart
|
2653 |
function allow_comments() {
|
2654 |
global $current_screen;
|
2655 |
+
|
2656 |
$PostAddEdit = $this->get_flit_data( 'post_add_edit' );
|
2657 |
$RemoveMetaBox = $this->get_flit_data( 'manage_metabox' );
|
2658 |
+
|
2659 |
if( !empty( $PostAddEdit["UPFN"] ) && !empty( $RemoveMetaBox["UPFN"] ) ) {
|
2660 |
if( $current_screen->action == 'add' ) {
|
2661 |
if( !empty( $RemoveMetaBox[$current_screen->id]["commentstatusdiv"] ) && !empty( $PostAddEdit["allow_comments"] ) ) {
|
2666 |
}
|
2667 |
}
|
2668 |
}
|
2669 |
+
|
2670 |
}
|
2671 |
|
2672 |
}
|
2684 |
}
|
2685 |
}
|
2686 |
}
|
2687 |
+
|
2688 |
return $title;
|
2689 |
}
|
2690 |
|
2693 |
$GetData = $this->get_flit_data( 'appearance_menus' );
|
2694 |
if( !empty( $GetData["UPFN"] ) ) {
|
2695 |
unset( $GetData["UPFN"] );
|
2696 |
+
|
2697 |
$nav_menus = wp_get_nav_menus();
|
2698 |
|
2699 |
if( !empty( $GetData["add_new_menu"] ) ) {
|
2701 |
if( count( $nav_menus ) > 1 ) {
|
2702 |
|
2703 |
echo '<style>.wrap > .manage-menus .add-new-menu-action, .locations-row-links .locations-add-menu-link { display: none; }</style>';
|
2704 |
+
|
2705 |
} else {
|
2706 |
+
|
2707 |
echo '<style>.wrap > .manage-menus, .locations-row-links .locations-add-menu-link { display: none; }</style>';
|
2708 |
|
2709 |
}
|
2748 |
$wauc = new WP_Admin_UI_Customize();
|
2749 |
|
2750 |
endif;
|
|