WP Admin UI Customize - Version 1.3.9

Version Description

  • Added: Remove metaboxes on Custom post types.
  • Change mechanism : Registration method of metabox.
Download this release

Release Info

Developer gqevu6bsiz
Plugin Icon wp plugin WP Admin UI Customize
Version 1.3.9
Comparing to
See all releases

Code changes from version 1.3.8.2 to 1.3.9

inc/list_variables.php CHANGED
@@ -1,102 +1,102 @@
1
- <?php
2
- $update_data = wp_get_update_data();
3
- $awaiting_mod = wp_count_comments();
4
- $awaiting_mod = $awaiting_mod->moderated;
5
- $current_user = wp_get_current_user();
6
- if( is_multisite() ) {
7
- $current_site = get_current_site();
8
- }
9
- ?>
10
-
11
- <div id="list_variables">
12
- <div class="list_variables_wrap">
13
-
14
- <table class="widefat fixed">
15
- <thead>
16
- <tr>
17
- <th><?php _e( 'Shortcodes' , $this->ltd ); ?></th>
18
- <th><?php _e( 'Value' ); ?></th>
19
- </tr>
20
- </thead>
21
- <tbody>
22
- <?php if( is_multisite() ) : ?>
23
- <tr>
24
- <th><strong>[site_name]</strong></th>
25
- <td>
26
- <code><?php echo esc_attr( $current_site->site_name ); ?></code>
27
- </td>
28
- </tr>
29
- <tr>
30
- <th><strong>[site_url]</strong></th>
31
- <td>
32
- <?php $protocol = is_ssl() ? 'https://' : 'http://'; ?>
33
- <code><?php echo $protocol . esc_attr( $current_site->domain );?></code>
34
- </td>
35
- </tr>
36
- <?php endif; ?>
37
- <tr>
38
- <th><strong>[blog_name]</strong></th>
39
- <td>
40
- <code><?php echo get_bloginfo( 'name' ); ?></code>
41
- <?php if( is_multisite() ) : ?>
42
- <span class="description"><?php _e( 'Blog name of logged in.' , $this->ltd ); ?></span>
43
- <?php endif; ?>
44
- </td>
45
- </tr>
46
- <tr>
47
- <th><strong>[blog_url]</strong></th>
48
- <td>
49
- <code><?php echo get_bloginfo( 'url' ); ?></code>
50
- <?php if( is_multisite() ) : ?>
51
- <span class="description"><?php _e( 'Blog URL of logged in.' , $this->ltd ); ?></span>
52
- <?php endif; ?>
53
- </td>
54
- </tr>
55
- <tr>
56
- <th><strong>[template_directory_uri]</strong></th>
57
- <td>
58
- <code><?php echo get_bloginfo( 'template_directory' ); ?></code>
59
- </td>
60
- </tr>
61
- <tr>
62
- <th><strong>[stylesheet_directory_uri]</strong></th>
63
- <td>
64
- <code><?php echo get_stylesheet_directory_uri(); ?></code>
65
- </td>
66
- </tr>
67
- <tr>
68
- <th><strong>[update_total]</strong></th>
69
- <td>
70
- <code>&lt;span class=&quot;update-plugins count-<?php echo $update_data["counts"]["total"]; ?>&quot;&gt;&lt;span class=&quot;update-count&quot;&gt;<strong><?php echo number_format_i18n( $update_data["counts"]["total"] ); ?></strong>&lt;/span&gt;&lt;/span&gt;</code>
71
- </td>
72
- </tr>
73
- <tr>
74
- <th><strong>[update_plugins]</strong></th>
75
- <td>
76
- <code>&lt;span class=&quot;update-plugins count-<?php echo $update_data["counts"]["plugins"]; ?>&quot;&gt;&lt;span class=&quot;plugin-count&quot;&gt;<strong><?php echo number_format_i18n( $update_data["counts"]["plugins"] ); ?></strong>&lt;/span&gt;&lt;/span&gt;</code>
77
- </td>
78
- </tr>
79
- <tr>
80
- <th><strong>[update_themes]</strong></th>
81
- <td>
82
- <code>&lt;span class=&quot;update-plugins count-<?php echo $update_data["counts"]["themes"]; ?>&quot;&gt;&lt;span class=&quot;theme-count&quot;&gt;<strong><?php echo number_format_i18n( $update_data["counts"]["themes"] ); ?></strong>&lt;/span&gt;&lt;/span&gt;</code>
83
- </td>
84
- </tr>
85
- <tr>
86
- <th><strong>[comment_count]</strong></th>
87
- <td>
88
- <code>&lt;span class=&quot;awaiting-mod count-<?php echo $awaiting_mod; ?>&quot;&gt;&lt;span class=&quot;pending-count&quot;&gt;<strong><?php echo number_format_i18n( $awaiting_mod ); ?></strong>&lt;/span&gt;&lt;/span&gt;</code>
89
- </td>
90
- </tr>
91
- <tr>
92
- <th><strong>[user_name]</strong></th>
93
- <td>
94
- <code><?php echo $current_user->display_name; ?></code>
95
- <span class="description"><?php _e( 'In your case.' , $this->ltd ); ?></span>
96
- </td>
97
- </tr>
98
- </tbody>
99
- </table>
100
-
101
- </div>
102
  </div>
1
+ <?php
2
+ $update_data = wp_get_update_data();
3
+ $awaiting_mod = wp_count_comments();
4
+ $awaiting_mod = $awaiting_mod->moderated;
5
+ $current_user = wp_get_current_user();
6
+ if( is_multisite() ) {
7
+ $current_site = get_current_site();
8
+ }
9
+ ?>
10
+
11
+ <div id="list_variables">
12
+ <div class="list_variables_wrap">
13
+
14
+ <table class="widefat fixed">
15
+ <thead>
16
+ <tr>
17
+ <th><?php _e( 'Shortcodes' , $this->ltd ); ?></th>
18
+ <th><?php _e( 'Value' ); ?></th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <?php if( is_multisite() ) : ?>
23
+ <tr>
24
+ <th><strong>[site_name]</strong></th>
25
+ <td>
26
+ <code><?php echo esc_attr( $current_site->site_name ); ?></code>
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <th><strong>[site_url]</strong></th>
31
+ <td>
32
+ <?php $protocol = is_ssl() ? 'https://' : 'http://'; ?>
33
+ <code><?php echo $protocol . esc_attr( $current_site->domain );?></code>
34
+ </td>
35
+ </tr>
36
+ <?php endif; ?>
37
+ <tr>
38
+ <th><strong>[blog_name]</strong></th>
39
+ <td>
40
+ <code><?php echo get_bloginfo( 'name' ); ?></code>
41
+ <?php if( is_multisite() ) : ?>
42
+ <span class="description"><?php _e( 'Blog name of logged in.' , $this->ltd ); ?></span>
43
+ <?php endif; ?>
44
+ </td>
45
+ </tr>
46
+ <tr>
47
+ <th><strong>[blog_url]</strong></th>
48
+ <td>
49
+ <code><?php echo get_bloginfo( 'url' ); ?></code>
50
+ <?php if( is_multisite() ) : ?>
51
+ <span class="description"><?php _e( 'Blog URL of logged in.' , $this->ltd ); ?></span>
52
+ <?php endif; ?>
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <th><strong>[template_directory_uri]</strong></th>
57
+ <td>
58
+ <code><?php echo get_bloginfo( 'template_directory' ); ?></code>
59
+ </td>
60
+ </tr>
61
+ <tr>
62
+ <th><strong>[stylesheet_directory_uri]</strong></th>
63
+ <td>
64
+ <code><?php echo get_stylesheet_directory_uri(); ?></code>
65
+ </td>
66
+ </tr>
67
+ <tr>
68
+ <th><strong>[update_total]</strong></th>
69
+ <td>
70
+ <code>&lt;span class=&quot;update-plugins count-<?php echo $update_data["counts"]["total"]; ?>&quot;&gt;&lt;span class=&quot;update-count&quot;&gt;<strong><?php echo number_format_i18n( $update_data["counts"]["total"] ); ?></strong>&lt;/span&gt;&lt;/span&gt;</code>
71
+ </td>
72
+ </tr>
73
+ <tr>
74
+ <th><strong>[update_plugins]</strong></th>
75
+ <td>
76
+ <code>&lt;span class=&quot;update-plugins count-<?php echo $update_data["counts"]["plugins"]; ?>&quot;&gt;&lt;span class=&quot;plugin-count&quot;&gt;<strong><?php echo number_format_i18n( $update_data["counts"]["plugins"] ); ?></strong>&lt;/span&gt;&lt;/span&gt;</code>
77
+ </td>
78
+ </tr>
79
+ <tr>
80
+ <th><strong>[update_themes]</strong></th>
81
+ <td>
82
+ <code>&lt;span class=&quot;update-plugins count-<?php echo $update_data["counts"]["themes"]; ?>&quot;&gt;&lt;span class=&quot;theme-count&quot;&gt;<strong><?php echo number_format_i18n( $update_data["counts"]["themes"] ); ?></strong>&lt;/span&gt;&lt;/span&gt;</code>
83
+ </td>
84
+ </tr>
85
+ <tr>
86
+ <th><strong>[comment_count]</strong></th>
87
+ <td>
88
+ <code>&lt;span class=&quot;awaiting-mod count-<?php echo $awaiting_mod; ?>&quot;&gt;&lt;span class=&quot;pending-count&quot;&gt;<strong><?php echo number_format_i18n( $awaiting_mod ); ?></strong>&lt;/span&gt;&lt;/span&gt;</code>
89
+ </td>
90
+ </tr>
91
+ <tr>
92
+ <th><strong>[user_name]</strong></th>
93
+ <td>
94
+ <code><?php echo $current_user->display_name; ?></code>
95
+ <span class="description"><?php _e( 'In your case.' , $this->ltd ); ?></span>
96
+ </td>
97
+ </tr>
98
+ </tbody>
99
+ </table>
100
+
101
+ </div>
102
  </div>
inc/reset_userrole.php CHANGED
@@ -1,40 +1,40 @@
1
- <?php
2
-
3
-
4
- $Data = $this->get_data( 'user_role' );
5
- $UserRoles = $this->get_user_role();
6
-
7
- // include js css
8
- $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
9
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
10
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
11
-
12
- ?>
13
- <div class="wrap">
14
- <div class="icon32" id="icon-tools"></div>
15
- <?php echo $this->Msg; ?>
16
- <h2><?php _e( 'Reset User Roles' , $this->ltd ); ?></h2>
17
- <p>&nbsp;</p>
18
-
19
- <form id="wauc_reset_userrole" class="wauc_form" method="post" action="">
20
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
21
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
22
-
23
- <h3><?php _e( 'Applied user roles' , $this->ltd ); ?></h3>
24
- <ul>
25
- <?php foreach( $Data as $key => $val ) : ?>
26
- <?php if( !empty( $UserRoles[$key] ) ): ?>
27
- <li><?php echo $UserRoles[$key]["label"]; ?></li>
28
- <?php endif; ?>
29
- <?php endforeach; ?>
30
- </ul>
31
- <br />
32
-
33
- <p><?php _e( 'You want to reset the user roles?' , $this->ltd ); ?></p>
34
- <p class="submit">
35
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
36
- </p>
37
-
38
- </form>
39
-
40
- </div>
1
+ <?php
2
+
3
+
4
+ $Data = $this->get_data( 'user_role' );
5
+ $UserRoles = $this->get_user_role();
6
+
7
+ // include js css
8
+ $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
9
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
10
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
11
+
12
+ ?>
13
+ <div class="wrap">
14
+ <div class="icon32" id="icon-tools"></div>
15
+ <?php echo $this->Msg; ?>
16
+ <h2><?php _e( 'Reset User Roles' , $this->ltd ); ?></h2>
17
+ <p>&nbsp;</p>
18
+
19
+ <form id="wauc_reset_userrole" class="wauc_form" method="post" action="">
20
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
21
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
22
+
23
+ <h3><?php _e( 'Applied user roles' , $this->ltd ); ?></h3>
24
+ <ul>
25
+ <?php foreach( $Data as $key => $val ) : ?>
26
+ <?php if( !empty( $UserRoles[$key] ) ): ?>
27
+ <li><?php echo $UserRoles[$key]["label"]; ?></li>
28
+ <?php endif; ?>
29
+ <?php endforeach; ?>
30
+ </ul>
31
+ <br />
32
+
33
+ <p><?php _e( 'You want to reset the user roles?' , $this->ltd ); ?></p>
34
+ <p class="submit">
35
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
36
+ </p>
37
+
38
+ </form>
39
+
40
+ </div>
inc/setting_admin_bar_menu.php CHANGED
@@ -1,414 +1,414 @@
1
- <?php
2
-
3
- if( !empty( $_POST["update"] ) ) {
4
- $this->update_admin_bar_menu();
5
- } elseif( !empty( $_POST["reset"] ) ) {
6
- $this->update_reset( 'admin_bar_menu' );
7
- }
8
-
9
- $Data = $this->get_data( 'admin_bar_menu' );
10
- $AllDefaultNodes = $this->admin_bar_filter_load();
11
-
12
- // include js css
13
- $ReadedJs = array( 'jquery' , 'jquery-ui-draggable' , 'jquery-ui-droppable' , 'jquery-ui-sortable' , 'thickbox' );
14
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
15
- wp_enqueue_style('thickbox');
16
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
17
-
18
- ?>
19
-
20
- <div class="wrap">
21
- <div class="icon32" id="icon-tools"></div>
22
- <?php echo $this->Msg; ?>
23
- <h2><?php _e( 'Admin Bar Menu' , $this->ltd ); ?></h2>
24
- <p><?php _e( 'Please change the menu by drag and drop.' , $this->ltd ); ?></p>
25
- <p><strong><?php _e( 'Notice: Please do not place the same multiple menu slug.' , $this->ltd ); ?></strong></p>
26
- <p class="description"><?php _e( 'Can be more than one custom menu.' , $this->ltd ); ?></p>
27
-
28
- <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
29
-
30
- <p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a></p>
31
-
32
- <form id="wauc_setting_admin_bar_menu" class="wauc_form" method="post" action="">
33
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
34
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
35
-
36
- <div id="poststuff">
37
-
38
- <div id="post-body" class="metabox-holder columns-2">
39
-
40
- <div id="postbox-container-1" class="postbox-container">
41
- <div id="right_menus">
42
- <div class="postbox">
43
- <div class="handlediv" title="Click to toggle"><br></div>
44
- <h3 class="hndle"><span><?php _e( 'Right' ); ?><?php _e( 'Menus' ); ?></span></h3>
45
- <div class="inside">
46
-
47
- <?php if( empty( $Data ) ) : ?>
48
-
49
- <?php foreach( $AllDefaultNodes["right"]["main"] as $main_node) : ?>
50
-
51
- <?php $pnsn = array(); ?>
52
- <?php if( !empty( $AllDefaultNodes["right"]["sub"] ) ) : ?>
53
-
54
- <?php foreach( $AllDefaultNodes["right"]["sub"] as $sub_node) : ?>
55
-
56
- <?php if( $main_node->id == $sub_node->parent ) : ?>
57
-
58
- <?php $pnsn[] = array( 'id' => $sub_node->id , 'title' => stripslashes( $sub_node->title ) , 'parent' => $main_node->id , 'href' => $sub_node->href , 'group' => false , 'meta' => $sub_node->meta , 'new' => false ); ?>
59
-
60
- <?php endif; ?>
61
-
62
- <?php endforeach; ?>
63
-
64
- <?php endif; ?>
65
-
66
- <?php $menu_widget = array( 'id' => $main_node->id , 'title' => stripslashes( $main_node->title ) , 'parent' => '' , 'href' => $main_node->href , 'group' => false , 'meta' => $main_node->meta , 'new' => false , 'subnode' => $pnsn ); ?>
67
- <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
68
-
69
- <?php endforeach; ?>
70
-
71
- <?php else : ?>
72
-
73
- <?php if( !empty( $Data["right"]["main"] ) ) : ?>
74
-
75
- <?php foreach( $Data["right"]["main"] as $main_node) : ?>
76
-
77
- <?php $pnsn = array(); ?>
78
- <?php if( !empty( $Data["right"]["sub"] ) ) : ?>
79
-
80
- <?php foreach( $Data["right"]["sub"] as $sub_node) : ?>
81
-
82
- <?php if( $main_node["id"] == $sub_node["parent"] ) : ?>
83
-
84
- <?php if( empty( $sub_node["meta"] ) ) : ?>
85
- <?php $sub_node["meta"] = array(); ?>
86
- <?php endif; ?>
87
-
88
- <?php $pnsn[] = array( 'id' => $sub_node["id"] , 'title' => stripslashes( $sub_node["title"] ) , 'parent' => $main_node["id"] , 'href' => $sub_node["href"] , 'group' => false , 'meta' => $sub_node["meta"] , 'new' => false ); ?>
89
-
90
- <?php endif; ?>
91
-
92
- <?php endforeach; ?>
93
-
94
- <?php endif; ?>
95
-
96
- <?php if( empty( $main_node["meta"] ) ) : ?>
97
- <?php $main_node["meta"] = array(); ?>
98
- <?php endif; ?>
99
-
100
- <?php $menu_widget = array( 'id' => $main_node["id"] , 'title' => stripslashes( $main_node["title"] ) , 'parent' => '' , 'href' => $main_node["href"] , 'group' => false , 'meta' => $main_node["meta"] , 'new' => false , 'subnode' => $pnsn ); ?>
101
- <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
102
-
103
- <?php endforeach; ?>
104
-
105
- <?php endif; ?>
106
-
107
- <?php endif; ?>
108
-
109
- </div>
110
- </div>
111
- </div>
112
- </div>
113
-
114
- <div id="postbox-container-2" class="postbox-container">
115
- <div id="left_menus">
116
- <div class="postbox">
117
- <div class="handlediv" title="Click to toggle"><br></div>
118
- <h3 class="hndle"><span><?php _e( 'Left' ); ?><?php _e( 'Menus' ); ?></span></h3>
119
- <div class="inside">
120
- <?php if( empty( $Data ) ) : ?>
121
-
122
- <?php foreach( $AllDefaultNodes["left"]["main"] as $main_node) : ?>
123
-
124
- <?php $pnsn = array(); ?>
125
- <?php if( !empty( $AllDefaultNodes["left"]["sub"] ) ) : ?>
126
-
127
- <?php foreach( $AllDefaultNodes["left"]["sub"] as $sub_node) : ?>
128
-
129
- <?php if( $main_node->id == $sub_node->parent ) : ?>
130
-
131
- <?php $pnsn[] = array( 'id' => $sub_node->id , 'title' => stripslashes( $sub_node->title ) , 'parent' => $main_node->id , 'href' => $sub_node->href , 'group' => false , 'meta' => $sub_node->meta , 'new' => false ); ?>
132
-
133
- <?php endif; ?>
134
-
135
- <?php endforeach; ?>
136
-
137
- <?php endif; ?>
138
-
139
- <?php $menu_widget = array( 'id' => $main_node->id , 'title' => stripslashes( $main_node->title ) , 'parent' => '' , 'href' => $main_node->href , 'group' => false , 'meta' => $main_node->meta , 'new' => false , 'subnode' => $pnsn ); ?>
140
- <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
141
-
142
- <?php endforeach; ?>
143
-
144
- <?php else : ?>
145
-
146
- <?php if( !empty( $Data["left"]["main"] ) ) : ?>
147
-
148
- <?php foreach( $Data["left"]["main"] as $main_node) : ?>
149
-
150
- <?php $pnsn = array(); ?>
151
- <?php if( !empty( $Data["left"]["sub"] ) ) : ?>
152
-
153
- <?php foreach( $Data["left"]["sub"] as $sub_node) : ?>
154
-
155
- <?php if( $main_node["id"] == $sub_node["parent"] ) : ?>
156
-
157
- <?php if( empty( $sub_node["meta"] ) ) : ?>
158
- <?php $sub_node["meta"] = array(); ?>
159
- <?php endif; ?>
160
-
161
- <?php $pnsn[] = array( 'id' => $sub_node["id"] , 'title' => stripslashes( $sub_node["title"] ) , 'parent' => $main_node["id"] , 'href' => $sub_node["href"] , 'group' => false , 'meta' => $sub_node["meta"] , 'new' => false ); ?>
162
-
163
- <?php endif; ?>
164
-
165
- <?php endforeach; ?>
166
-
167
- <?php endif; ?>
168
-
169
- <?php if( empty( $main_node["meta"] ) ) : ?>
170
- <?php $main_node["meta"] = array(); ?>
171
- <?php endif; ?>
172
-
173
- <?php $menu_widget = array( 'id' => $main_node["id"] , 'title' => stripslashes( $main_node["title"] ) , 'parent' => '' , 'href' => $main_node["href"] , 'group' => false , 'meta' => $main_node["meta"] , 'new' => false , 'subnode' => $pnsn ); ?>
174
- <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
175
-
176
- <?php endforeach; ?>
177
-
178
- <?php endif; ?>
179
-
180
- <?php endif; ?>
181
- </div>
182
- </div>
183
- </div>
184
- </div>
185
-
186
- <br class="clear">
187
-
188
- </div>
189
-
190
- </div>
191
-
192
- <div id="can_menus" class="metabox-holder columns-1">
193
-
194
- <div class="postbox">
195
- <h3 class="hndle"><span><?php _e ( 'Menu items that can be added' , $this->ltd ); ?></span></h3>
196
- <div class="inside">
197
-
198
- <h4><?php _e( 'Custom' ); ?> <?php _e( 'Menus' ); ?></h4>
199
- <?php $menu_widget = array( 'id' => "custom_node" , 'title' => "" , 'parent' => '' , 'href' => "" , 'group' => false , 'meta' => array() , 'new' => true , 'subnode' => false ); ?>
200
- <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
201
- <div class="clear"></div>
202
-
203
- <h4><?php _e( 'Left' ); ?> <?php _e( 'Menus' ); ?></h4>
204
-
205
- <?php foreach( $AllDefaultNodes["left"]["main"] as $node_id => $node ) : ?>
206
-
207
- <p class="description"><?php echo $node_id; ?></p>
208
- <?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'meta' => $node->meta , 'new' => true , 'subnode' => false ); ?>
209
- <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
210
-
211
- <?php foreach( $AllDefaultNodes["left"]["sub"] as $child_node_id => $child_node ) : ?>
212
-
213
- <?php if( $child_node->parent == $node_id ) : ?>
214
-
215
- <?php $menu_widget = array( 'id' => $child_node->id , 'title' => $child_node->title , 'parent' => '' , 'href' => $child_node->href , 'group' => false , 'meta' => $child_node->meta , 'new' => true , 'subnode' => false ); ?>
216
- <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
217
-
218
- <?php endif; ?>
219
-
220
- <?php endforeach; ?>
221
-
222
- <div class="clear"></div>
223
-
224
- <?php endforeach; ?>
225
-
226
- <div class="clear"></div>
227
-
228
- <h4><?php _e( 'Right' ); ?> <?php _e( 'Menus' ); ?></h4>
229
-
230
- <?php foreach( $AllDefaultNodes["right"]["main"] as $node_id => $node ) : ?>
231
-
232
- <p class="description"><?php echo $node_id; ?></p>
233
- <?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'new' => $node->meta , 'new' => true , 'subnode' => false ); ?>
234
- <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
235
-
236
- <?php foreach( $AllDefaultNodes["right"]["sub"] as $child_node_id => $child_node ) : ?>
237
-
238
- <?php if( $child_node->parent == $node_id ) : ?>
239
-
240
- <?php $menu_widget = array( 'id' => $child_node->id , 'title' => $child_node->title , 'parent' => '' , 'href' => $child_node->href , 'group' => false , 'new' => $child_node->meta , 'new' => true , 'subnode' => false ); ?>
241
- <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
242
-
243
- <?php endif; ?>
244
-
245
- <?php endforeach; ?>
246
-
247
- <div class="clear"></div>
248
-
249
- <?php endforeach; ?>
250
-
251
- <div class="clear"></div>
252
-
253
- </div>
254
- </div>
255
-
256
- </div>
257
-
258
- <p class="submit">
259
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
260
- </p>
261
-
262
- <p class="submit reset">
263
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
264
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
265
- </p>
266
-
267
- </form>
268
-
269
- </div>
270
-
271
- <?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
272
-
273
- <style>
274
- #wauc_setting_admin_bar_menu .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon,
275
- #wauc_setting_admin_bar_menu .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
276
- #wauc_setting_admin_bar_menu .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
277
- #wauc_setting_admin_bar_menu .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon
278
- { background-image: url(../wp-includes/images/admin-bar-sprite.png); }
279
- </style>
280
-
281
- <script type="text/javascript">
282
-
283
- var wauc_widget_each, wauc_menu_sortable;
284
-
285
- jQuery(document).ready(function($) {
286
-
287
- var $Form = $("#wauc_setting_admin_bar_menu");
288
- var $AddInside = $('#can_menus .postbox .inside', $Form);
289
- var $SettingInside = $('#poststuff #post-body .postbox-container .postbox .inside', $Form);
290
-
291
- $AddInside.children('.widget').draggable({
292
- connectToSortable: '#poststuff #post-body .postbox-container .postbox .inside',
293
- handle: '> .widget-top > .widget-title',
294
- distance: 2,
295
- helper: 'clone',
296
- zIndex: 5,
297
- containment: 'document',
298
- stop: function(e,ui) {
299
- wauc_widget_each();
300
- wauc_menu_sortable();
301
- }
302
- });
303
-
304
- $('.columns-1', $Form).droppable({
305
- tolerance: 'pointer',
306
- accept: function(o){
307
- return $(o).parent().parent().parent().parent().parent().parent().parent().attr('class') != 'columns-1';
308
- },
309
- drop: function(e,ui) {
310
- ui.draggable.addClass('deleting');
311
- },
312
- over: function(e,ui) {
313
- ui.draggable.addClass('deleting');
314
- $('div.widget-placeholder').hide();
315
- },
316
- out: function(e,ui) {
317
- ui.draggable.removeClass('deleting');
318
- $('div.widget-placeholder').show();
319
- }
320
- });
321
-
322
-
323
- var $AvailableAction = $('#poststuff #post-body .postbox-container .postbox .inside .widget .widget-top .widget-title-action a[href=#available]', $Form);
324
- $AvailableAction.live( 'click', function() {
325
- $(this).parent().parent().parent().children(".widget-inside").slideToggle();
326
- return false;
327
- });
328
-
329
- var $RemoveAction = $('#poststuff #post-body .postbox-container .postbox .inside .widget .widget-inside .widget-control-actions .alignleft a[href=#remove]', $Form);
330
- $RemoveAction.live( 'click', function() {
331
- $(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
332
- return false;
333
- });
334
-
335
- wauc_menu_sortable = function menu_sortable() {
336
-
337
- $('#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside, #wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget .widget-inside .submenu').sortable({
338
- placeholder: "widget-placeholder",
339
- items: '> .widget',
340
- connectWith: "#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside, #wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget .widget-inside .submenu",
341
- handle: '> .widget-top > .widget-title',
342
- cursor: 'move',
343
- distance: 2,
344
- containment: 'document',
345
- change: function(e,ui) {
346
- var $height = ui.helper.height();
347
- $('#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget-placeholder').height($height);
348
- },
349
- stop: function(e,ui) {
350
- if ( ui.item.hasClass('deleting') ) {
351
- ui.item.remove();
352
- }
353
- wauc_widget_each();
354
- },
355
- });
356
-
357
- }
358
- wauc_menu_sortable();
359
-
360
- wauc_widget_each = function widget_each() {
361
- var $Count = 0;
362
- $('#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget').each(function() {
363
- var $InputId = $(this).children(".widget-inside").children(".settings").children(".field-url").children(".idtext");
364
- var $InputLink = $(this).children(".widget-inside").children(".settings").children(".field-url").children(".linktext");
365
- var $InputTitle = $(this).children(".widget-inside").children(".settings").children(".field-title").children("label").children(".titletext");
366
- var $InputMetaTarget = $(this).children(".widget-inside").children(".settings").children(".field-meta").children("label").children(".meta_target");
367
- var $InputParentName = $(this).children(".widget-inside").children(".settings").children(".parent");
368
-
369
- var $BoxName = "";
370
- if( $(this).parent().hasClass("submenu") ) {
371
- $BoxName = $(this).parent().parent().parent().parent().parent().parent().attr("id");
372
- } else {
373
- $BoxName = $(this).parent().parent().parent().attr("id");
374
- }
375
-
376
- if( $BoxName ) {
377
- var $BarType = $BoxName.replace( '_menus' , '');
378
- }
379
-
380
- if( $(this).hasClass("custom_node") ) {
381
- var $CustomVal = $InputId.val();
382
- $InputId.val( $CustomVal + Math.ceil( Math.random() * 1000 ) );
383
- } else if( $(this).hasClass("newcustom_node") ) {
384
- var $CustomVal = $InputId.val();
385
- var $CustomClassName = $CustomVal + Math.ceil( Math.random() * 1000 );
386
- $InputId.val( $CustomClassName );
387
- $(this).removeClass("newcustom_node");
388
- $(this).addClass( $CustomClassName );
389
- }
390
-
391
- var $Name = 'data' + '[' + $BarType + ']['+$Count+']';
392
- $InputId.attr("name", $Name+'[id]');
393
- $InputLink.attr("name", $Name+'[href]');
394
- $InputTitle.attr("name", $Name+'[title]');
395
- $InputMetaTarget.attr("name", $Name+'[meta][target]');
396
- $InputParentName.attr("name", $Name+'[parent]');
397
-
398
- if ( $(this).parent().parent().parent().parent().hasClass("submenu") ) {
399
- // None three
400
- $(this).remove();
401
- } else if ( $(this).parent().hasClass("submenu") ) {
402
- var $ParentId = $(this).parent().parent().children(".settings").children(".description").children(".idtext").val();
403
- $InputParentName.val($ParentId);
404
- } else {
405
- $InputParentName.val('');
406
- }
407
-
408
- $Count++;
409
- });
410
- }
411
- wauc_widget_each();
412
-
413
- });
414
  </script>
1
+ <?php
2
+
3
+ if( !empty( $_POST["update"] ) ) {
4
+ $this->update_admin_bar_menu();
5
+ } elseif( !empty( $_POST["reset"] ) ) {
6
+ $this->update_reset( 'admin_bar_menu' );
7
+ }
8
+
9
+ $Data = $this->get_data( 'admin_bar_menu' );
10
+ $AllDefaultNodes = $this->admin_bar_filter_load();
11
+
12
+ // include js css
13
+ $ReadedJs = array( 'jquery' , 'jquery-ui-draggable' , 'jquery-ui-droppable' , 'jquery-ui-sortable' , 'thickbox' );
14
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
15
+ wp_enqueue_style('thickbox');
16
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
17
+
18
+ ?>
19
+
20
+ <div class="wrap">
21
+ <div class="icon32" id="icon-tools"></div>
22
+ <?php echo $this->Msg; ?>
23
+ <h2><?php _e( 'Admin Bar Menu' , $this->ltd ); ?></h2>
24
+ <p><?php _e( 'Please change the menu by drag and drop.' , $this->ltd ); ?></p>
25
+ <p><strong><?php _e( 'Notice: Please do not place the same multiple menu slug.' , $this->ltd ); ?></strong></p>
26
+ <p class="description"><?php _e( 'Can be more than one custom menu.' , $this->ltd ); ?></p>
27
+
28
+ <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
29
+
30
+ <p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a></p>
31
+
32
+ <form id="wauc_setting_admin_bar_menu" class="wauc_form" method="post" action="">
33
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
34
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
35
+
36
+ <div id="poststuff">
37
+
38
+ <div id="post-body" class="metabox-holder columns-2">
39
+
40
+ <div id="postbox-container-1" class="postbox-container">
41
+ <div id="right_menus">
42
+ <div class="postbox">
43
+ <div class="handlediv" title="Click to toggle"><br></div>
44
+ <h3 class="hndle"><span><?php _e( 'Right' ); ?><?php _e( 'Menus' ); ?></span></h3>
45
+ <div class="inside">
46
+
47
+ <?php if( empty( $Data ) ) : ?>
48
+
49
+ <?php foreach( $AllDefaultNodes["right"]["main"] as $main_node) : ?>
50
+
51
+ <?php $pnsn = array(); ?>
52
+ <?php if( !empty( $AllDefaultNodes["right"]["sub"] ) ) : ?>
53
+
54
+ <?php foreach( $AllDefaultNodes["right"]["sub"] as $sub_node) : ?>
55
+
56
+ <?php if( $main_node->id == $sub_node->parent ) : ?>
57
+
58
+ <?php $pnsn[] = array( 'id' => $sub_node->id , 'title' => stripslashes( $sub_node->title ) , 'parent' => $main_node->id , 'href' => $sub_node->href , 'group' => false , 'meta' => $sub_node->meta , 'new' => false ); ?>
59
+
60
+ <?php endif; ?>
61
+
62
+ <?php endforeach; ?>
63
+
64
+ <?php endif; ?>
65
+
66
+ <?php $menu_widget = array( 'id' => $main_node->id , 'title' => stripslashes( $main_node->title ) , 'parent' => '' , 'href' => $main_node->href , 'group' => false , 'meta' => $main_node->meta , 'new' => false , 'subnode' => $pnsn ); ?>
67
+ <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
68
+
69
+ <?php endforeach; ?>
70
+
71
+ <?php else : ?>
72
+
73
+ <?php if( !empty( $Data["right"]["main"] ) ) : ?>
74
+
75
+ <?php foreach( $Data["right"]["main"] as $main_node) : ?>
76
+
77
+ <?php $pnsn = array(); ?>
78
+ <?php if( !empty( $Data["right"]["sub"] ) ) : ?>
79
+
80
+ <?php foreach( $Data["right"]["sub"] as $sub_node) : ?>
81
+
82
+ <?php if( $main_node["id"] == $sub_node["parent"] ) : ?>
83
+
84
+ <?php if( empty( $sub_node["meta"] ) ) : ?>
85
+ <?php $sub_node["meta"] = array(); ?>
86
+ <?php endif; ?>
87
+
88
+ <?php $pnsn[] = array( 'id' => $sub_node["id"] , 'title' => stripslashes( $sub_node["title"] ) , 'parent' => $main_node["id"] , 'href' => $sub_node["href"] , 'group' => false , 'meta' => $sub_node["meta"] , 'new' => false ); ?>
89
+
90
+ <?php endif; ?>
91
+
92
+ <?php endforeach; ?>
93
+
94
+ <?php endif; ?>
95
+
96
+ <?php if( empty( $main_node["meta"] ) ) : ?>
97
+ <?php $main_node["meta"] = array(); ?>
98
+ <?php endif; ?>
99
+
100
+ <?php $menu_widget = array( 'id' => $main_node["id"] , 'title' => stripslashes( $main_node["title"] ) , 'parent' => '' , 'href' => $main_node["href"] , 'group' => false , 'meta' => $main_node["meta"] , 'new' => false , 'subnode' => $pnsn ); ?>
101
+ <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
102
+
103
+ <?php endforeach; ?>
104
+
105
+ <?php endif; ?>
106
+
107
+ <?php endif; ?>
108
+
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </div>
113
+
114
+ <div id="postbox-container-2" class="postbox-container">
115
+ <div id="left_menus">
116
+ <div class="postbox">
117
+ <div class="handlediv" title="Click to toggle"><br></div>
118
+ <h3 class="hndle"><span><?php _e( 'Left' ); ?><?php _e( 'Menus' ); ?></span></h3>
119
+ <div class="inside">
120
+ <?php if( empty( $Data ) ) : ?>
121
+
122
+ <?php foreach( $AllDefaultNodes["left"]["main"] as $main_node) : ?>
123
+
124
+ <?php $pnsn = array(); ?>
125
+ <?php if( !empty( $AllDefaultNodes["left"]["sub"] ) ) : ?>
126
+
127
+ <?php foreach( $AllDefaultNodes["left"]["sub"] as $sub_node) : ?>
128
+
129
+ <?php if( $main_node->id == $sub_node->parent ) : ?>
130
+
131
+ <?php $pnsn[] = array( 'id' => $sub_node->id , 'title' => stripslashes( $sub_node->title ) , 'parent' => $main_node->id , 'href' => $sub_node->href , 'group' => false , 'meta' => $sub_node->meta , 'new' => false ); ?>
132
+
133
+ <?php endif; ?>
134
+
135
+ <?php endforeach; ?>
136
+
137
+ <?php endif; ?>
138
+
139
+ <?php $menu_widget = array( 'id' => $main_node->id , 'title' => stripslashes( $main_node->title ) , 'parent' => '' , 'href' => $main_node->href , 'group' => false , 'meta' => $main_node->meta , 'new' => false , 'subnode' => $pnsn ); ?>
140
+ <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
141
+
142
+ <?php endforeach; ?>
143
+
144
+ <?php else : ?>
145
+
146
+ <?php if( !empty( $Data["left"]["main"] ) ) : ?>
147
+
148
+ <?php foreach( $Data["left"]["main"] as $main_node) : ?>
149
+
150
+ <?php $pnsn = array(); ?>
151
+ <?php if( !empty( $Data["left"]["sub"] ) ) : ?>
152
+
153
+ <?php foreach( $Data["left"]["sub"] as $sub_node) : ?>
154
+
155
+ <?php if( $main_node["id"] == $sub_node["parent"] ) : ?>
156
+
157
+ <?php if( empty( $sub_node["meta"] ) ) : ?>
158
+ <?php $sub_node["meta"] = array(); ?>
159
+ <?php endif; ?>
160
+
161
+ <?php $pnsn[] = array( 'id' => $sub_node["id"] , 'title' => stripslashes( $sub_node["title"] ) , 'parent' => $main_node["id"] , 'href' => $sub_node["href"] , 'group' => false , 'meta' => $sub_node["meta"] , 'new' => false ); ?>
162
+
163
+ <?php endif; ?>
164
+
165
+ <?php endforeach; ?>
166
+
167
+ <?php endif; ?>
168
+
169
+ <?php if( empty( $main_node["meta"] ) ) : ?>
170
+ <?php $main_node["meta"] = array(); ?>
171
+ <?php endif; ?>
172
+
173
+ <?php $menu_widget = array( 'id' => $main_node["id"] , 'title' => stripslashes( $main_node["title"] ) , 'parent' => '' , 'href' => $main_node["href"] , 'group' => false , 'meta' => $main_node["meta"] , 'new' => false , 'subnode' => $pnsn ); ?>
174
+ <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
175
+
176
+ <?php endforeach; ?>
177
+
178
+ <?php endif; ?>
179
+
180
+ <?php endif; ?>
181
+ </div>
182
+ </div>
183
+ </div>
184
+ </div>
185
+
186
+ <br class="clear">
187
+
188
+ </div>
189
+
190
+ </div>
191
+
192
+ <div id="can_menus" class="metabox-holder columns-1">
193
+
194
+ <div class="postbox">
195
+ <h3 class="hndle"><span><?php _e ( 'Menu items that can be added' , $this->ltd ); ?></span></h3>
196
+ <div class="inside">
197
+
198
+ <h4><?php _e( 'Custom' ); ?> <?php _e( 'Menus' ); ?></h4>
199
+ <?php $menu_widget = array( 'id' => "custom_node" , 'title' => "" , 'parent' => '' , 'href' => "" , 'group' => false , 'meta' => array() , 'new' => true , 'subnode' => false ); ?>
200
+ <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
201
+ <div class="clear"></div>
202
+
203
+ <h4><?php _e( 'Left' ); ?> <?php _e( 'Menus' ); ?></h4>
204
+
205
+ <?php foreach( $AllDefaultNodes["left"]["main"] as $node_id => $node ) : ?>
206
+
207
+ <p class="description"><?php echo $node_id; ?></p>
208
+ <?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'meta' => $node->meta , 'new' => true , 'subnode' => false ); ?>
209
+ <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
210
+
211
+ <?php foreach( $AllDefaultNodes["left"]["sub"] as $child_node_id => $child_node ) : ?>
212
+
213
+ <?php if( $child_node->parent == $node_id ) : ?>
214
+
215
+ <?php $menu_widget = array( 'id' => $child_node->id , 'title' => $child_node->title , 'parent' => '' , 'href' => $child_node->href , 'group' => false , 'meta' => $child_node->meta , 'new' => true , 'subnode' => false ); ?>
216
+ <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
217
+
218
+ <?php endif; ?>
219
+
220
+ <?php endforeach; ?>
221
+
222
+ <div class="clear"></div>
223
+
224
+ <?php endforeach; ?>
225
+
226
+ <div class="clear"></div>
227
+
228
+ <h4><?php _e( 'Right' ); ?> <?php _e( 'Menus' ); ?></h4>
229
+
230
+ <?php foreach( $AllDefaultNodes["right"]["main"] as $node_id => $node ) : ?>
231
+
232
+ <p class="description"><?php echo $node_id; ?></p>
233
+ <?php $menu_widget = array( 'id' => $node->id , 'title' => $node->title , 'parent' => '' , 'href' => $node->href , 'group' => false , 'new' => $node->meta , 'new' => true , 'subnode' => false ); ?>
234
+ <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
235
+
236
+ <?php foreach( $AllDefaultNodes["right"]["sub"] as $child_node_id => $child_node ) : ?>
237
+
238
+ <?php if( $child_node->parent == $node_id ) : ?>
239
+
240
+ <?php $menu_widget = array( 'id' => $child_node->id , 'title' => $child_node->title , 'parent' => '' , 'href' => $child_node->href , 'group' => false , 'new' => $child_node->meta , 'new' => true , 'subnode' => false ); ?>
241
+ <?php $this->admin_bar_menu_widget( $menu_widget ); ?>
242
+
243
+ <?php endif; ?>
244
+
245
+ <?php endforeach; ?>
246
+
247
+ <div class="clear"></div>
248
+
249
+ <?php endforeach; ?>
250
+
251
+ <div class="clear"></div>
252
+
253
+ </div>
254
+ </div>
255
+
256
+ </div>
257
+
258
+ <p class="submit">
259
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
260
+ </p>
261
+
262
+ <p class="submit reset">
263
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
264
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
265
+ </p>
266
+
267
+ </form>
268
+
269
+ </div>
270
+
271
+ <?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
272
+
273
+ <style>
274
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon,
275
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
276
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
277
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon
278
+ { background-image: url(../wp-includes/images/admin-bar-sprite.png); }
279
+ </style>
280
+
281
+ <script type="text/javascript">
282
+
283
+ var wauc_widget_each, wauc_menu_sortable;
284
+
285
+ jQuery(document).ready(function($) {
286
+
287
+ var $Form = $("#wauc_setting_admin_bar_menu");
288
+ var $AddInside = $('#can_menus .postbox .inside', $Form);
289
+ var $SettingInside = $('#poststuff #post-body .postbox-container .postbox .inside', $Form);
290
+
291
+ $AddInside.children('.widget').draggable({
292
+ connectToSortable: '#poststuff #post-body .postbox-container .postbox .inside',
293
+ handle: '> .widget-top > .widget-title',
294
+ distance: 2,
295
+ helper: 'clone',
296
+ zIndex: 5,
297
+ containment: 'document',
298
+ stop: function(e,ui) {
299
+ wauc_widget_each();
300
+ wauc_menu_sortable();
301
+ }
302
+ });
303
+
304
+ $('.columns-1', $Form).droppable({
305
+ tolerance: 'pointer',
306
+ accept: function(o){
307
+ return $(o).parent().parent().parent().parent().parent().parent().parent().attr('class') != 'columns-1';
308
+ },
309
+ drop: function(e,ui) {
310
+ ui.draggable.addClass('deleting');
311
+ },
312
+ over: function(e,ui) {
313
+ ui.draggable.addClass('deleting');
314
+ $('div.widget-placeholder').hide();
315
+ },
316
+ out: function(e,ui) {
317
+ ui.draggable.removeClass('deleting');
318
+ $('div.widget-placeholder').show();
319
+ }
320
+ });
321
+
322
+
323
+ var $AvailableAction = $('#poststuff #post-body .postbox-container .postbox .inside .widget .widget-top .widget-title-action a[href=#available]', $Form);
324
+ $AvailableAction.live( 'click', function() {
325
+ $(this).parent().parent().parent().children(".widget-inside").slideToggle();
326
+ return false;
327
+ });
328
+
329
+ var $RemoveAction = $('#poststuff #post-body .postbox-container .postbox .inside .widget .widget-inside .widget-control-actions .alignleft a[href=#remove]', $Form);
330
+ $RemoveAction.live( 'click', function() {
331
+ $(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
332
+ return false;
333
+ });
334
+
335
+ wauc_menu_sortable = function menu_sortable() {
336
+
337
+ $('#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside, #wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget .widget-inside .submenu').sortable({
338
+ placeholder: "widget-placeholder",
339
+ items: '> .widget',
340
+ connectWith: "#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside, #wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget .widget-inside .submenu",
341
+ handle: '> .widget-top > .widget-title',
342
+ cursor: 'move',
343
+ distance: 2,
344
+ containment: 'document',
345
+ change: function(e,ui) {
346
+ var $height = ui.helper.height();
347
+ $('#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget-placeholder').height($height);
348
+ },
349
+ stop: function(e,ui) {
350
+ if ( ui.item.hasClass('deleting') ) {
351
+ ui.item.remove();
352
+ }
353
+ wauc_widget_each();
354
+ },
355
+ });
356
+
357
+ }
358
+ wauc_menu_sortable();
359
+
360
+ wauc_widget_each = function widget_each() {
361
+ var $Count = 0;
362
+ $('#wauc_setting_admin_bar_menu #poststuff #post-body .postbox-container .postbox .inside .widget').each(function() {
363
+ var $InputId = $(this).children(".widget-inside").children(".settings").children(".field-url").children(".idtext");
364
+ var $InputLink = $(this).children(".widget-inside").children(".settings").children(".field-url").children(".linktext");
365
+ var $InputTitle = $(this).children(".widget-inside").children(".settings").children(".field-title").children("label").children(".titletext");
366
+ var $InputMetaTarget = $(this).children(".widget-inside").children(".settings").children(".field-meta").children("label").children(".meta_target");
367
+ var $InputParentName = $(this).children(".widget-inside").children(".settings").children(".parent");
368
+
369
+ var $BoxName = "";
370
+ if( $(this).parent().hasClass("submenu") ) {
371
+ $BoxName = $(this).parent().parent().parent().parent().parent().parent().attr("id");
372
+ } else {
373
+ $BoxName = $(this).parent().parent().parent().attr("id");
374
+ }
375
+
376
+ if( $BoxName ) {
377
+ var $BarType = $BoxName.replace( '_menus' , '');
378
+ }
379
+
380
+ if( $(this).hasClass("custom_node") ) {
381
+ var $CustomVal = $InputId.val();
382
+ $InputId.val( $CustomVal + Math.ceil( Math.random() * 1000 ) );
383
+ } else if( $(this).hasClass("newcustom_node") ) {
384
+ var $CustomVal = $InputId.val();
385
+ var $CustomClassName = $CustomVal + Math.ceil( Math.random() * 1000 );
386
+ $InputId.val( $CustomClassName );
387
+ $(this).removeClass("newcustom_node");
388
+ $(this).addClass( $CustomClassName );
389
+ }
390
+
391
+ var $Name = 'data' + '[' + $BarType + ']['+$Count+']';
392
+ $InputId.attr("name", $Name+'[id]');
393
+ $InputLink.attr("name", $Name+'[href]');
394
+ $InputTitle.attr("name", $Name+'[title]');
395
+ $InputMetaTarget.attr("name", $Name+'[meta][target]');
396
+ $InputParentName.attr("name", $Name+'[parent]');
397
+
398
+ if ( $(this).parent().parent().parent().parent().hasClass("submenu") ) {
399
+ // None three
400
+ $(this).remove();
401
+ } else if ( $(this).parent().hasClass("submenu") ) {
402
+ var $ParentId = $(this).parent().parent().children(".settings").children(".description").children(".idtext").val();
403
+ $InputParentName.val($ParentId);
404
+ } else {
405
+ $InputParentName.val('');
406
+ }
407
+
408
+ $Count++;
409
+ });
410
+ }
411
+ wauc_widget_each();
412
+
413
+ });
414
  </script>
inc/setting_admin_general.php CHANGED
@@ -1,194 +1,194 @@
1
- <?php
2
-
3
- if( !empty( $_POST["update"] ) ) {
4
- $this->update_admin_general();
5
- } elseif( !empty( $_POST["reset"] ) ) {
6
- $this->update_reset( 'admin_general' );
7
- }
8
-
9
- $Data = $this->get_data( 'admin_general' );
10
-
11
- // include js css
12
- $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' , 'thickbox' );
13
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
14
- wp_enqueue_style('thickbox');
15
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
16
-
17
- ?>
18
-
19
- <div class="wrap">
20
- <div class="icon32" id="icon-tools"></div>
21
- <?php echo $this->Msg; ?>
22
- <h2><?php _e( 'General Screen Settings' , $this->ltd ); ?></h2>
23
- <p>&nbsp;</p>
24
-
25
- <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
26
-
27
- <form id="wauc_setting_admin_general" class="wauc_form" method="post" action="">
28
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
29
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
30
-
31
- <div id="poststuff">
32
-
33
- <div id="post-body" class="metabox-holder columns-1">
34
-
35
- <div id="postbox-container-1" class="postbox-container">
36
- <div id="admin_general">
37
- <div class="postbox">
38
- <div class="handlediv" title="Click to toggle"><br></div>
39
- <h3 class="hndle"><span><?php echo _e( 'Notifications' , $this->ltd ); ?></span></h3>
40
- <div class="inside">
41
- <table class="form-table">
42
- <tbody>
43
- <tr>
44
- <th>
45
- <label><?php _e( 'WordPress core update notice' , $this->ltd ); ?></label>
46
- </th>
47
- <td>
48
- <?php $field = 'notice_update_core'; ?>
49
- <?php $Checked = ''; ?>
50
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
51
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
52
- </td>
53
- </tr>
54
- <tr>
55
- <th>
56
- <label><?php _e( 'Plugin update notice' , $this->ltd ); ?></label>
57
- </th>
58
- <td>
59
- <?php $field = 'notice_update_plugin'; ?>
60
- <?php $Checked = ''; ?>
61
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
62
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
63
- </td>
64
- </tr>
65
- <tr>
66
- <th>
67
- <label><?php _e( 'Theme update notice' , $this->ltd ); ?></label>
68
- </th>
69
- <td>
70
- <?php $field = 'notice_update_theme'; ?>
71
- <?php $Checked = ''; ?>
72
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
73
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
74
- </td>
75
- </tr>
76
- </tbody>
77
- </table>
78
- </div>
79
- </div>
80
-
81
- <div class="postbox">
82
- <div class="handlediv" title="Click to toggle"><br></div>
83
- <h3 class="hndle"><span><?php echo _e( 'Screen Options and Help Tab' , $this->ltd ); ?></span></h3>
84
- <div class="inside">
85
- <table class="form-table">
86
- <tbody>
87
- <tr>
88
- <th>
89
- <label><?php _e( 'Screen Options' ); ?></label>
90
- </th>
91
- <td>
92
- <?php $field = 'screen_option_tab'; ?>
93
- <?php $Checked = ''; ?>
94
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
95
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
96
- </td>
97
- </tr>
98
- <tr>
99
- <th>
100
- <label><?php _e( 'Help' ); ?></label>
101
- </th>
102
- <td>
103
- <?php $field = 'help_tab'; ?>
104
- <?php $Checked = ''; ?>
105
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
106
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
107
- </td>
108
- </tr>
109
- </tbody>
110
- </table>
111
- </div>
112
- </div>
113
-
114
- <div class="postbox">
115
- <div class="handlediv" title="Click to toggle"><br></div>
116
- <h3 class="hndle"><span><?php echo _e( 'Footer' ); ?></span></h3>
117
- <div class="inside">
118
- <table class="form-table">
119
- <tbody>
120
- <tr>
121
- <th>
122
- <label><?php _e( 'Footer text' , $this->ltd ); ?></label>
123
- </th>
124
- <td>
125
- <?php $field = 'footer_text'; ?>
126
- <?php $Val = ''; ?>
127
- <?php if( !empty( $Data[$field] ) ) : $Val = esc_html( stripslashes( $Data[$field] ) ); endif; ?>
128
- <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" />
129
- <p class="description"><?php _e( 'Default' ); ?>: <?php _e( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ); ?></p>
130
- <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
131
- </td>
132
- </tr>
133
- </tbody>
134
- </table>
135
- </div>
136
- </div>
137
-
138
- <div class="postbox">
139
- <div class="handlediv" title="Click to toggle"><br></div>
140
- <h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
141
- <div class="inside">
142
- <table class="form-table">
143
- <tbody>
144
- <?php $field = 'css'; ?>
145
- <tr>
146
- <th>
147
- <label><?php _e( 'CSS file to load' , $this->ltd ); ?></label>
148
- </th>
149
- <td>
150
- <?php $Val = ''; ?>
151
- <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
152
- <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text">
153
- <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
154
- </td>
155
- </tr>
156
-
157
- <?php $field = 'title_tag'; ?>
158
- <tr>
159
- <th>
160
- <label><?php _e( 'Title tag for Admin screen' , $this->ltd ); ?></label>
161
- </th>
162
- <td>
163
- <?php $Checked = ''; ?>
164
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
165
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Remove "Wordpress" from the title tag of the Admin screen' , $this->ltd ); ?></label>
166
- </td>
167
- </tr>
168
- </tbody>
169
- </table>
170
- </div>
171
- </div>
172
- </div>
173
- </div>
174
-
175
- <br class="clear">
176
-
177
- </div>
178
-
179
- </div>
180
-
181
- <p class="submit">
182
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
183
- </p>
184
-
185
- <p class="submit reset">
186
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
187
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
188
- </p>
189
-
190
- </form>
191
-
192
- </div>
193
-
194
- <?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
1
+ <?php
2
+
3
+ if( !empty( $_POST["update"] ) ) {
4
+ $this->update_admin_general();
5
+ } elseif( !empty( $_POST["reset"] ) ) {
6
+ $this->update_reset( 'admin_general' );
7
+ }
8
+
9
+ $Data = $this->get_data( 'admin_general' );
10
+
11
+ // include js css
12
+ $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' , 'thickbox' );
13
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
14
+ wp_enqueue_style('thickbox');
15
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
16
+
17
+ ?>
18
+
19
+ <div class="wrap">
20
+ <div class="icon32" id="icon-tools"></div>
21
+ <?php echo $this->Msg; ?>
22
+ <h2><?php _e( 'General Screen Settings' , $this->ltd ); ?></h2>
23
+ <p>&nbsp;</p>
24
+
25
+ <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
26
+
27
+ <form id="wauc_setting_admin_general" class="wauc_form" method="post" action="">
28
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
29
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
30
+
31
+ <div id="poststuff">
32
+
33
+ <div id="post-body" class="metabox-holder columns-1">
34
+
35
+ <div id="postbox-container-1" class="postbox-container">
36
+ <div id="admin_general">
37
+ <div class="postbox">
38
+ <div class="handlediv" title="Click to toggle"><br></div>
39
+ <h3 class="hndle"><span><?php echo _e( 'Notifications' , $this->ltd ); ?></span></h3>
40
+ <div class="inside">
41
+ <table class="form-table">
42
+ <tbody>
43
+ <tr>
44
+ <th>
45
+ <label><?php _e( 'WordPress core update notice' , $this->ltd ); ?></label>
46
+ </th>
47
+ <td>
48
+ <?php $field = 'notice_update_core'; ?>
49
+ <?php $Checked = ''; ?>
50
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
51
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <th>
56
+ <label><?php _e( 'Plugin update notice' , $this->ltd ); ?></label>
57
+ </th>
58
+ <td>
59
+ <?php $field = 'notice_update_plugin'; ?>
60
+ <?php $Checked = ''; ?>
61
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
62
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
63
+ </td>
64
+ </tr>
65
+ <tr>
66
+ <th>
67
+ <label><?php _e( 'Theme update notice' , $this->ltd ); ?></label>
68
+ </th>
69
+ <td>
70
+ <?php $field = 'notice_update_theme'; ?>
71
+ <?php $Checked = ''; ?>
72
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
73
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
74
+ </td>
75
+ </tr>
76
+ </tbody>
77
+ </table>
78
+ </div>
79
+ </div>
80
+
81
+ <div class="postbox">
82
+ <div class="handlediv" title="Click to toggle"><br></div>
83
+ <h3 class="hndle"><span><?php echo _e( 'Screen Options and Help Tab' , $this->ltd ); ?></span></h3>
84
+ <div class="inside">
85
+ <table class="form-table">
86
+ <tbody>
87
+ <tr>
88
+ <th>
89
+ <label><?php _e( 'Screen Options' ); ?></label>
90
+ </th>
91
+ <td>
92
+ <?php $field = 'screen_option_tab'; ?>
93
+ <?php $Checked = ''; ?>
94
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
95
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
96
+ </td>
97
+ </tr>
98
+ <tr>
99
+ <th>
100
+ <label><?php _e( 'Help' ); ?></label>
101
+ </th>
102
+ <td>
103
+ <?php $field = 'help_tab'; ?>
104
+ <?php $Checked = ''; ?>
105
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
106
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
107
+ </td>
108
+ </tr>
109
+ </tbody>
110
+ </table>
111
+ </div>
112
+ </div>
113
+
114
+ <div class="postbox">
115
+ <div class="handlediv" title="Click to toggle"><br></div>
116
+ <h3 class="hndle"><span><?php echo _e( 'Footer' ); ?></span></h3>
117
+ <div class="inside">
118
+ <table class="form-table">
119
+ <tbody>
120
+ <tr>
121
+ <th>
122
+ <label><?php _e( 'Footer text' , $this->ltd ); ?></label>
123
+ </th>
124
+ <td>
125
+ <?php $field = 'footer_text'; ?>
126
+ <?php $Val = ''; ?>
127
+ <?php if( !empty( $Data[$field] ) ) : $Val = esc_html( stripslashes( $Data[$field] ) ); endif; ?>
128
+ <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" />
129
+ <p class="description"><?php _e( 'Default' ); ?>: <?php _e( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ); ?></p>
130
+ <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
131
+ </td>
132
+ </tr>
133
+ </tbody>
134
+ </table>
135
+ </div>
136
+ </div>
137
+
138
+ <div class="postbox">
139
+ <div class="handlediv" title="Click to toggle"><br></div>
140
+ <h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
141
+ <div class="inside">
142
+ <table class="form-table">
143
+ <tbody>
144
+ <?php $field = 'css'; ?>
145
+ <tr>
146
+ <th>
147
+ <label><?php _e( 'CSS file to load' , $this->ltd ); ?></label>
148
+ </th>
149
+ <td>
150
+ <?php $Val = ''; ?>
151
+ <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
152
+ <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text">
153
+ <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
154
+ </td>
155
+ </tr>
156
+
157
+ <?php $field = 'title_tag'; ?>
158
+ <tr>
159
+ <th>
160
+ <label><?php _e( 'Title tag for Admin screen' , $this->ltd ); ?></label>
161
+ </th>
162
+ <td>
163
+ <?php $Checked = ''; ?>
164
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
165
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Remove "Wordpress" from the title tag of the Admin screen' , $this->ltd ); ?></label>
166
+ </td>
167
+ </tr>
168
+ </tbody>
169
+ </table>
170
+ </div>
171
+ </div>
172
+ </div>
173
+ </div>
174
+
175
+ <br class="clear">
176
+
177
+ </div>
178
+
179
+ </div>
180
+
181
+ <p class="submit">
182
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
183
+ </p>
184
+
185
+ <p class="submit reset">
186
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
187
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
188
+ </p>
189
+
190
+ </form>
191
+
192
+ </div>
193
+
194
+ <?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
inc/setting_appearance_menus.php CHANGED
@@ -1,101 +1,101 @@
1
- <?php
2
-
3
- if( !empty( $_POST["update"] ) ) {
4
- $this->update_appearance_menus();
5
- } elseif( !empty( $_POST["reset"] ) ) {
6
- $this->update_reset( 'appearance_menus' );
7
- }
8
-
9
- $Data = $this->get_data( 'appearance_menus' );
10
-
11
- // include js css
12
- $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
13
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
14
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
15
-
16
- ?>
17
-
18
- <div class="wrap">
19
- <div class="icon32" id="icon-tools"></div>
20
- <?php echo $this->Msg; ?>
21
- <h2><?php _e( 'Appearance Menus Screen Setting' , $this->ltd ); ?></h2>
22
- <p>&nbsp;</p>
23
-
24
- <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
25
-
26
- <form id="wauc_setting_appearance_menus" class="wauc_form" method="post" action="">
27
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
28
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
29
-
30
- <div id="poststuff">
31
-
32
- <div id="post-body" class="metabox-holder columns-1">
33
-
34
- <div id="postbox-container-1" class="postbox-container">
35
-
36
- <div id="appearance_menus">
37
- <div class="postbox">
38
- <h3 class="hndle"><span><?php _e( 'Menus' ); ?></span></h3>
39
- <div class="inside">
40
- <table class="form-table">
41
- <tbody>
42
- <?php $field = 'add_new_menu'; ?>
43
- <tr>
44
- <th>
45
- <label><?php _e( 'Create a new menu' , $this->ltd ); ?></label>
46
- </th>
47
- <td>
48
- <?php $Checked = ''; ?>
49
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
50
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
51
- <p class="description"><?php _e( 'This is useful when you want to use only the menus have been created.' , $this->ltd ); ?></p>
52
- <?php if( version_compare( $GLOBALS['wp_version'], '3.6', '>=' ) ) : ?>
53
- <p><img src="<?php echo $this->Url; ?>images/3.6/appearance_menus_add_new_menu.png" /></p>
54
- <p><img src="<?php echo $this->Url; ?>images/3.6/appearance_menus_add_new_menu_of_location.png" /></p>
55
- <?php else: ?>
56
- <p><img src="<?php echo $this->Url; ?>images/appearance_menus_add_new_menu.png" /></p>
57
- <?php endif; ?>
58
- </td>
59
- </tr>
60
- <?php $field = 'delete_menu'; ?>
61
- <tr>
62
- <th>
63
- <label><?php _e( 'Delete Menu' ); ?></label>
64
- </th>
65
- <td>
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' ); ?></label>
69
- <p class="description"><?php _e( 'This is useful when you want to use only the menus have been created.' , $this->ltd ); ?></p>
70
- <?php if( version_compare( $GLOBALS['wp_version'], '3.6', '>=' ) ) : ?>
71
- <p><img src="<?php echo $this->Url; ?>images/3.6/appearance_menus_delete_menu.png" /></p>
72
- <?php else: ?>
73
- <p><img src="<?php echo $this->Url; ?>images/appearance_menus_delete_menu.png" /></p>
74
- <?php endif; ?>
75
- </td>
76
- </tr>
77
- </tbody>
78
- </table>
79
- </div>
80
- </div>
81
- </div>
82
- </div>
83
-
84
- <br class="clear">
85
-
86
- </div>
87
-
88
- </div>
89
-
90
- <p class="submit">
91
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
92
- </p>
93
-
94
- <p class="submit reset">
95
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
96
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
97
- </p>
98
-
99
- </form>
100
-
101
- </div>
1
+ <?php
2
+
3
+ if( !empty( $_POST["update"] ) ) {
4
+ $this->update_appearance_menus();
5
+ } elseif( !empty( $_POST["reset"] ) ) {
6
+ $this->update_reset( 'appearance_menus' );
7
+ }
8
+
9
+ $Data = $this->get_data( 'appearance_menus' );
10
+
11
+ // include js css
12
+ $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
13
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
14
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
15
+
16
+ ?>
17
+
18
+ <div class="wrap">
19
+ <div class="icon32" id="icon-tools"></div>
20
+ <?php echo $this->Msg; ?>
21
+ <h2><?php _e( 'Appearance Menus Screen Setting' , $this->ltd ); ?></h2>
22
+ <p>&nbsp;</p>
23
+
24
+ <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
25
+
26
+ <form id="wauc_setting_appearance_menus" class="wauc_form" method="post" action="">
27
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
28
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
29
+
30
+ <div id="poststuff">
31
+
32
+ <div id="post-body" class="metabox-holder columns-1">
33
+
34
+ <div id="postbox-container-1" class="postbox-container">
35
+
36
+ <div id="appearance_menus">
37
+ <div class="postbox">
38
+ <h3 class="hndle"><span><?php _e( 'Menus' ); ?></span></h3>
39
+ <div class="inside">
40
+ <table class="form-table">
41
+ <tbody>
42
+ <?php $field = 'add_new_menu'; ?>
43
+ <tr>
44
+ <th>
45
+ <label><?php _e( 'Create a new menu' , $this->ltd ); ?></label>
46
+ </th>
47
+ <td>
48
+ <?php $Checked = ''; ?>
49
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
50
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
51
+ <p class="description"><?php _e( 'This is useful when you want to use only the menus have been created.' , $this->ltd ); ?></p>
52
+ <?php if( version_compare( $GLOBALS['wp_version'], '3.6', '>=' ) ) : ?>
53
+ <p><img src="<?php echo $this->Url; ?>images/3.6/appearance_menus_add_new_menu.png" /></p>
54
+ <p><img src="<?php echo $this->Url; ?>images/3.6/appearance_menus_add_new_menu_of_location.png" /></p>
55
+ <?php else: ?>
56
+ <p><img src="<?php echo $this->Url; ?>images/appearance_menus_add_new_menu.png" /></p>
57
+ <?php endif; ?>
58
+ </td>
59
+ </tr>
60
+ <?php $field = 'delete_menu'; ?>
61
+ <tr>
62
+ <th>
63
+ <label><?php _e( 'Delete Menu' ); ?></label>
64
+ </th>
65
+ <td>
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' ); ?></label>
69
+ <p class="description"><?php _e( 'This is useful when you want to use only the menus have been created.' , $this->ltd ); ?></p>
70
+ <?php if( version_compare( $GLOBALS['wp_version'], '3.6', '>=' ) ) : ?>
71
+ <p><img src="<?php echo $this->Url; ?>images/3.6/appearance_menus_delete_menu.png" /></p>
72
+ <?php else: ?>
73
+ <p><img src="<?php echo $this->Url; ?>images/appearance_menus_delete_menu.png" /></p>
74
+ <?php endif; ?>
75
+ </td>
76
+ </tr>
77
+ </tbody>
78
+ </table>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ <br class="clear">
85
+
86
+ </div>
87
+
88
+ </div>
89
+
90
+ <p class="submit">
91
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
92
+ </p>
93
+
94
+ <p class="submit reset">
95
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
96
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
97
+ </p>
98
+
99
+ </form>
100
+
101
+ </div>
inc/setting_dashboard.php CHANGED
@@ -1,187 +1,187 @@
1
- <?php
2
-
3
- if( !empty( $_POST["update"] ) ) {
4
- $this->update_dashboard();
5
- } elseif( !empty( $_POST["reset"] ) ) {
6
- $this->update_reset( 'dashboard' );
7
- }
8
-
9
- $Data = $this->get_data( 'dashboard' );
10
-
11
- // include js css
12
- $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
13
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
14
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
15
-
16
- ?>
17
-
18
- <div class="wrap">
19
- <div class="icon32" id="icon-tools"></div>
20
- <?php echo $this->Msg; ?>
21
- <h2><?php _e( 'Dashboard' ); ?><?php _e( 'Settings' ); ?></h2>
22
- <p>&nbsp;</p>
23
-
24
- <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
25
-
26
- <form id="wauc_setting_dashboard" class="wauc_form" method="post" action="">
27
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
28
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
29
-
30
- <div id="poststuff">
31
-
32
- <div id="post-body" class="metabox-holder columns-1">
33
-
34
- <div id="postbox-container-1" class="postbox-container">
35
- <div id="dashboard">
36
- <div class="postbox">
37
- <div class="handlediv" title="Click to toggle"><br></div>
38
- <h3 class="hndle"><span><?php _e( 'Meta boxes' , $this->ltd ); ?></span></h3>
39
- <div class="inside">
40
- <table class="form-table">
41
- <tbody>
42
- <?php $field = 'show_welcome_panel'; ?>
43
- <tr>
44
- <th>
45
- <label><?php _e( 'Welcome Panel' , $this->ltd ); ?></label>
46
- </th>
47
- <td>
48
- <?php $Checked = ''; ?>
49
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
50
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
51
- </td>
52
- </tr>
53
- <?php $field = 'dashboard_right_now'; ?>
54
- <tr>
55
- <th>
56
- <label><?php _e( 'Right Now' ); ?></label>
57
- </th>
58
- <td>
59
- <?php $Checked = ''; ?>
60
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
61
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
62
- </td>
63
- </tr>
64
- <?php $field = 'dashboard_recent_comments'; ?>
65
- <tr>
66
- <th>
67
- <label><?php _e( 'Recent Comments' ); ?></label>
68
- </th>
69
- <td>
70
- <?php $Checked = ''; ?>
71
- <?php if( !empty( $Data[$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
- </td>
74
- </tr>
75
- <?php $field = 'dashboard_incoming_links'; ?>
76
- <tr>
77
- <th>
78
- <label><?php _e( 'Incoming Links' ); ?></label>
79
- </th>
80
- <td>
81
- <?php $Checked = ''; ?>
82
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
83
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
84
- </td>
85
- </tr>
86
- <?php $field = 'dashboard_plugins'; ?>
87
- <tr>
88
- <th>
89
- <label><?php _e( 'Plugins' ); ?></label>
90
- </th>
91
- <td>
92
- <?php $Checked = ''; ?>
93
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
94
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
95
- </td>
96
- </tr>
97
- <?php $field = 'dashboard_quick_press'; ?>
98
- <tr>
99
- <th>
100
- <label><?php _e( 'QuickPress' ); ?></label>
101
- </th>
102
- <td>
103
- <?php $Checked = ''; ?>
104
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
105
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
106
- </td>
107
- </tr>
108
- <?php $field = 'dashboard_recent_drafts'; ?>
109
- <tr>
110
- <th>
111
- <label><?php _e( 'Recent Drafts' ); ?></label>
112
- </th>
113
- <td>
114
- <?php $Checked = ''; ?>
115
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
116
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
117
- </td>
118
- </tr>
119
- <?php $field = 'dashboard_primary'; ?>
120
- <tr>
121
- <th>
122
- <label><?php _e( 'WordPress Blog' ); ?></label>
123
- </th>
124
- <td>
125
- <?php $Checked = ''; ?>
126
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
127
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
128
- </td>
129
- </tr>
130
- <?php $field = 'dashboard_secondary'; ?>
131
- <tr>
132
- <th>
133
- <label><?php _e( 'Other WordPress News' ); ?></label>
134
- </th>
135
- <td>
136
- <?php $Checked = ''; ?>
137
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
138
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
139
- </td>
140
- </tr>
141
- </tbody>
142
- </table>
143
- </div>
144
- </div>
145
-
146
- <div class="postbox">
147
- <div class="handlediv" title="Click to toggle"><br></div>
148
- <h3 class="hndle"><span><?php _e( 'Other' , $this->ltd ); ?></span></h3>
149
- <div class="inside">
150
- <table class="form-table">
151
- <tbody>
152
- <?php $field = 'metabox_move'; ?>
153
- <tr>
154
- <th>
155
- <label><?php _e( 'Meta box movement restriction' , $this->ltd ); ?></label>
156
- </th>
157
- <td>
158
- <?php $Checked = ''; ?>
159
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
160
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e( "Lock meta box positions" , $this->ltd ); ?></label>
161
- </td>
162
- </tr>
163
- </tbody>
164
- </table>
165
- </div>
166
- </div>
167
- </div>
168
- </div>
169
-
170
- <br class="clear">
171
-
172
- </div>
173
-
174
- </div>
175
-
176
- <p class="submit">
177
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
178
- </p>
179
-
180
- <p class="submit reset">
181
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
182
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
183
- </p>
184
-
185
- </form>
186
-
187
- </div>
1
+ <?php
2
+
3
+ if( !empty( $_POST["update"] ) ) {
4
+ $this->update_dashboard();
5
+ } elseif( !empty( $_POST["reset"] ) ) {
6
+ $this->update_reset( 'dashboard' );
7
+ }
8
+
9
+ $Data = $this->get_data( 'dashboard' );
10
+
11
+ // include js css
12
+ $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
13
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
14
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
15
+
16
+ ?>
17
+
18
+ <div class="wrap">
19
+ <div class="icon32" id="icon-tools"></div>
20
+ <?php echo $this->Msg; ?>
21
+ <h2><?php _e( 'Dashboard' ); ?><?php _e( 'Settings' ); ?></h2>
22
+ <p>&nbsp;</p>
23
+
24
+ <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
25
+
26
+ <form id="wauc_setting_dashboard" class="wauc_form" method="post" action="">
27
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
28
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
29
+
30
+ <div id="poststuff">
31
+
32
+ <div id="post-body" class="metabox-holder columns-1">
33
+
34
+ <div id="postbox-container-1" class="postbox-container">
35
+ <div id="dashboard">
36
+ <div class="postbox">
37
+ <div class="handlediv" title="Click to toggle"><br></div>
38
+ <h3 class="hndle"><span><?php _e( 'Meta boxes' , $this->ltd ); ?></span></h3>
39
+ <div class="inside">
40
+ <table class="form-table">
41
+ <tbody>
42
+ <?php $field = 'show_welcome_panel'; ?>
43
+ <tr>
44
+ <th>
45
+ <label><?php _e( 'Welcome Panel' , $this->ltd ); ?></label>
46
+ </th>
47
+ <td>
48
+ <?php $Checked = ''; ?>
49
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
50
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
51
+ </td>
52
+ </tr>
53
+ <?php $field = 'dashboard_right_now'; ?>
54
+ <tr>
55
+ <th>
56
+ <label><?php _e( 'Right Now' ); ?></label>
57
+ </th>
58
+ <td>
59
+ <?php $Checked = ''; ?>
60
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
61
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
62
+ </td>
63
+ </tr>
64
+ <?php $field = 'dashboard_recent_comments'; ?>
65
+ <tr>
66
+ <th>
67
+ <label><?php _e( 'Recent Comments' ); ?></label>
68
+ </th>
69
+ <td>
70
+ <?php $Checked = ''; ?>
71
+ <?php if( !empty( $Data[$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
+ </td>
74
+ </tr>
75
+ <?php $field = 'dashboard_incoming_links'; ?>
76
+ <tr>
77
+ <th>
78
+ <label><?php _e( 'Incoming Links' ); ?></label>
79
+ </th>
80
+ <td>
81
+ <?php $Checked = ''; ?>
82
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
83
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
84
+ </td>
85
+ </tr>
86
+ <?php $field = 'dashboard_plugins'; ?>
87
+ <tr>
88
+ <th>
89
+ <label><?php _e( 'Plugins' ); ?></label>
90
+ </th>
91
+ <td>
92
+ <?php $Checked = ''; ?>
93
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
94
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
95
+ </td>
96
+ </tr>
97
+ <?php $field = 'dashboard_quick_press'; ?>
98
+ <tr>
99
+ <th>
100
+ <label><?php _e( 'QuickPress' ); ?></label>
101
+ </th>
102
+ <td>
103
+ <?php $Checked = ''; ?>
104
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
105
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
106
+ </td>
107
+ </tr>
108
+ <?php $field = 'dashboard_recent_drafts'; ?>
109
+ <tr>
110
+ <th>
111
+ <label><?php _e( 'Recent Drafts' ); ?></label>
112
+ </th>
113
+ <td>
114
+ <?php $Checked = ''; ?>
115
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
116
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
117
+ </td>
118
+ </tr>
119
+ <?php $field = 'dashboard_primary'; ?>
120
+ <tr>
121
+ <th>
122
+ <label><?php _e( 'WordPress Blog' ); ?></label>
123
+ </th>
124
+ <td>
125
+ <?php $Checked = ''; ?>
126
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
127
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
128
+ </td>
129
+ </tr>
130
+ <?php $field = 'dashboard_secondary'; ?>
131
+ <tr>
132
+ <th>
133
+ <label><?php _e( 'Other WordPress News' ); ?></label>
134
+ </th>
135
+ <td>
136
+ <?php $Checked = ''; ?>
137
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
138
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
139
+ </td>
140
+ </tr>
141
+ </tbody>
142
+ </table>
143
+ </div>
144
+ </div>
145
+
146
+ <div class="postbox">
147
+ <div class="handlediv" title="Click to toggle"><br></div>
148
+ <h3 class="hndle"><span><?php _e( 'Other' , $this->ltd ); ?></span></h3>
149
+ <div class="inside">
150
+ <table class="form-table">
151
+ <tbody>
152
+ <?php $field = 'metabox_move'; ?>
153
+ <tr>
154
+ <th>
155
+ <label><?php _e( 'Meta box movement restriction' , $this->ltd ); ?></label>
156
+ </th>
157
+ <td>
158
+ <?php $Checked = ''; ?>
159
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
160
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e( "Lock meta box positions" , $this->ltd ); ?></label>
161
+ </td>
162
+ </tr>
163
+ </tbody>
164
+ </table>
165
+ </div>
166
+ </div>
167
+ </div>
168
+ </div>
169
+
170
+ <br class="clear">
171
+
172
+ </div>
173
+
174
+ </div>
175
+
176
+ <p class="submit">
177
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
178
+ </p>
179
+
180
+ <p class="submit reset">
181
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
182
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
183
+ </p>
184
+
185
+ </form>
186
+
187
+ </div>
inc/setting_default.php CHANGED
@@ -1,192 +1,192 @@
1
- <?php
2
-
3
- if( !empty( $_POST["donate_key"] ) ) {
4
- $this->DonatingCheck();
5
- } elseif( !empty( $_POST["update"] ) ) {
6
- $this->update_userrole();
7
- } elseif( !empty( $_POST["reset"] ) ) {
8
- $this->update_reset( 'user_role' );
9
- }
10
-
11
- $Data = $this->get_data( 'user_role' );
12
- $UserRoles = $this->get_user_role();
13
-
14
- // include js css
15
- $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
16
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
17
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
18
-
19
- ?>
20
- <div class="wrap">
21
- <div class="icon32" id="icon-tools"></div>
22
- <?php echo $this->Msg; ?>
23
- <h2><?php echo $this->Name; ?></h2>
24
- <p><?php _e( 'Customize the UI of the management screen for all users.' , $this->ltd ); ?></p>
25
- <p><?php _e ( 'Please select the user roles that all settings will apply to.' , $this->ltd ); ?></p>
26
- <p class="description"><?php _e( 'Please use the Multiple Add-on If you want settings on User role basis.' , $this->ltd ); ?></p>
27
- <p><strong><span style="color: orange;">new</span> <a href="<?php echo $this->Site; ?>multiple_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Multiple Add-on</a></strong></p>
28
-
29
- <div id="poststuff">
30
- <div id="post-body" class="metabox-holder columns-2">
31
-
32
- <div id="postbox-container-1" class="postbox-container">
33
-
34
- <div id="about_plugin">
35
-
36
- <div class="stuffbox" id="donationbox">
37
- <div class="inside">
38
- <p style="color: #FFFFFF; font-size: 20px;"><?php _e( 'Donate' , $this->ltd_p ); ?></p>
39
- <p style="color: #FFFFFF;"><?php _e( 'You are contented with this plugin?<br />By the laws of Japan, Japan\'s new paypal user can not make a donation button.<br />So i would like you to buy this plugin as the replacement for the donation.' , $this->ltd_p ); ?></p>
40
- <p>&nbsp;</p>
41
- <p style="text-align: center;">
42
- <a href="<?php echo $this->AuthorUrl; ?>line-break-first-and-end/?utm_source=use_plugin&utm_medium=donate&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" class="button-primary" target="_blank">Line Break First and End</a>
43
- </p>
44
- <p>&nbsp;</p>
45
- <div class="donation_memo">
46
- <p><strong><?php _e( 'Features' , $this->ltd_p ); ?></strong></p>
47
- <p><?php _e( 'Line Break First and End plugin is In the visual editor TinyMCE, It is a plugin that will help when you will not be able to enter a line break.' , $this->ltd_p ); ?></p>
48
- </div>
49
- <div class="donation_memo">
50
- <p><strong><?php _e( 'The primary use of donations' , $this->ltd_p ); ?></strong></p>
51
- <ul>
52
- <li>- <?php _e( 'Liquidation of time and value' , $this->ltd_p ); ?></li>
53
- <li>- <?php _e( 'Additional suggestions feature' , $this->ltd_p ); ?></li>
54
- <li>- <?php _e( 'Maintain motivation' , $this->ltd_p ); ?></li>
55
- <li>- <?php _e( 'Ensure time as the father of Sunday' , $this->ltd_p ); ?></li>
56
- </ul>
57
- </div>
58
- </div>
59
- </div>
60
-
61
- <div class="stuffbox" id="aboutbox">
62
- <h3><span class="hndle"><?php _e( 'About plugin' , $this->ltd_p ); ?></span></h3>
63
- <div class="inside">
64
- <p><?php _e( 'Version checked' , $this->ltd_p ); ?> : 3.5.2 - 3.6</p>
65
- <ul>
66
- <li><a href="<?php echo $this->Site; ?>?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e( 'Plugin\'s site' , $this->ltd_p ); ?></a></li>
67
- <li><a href="<?php echo $this->AuthorUrl; ?>?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e( 'Developer\'s site' , $this->ltd_p ); ?></a></li>
68
- <li><a href="http://wordpress.org/support/plugin/<?php echo $this->PluginSlug; ?>" target="_blank"><?php _e( 'Support Forums' ); ?></a></li>
69
- <li><a href="http://wordpress.org/support/view/plugin-reviews/<?php echo $this->PluginSlug; ?>" target="_blank"><?php _e( 'Reviews' , $this->ltd_p ); ?></a></li>
70
- <li><a href="https://twitter.com/gqevu6bsiz" target="_blank">twitter</a></li>
71
- <li><a href="http://www.facebook.com/pages/Gqevu6bsiz/499584376749601" target="_blank">facebook</a></li>
72
- </ul>
73
- </div>
74
- </div>
75
-
76
- <div class="stuffbox" id="usefulbox">
77
- <h3><span class="hndle"><?php _e( 'Useful plugins' , $this->ltd_p ); ?></span></h3>
78
- <div class="inside">
79
- <p><strong><span style="color: orange;">new</span> <a href="<?php echo $this->Site; ?>multiple_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Multiple Add-on</a></strong></p>
80
- <p class="description"><?php _e( 'This add-on is simply settings of multi user roles.' , $this->ltd_p ); ?></p>
81
- <p><strong><a href="<?php echo $this->Site; ?>import_export_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Import &amp; Export Add-on</a></strong></p>
82
- <p class="description"><?php _e( 'This add-on is Import/Export easily of the settings data.' , $this->ltd_p ); ?></p>
83
- <p><strong><a href="<?php echo $this->Site; ?>multisite_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize for Multisite</a></strong></p>
84
- <p class="description"><?php _e( 'This add-on is an add-on to unify the management screen of all sites.' , $this->ltd_p ); ?></p>
85
- <p><strong><a href="http://wordpress.org/extend/plugins/post-lists-view-custom/" target="_blank">Post Lists View Custom</a></strong></p>
86
- <p class="description"><?php _e( 'Customize the list of the post and page. custom post type page, too. You can customize the column display items freely.' , $this->ltd_p ); ?></p>
87
- <p><strong><a href="http://wordpress.org/extend/plugins/announce-from-the-dashboard/" target="_blank">Announce from the Dashboard</a></strong></p>
88
- <p class="description"><?php _e( 'Announce to display the dashboard. Change the display to a different user role.' , $this->ltd_p ); ?></p>
89
- <p><strong><a href="http://wordpress.org/extend/plugins/custom-options-plus-post-in/" target="_blank">Custom Options Plus Post in</a></strong></p>
90
- <p class="description"><?php _e( 'The plugin that allows you to add the value of the options. Option value that you have created, can be used in addition to the template tag, Short code can be used in the body of the article.' , $this->ltd_p ); ?></p>
91
- <p>&nbsp;</p>
92
- </div>
93
- </div>
94
-
95
- </div>
96
-
97
- </div>
98
-
99
- <div id="postbox-container-2" class="postbox-container">
100
-
101
- <div id="user_role">
102
-
103
- <form id="wauc_setting_default" class="wauc_form" method="post" action="">
104
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
105
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
106
-
107
- <div class="postbox">
108
- <h3 class="hndle"><span><?php _e( 'User Roles' ); ?></span></h3>
109
- <div class="inside">
110
- <?php $field = 'user_role'; ?>
111
- <?php foreach($UserRoles as $role_name => $val) : ?>
112
- <?php $Checked = ''; ?>
113
- <?php if( !empty( $Data[$role_name] ) ) : $Checked = 'checked="checked"'; endif; ?>
114
- <p>
115
- <label>
116
- <input type="checkbox" name="data[<?php echo $field; ?>][<?php echo $role_name; ?>]" value="1" <?php echo $Checked; ?> />
117
- <?php echo $val["label"]; ?>
118
- </label>
119
- </p>
120
- <?php endforeach; ?>
121
- </div>
122
- </div>
123
-
124
- <p class="submit">
125
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
126
- </p>
127
-
128
- <p class="submit reset">
129
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
130
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
131
- </p>
132
-
133
- <p>&nbsp;</p>
134
-
135
- </form>
136
-
137
- <form id="donation_form" class="wauc_form" method="post" action="">
138
- <h3><?php _e( 'If you have already donated to.' , $this->ltd_p ); ?></h3>
139
- <p><?php _e( 'Please enter the \'Donation delete key\' that have been described in the \'Line Break First and End download page\'.' , $this->ltd_p ); ?></p>
140
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
141
- <?php wp_nonce_field(); ?>
142
- <label for="donate_key"><?php _e( 'Donation delete key' , $this->ltd_p ); ?></label>
143
- <input type="text" name="donate_key" id="donate_key" value="" class="regular-text" />
144
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Submit' ); ?>" />
145
- </form>
146
-
147
- <p>&nbsp;</p>
148
-
149
- <div class="stuffbox" style="border-color: #FFC426; border-width: 3px;">
150
- <h3 style="background: #FFF2D0; border-color: #FFC426;"><span class="hndle"><?php _e( 'Have you want to customize?' , $this->ltd_p ); ?></span></h3>
151
- <div class="inside">
152
- <p style="float: right;">
153
- <img src="<?php echo $this->Schema; ?>www.gravatar.com/avatar/7e05137c5a859aa987a809190b979ed4?s=46" width="46" /><br />
154
- <a href="<?php echo $this->AuthorUrl; ?>contact-us/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">gqevu6bsiz</a>
155
- </p>
156
- <p><?php _e( 'I am good at Admin Screen Customize.' , $this->ltd_p ); ?></p>
157
- <p><?php _e( 'Please consider the request to me if it is good.' , $this->ltd_p ); ?></p>
158
- <p>
159
- <a href="<?php echo $this->Site; ?>blog/category/example/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e ( 'Example Customize' , $this->ltd_p ); ?></a> :
160
- <a href="<?php echo $this->Site; ?>contact/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e( 'Contact me' , $this->ltd_p ); ?></a></p>
161
- </div>
162
- </div>
163
-
164
- </div>
165
-
166
- </div>
167
-
168
- <br class="clear">
169
-
170
- </div>
171
-
172
- </div>
173
-
174
- </div>
175
-
176
- <script type="text/javascript">
177
- jQuery(document).ready(function($) {
178
-
179
- var $RDonated = '<?php echo get_option( $this->Record["donate"] ); ?>';
180
- var $TDonated = '<?php echo $this->DonateKey; ?>';
181
-
182
- if( $RDonated == $TDonated ) {
183
- $("#donationbox").hide();
184
- if( $TDonated != "" ) {
185
- $("#donation_form").html( '<p>&nbsp;</p><p>&nbsp;</p><span class="description"><?php _e( 'Thank you for your donation.' , $this->ltd_p ); ?></span>' );
186
- } else {
187
- $("#donation_form").html( '' );
188
- }
189
- }
190
-
191
- });
192
- </script>
1
+ <?php
2
+
3
+ if( !empty( $_POST["donate_key"] ) ) {
4
+ $this->DonatingCheck();
5
+ } elseif( !empty( $_POST["update"] ) ) {
6
+ $this->update_userrole();
7
+ } elseif( !empty( $_POST["reset"] ) ) {
8
+ $this->update_reset( 'user_role' );
9
+ }
10
+
11
+ $Data = $this->get_data( 'user_role' );
12
+ $UserRoles = $this->get_user_role();
13
+
14
+ // include js css
15
+ $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
16
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
17
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
18
+
19
+ ?>
20
+ <div class="wrap">
21
+ <div class="icon32" id="icon-tools"></div>
22
+ <?php echo $this->Msg; ?>
23
+ <h2><?php echo $this->Name; ?></h2>
24
+ <p><?php _e( 'Customize the UI of the management screen for all users.' , $this->ltd ); ?></p>
25
+ <p><?php _e ( 'Please select the user roles that all settings will apply to.' , $this->ltd ); ?></p>
26
+ <p class="description"><?php _e( 'Please use the Multiple Add-on If you want settings on User role basis.' , $this->ltd ); ?></p>
27
+ <p><strong><span style="color: orange;">new</span> <a href="<?php echo $this->Site; ?>multiple_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Multiple Add-on</a></strong></p>
28
+
29
+ <div id="poststuff">
30
+ <div id="post-body" class="metabox-holder columns-2">
31
+
32
+ <div id="postbox-container-1" class="postbox-container">
33
+
34
+ <div id="about_plugin">
35
+
36
+ <div class="stuffbox" id="donationbox">
37
+ <div class="inside">
38
+ <p style="color: #FFFFFF; font-size: 20px;"><?php _e( 'Donate' , $this->ltd_p ); ?></p>
39
+ <p style="color: #FFFFFF;"><?php _e( 'You are contented with this plugin?<br />By the laws of Japan, Japan\'s new paypal user can not make a donation button.<br />So i would like you to buy this plugin as the replacement for the donation.' , $this->ltd_p ); ?></p>
40
+ <p>&nbsp;</p>
41
+ <p style="text-align: center;">
42
+ <a href="<?php echo $this->AuthorUrl; ?>line-break-first-and-end/?utm_source=use_plugin&utm_medium=donate&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" class="button-primary" target="_blank">Line Break First and End</a>
43
+ </p>
44
+ <p>&nbsp;</p>
45
+ <div class="donation_memo">
46
+ <p><strong><?php _e( 'Features' , $this->ltd_p ); ?></strong></p>
47
+ <p><?php _e( 'Line Break First and End plugin is In the visual editor TinyMCE, It is a plugin that will help when you will not be able to enter a line break.' , $this->ltd_p ); ?></p>
48
+ </div>
49
+ <div class="donation_memo">
50
+ <p><strong><?php _e( 'The primary use of donations' , $this->ltd_p ); ?></strong></p>
51
+ <ul>
52
+ <li>- <?php _e( 'Liquidation of time and value' , $this->ltd_p ); ?></li>
53
+ <li>- <?php _e( 'Additional suggestions feature' , $this->ltd_p ); ?></li>
54
+ <li>- <?php _e( 'Maintain motivation' , $this->ltd_p ); ?></li>
55
+ <li>- <?php _e( 'Ensure time as the father of Sunday' , $this->ltd_p ); ?></li>
56
+ </ul>
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="stuffbox" id="aboutbox">
62
+ <h3><span class="hndle"><?php _e( 'About plugin' , $this->ltd_p ); ?></span></h3>
63
+ <div class="inside">
64
+ <p><?php _e( 'Version checked' , $this->ltd_p ); ?> : 3.5.2 - 3.6</p>
65
+ <ul>
66
+ <li><a href="<?php echo $this->Site; ?>?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e( 'Plugin\'s site' , $this->ltd_p ); ?></a></li>
67
+ <li><a href="<?php echo $this->AuthorUrl; ?>?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e( 'Developer\'s site' , $this->ltd_p ); ?></a></li>
68
+ <li><a href="http://wordpress.org/support/plugin/<?php echo $this->PluginSlug; ?>" target="_blank"><?php _e( 'Support Forums' ); ?></a></li>
69
+ <li><a href="http://wordpress.org/support/view/plugin-reviews/<?php echo $this->PluginSlug; ?>" target="_blank"><?php _e( 'Reviews' , $this->ltd_p ); ?></a></li>
70
+ <li><a href="https://twitter.com/gqevu6bsiz" target="_blank">twitter</a></li>
71
+ <li><a href="http://www.facebook.com/pages/Gqevu6bsiz/499584376749601" target="_blank">facebook</a></li>
72
+ </ul>
73
+ </div>
74
+ </div>
75
+
76
+ <div class="stuffbox" id="usefulbox">
77
+ <h3><span class="hndle"><?php _e( 'Useful plugins' , $this->ltd_p ); ?></span></h3>
78
+ <div class="inside">
79
+ <p><strong><span style="color: orange;">new</span> <a href="<?php echo $this->Site; ?>multiple_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Multiple Add-on</a></strong></p>
80
+ <p class="description"><?php _e( 'This add-on is simply settings of multi user roles.' , $this->ltd_p ); ?></p>
81
+ <p><strong><a href="<?php echo $this->Site; ?>import_export_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize Import &amp; Export Add-on</a></strong></p>
82
+ <p class="description"><?php _e( 'This add-on is Import/Export easily of the settings data.' , $this->ltd_p ); ?></p>
83
+ <p><strong><a href="<?php echo $this->Site; ?>multisite_about/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">WP Admin UI Customize for Multisite</a></strong></p>
84
+ <p class="description"><?php _e( 'This add-on is an add-on to unify the management screen of all sites.' , $this->ltd_p ); ?></p>
85
+ <p><strong><a href="http://wordpress.org/extend/plugins/post-lists-view-custom/" target="_blank">Post Lists View Custom</a></strong></p>
86
+ <p class="description"><?php _e( 'Customize the list of the post and page. custom post type page, too. You can customize the column display items freely.' , $this->ltd_p ); ?></p>
87
+ <p><strong><a href="http://wordpress.org/extend/plugins/announce-from-the-dashboard/" target="_blank">Announce from the Dashboard</a></strong></p>
88
+ <p class="description"><?php _e( 'Announce to display the dashboard. Change the display to a different user role.' , $this->ltd_p ); ?></p>
89
+ <p><strong><a href="http://wordpress.org/extend/plugins/custom-options-plus-post-in/" target="_blank">Custom Options Plus Post in</a></strong></p>
90
+ <p class="description"><?php _e( 'The plugin that allows you to add the value of the options. Option value that you have created, can be used in addition to the template tag, Short code can be used in the body of the article.' , $this->ltd_p ); ?></p>
91
+ <p>&nbsp;</p>
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+ </div>
98
+
99
+ <div id="postbox-container-2" class="postbox-container">
100
+
101
+ <div id="user_role">
102
+
103
+ <form id="wauc_setting_default" class="wauc_form" method="post" action="">
104
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
105
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
106
+
107
+ <div class="postbox">
108
+ <h3 class="hndle"><span><?php _e( 'User Roles' ); ?></span></h3>
109
+ <div class="inside">
110
+ <?php $field = 'user_role'; ?>
111
+ <?php foreach($UserRoles as $role_name => $val) : ?>
112
+ <?php $Checked = ''; ?>
113
+ <?php if( !empty( $Data[$role_name] ) ) : $Checked = 'checked="checked"'; endif; ?>
114
+ <p>
115
+ <label>
116
+ <input type="checkbox" name="data[<?php echo $field; ?>][<?php echo $role_name; ?>]" value="1" <?php echo $Checked; ?> />
117
+ <?php echo $val["label"]; ?>
118
+ </label>
119
+ </p>
120
+ <?php endforeach; ?>
121
+ </div>
122
+ </div>
123
+
124
+ <p class="submit">
125
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
126
+ </p>
127
+
128
+ <p class="submit reset">
129
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
130
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
131
+ </p>
132
+
133
+ <p>&nbsp;</p>
134
+
135
+ </form>
136
+
137
+ <form id="donation_form" class="wauc_form" method="post" action="">
138
+ <h3><?php _e( 'If you have already donated to.' , $this->ltd_p ); ?></h3>
139
+ <p><?php _e( 'Please enter the \'Donation delete key\' that have been described in the \'Line Break First and End download page\'.' , $this->ltd_p ); ?></p>
140
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
141
+ <?php wp_nonce_field(); ?>
142
+ <label for="donate_key"><?php _e( 'Donation delete key' , $this->ltd_p ); ?></label>
143
+ <input type="text" name="donate_key" id="donate_key" value="" class="regular-text" />
144
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Submit' ); ?>" />
145
+ </form>
146
+
147
+ <p>&nbsp;</p>
148
+
149
+ <div class="stuffbox" style="border-color: #FFC426; border-width: 3px;">
150
+ <h3 style="background: #FFF2D0; border-color: #FFC426;"><span class="hndle"><?php _e( 'Have you want to customize?' , $this->ltd_p ); ?></span></h3>
151
+ <div class="inside">
152
+ <p style="float: right;">
153
+ <img src="<?php echo $this->Schema; ?>www.gravatar.com/avatar/7e05137c5a859aa987a809190b979ed4?s=46" width="46" /><br />
154
+ <a href="<?php echo $this->AuthorUrl; ?>contact-us/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank">gqevu6bsiz</a>
155
+ </p>
156
+ <p><?php _e( 'I am good at Admin Screen Customize.' , $this->ltd_p ); ?></p>
157
+ <p><?php _e( 'Please consider the request to me if it is good.' , $this->ltd_p ); ?></p>
158
+ <p>
159
+ <a href="<?php echo $this->Site; ?>blog/category/example/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e ( 'Example Customize' , $this->ltd_p ); ?></a> :
160
+ <a href="<?php echo $this->Site; ?>contact/?utm_source=use_plugin&utm_medium=side&utm_content=<?php echo $this->ltd; ?>&utm_campaign=<?php echo str_replace( '.' , '_' , $this->Ver ); ?>" target="_blank"><?php _e( 'Contact me' , $this->ltd_p ); ?></a></p>
161
+ </div>
162
+ </div>
163
+
164
+ </div>
165
+
166
+ </div>
167
+
168
+ <br class="clear">
169
+
170
+ </div>
171
+
172
+ </div>
173
+
174
+ </div>
175
+
176
+ <script type="text/javascript">
177
+ jQuery(document).ready(function($) {
178
+
179
+ var $RDonated = '<?php echo get_option( $this->Record["donate"] ); ?>';
180
+ var $TDonated = '<?php echo $this->DonateKey; ?>';
181
+
182
+ if( $RDonated == $TDonated ) {
183
+ $("#donationbox").hide();
184
+ if( $TDonated != "" ) {
185
+ $("#donation_form").html( '<p>&nbsp;</p><p>&nbsp;</p><span class="description"><?php _e( 'Thank you for your donation.' , $this->ltd_p ); ?></span>' );
186
+ } else {
187
+ $("#donation_form").html( '' );
188
+ }
189
+ }
190
+
191
+ });
192
+ </script>
inc/setting_loginscreen.php CHANGED
@@ -1,151 +1,151 @@
1
- <?php
2
-
3
- if( !empty( $_POST["update"] ) ) {
4
- $this->update_loginscreen();
5
- } elseif( !empty( $_POST["reset"] ) ) {
6
- $this->update_reset( 'loginscreen' );
7
- }
8
-
9
- $Data = $this->get_data( 'loginscreen' );
10
-
11
- // include js css
12
- $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' , 'thickbox' );
13
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
14
- wp_enqueue_style('thickbox');
15
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
16
-
17
- ?>
18
-
19
- <div class="wrap">
20
- <div class="icon32" id="icon-tools"></div>
21
- <?php echo $this->Msg; ?>
22
- <h2><?php _e( 'Login Screen Settings' , $this->ltd ); ?></h2>
23
- <p>&nbsp;</p>
24
-
25
- <form id="wauc_setting_loginscreen" class="wauc_form" method="post" action="">
26
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
27
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
28
-
29
- <?php if( is_multisite() ) : ?>
30
- <p class="description"><?php _e( 'Is not possible to check the login form if you do not log out in the case of MultiSite.' , $this->ltd ); ?></p>
31
- <?php endif; ?>
32
- <p><a title="<?php _e( 'Login Screen' , $this->ltd ); ?>" href="<?php echo get_option( 'siteurl' ); ?>/wp-login.php?TB_iframe=1&width=520&height=520" class="thickbox"><?php _e( 'Show Login Screen' , $this->ltd ); ?></a></p>
33
-
34
- <div id="poststuff">
35
- <div id="post-body" class="metabox-holder columns-1">
36
-
37
- <div id="postbox-container-1" class="postbox-container">
38
- <div id="login_screen">
39
-
40
- <div class="postbox">
41
- <div class="handlediv" title="Click to toggle"><br></div>
42
- <h3 class="hndle"><span><?php _e( 'Login Form' , $this->ltd ); ?></span></h3>
43
- <div class="inside">
44
- <table class="form-table">
45
- <tbody>
46
- <?php $field = 'login_headerurl'; ?>
47
- <tr>
48
- <th>
49
- <label><?php _e( 'The link after clicking on the logo' , $this->ltd ); ?></label>
50
- </th>
51
- <td>
52
- <?php $Val = ''; ?>
53
- <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
54
- <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
55
- <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
56
-
57
- </td>
58
- </tr>
59
- <?php $field = 'login_headertitle'; ?>
60
- <tr>
61
- <th>
62
- <label><?php _e( 'Logo Title' , $this->ltd ); ?></label>
63
- </th>
64
- <td>
65
- <?php $Val = ''; ?>
66
- <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
67
- <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
68
- <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
69
- </td>
70
- </tr>
71
- <?php $field = 'login_headerlogo'; ?>
72
- <tr>
73
- <th>
74
- <label><?php _e( 'Logo Image path' , $this->ltd ); ?></label>
75
- </th>
76
- <td>
77
- <?php $Val = ''; ?>
78
- <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
79
- <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
80
- <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
81
- <?php if( !empty( $Val ) ) : ?>
82
- <?php $img = str_replace( '[blog_url]' , get_bloginfo( 'url' ) , $Val ); ?>
83
- <?php $img = str_replace( '[template_directory_uri]' , get_bloginfo( 'url' ) , $img ); ?>
84
- <p><img src="<?php echo $img; ?>" alt="Login Logo" /></p>
85
- <?php endif; ?>
86
- </td>
87
- </tr>
88
- </tbody>
89
- </table>
90
- </div>
91
- </div>
92
-
93
- <div class="postbox">
94
- <div class="handlediv" title="Click to toggle"><br></div>
95
- <h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
96
- <div class="inside">
97
- <table class="form-table">
98
- <tbody>
99
- <?php $field = 'login_css'; ?>
100
- <tr>
101
- <th>
102
- <label><?php _e( 'CSS file to load' , $this->ltd ); ?></label>
103
- </th>
104
- <td>
105
- <?php $Val = ''; ?>
106
- <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
107
- <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
108
- <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
109
- </td>
110
- </tr>
111
- <?php $field = 'login_footer'; ?>
112
- <tr>
113
- <th>
114
- <label><?php _e( 'Footer text' , $this->ltd ); ?></label>
115
- </th>
116
- <td>
117
- <?php $Val = ''; ?>
118
- <?php if( !empty( $Data[$field] ) ) : $Val = stripslashes( esc_html( $Data[$field] ) ); endif; ?>
119
- <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" id="<?php echo $field; ?>">
120
- <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
121
- </td>
122
- </tr>
123
- </tbody>
124
- </table>
125
- </div>
126
- </div>
127
-
128
- </div>
129
-
130
- </div>
131
-
132
- <br class="clear">
133
-
134
- </div>
135
-
136
- </div>
137
-
138
- <p class="submit">
139
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
140
- </p>
141
-
142
- <p class="submit reset">
143
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
144
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
145
- </p>
146
-
147
- </form>
148
-
149
- </div>
150
-
151
- <?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
1
+ <?php
2
+
3
+ if( !empty( $_POST["update"] ) ) {
4
+ $this->update_loginscreen();
5
+ } elseif( !empty( $_POST["reset"] ) ) {
6
+ $this->update_reset( 'loginscreen' );
7
+ }
8
+
9
+ $Data = $this->get_data( 'loginscreen' );
10
+
11
+ // include js css
12
+ $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' , 'thickbox' );
13
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
14
+ wp_enqueue_style('thickbox');
15
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
16
+
17
+ ?>
18
+
19
+ <div class="wrap">
20
+ <div class="icon32" id="icon-tools"></div>
21
+ <?php echo $this->Msg; ?>
22
+ <h2><?php _e( 'Login Screen Settings' , $this->ltd ); ?></h2>
23
+ <p>&nbsp;</p>
24
+
25
+ <form id="wauc_setting_loginscreen" class="wauc_form" method="post" action="">
26
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
27
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
28
+
29
+ <?php if( is_multisite() ) : ?>
30
+ <p class="description"><?php _e( 'Is not possible to check the login form if you do not log out in the case of MultiSite.' , $this->ltd ); ?></p>
31
+ <?php endif; ?>
32
+ <p><a title="<?php _e( 'Login Screen' , $this->ltd ); ?>" href="<?php echo get_option( 'siteurl' ); ?>/wp-login.php?TB_iframe=1&width=520&height=520" class="thickbox"><?php _e( 'Show Login Screen' , $this->ltd ); ?></a></p>
33
+
34
+ <div id="poststuff">
35
+ <div id="post-body" class="metabox-holder columns-1">
36
+
37
+ <div id="postbox-container-1" class="postbox-container">
38
+ <div id="login_screen">
39
+
40
+ <div class="postbox">
41
+ <div class="handlediv" title="Click to toggle"><br></div>
42
+ <h3 class="hndle"><span><?php _e( 'Login Form' , $this->ltd ); ?></span></h3>
43
+ <div class="inside">
44
+ <table class="form-table">
45
+ <tbody>
46
+ <?php $field = 'login_headerurl'; ?>
47
+ <tr>
48
+ <th>
49
+ <label><?php _e( 'The link after clicking on the logo' , $this->ltd ); ?></label>
50
+ </th>
51
+ <td>
52
+ <?php $Val = ''; ?>
53
+ <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
54
+ <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
55
+ <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
56
+
57
+ </td>
58
+ </tr>
59
+ <?php $field = 'login_headertitle'; ?>
60
+ <tr>
61
+ <th>
62
+ <label><?php _e( 'Logo Title' , $this->ltd ); ?></label>
63
+ </th>
64
+ <td>
65
+ <?php $Val = ''; ?>
66
+ <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
67
+ <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
68
+ <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
69
+ </td>
70
+ </tr>
71
+ <?php $field = 'login_headerlogo'; ?>
72
+ <tr>
73
+ <th>
74
+ <label><?php _e( 'Logo Image path' , $this->ltd ); ?></label>
75
+ </th>
76
+ <td>
77
+ <?php $Val = ''; ?>
78
+ <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
79
+ <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
80
+ <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
81
+ <?php if( !empty( $Val ) ) : ?>
82
+ <?php $img = str_replace( '[blog_url]' , get_bloginfo( 'url' ) , $Val ); ?>
83
+ <?php $img = str_replace( '[template_directory_uri]' , get_bloginfo( 'url' ) , $img ); ?>
84
+ <p><img src="<?php echo $img; ?>" alt="Login Logo" /></p>
85
+ <?php endif; ?>
86
+ </td>
87
+ </tr>
88
+ </tbody>
89
+ </table>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="postbox">
94
+ <div class="handlediv" title="Click to toggle"><br></div>
95
+ <h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
96
+ <div class="inside">
97
+ <table class="form-table">
98
+ <tbody>
99
+ <?php $field = 'login_css'; ?>
100
+ <tr>
101
+ <th>
102
+ <label><?php _e( 'CSS file to load' , $this->ltd ); ?></label>
103
+ </th>
104
+ <td>
105
+ <?php $Val = ''; ?>
106
+ <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
107
+ <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
108
+ <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
109
+ </td>
110
+ </tr>
111
+ <?php $field = 'login_footer'; ?>
112
+ <tr>
113
+ <th>
114
+ <label><?php _e( 'Footer text' , $this->ltd ); ?></label>
115
+ </th>
116
+ <td>
117
+ <?php $Val = ''; ?>
118
+ <?php if( !empty( $Data[$field] ) ) : $Val = stripslashes( esc_html( $Data[$field] ) ); endif; ?>
119
+ <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" id="<?php echo $field; ?>">
120
+ <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
121
+ </td>
122
+ </tr>
123
+ </tbody>
124
+ </table>
125
+ </div>
126
+ </div>
127
+
128
+ </div>
129
+
130
+ </div>
131
+
132
+ <br class="clear">
133
+
134
+ </div>
135
+
136
+ </div>
137
+
138
+ <p class="submit">
139
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
140
+ </p>
141
+
142
+ <p class="submit reset">
143
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
144
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
145
+ </p>
146
+
147
+ </form>
148
+
149
+ </div>
150
+
151
+ <?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
inc/setting_post_add_edit.php CHANGED
@@ -1,112 +1,112 @@
1
- <?php
2
-
3
- if( !empty( $_POST["update"] ) ) {
4
- $this->update_post_add_edit();
5
- } elseif( !empty( $_POST["reset"] ) ) {
6
- $this->update_reset( 'post_add_edit' );
7
- }
8
-
9
- $Data = $this->get_data( 'post_add_edit' );
10
- $comment_status = get_option( 'default_comment_status' );
11
-
12
- // include js css
13
- $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
14
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
15
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
16
-
17
- ?>
18
-
19
- <div class="wrap">
20
- <div class="icon32" id="icon-tools"></div>
21
- <?php echo $this->Msg; ?>
22
- <h2><?php _e( 'Add New Post and Edit Post Screen Setting' , $this->ltd ); ?></h2>
23
- <p>&nbsp;</p>
24
-
25
- <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
26
-
27
- <form id="wauc_setting_post_add_edit" class="wauc_form" method="post" action="">
28
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
29
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
30
-
31
- <div id="poststuff">
32
-
33
- <div id="post-body" class="metabox-holder columns-1">
34
-
35
- <div id="postbox-container-1" class="postbox-container">
36
-
37
- <div id="post_add">
38
- <div class="postbox">
39
- <h3 class="hndle"><span><?php _e( 'Add New Post' ); ?> &amp; <?php _e( 'Add New Page' ); ?></span></h3>
40
- <div class="inside">
41
- <table class="form-table">
42
- <tbody>
43
- <?php $field = 'allow_comments'; ?>
44
- <tr>
45
- <th>
46
- <label><?php _e( 'Allow people to post comments on new articles when hide to discussion of metabox' , $this->ltd ); ?></label>
47
- </th>
48
- <td>
49
- <?php if( $comment_status == 'open' ) : ?>
50
- <?php $Checked = ''; ?>
51
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
52
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Allow' ); ?></label>
53
- <p class="description"><?php _e( 'Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role.' , $this->ltd ); ?></p>
54
- <p><?php _e( 'Please select if you want to display the comments on Site.' , $this->ltd ); ?></p>
55
- <p><a href="<?php echo admin_url( 'options-discussion.php' ); ?>"><?php echo sprintf( __( 'However, this will follow the setting of %s.' , $this->ltd ) , __( 'Default article settings' ) ); ?></a></p>
56
- <?php else : ?>
57
- <p><a href="<?php echo admin_url( 'options-discussion.php' ); ?>"><?php echo sprintf( __( 'Please select the %s' , $this->ltd ) , __( 'Allow people to post comments on new articles' ) ); ?></a></p>
58
- <?php endif; ?>
59
-
60
- </td>
61
- </tr>
62
- </tbody>
63
- </table>
64
- </div>
65
- </div>
66
- </div>
67
-
68
- <div id="post_add_edit">
69
- <div class="postbox">
70
- <h3 class="hndle"><span><?php _e( 'Add New Post' ); ?> &amp; <?php _e( 'Edit Post' ); ?></span></h3>
71
- <div class="inside">
72
- <table class="form-table">
73
- <tbody>
74
- <?php $field = 'default_permalink'; ?>
75
- <tr>
76
- <th>
77
- <label><?php _e( 'Change Permalinks' ); ?></label>
78
- </th>
79
- <td>
80
- <?php $Checked = ''; ?>
81
- <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
82
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
83
- <p class="description"><?php _e( 'Only appears when you have settings to the default permalink.' , $this->ltd ); ?></p>
84
- <p><img src="<?php echo $this->Url; ?>images/post_add_edit_screen__edit_ppermalink.png" /></p>
85
- </td>
86
- </tr>
87
- </tbody>
88
- </table>
89
- </div>
90
- </div>
91
- </div>
92
-
93
- </div>
94
-
95
- <br class="clear">
96
-
97
- </div>
98
-
99
- </div>
100
-
101
- <p class="submit">
102
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
103
- </p>
104
-
105
- <p class="submit reset">
106
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
107
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
108
- </p>
109
-
110
- </form>
111
-
112
- </div>
1
+ <?php
2
+
3
+ if( !empty( $_POST["update"] ) ) {
4
+ $this->update_post_add_edit();
5
+ } elseif( !empty( $_POST["reset"] ) ) {
6
+ $this->update_reset( 'post_add_edit' );
7
+ }
8
+
9
+ $Data = $this->get_data( 'post_add_edit' );
10
+ $comment_status = get_option( 'default_comment_status' );
11
+
12
+ // include js css
13
+ $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
14
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
15
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
16
+
17
+ ?>
18
+
19
+ <div class="wrap">
20
+ <div class="icon32" id="icon-tools"></div>
21
+ <?php echo $this->Msg; ?>
22
+ <h2><?php _e( 'Add New Post and Edit Post Screen Setting' , $this->ltd ); ?></h2>
23
+ <p>&nbsp;</p>
24
+
25
+ <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
26
+
27
+ <form id="wauc_setting_post_add_edit" class="wauc_form" method="post" action="">
28
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
29
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
30
+
31
+ <div id="poststuff">
32
+
33
+ <div id="post-body" class="metabox-holder columns-1">
34
+
35
+ <div id="postbox-container-1" class="postbox-container">
36
+
37
+ <div id="post_add">
38
+ <div class="postbox">
39
+ <h3 class="hndle"><span><?php _e( 'Add New Post' ); ?> &amp; <?php _e( 'Add New Page' ); ?></span></h3>
40
+ <div class="inside">
41
+ <table class="form-table">
42
+ <tbody>
43
+ <?php $field = 'allow_comments'; ?>
44
+ <tr>
45
+ <th>
46
+ <label><?php _e( 'Allow people to post comments on new articles when hide to discussion of metabox' , $this->ltd ); ?></label>
47
+ </th>
48
+ <td>
49
+ <?php if( $comment_status == 'open' ) : ?>
50
+ <?php $Checked = ''; ?>
51
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
52
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Allow' ); ?></label>
53
+ <p class="description"><?php _e( 'Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role.' , $this->ltd ); ?></p>
54
+ <p><?php _e( 'Please select if you want to display the comments on Site.' , $this->ltd ); ?></p>
55
+ <p><a href="<?php echo admin_url( 'options-discussion.php' ); ?>"><?php echo sprintf( __( 'However, this will follow the setting of %s.' , $this->ltd ) , __( 'Default article settings' ) ); ?></a></p>
56
+ <?php else : ?>
57
+ <p><a href="<?php echo admin_url( 'options-discussion.php' ); ?>"><?php echo sprintf( __( 'Please select the %s' , $this->ltd ) , __( 'Allow people to post comments on new articles' ) ); ?></a></p>
58
+ <?php endif; ?>
59
+
60
+ </td>
61
+ </tr>
62
+ </tbody>
63
+ </table>
64
+ </div>
65
+ </div>
66
+ </div>
67
+
68
+ <div id="post_add_edit">
69
+ <div class="postbox">
70
+ <h3 class="hndle"><span><?php _e( 'Add New Post' ); ?> &amp; <?php _e( 'Edit Post' ); ?></span></h3>
71
+ <div class="inside">
72
+ <table class="form-table">
73
+ <tbody>
74
+ <?php $field = 'default_permalink'; ?>
75
+ <tr>
76
+ <th>
77
+ <label><?php _e( 'Change Permalinks' ); ?></label>
78
+ </th>
79
+ <td>
80
+ <?php $Checked = ''; ?>
81
+ <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
82
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
83
+ <p class="description"><?php _e( 'Only appears when you have settings to the default permalink.' , $this->ltd ); ?></p>
84
+ <p><img src="<?php echo $this->Url; ?>images/post_add_edit_screen__edit_ppermalink.png" /></p>
85
+ </td>
86
+ </tr>
87
+ </tbody>
88
+ </table>
89
+ </div>
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+ <br class="clear">
96
+
97
+ </div>
98
+
99
+ </div>
100
+
101
+ <p class="submit">
102
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
103
+ </p>
104
+
105
+ <p class="submit reset">
106
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
107
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
108
+ </p>
109
+
110
+ </form>
111
+
112
+ </div>
inc/setting_removemtabox.php CHANGED
@@ -1,146 +1,196 @@
1
- <?php
2
-
3
- if( !empty( $_POST["update"] ) ) {
4
- $this->update_removemetabox();
5
- } elseif( !empty( $_POST["reset"] ) ) {
6
- $this->update_reset( 'removemetabox' );
7
- }
8
-
9
- $Data = $this->get_data( 'removemetabox' );
10
- $Metaboxes = $this->get_data( "regist_metabox" );
11
-
12
- // include js css
13
- $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
14
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
15
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
16
-
17
- ?>
18
-
19
- <div class="wrap">
20
- <div class="icon32" id="icon-tools"></div>
21
- <?php echo $this->Msg; ?>
22
- <h2><?php _e( 'Remove meta box' , $this->ltd ); ?></h2>
23
- <p><?php _e( 'Please update or add a "post" and a "page" to load the available meta boxes.' , $this->ltd ); ?></p>
24
-
25
- <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
26
-
27
- <form id="wauc_setting_removemtabox" class="wauc_form" method="post" action="">
28
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
29
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
30
-
31
- <div id="poststuff">
32
-
33
- <div id="post-body" class="metabox-holder columns-1">
34
-
35
- <div id="postbox-container-1" class="postbox-container">
36
- <div id="metabox_post">
37
- <div class="postbox">
38
- <div class="handlediv" title="Click to toggle"><br></div>
39
- <h3 class="hndle"><span><?php _e( 'Post' ); ?></span></h3>
40
- <div class="inside">
41
-
42
- <?php if( empty( $Metaboxes["metaboxes"]["post"] ) ) : ?>
43
-
44
- <p><?php _e( 'Could not read the meta box.' , $this->ltd ); ?></p>
45
- <p><?php echo sprintf( __( 'Meta boxes will be loaded automatically when you Edit %s.' , $this->ltd ) , __( 'Post' ) ); ?></p>
46
-
47
- <?php else: ?>
48
-
49
- <table class="form-table">
50
- <tbody>
51
- <?php foreach( $Metaboxes["metaboxes"]["post"] as $context => $meta_box ) : ?>
52
- <?php foreach( $meta_box as $priority => $box ) : ?>
53
- <?php foreach( $box as $metabox_id => $metabox_title ) : ?>
54
- <?php if( $metabox_id != 'submitdiv' ) : ?>
55
- <tr>
56
- <th><?php echo $metabox_title; ?></th>
57
- <td>
58
- <?php $Checked = ''; ?>
59
- <?php if( !empty( $Data["post"][$metabox_id] ) ) : $Checked = 'checked="checked"'; endif; ?>
60
- <label><input type="checkbox" name="data[post][<?php echo $metabox_id; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
61
- <?php if( $metabox_id == 'commentstatusdiv' ) : ?>
62
- <p class="description"><?php _e( 'Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role.' , $this->ltd ); ?></p>
63
- <p><img src="<?php echo $this->Url; ?>images/discussion_allow_comments.png" /></p>
64
- <p><a href="<?php echo admin_url( 'admin.php?page=' . $this->PageSlug . '_post_add_edit_screen' ); ?>"><?php _e( 'Please set from here if you want to view the comments on screen.' , $this->ltd ); ?></a></p>
65
- <?php endif; ?>
66
- </td>
67
- </tr>
68
- <?php endif; ?>
69
- <?php endforeach; ?>
70
- <?php endforeach; ?>
71
- <?php endforeach; ?>
72
- </tbody>
73
- </table>
74
-
75
-
76
- <?php endif; ?>
77
- </div>
78
- </div>
79
- </div>
80
- </div>
81
-
82
- <div id="postbox-container-2" class="postbox-container">
83
- <div id="metabox_page">
84
- <div class="postbox">
85
- <div class="handlediv" title="Click to toggle"><br></div>
86
- <h3 class="hndle"><span><?php _e( 'Page' ); ?></span></h3>
87
- <div class="inside">
88
-
89
- <?php if( empty( $Metaboxes["metaboxes"]["page"] ) ) : ?>
90
-
91
- <p><?php _e( 'Could not read the meta box.' , $this->ltd ); ?></p>
92
- <p><?php echo sprintf( __( 'Meta boxes will be loaded automatically when you Edit %s.' , $this->ltd ) , __( 'Page' ) ); ?></p>
93
-
94
- <?php else: ?>
95
-
96
- <table class="form-table">
97
- <tbody>
98
- <?php foreach( $Metaboxes["metaboxes"]["page"] as $context => $meta_box ) : ?>
99
- <?php foreach( $meta_box as $priority => $box ) : ?>
100
- <?php foreach( $box as $metabox_id => $metabox_title ) : ?>
101
- <?php if( $metabox_id != 'submitdiv' ) : ?>
102
- <tr>
103
- <th><?php echo $metabox_title; ?></th>
104
- <td>
105
- <?php $Checked = ''; ?>
106
- <?php if( !empty( $Data["page"][$metabox_id] ) ) : $Checked = 'checked="checked"'; endif; ?>
107
- <label><input type="checkbox" name="data[page][<?php echo $metabox_id; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
108
- <?php if( $metabox_id == 'commentstatusdiv' ) : ?>
109
- <p class="description"><?php _e( 'Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role.' , $this->ltd ); ?></p>
110
- <p><img src="<?php echo $this->Url; ?>images/discussion_allow_comments.png" /></p>
111
- <p><a href="<?php echo admin_url( 'admin.php?page=' . $this->PageSlug . '_post_add_edit_screen' ); ?>"><?php _e( 'Please set from here if you want to view the comments on screen.' , $this->ltd ); ?></a></p>
112
- <?php endif; ?>
113
- </td>
114
- </tr>
115
- <?php endif; ?>
116
- <?php endforeach; ?>
117
- <?php endforeach; ?>
118
- <?php endforeach; ?>
119
- </tbody>
120
- </table>
121
-
122
- <?php endif; ?>
123
-
124
- </div>
125
- </div>
126
- </div>
127
- </div>
128
-
129
- <br class="clear">
130
-
131
- </div>
132
-
133
- </div>
134
-
135
- <p class="submit">
136
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
137
- </p>
138
-
139
- <p class="submit reset">
140
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
141
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
142
- </p>
143
-
144
- </form>
145
-
146
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( !empty( $_POST["update"] ) ) {
4
+ $this->update_removemetabox();
5
+ } elseif( !empty( $_POST["reset"] ) ) {
6
+ $this->update_reset( 'removemetabox' );
7
+ $this->update_reset( 'regist_metabox' );
8
+ }
9
+
10
+ $Data = $this->get_data( 'removemetabox' );
11
+ $Metaboxes = $this->get_data( "regist_metabox" );
12
+ $CustomPosts = $this->get_custom_posts();
13
+
14
+ // include js css
15
+ $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
16
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
17
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
18
+
19
+ ?>
20
+
21
+ <div class="wrap">
22
+ <div class="icon32" id="icon-tools"></div>
23
+ <?php echo $this->Msg; ?>
24
+ <h2><?php _e( 'Remove meta box' , $this->ltd ); ?></h2>
25
+ <p><?php _e( 'Please update or add a "post" and a "page" to load the available meta boxes.' , $this->ltd ); ?></p>
26
+
27
+ <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
28
+
29
+ <form id="wauc_setting_removemtabox" class="wauc_form" method="post" action="">
30
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
31
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
32
+
33
+ <div id="poststuff">
34
+
35
+ <div id="post-body" class="metabox-holder columns-1">
36
+
37
+ <div id="postbox-container-1" class="postbox-container">
38
+ <div id="built_in">
39
+
40
+ <div class="postbox">
41
+ <div class="handlediv" title="Click to toggle"><br></div>
42
+ <h3 class="hndle"><span><?php _e( 'Post' ); ?></span></h3>
43
+ <div class="inside">
44
+
45
+ <?php if( empty( $Metaboxes["metaboxes"]["post"] ) ) : ?>
46
+
47
+ <p><?php _e( 'Could not read the meta box.' , $this->ltd ); ?></p>
48
+ <p><?php echo sprintf( __( 'Meta boxes will be loaded automatically when you Edit %s.' , $this->ltd ) , __( 'Post' ) ); ?></p>
49
+
50
+ <?php else: ?>
51
+
52
+ <table class="form-table">
53
+ <tbody>
54
+ <?php foreach( $Metaboxes["metaboxes"]["post"] as $context => $meta_box ) : ?>
55
+ <?php foreach( $meta_box as $priority => $box ) : ?>
56
+ <?php foreach( $box as $metabox_id => $metabox_title ) : ?>
57
+ <?php if( $metabox_id != 'submitdiv' ) : ?>
58
+ <tr>
59
+ <th><?php echo $metabox_title; ?></th>
60
+ <td>
61
+ <?php $Checked = ''; ?>
62
+ <?php if( !empty( $Data["post"][$metabox_id] ) ) : $Checked = 'checked="checked"'; endif; ?>
63
+ <label><input type="checkbox" name="data[post][<?php echo $metabox_id; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
64
+ <?php if( $metabox_id == 'commentstatusdiv' ) : ?>
65
+ <p class="description"><?php _e( 'Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role.' , $this->ltd ); ?></p>
66
+ <p><img src="<?php echo $this->Url; ?>images/discussion_allow_comments.png" /></p>
67
+ <p><a href="<?php echo admin_url( 'admin.php?page=' . $this->PageSlug . '_post_add_edit_screen' ); ?>"><?php _e( 'Please set from here if you want to view the comments on screen.' , $this->ltd ); ?></a></p>
68
+ <?php endif; ?>
69
+ </td>
70
+ </tr>
71
+ <?php endif; ?>
72
+ <?php endforeach; ?>
73
+ <?php endforeach; ?>
74
+ <?php endforeach; ?>
75
+ </tbody>
76
+ </table>
77
+
78
+
79
+ <?php endif; ?>
80
+ </div>
81
+ </div>
82
+
83
+ <div class="postbox">
84
+ <div class="handlediv" title="Click to toggle"><br></div>
85
+ <h3 class="hndle"><span><?php _e( 'Page' ); ?></span></h3>
86
+ <div class="inside">
87
+
88
+ <?php if( empty( $Metaboxes["metaboxes"]["page"] ) ) : ?>
89
+
90
+ <p><?php _e( 'Could not read the meta box.' , $this->ltd ); ?></p>
91
+ <p><?php echo sprintf( __( 'Meta boxes will be loaded automatically when you Edit %s.' , $this->ltd ) , __( 'Page' ) ); ?></p>
92
+
93
+ <?php else: ?>
94
+
95
+ <table class="form-table">
96
+ <tbody>
97
+ <?php foreach( $Metaboxes["metaboxes"]["page"] as $context => $meta_box ) : ?>
98
+ <?php foreach( $meta_box as $priority => $box ) : ?>
99
+ <?php foreach( $box as $metabox_id => $metabox_title ) : ?>
100
+ <?php if( $metabox_id != 'submitdiv' ) : ?>
101
+ <tr>
102
+ <th><?php echo $metabox_title; ?></th>
103
+ <td>
104
+ <?php $Checked = ''; ?>
105
+ <?php if( !empty( $Data["page"][$metabox_id] ) ) : $Checked = 'checked="checked"'; endif; ?>
106
+ <label><input type="checkbox" name="data[page][<?php echo $metabox_id; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
107
+ <?php if( $metabox_id == 'commentstatusdiv' ) : ?>
108
+ <p class="description"><?php _e( 'Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role.' , $this->ltd ); ?></p>
109
+ <p><img src="<?php echo $this->Url; ?>images/discussion_allow_comments.png" /></p>
110
+ <p><a href="<?php echo admin_url( 'admin.php?page=' . $this->PageSlug . '_post_add_edit_screen' ); ?>"><?php _e( 'Please set from here if you want to view the comments on screen.' , $this->ltd ); ?></a></p>
111
+ <?php endif; ?>
112
+ </td>
113
+ </tr>
114
+ <?php endif; ?>
115
+ <?php endforeach; ?>
116
+ <?php endforeach; ?>
117
+ <?php endforeach; ?>
118
+ </tbody>
119
+ </table>
120
+
121
+ <?php endif; ?>
122
+
123
+ </div>
124
+ </div>
125
+
126
+ </div>
127
+ </div>
128
+
129
+ <?php if ( !empty( $CustomPosts ) ) : ?>
130
+
131
+ <div id="postbox-container-2" class="postbox-container">
132
+ <div id="custom_post">
133
+
134
+ <?php foreach( $CustomPosts as $post_name => $cpt ) : ?>
135
+ <div class="postbox">
136
+ <div class="handlediv" title="Click to toggle"><br></div>
137
+ <h3 class="hndle"><span><?php echo strip_tags( $cpt->labels->name ); ?></span></h3>
138
+ <div class="inside">
139
+
140
+ <?php if( empty( $Metaboxes["metaboxes"][$post_name] ) ) : ?>
141
+
142
+ <p><?php _e( 'Could not read the meta box.' , $this->ltd ); ?></p>
143
+ <p><?php echo sprintf( __( 'Meta boxes will be loaded automatically when you Edit %s.' , $this->ltd ) , strip_tags( $cpt->labels->name ) ); ?></p>
144
+
145
+ <?php else: ?>
146
+
147
+ <table class="form-table">
148
+ <tbody>
149
+ <?php foreach( $Metaboxes["metaboxes"][$post_name] as $context => $meta_box ) : ?>
150
+ <?php foreach( $meta_box as $priority => $box ) : ?>
151
+ <?php foreach( $box as $metabox_id => $metabox_title ) : ?>
152
+ <?php if( !empty( $metabox_id ) && $metabox_id != 'submitdiv' ) : ?>
153
+ <tr>
154
+ <th><?php echo $metabox_title; ?></th>
155
+ <td>
156
+ <?php $Checked = ''; ?>
157
+ <?php if( !empty( $Data[$post_name][$metabox_id] ) ) : $Checked = 'checked="checked"'; endif; ?>
158
+ <label><input type="checkbox" name="data[<?php echo $post_name; ?>][<?php echo $metabox_id; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
159
+ </td>
160
+ </tr>
161
+ <?php endif; ?>
162
+ <?php endforeach; ?>
163
+ <?php endforeach; ?>
164
+ <?php endforeach; ?>
165
+ </tbody>
166
+ </table>
167
+
168
+ <?php endif; ?>
169
+
170
+ </div>
171
+ </div>
172
+ <?php endforeach; ?>
173
+
174
+ </div>
175
+ </div>
176
+
177
+ <?php endif; ?>
178
+
179
+ <br class="clear">
180
+
181
+ </div>
182
+
183
+ </div>
184
+
185
+ <p class="submit">
186
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
187
+ </p>
188
+
189
+ <p class="submit reset">
190
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
191
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
192
+ </p>
193
+
194
+ </form>
195
+
196
+ </div>
inc/setting_sidemenu.php CHANGED
@@ -1,351 +1,351 @@
1
- <?php
2
-
3
- global $menu, $submenu;
4
-
5
- if( !empty( $_POST["update"] ) ) {
6
- $this->update_sidemenu();
7
- } elseif( !empty( $_POST["reset"] ) ) {
8
- $this->update_reset( 'sidemenu' );
9
- }
10
-
11
- $this->get_user_role();
12
- $Data = $this->get_data( 'sidemenu' );
13
-
14
- // include js css
15
- $ReadedJs = array( 'jquery' , 'jquery-ui-draggable' , 'jquery-ui-droppable' , 'jquery-ui-sortable' , 'thickbox' );
16
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
17
- wp_enqueue_style('thickbox');
18
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
19
-
20
- ?>
21
-
22
- <div class="wrap">
23
- <div class="icon32" id="icon-tools"></div>
24
- <?php echo $this->Msg; ?>
25
- <h2><?php _e( 'Side Menu' , $this->ltd ); ?></h2>
26
- <p><?php _e( 'Please change the menu by drag and drop.' , $this->ltd ); ?></p>
27
- <p class="description"><?php echo sprintf( __( 'New plugin menus will be added to the <strong>%s</strong>.' , $this->ltd ) , __( 'Menu items that can be added' , $this->ltd ) ); ?>
28
- <p><strong><?php _e( 'Notice: Please do not place the same multiple menu slug.' , $this->ltd ); ?></strong></p>
29
-
30
- <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
31
-
32
- <p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a></p>
33
-
34
- <form id="wauc_setting_sidemenu" class="wauc_form" method="post" action="">
35
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
36
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
37
-
38
- <div id="poststuff">
39
-
40
- <div id="post-body" class="metabox-holder columns-2">
41
-
42
- <div id="postbox-container-1" class="postbox-container">
43
-
44
- <div id="can_menus">
45
-
46
- <div class="postbox">
47
- <h3 class="hndle"><span><?php _e( 'Menu items that can be added' , $this->ltd ); ?></span></h3>
48
- <div class="inside">
49
-
50
- <p class="description"><?php _e( 'Sepalator' , $this->ltd ); ?></p>
51
- <?php $menu_widget = array( 'title' => '-' , 'slug' => 'separator' , 'parent_slug' => '' , 'new' => true , 'cap' => 'read' ); ?>
52
- <?php $this->sidebar_menu_widget( $menu_widget ); ?>
53
- <div class="clear"></div>
54
-
55
- <?php foreach($this->Menu as $mm) : ?>
56
-
57
- <?php if( !empty( $mm[0] ) ) : ?>
58
-
59
- <?php $menu_title = $mm[0]; ?>
60
- <?php if( $mm[5] == 'menu-comments' ) : ?>
61
- <?php $menu_title = __( 'Comments' ); ?>
62
- <?php elseif( $mm[5] == 'menu-appearance' ) : ?>
63
- <?php $menu_title = __( 'Appearance' ); ?>
64
- <?php elseif( $mm[5] == 'menu-plugins' ) : ?>
65
- <?php $menu_title = __( 'Plugins' ); ?>
66
- <?php endif; ?>
67
- <p class="description"><?php echo $menu_title; ?></p>
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' ) : ?>
76
- <?php $menu_title = __( 'Update' ) . ' [update_total]'; ?>
77
- <?php elseif( $sm[2] == 'edit-comments.php' ) : ?>
78
- <?php $menu_title .= ' [comment_count]'; ?>
79
- <?php elseif( $sm[2] == 'themes.php' ) : ?>
80
- <?php $menu_title .= ' [update_themes]'; ?>
81
- <?php elseif( $sm[2] == 'plugins.php' ) : ?>
82
- <?php $menu_title .= ' [update_plugins]'; ?>
83
- <?php endif; ?>
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
- <div class="clear"></div>
93
-
94
- <?php endif; ?>
95
-
96
- <?php endforeach; ?>
97
-
98
- </div>
99
-
100
- </div>
101
-
102
- </div>
103
-
104
- </div>
105
-
106
- <div id="postbox-container-2" class="postbox-container">
107
-
108
- <div id="setting_menus">
109
-
110
- <div class="postbox">
111
- <h3 class="hndle">
112
- <span><?php _e( 'Current menu' , $this->ltd ); ?></span>
113
- </h3>
114
- <div class="inside">
115
-
116
- <?php if( empty( $Data ) ) : ?>
117
-
118
- <?php foreach($menu as $mm) : ?>
119
-
120
- <?php if( isset( $mm[2] ) && strstr( $mm[2] , 'separator' ) ) : ?>
121
-
122
- <?php $menu_title = '-'; ?>
123
- <?php $mm[2] = 'separator'; ?>
124
- <?php $mwsm = array(); ?>
125
-
126
- <?php elseif( !empty( $mm[0] ) ) : ?>
127
-
128
- <?php $menu_title = $mm[0]; ?>
129
- <?php if( !empty( $mm[5] ) ) : ?>
130
- <?php if( $mm[5] == 'menu-comments' ) : ?>
131
- <?php $menu_title = __( 'Comments' ) . ' [comment_count]'; ?>
132
- <?php elseif( $mm[5] == 'menu-appearance' ) : ?>
133
- <?php $menu_title = __( 'Appearance' ) . ' [update_themes]'; ?>
134
- <?php elseif( $mm[5] == 'menu-plugins' ) : ?>
135
- <?php $menu_title = __( 'Plugins' ) . ' [update_plugins]'; ?>
136
- <?php endif; ?>
137
- <?php endif; ?>
138
-
139
- <?php $mwsm = array(); ?>
140
- <?php foreach($submenu as $parent_slug => $sub) : ?>
141
- <?php foreach($sub as $sm) : ?>
142
- <?php if( $mm[2] == $parent_slug ) : ?>
143
- <?php $submenu_title = $sm[0]; ?>
144
-
145
- <?php if( $sm[1] == 'update_core' ) : ?>
146
- <?php $submenu_title = __( 'Update' ) . ' [update_total]'; ?>
147
- <?php endif; ?>
148
- <?php $mwsm[] = array( 'title' => $submenu_title , 'slug' => $sm[2] , 'parent_slug' => $parent_slug , 'cap' => $sm[1] ); ?>
149
- <?php endif; ?>
150
- <?php endforeach; ?>
151
- <?php endforeach; ?>
152
-
153
- <?php endif; ?>
154
-
155
- <?php $menu_widget = array( 'title' => $menu_title , 'slug' => $mm[2] , 'parent_slug' => '' , 'new' => false , 'cap' => $mm[1] , 'submenu' => $mwsm ); ?>
156
- <?php $this->sidebar_menu_widget( $menu_widget ); ?>
157
-
158
- <?php endforeach; ?>
159
-
160
- <?php else: ?>
161
-
162
- <?php if( !empty( $Data["main"] ) ) : ?>
163
-
164
- <?php foreach($Data["main"] as $mm) : ?>
165
-
166
- <?php if( !empty( $mm["title"] ) ) : ?>
167
-
168
- <?php $mwsm = array(); ?>
169
- <?php if( !empty( $Data["sub"] ) ) : ?>
170
- <?php foreach($Data["sub"] as $sm) : ?>
171
-
172
- <?php if( $mm["slug"] == $sm["parent_slug"] ) : ?>
173
-
174
- <?php $cap = ""; ?>
175
- <?php if( !empty( $submenu[$mm["slug"]] ) ) : ?>
176
- <?php foreach( $submenu[$mm["slug"]] as $k => $tmp_sm ) : ?>
177
- <?php if( $tmp_sm[2] == $sm["slug"] ) : ?>
178
- <?php $cap = $tmp_sm[1]; ?>
179
- <?php break; ?>
180
- <?php endif; ?>
181
- <?php endforeach; ?>
182
- <?php endif; ?>
183
-
184
- <?php $mwsm[] = array( 'title' => $sm["title"] , 'slug' => $sm["slug"] , 'parent_slug' => $sm["parent_slug"] , 'cap' => $cap ); ?>
185
-
186
- <?php endif; ?>
187
-
188
- <?php endforeach; ?>
189
- <?php endif; ?>
190
-
191
- <?php $cap = ""; ?>
192
- <?php foreach( $menu as $tmp_m ) : ?>
193
- <?php if( $tmp_m[2] == $mm["slug"] ) : ?>
194
- <?php $cap = $tmp_m[1]; ?>
195
- <?php break; ?>
196
- <?php endif; ?>
197
- <?php endforeach; ?>
198
-
199
- <?php $menu_widget = array( 'title' => $mm["title"] , 'slug' => $mm["slug"] , 'parent_slug' => '' , 'new' => false , 'cap' =>$cap , 'submenu' => $mwsm ); ?>
200
- <?php $this->sidebar_menu_widget( $menu_widget ); ?>
201
-
202
- <?php endif; ?>
203
-
204
- <?php endforeach; ?>
205
-
206
- <?php endif; ?>
207
-
208
- <?php endif; ?>
209
-
210
- </div>
211
-
212
- </div>
213
-
214
- <p class="sidebar_setting_delete"><a href="#"><?php _e( 'Delete all' ); ?></a></p>
215
-
216
- </div>
217
- </div>
218
-
219
- <br class="clear">
220
-
221
- </div>
222
-
223
- </div>
224
-
225
- <p class="submit">
226
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
227
- </p>
228
-
229
- <p class="submit reset">
230
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
231
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
232
- </p>
233
-
234
- </form>
235
-
236
- </div>
237
-
238
- <?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
239
-
240
- <script type="text/javascript">
241
-
242
- var wauc_widget_each, wauc_menu_sortable;
243
-
244
- jQuery(document).ready(function($) {
245
-
246
- var $Form = $("#wauc_setting_sidemenu");
247
- var $AddInside = $('#can_menus .postbox .inside', $Form);
248
- var $SettingInside = $('#setting_menus .postbox .inside', $Form);
249
-
250
- $AddInside.children('.widget').draggable({
251
- connectToSortable: '#setting_menus .postbox .inside',
252
- handle: '> .widget-top > .widget-title',
253
- distance: 2,
254
- helper: 'clone',
255
- zIndex: 5,
256
- containment: 'document',
257
- stop: function(e,ui) {
258
- wauc_widget_each();
259
- wauc_menu_sortable();
260
- }
261
- });
262
-
263
- $('#postbox-container-1', $Form).droppable({
264
- tolerance: 'pointer',
265
- accept: function(o){
266
- return $(o).parent().parent().parent().attr('id') != 'postbox-container-1';
267
- },
268
- drop: function(e,ui) {
269
- ui.draggable.addClass('deleting');
270
- },
271
- over: function(e,ui) {
272
- ui.draggable.addClass('deleting');
273
- $('div.widget-placeholder').hide();
274
- },
275
- out: function(e,ui) {
276
- ui.draggable.removeClass('deleting');
277
- $('div.widget-placeholder').show();
278
- }
279
- });
280
-
281
-
282
- var $AvailableAction = $('#postbox-container-2 .postbox .inside .widget .widget-top .widget-title-action a[href=#available]', $Form);
283
- $AvailableAction.live( 'click', function() {
284
- $(this).parent().parent().parent().children(".widget-inside").slideToggle();
285
- return false;
286
- });
287
-
288
- var $RemoveAction = $('#postbox-container-2 .postbox .inside .widget .widget-inside .widget-control-actions .alignleft a[href=#remove]', $Form);
289
- $RemoveAction.live( 'click', function() {
290
- $(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
291
- return false;
292
- });
293
-
294
- wauc_menu_sortable = function menu_sortable() {
295
-
296
- $('#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside, #wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside .widget .widget-inside .submenu').sortable({
297
- placeholder: "widget-placeholder",
298
- items: '> .widget',
299
- connectWith: "#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside, #wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside .widget .widget-inside .submenu",
300
- handle: '> .widget-top > .widget-title',
301
- cursor: 'move',
302
- distance: 2,
303
- containment: 'document',
304
- change: function(e,ui) {
305
- var $height = ui.helper.height();
306
- $('#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside .widget-placeholder').height($height);
307
- },
308
- stop: function(e,ui) {
309
- if ( ui.item.hasClass('deleting') ) {
310
- ui.item.remove();
311
- }
312
- wauc_widget_each();
313
- },
314
- });
315
-
316
- }
317
- wauc_menu_sortable();
318
-
319
- wauc_widget_each = function widget_each() {
320
- var $Count = 0;
321
- $('#wauc_setting_sidemenu #setting_menus .postbox .inside .widget').each(function() {
322
- var $InputSlug = $(this).children(".widget-inside").children(".settings").children(".description").children(".slugtext");
323
- var $InputTitle = $(this).children(".widget-inside").children(".settings").children("label").children(".titletext");
324
- var $InputParentSlug = $(this).children(".widget-inside").children(".settings").children(".parent_slugtext");
325
-
326
- var $Name = 'data' + '['+$Count+']';
327
- $InputSlug.attr("name", $Name+'[slug]');
328
- $InputTitle.attr("name", $Name+'[title]');
329
- $InputParentSlug.attr("name", $Name+'[parent_slug]');
330
-
331
- if ( $(this).parent().parent().parent().parent().hasClass("submenu") ) {
332
- // None three
333
- $(this).remove();
334
- } else if ( $(this).parent().hasClass("submenu") ) {
335
- var $ParentSlug = $(this).parent().parent().children(".settings").children(".description").children(".slugtext").val();
336
- $InputParentSlug.val($ParentSlug);
337
- } else {
338
- $InputParentSlug.val('');
339
- }
340
- $Count++;
341
- });
342
- }
343
- wauc_widget_each();
344
-
345
- $('#wauc_setting_sidemenu #setting_menus .sidebar_setting_delete a').live('click', function() {
346
- $('#wauc_setting_sidemenu #setting_menus .postbox .inside').html('');
347
- return false;
348
- });
349
-
350
- });
351
  </script>
1
+ <?php
2
+
3
+ global $menu, $submenu;
4
+
5
+ if( !empty( $_POST["update"] ) ) {
6
+ $this->update_sidemenu();
7
+ } elseif( !empty( $_POST["reset"] ) ) {
8
+ $this->update_reset( 'sidemenu' );
9
+ }
10
+
11
+ $this->get_user_role();
12
+ $Data = $this->get_data( 'sidemenu' );
13
+
14
+ // include js css
15
+ $ReadedJs = array( 'jquery' , 'jquery-ui-draggable' , 'jquery-ui-droppable' , 'jquery-ui-sortable' , 'thickbox' );
16
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
17
+ wp_enqueue_style('thickbox');
18
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
19
+
20
+ ?>
21
+
22
+ <div class="wrap">
23
+ <div class="icon32" id="icon-tools"></div>
24
+ <?php echo $this->Msg; ?>
25
+ <h2><?php _e( 'Side Menu' , $this->ltd ); ?></h2>
26
+ <p><?php _e( 'Please change the menu by drag and drop.' , $this->ltd ); ?></p>
27
+ <p class="description"><?php echo sprintf( __( 'New plugin menus will be added to the <strong>%s</strong>.' , $this->ltd ) , __( 'Menu items that can be added' , $this->ltd ) ); ?>
28
+ <p><strong><?php _e( 'Notice: Please do not place the same multiple menu slug.' , $this->ltd ); ?></strong></p>
29
+
30
+ <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
31
+
32
+ <p><a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Shortcodes' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a></p>
33
+
34
+ <form id="wauc_setting_sidemenu" class="wauc_form" method="post" action="">
35
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
36
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
37
+
38
+ <div id="poststuff">
39
+
40
+ <div id="post-body" class="metabox-holder columns-2">
41
+
42
+ <div id="postbox-container-1" class="postbox-container">
43
+
44
+ <div id="can_menus">
45
+
46
+ <div class="postbox">
47
+ <h3 class="hndle"><span><?php _e( 'Menu items that can be added' , $this->ltd ); ?></span></h3>
48
+ <div class="inside">
49
+
50
+ <p class="description"><?php _e( 'Sepalator' , $this->ltd ); ?></p>
51
+ <?php $menu_widget = array( 'title' => '-' , 'slug' => 'separator' , 'parent_slug' => '' , 'new' => true , 'cap' => 'read' ); ?>
52
+ <?php $this->sidebar_menu_widget( $menu_widget ); ?>
53
+ <div class="clear"></div>
54
+
55
+ <?php foreach($this->Menu as $mm) : ?>
56
+
57
+ <?php if( !empty( $mm[0] ) ) : ?>
58
+
59
+ <?php $menu_title = $mm[0]; ?>
60
+ <?php if( $mm[5] == 'menu-comments' ) : ?>
61
+ <?php $menu_title = __( 'Comments' ); ?>
62
+ <?php elseif( $mm[5] == 'menu-appearance' ) : ?>
63
+ <?php $menu_title = __( 'Appearance' ); ?>
64
+ <?php elseif( $mm[5] == 'menu-plugins' ) : ?>
65
+ <?php $menu_title = __( 'Plugins' ); ?>
66
+ <?php endif; ?>
67
+ <p class="description"><?php echo $menu_title; ?></p>
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' ) : ?>
76
+ <?php $menu_title = __( 'Update' ) . ' [update_total]'; ?>
77
+ <?php elseif( $sm[2] == 'edit-comments.php' ) : ?>
78
+ <?php $menu_title .= ' [comment_count]'; ?>
79
+ <?php elseif( $sm[2] == 'themes.php' ) : ?>
80
+ <?php $menu_title .= ' [update_themes]'; ?>
81
+ <?php elseif( $sm[2] == 'plugins.php' ) : ?>
82
+ <?php $menu_title .= ' [update_plugins]'; ?>
83
+ <?php endif; ?>
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
+ <div class="clear"></div>
93
+
94
+ <?php endif; ?>
95
+
96
+ <?php endforeach; ?>
97
+
98
+ </div>
99
+
100
+ </div>
101
+
102
+ </div>
103
+
104
+ </div>
105
+
106
+ <div id="postbox-container-2" class="postbox-container">
107
+
108
+ <div id="setting_menus">
109
+
110
+ <div class="postbox">
111
+ <h3 class="hndle">
112
+ <span><?php _e( 'Current menu' , $this->ltd ); ?></span>
113
+ </h3>
114
+ <div class="inside">
115
+
116
+ <?php if( empty( $Data ) ) : ?>
117
+
118
+ <?php foreach($menu as $mm) : ?>
119
+
120
+ <?php if( isset( $mm[2] ) && strstr( $mm[2] , 'separator' ) ) : ?>
121
+
122
+ <?php $menu_title = '-'; ?>
123
+ <?php $mm[2] = 'separator'; ?>
124
+ <?php $mwsm = array(); ?>
125
+
126
+ <?php elseif( !empty( $mm[0] ) ) : ?>
127
+
128
+ <?php $menu_title = $mm[0]; ?>
129
+ <?php if( !empty( $mm[5] ) ) : ?>
130
+ <?php if( $mm[5] == 'menu-comments' ) : ?>
131
+ <?php $menu_title = __( 'Comments' ) . ' [comment_count]'; ?>
132
+ <?php elseif( $mm[5] == 'menu-appearance' ) : ?>
133
+ <?php $menu_title = __( 'Appearance' ) . ' [update_themes]'; ?>
134
+ <?php elseif( $mm[5] == 'menu-plugins' ) : ?>
135
+ <?php $menu_title = __( 'Plugins' ) . ' [update_plugins]'; ?>
136
+ <?php endif; ?>
137
+ <?php endif; ?>
138
+
139
+ <?php $mwsm = array(); ?>
140
+ <?php foreach($submenu as $parent_slug => $sub) : ?>
141
+ <?php foreach($sub as $sm) : ?>
142
+ <?php if( $mm[2] == $parent_slug ) : ?>
143
+ <?php $submenu_title = $sm[0]; ?>
144
+
145
+ <?php if( $sm[1] == 'update_core' ) : ?>
146
+ <?php $submenu_title = __( 'Update' ) . ' [update_total]'; ?>
147
+ <?php endif; ?>
148
+ <?php $mwsm[] = array( 'title' => $submenu_title , 'slug' => $sm[2] , 'parent_slug' => $parent_slug , 'cap' => $sm[1] ); ?>
149
+ <?php endif; ?>
150
+ <?php endforeach; ?>
151
+ <?php endforeach; ?>
152
+
153
+ <?php endif; ?>
154
+
155
+ <?php $menu_widget = array( 'title' => $menu_title , 'slug' => $mm[2] , 'parent_slug' => '' , 'new' => false , 'cap' => $mm[1] , 'submenu' => $mwsm ); ?>
156
+ <?php $this->sidebar_menu_widget( $menu_widget ); ?>
157
+
158
+ <?php endforeach; ?>
159
+
160
+ <?php else: ?>
161
+
162
+ <?php if( !empty( $Data["main"] ) ) : ?>
163
+
164
+ <?php foreach($Data["main"] as $mm) : ?>
165
+
166
+ <?php if( !empty( $mm["title"] ) ) : ?>
167
+
168
+ <?php $mwsm = array(); ?>
169
+ <?php if( !empty( $Data["sub"] ) ) : ?>
170
+ <?php foreach($Data["sub"] as $sm) : ?>
171
+
172
+ <?php if( $mm["slug"] == $sm["parent_slug"] ) : ?>
173
+
174
+ <?php $cap = ""; ?>
175
+ <?php if( !empty( $submenu[$mm["slug"]] ) ) : ?>
176
+ <?php foreach( $submenu[$mm["slug"]] as $k => $tmp_sm ) : ?>
177
+ <?php if( $tmp_sm[2] == $sm["slug"] ) : ?>
178
+ <?php $cap = $tmp_sm[1]; ?>
179
+ <?php break; ?>
180
+ <?php endif; ?>
181
+ <?php endforeach; ?>
182
+ <?php endif; ?>
183
+
184
+ <?php $mwsm[] = array( 'title' => $sm["title"] , 'slug' => $sm["slug"] , 'parent_slug' => $sm["parent_slug"] , 'cap' => $cap ); ?>
185
+
186
+ <?php endif; ?>
187
+
188
+ <?php endforeach; ?>
189
+ <?php endif; ?>
190
+
191
+ <?php $cap = ""; ?>
192
+ <?php foreach( $menu as $tmp_m ) : ?>
193
+ <?php if( $tmp_m[2] == $mm["slug"] ) : ?>
194
+ <?php $cap = $tmp_m[1]; ?>
195
+ <?php break; ?>
196
+ <?php endif; ?>
197
+ <?php endforeach; ?>
198
+
199
+ <?php $menu_widget = array( 'title' => $mm["title"] , 'slug' => $mm["slug"] , 'parent_slug' => '' , 'new' => false , 'cap' =>$cap , 'submenu' => $mwsm ); ?>
200
+ <?php $this->sidebar_menu_widget( $menu_widget ); ?>
201
+
202
+ <?php endif; ?>
203
+
204
+ <?php endforeach; ?>
205
+
206
+ <?php endif; ?>
207
+
208
+ <?php endif; ?>
209
+
210
+ </div>
211
+
212
+ </div>
213
+
214
+ <p class="sidebar_setting_delete"><a href="#"><?php _e( 'Delete all' ); ?></a></p>
215
+
216
+ </div>
217
+ </div>
218
+
219
+ <br class="clear">
220
+
221
+ </div>
222
+
223
+ </div>
224
+
225
+ <p class="submit">
226
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
227
+ </p>
228
+
229
+ <p class="submit reset">
230
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
231
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
232
+ </p>
233
+
234
+ </form>
235
+
236
+ </div>
237
+
238
+ <?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
239
+
240
+ <script type="text/javascript">
241
+
242
+ var wauc_widget_each, wauc_menu_sortable;
243
+
244
+ jQuery(document).ready(function($) {
245
+
246
+ var $Form = $("#wauc_setting_sidemenu");
247
+ var $AddInside = $('#can_menus .postbox .inside', $Form);
248
+ var $SettingInside = $('#setting_menus .postbox .inside', $Form);
249
+
250
+ $AddInside.children('.widget').draggable({
251
+ connectToSortable: '#setting_menus .postbox .inside',
252
+ handle: '> .widget-top > .widget-title',
253
+ distance: 2,
254
+ helper: 'clone',
255
+ zIndex: 5,
256
+ containment: 'document',
257
+ stop: function(e,ui) {
258
+ wauc_widget_each();
259
+ wauc_menu_sortable();
260
+ }
261
+ });
262
+
263
+ $('#postbox-container-1', $Form).droppable({
264
+ tolerance: 'pointer',
265
+ accept: function(o){
266
+ return $(o).parent().parent().parent().attr('id') != 'postbox-container-1';
267
+ },
268
+ drop: function(e,ui) {
269
+ ui.draggable.addClass('deleting');
270
+ },
271
+ over: function(e,ui) {
272
+ ui.draggable.addClass('deleting');
273
+ $('div.widget-placeholder').hide();
274
+ },
275
+ out: function(e,ui) {
276
+ ui.draggable.removeClass('deleting');
277
+ $('div.widget-placeholder').show();
278
+ }
279
+ });
280
+
281
+
282
+ var $AvailableAction = $('#postbox-container-2 .postbox .inside .widget .widget-top .widget-title-action a[href=#available]', $Form);
283
+ $AvailableAction.live( 'click', function() {
284
+ $(this).parent().parent().parent().children(".widget-inside").slideToggle();
285
+ return false;
286
+ });
287
+
288
+ var $RemoveAction = $('#postbox-container-2 .postbox .inside .widget .widget-inside .widget-control-actions .alignleft a[href=#remove]', $Form);
289
+ $RemoveAction.live( 'click', function() {
290
+ $(this).parent().parent().parent().parent().slideUp("normal", function() { $(this).remove(); } );
291
+ return false;
292
+ });
293
+
294
+ wauc_menu_sortable = function menu_sortable() {
295
+
296
+ $('#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside, #wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside .widget .widget-inside .submenu').sortable({
297
+ placeholder: "widget-placeholder",
298
+ items: '> .widget',
299
+ connectWith: "#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside, #wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside .widget .widget-inside .submenu",
300
+ handle: '> .widget-top > .widget-title',
301
+ cursor: 'move',
302
+ distance: 2,
303
+ containment: 'document',
304
+ change: function(e,ui) {
305
+ var $height = ui.helper.height();
306
+ $('#wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 #setting_menus .postbox .inside .widget-placeholder').height($height);
307
+ },
308
+ stop: function(e,ui) {
309
+ if ( ui.item.hasClass('deleting') ) {
310
+ ui.item.remove();
311
+ }
312
+ wauc_widget_each();
313
+ },
314
+ });
315
+
316
+ }
317
+ wauc_menu_sortable();
318
+
319
+ wauc_widget_each = function widget_each() {
320
+ var $Count = 0;
321
+ $('#wauc_setting_sidemenu #setting_menus .postbox .inside .widget').each(function() {
322
+ var $InputSlug = $(this).children(".widget-inside").children(".settings").children(".description").children(".slugtext");
323
+ var $InputTitle = $(this).children(".widget-inside").children(".settings").children("label").children(".titletext");
324
+ var $InputParentSlug = $(this).children(".widget-inside").children(".settings").children(".parent_slugtext");
325
+
326
+ var $Name = 'data' + '['+$Count+']';
327
+ $InputSlug.attr("name", $Name+'[slug]');
328
+ $InputTitle.attr("name", $Name+'[title]');
329
+ $InputParentSlug.attr("name", $Name+'[parent_slug]');
330
+
331
+ if ( $(this).parent().parent().parent().parent().hasClass("submenu") ) {
332
+ // None three
333
+ $(this).remove();
334
+ } else if ( $(this).parent().hasClass("submenu") ) {
335
+ var $ParentSlug = $(this).parent().parent().children(".settings").children(".description").children(".slugtext").val();
336
+ $InputParentSlug.val($ParentSlug);
337
+ } else {
338
+ $InputParentSlug.val('');
339
+ }
340
+ $Count++;
341
+ });
342
+ }
343
+ wauc_widget_each();
344
+
345
+ $('#wauc_setting_sidemenu #setting_menus .sidebar_setting_delete a').live('click', function() {
346
+ $('#wauc_setting_sidemenu #setting_menus .postbox .inside').html('');
347
+ return false;
348
+ });
349
+
350
+ });
351
  </script>
inc/setting_site.php CHANGED
@@ -1,171 +1,171 @@
1
- <?php
2
-
3
- if( !empty( $_POST["update"] ) ) {
4
- $this->update_site();
5
- } elseif( !empty( $_POST["reset"] ) ) {
6
- $this->update_reset( 'site' );
7
- }
8
-
9
- $Data = $this->get_data( 'site' );
10
- $SiteSetting = get_option( $this->Record["site"] );
11
-
12
- // include js css
13
- $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
14
- wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
15
- wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
16
-
17
- ?>
18
-
19
- <div class="wrap">
20
- <div class="icon32" id="icon-tools"></div>
21
- <?php echo $this->Msg; ?>
22
- <h2><?php _e( 'Site Settings' , $this->ltd ); ?></h2>
23
- <p>&nbsp;</p>
24
-
25
- <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
26
-
27
- <form id="wauc_setting_site" class="wauc_form" method="post" action="">
28
- <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
29
- <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
30
-
31
- <div id="poststuff">
32
- <div id="post-body" class="metabox-holder columns-1">
33
-
34
- <div id="postbox-container-1" class="postbox-container">
35
-
36
- <div id="meta_fields">
37
-
38
- <div class="postbox">
39
- <div class="handlediv" title="Click to toggle"><br></div>
40
- <h3 class="hndle"><span>Meta Fields</span></h3>
41
- <div class="inside">
42
- <table class="form-table">
43
- <tbody>
44
- <?php $field = 'wp_generator'; ?>
45
- <tr>
46
- <th>
47
- <label><?php echo $field; ?></label>
48
- </th>
49
- <td>
50
- <?php $Checked = ''; ?>
51
- <?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
52
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
53
- <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( get_the_generator( 'xhtml' ) ); ?></code></p>
54
- </td>
55
- </tr>
56
- <?php $field = 'wlwmanifest_link'; ?>
57
- <tr>
58
- <th>
59
- <?php echo $field; ?>
60
- </th>
61
- <td>
62
- <?php $Checked = ''; ?>
63
- <?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
64
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
65
- <p class="description"><?php _e( 'Please display when using the Windows Live Writer.' , $this->ltd ); ?></p>
66
- <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="' . get_bloginfo('wpurl') . '/wp-includes/wlwmanifest.xml" />' ); ?></code></p>
67
- </td>
68
- </tr>
69
- <?php $field = 'rsd_link'; ?>
70
- <tr>
71
- <th>
72
- <?php echo $field; ?>
73
- </th>
74
- <td>
75
- <?php $Checked = ''; ?>
76
- <?php if( !empty( $SiteSetting[$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( 'Information of XML-rpc' , $this->ltd ); ?></p>
79
- <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_bloginfo('wpurl') . '"/xmlrpc.php?rsd" />' ); ?></code></p>
80
- </td>
81
- </tr>
82
- <?php $field = 'feed_links'; ?>
83
- <tr>
84
- <th>
85
- <?php echo $field; ?>
86
- </th>
87
- <td>
88
- <?php $Checked = ''; ?>
89
- <?php if( !empty( $SiteSetting[$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
- <p class="description"><?php _e( 'Sitewide feed' , $this->ltd ); ?></p>
92
- <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( __('%1$s %2$s Feed') , get_bloginfo('name') , '&amp;raquo&#059;' ) ) . '" href="' . get_feed_link( get_default_feed() ) . ' />' ); ?></code></p>
93
- </td>
94
- </tr>
95
- <?php $field = 'feed_links_extra'; ?>
96
- <tr>
97
- <th>
98
- <?php echo $field; ?>
99
- </th>
100
- <td>
101
- <?php $Checked = ''; ?>
102
- <?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
103
- <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
104
- <p class="description"><?php _e( 'Extra feed' , $this->ltd ); ?></p>
105
- <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( __('%1$s %2$s Comments Feed') , get_bloginfo('name') , '&amp;raquo&#059;' ) ) . '" href="' . get_feed_link( get_default_feed() . '&#038;p=***' ) . ' />' ); ?></code></p>
106
- </td>
107
- </tr>
108
- </tbody>
109
- </table>
110
- </div>
111
- </div>
112
-
113
- </div>
114
-
115
- </div>
116
-
117
- <div id="postbox-container-2" class="postbox-container">
118
-
119
- <div id="general">
120
- <div class="postbox">
121
- <div class="handlediv" title="Click to toggle"><br></div>
122
- <h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
123
- <div class="inside">
124
- <table class="form-table">
125
- <tbody>
126
- <?php $field = 'admin_bar'; ?>
127
- <tr>
128
- <th>
129
- <?php echo $field; ?>
130
- </th>
131
- <td>
132
- <?php $arr = array( "hide" => __( 'Hide the Admin bar on the front end' , $this->ltd ) , "front" => __( 'Apply WP Admin UI Customize settings on the front end admin bar also' , $this->ltd ) ); ?>
133
- <select name="data[<?php echo $field; ?>]">
134
- <option value="">-</option>
135
- <?php foreach( $arr as $key => $label ) : ?>
136
- <?php $Selected = ''; ?>
137
- <?php if( !empty( $Data[$field] ) ) : ?>
138
- <?php if( $Data[$field] == $key ) : $Selected = 'selected="selected"'; endif; ?>
139
- <?php if( $key == "hide" && $Data[$field] == "1" ) : $Selected = 'selected="selected"'; endif; ?>
140
- <?php endif; ?>
141
- <option value="<?php echo $key; ?>" <?php echo $Selected; ?>><?php echo $label; ?></option>
142
- <?php endforeach; ?>
143
- </select>
144
- </td>
145
- </tr>
146
- </tbody>
147
- </table>
148
- </div>
149
- </div>
150
- </div>
151
-
152
- </div>
153
-
154
- <br class="clear">
155
-
156
- </div>
157
-
158
- </div>
159
-
160
- <p class="submit">
161
- <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
162
- </p>
163
-
164
- <p class="submit reset">
165
- <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
166
- <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
167
- </p>
168
-
169
- </form>
170
-
171
- </div>
1
+ <?php
2
+
3
+ if( !empty( $_POST["update"] ) ) {
4
+ $this->update_site();
5
+ } elseif( !empty( $_POST["reset"] ) ) {
6
+ $this->update_reset( 'site' );
7
+ }
8
+
9
+ $Data = $this->get_data( 'site' );
10
+ $SiteSetting = get_option( $this->Record["site"] );
11
+
12
+ // include js css
13
+ $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
14
+ wp_enqueue_script( $this->PageSlug , $this->Url . $this->PluginSlug . '.js', $ReadedJs , $this->Ver );
15
+ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', array() , $this->Ver );
16
+
17
+ ?>
18
+
19
+ <div class="wrap">
20
+ <div class="icon32" id="icon-tools"></div>
21
+ <?php echo $this->Msg; ?>
22
+ <h2><?php _e( 'Site Settings' , $this->ltd ); ?></h2>
23
+ <p>&nbsp;</p>
24
+
25
+ <h3 id="wauc-apply-user-roles"><?php echo $this->get_apply_roles(); ?></h3>
26
+
27
+ <form id="wauc_setting_site" class="wauc_form" method="post" action="">
28
+ <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
29
+ <?php wp_nonce_field( $this->Nonces["value"] , $this->Nonces["field"] ); ?>
30
+
31
+ <div id="poststuff">
32
+ <div id="post-body" class="metabox-holder columns-1">
33
+
34
+ <div id="postbox-container-1" class="postbox-container">
35
+
36
+ <div id="meta_fields">
37
+
38
+ <div class="postbox">
39
+ <div class="handlediv" title="Click to toggle"><br></div>
40
+ <h3 class="hndle"><span>Meta Fields</span></h3>
41
+ <div class="inside">
42
+ <table class="form-table">
43
+ <tbody>
44
+ <?php $field = 'wp_generator'; ?>
45
+ <tr>
46
+ <th>
47
+ <label><?php echo $field; ?></label>
48
+ </th>
49
+ <td>
50
+ <?php $Checked = ''; ?>
51
+ <?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
52
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
53
+ <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( get_the_generator( 'xhtml' ) ); ?></code></p>
54
+ </td>
55
+ </tr>
56
+ <?php $field = 'wlwmanifest_link'; ?>
57
+ <tr>
58
+ <th>
59
+ <?php echo $field; ?>
60
+ </th>
61
+ <td>
62
+ <?php $Checked = ''; ?>
63
+ <?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
64
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
65
+ <p class="description"><?php _e( 'Please display when using the Windows Live Writer.' , $this->ltd ); ?></p>
66
+ <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="' . get_bloginfo('wpurl') . '/wp-includes/wlwmanifest.xml" />' ); ?></code></p>
67
+ </td>
68
+ </tr>
69
+ <?php $field = 'rsd_link'; ?>
70
+ <tr>
71
+ <th>
72
+ <?php echo $field; ?>
73
+ </th>
74
+ <td>
75
+ <?php $Checked = ''; ?>
76
+ <?php if( !empty( $SiteSetting[$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( 'Information of XML-rpc' , $this->ltd ); ?></p>
79
+ <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_bloginfo('wpurl') . '"/xmlrpc.php?rsd" />' ); ?></code></p>
80
+ </td>
81
+ </tr>
82
+ <?php $field = 'feed_links'; ?>
83
+ <tr>
84
+ <th>
85
+ <?php echo $field; ?>
86
+ </th>
87
+ <td>
88
+ <?php $Checked = ''; ?>
89
+ <?php if( !empty( $SiteSetting[$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
+ <p class="description"><?php _e( 'Sitewide feed' , $this->ltd ); ?></p>
92
+ <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( __('%1$s %2$s Feed') , get_bloginfo('name') , '&amp;raquo&#059;' ) ) . '" href="' . get_feed_link( get_default_feed() ) . ' />' ); ?></code></p>
93
+ </td>
94
+ </tr>
95
+ <?php $field = 'feed_links_extra'; ?>
96
+ <tr>
97
+ <th>
98
+ <?php echo $field; ?>
99
+ </th>
100
+ <td>
101
+ <?php $Checked = ''; ?>
102
+ <?php if( !empty( $SiteSetting[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
103
+ <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
104
+ <p class="description"><?php _e( 'Extra feed' , $this->ltd ); ?></p>
105
+ <p class="description"><?php _e( 'Tag to be output' , $this->ltd ); ?> : <code><?php echo esc_html( '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( __('%1$s %2$s Comments Feed') , get_bloginfo('name') , '&amp;raquo&#059;' ) ) . '" href="' . get_feed_link( get_default_feed() . '&#038;p=***' ) . ' />' ); ?></code></p>
106
+ </td>
107
+ </tr>
108
+ </tbody>
109
+ </table>
110
+ </div>
111
+ </div>
112
+
113
+ </div>
114
+
115
+ </div>
116
+
117
+ <div id="postbox-container-2" class="postbox-container">
118
+
119
+ <div id="general">
120
+ <div class="postbox">
121
+ <div class="handlediv" title="Click to toggle"><br></div>
122
+ <h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
123
+ <div class="inside">
124
+ <table class="form-table">
125
+ <tbody>
126
+ <?php $field = 'admin_bar'; ?>
127
+ <tr>
128
+ <th>
129
+ <?php echo $field; ?>
130
+ </th>
131
+ <td>
132
+ <?php $arr = array( "hide" => __( 'Hide the Admin bar on the front end' , $this->ltd ) , "front" => __( 'Apply WP Admin UI Customize settings on the front end admin bar also' , $this->ltd ) ); ?>
133
+ <select name="data[<?php echo $field; ?>]">
134
+ <option value="">-</option>
135
+ <?php foreach( $arr as $key => $label ) : ?>
136
+ <?php $Selected = ''; ?>
137
+ <?php if( !empty( $Data[$field] ) ) : ?>
138
+ <?php if( $Data[$field] == $key ) : $Selected = 'selected="selected"'; endif; ?>
139
+ <?php if( $key == "hide" && $Data[$field] == "1" ) : $Selected = 'selected="selected"'; endif; ?>
140
+ <?php endif; ?>
141
+ <option value="<?php echo $key; ?>" <?php echo $Selected; ?>><?php echo $label; ?></option>
142
+ <?php endforeach; ?>
143
+ </select>
144
+ </td>
145
+ </tr>
146
+ </tbody>
147
+ </table>
148
+ </div>
149
+ </div>
150
+ </div>
151
+
152
+ </div>
153
+
154
+ <br class="clear">
155
+
156
+ </div>
157
+
158
+ </div>
159
+
160
+ <p class="submit">
161
+ <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
162
+ </p>
163
+
164
+ <p class="submit reset">
165
+ <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
166
+ <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
167
+ </p>
168
+
169
+ </form>
170
+
171
+ </div>
js/dashboard/not_move.js CHANGED
@@ -1,6 +1,6 @@
1
- jQuery(document).ready(function($) {
2
-
3
- $( ".meta-box-sortables" ).sortable( "disable" );
4
- $( ".postbox .hndle" ).css( "cursor" , "pointer" );
5
-
6
- });
1
+ jQuery(document).ready(function($) {
2
+
3
+ $( ".meta-box-sortables" ).sortable( "disable" );
4
+ $( ".postbox .hndle" ).css( "cursor" , "pointer" );
5
+
6
+ });
languages/wauc-ja.mo CHANGED
Binary file
languages/wauc-ja.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Admin UI Customize\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-09-07 12:24+0900\n"
6
- "PO-Revision-Date: 2013-09-07 13:46+0900\n"
7
  "Last-Translator: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
8
  "Language-Team: gqevu6bsiz@gmail.com <gqevu6bsiz@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -48,7 +48,7 @@ msgid "Side Menu"
48
  msgstr "サイドメニュー"
49
 
50
  #: wp-admin-ui-customize.php:148
51
- #: inc/setting_removemtabox.php:22
52
  msgid "Remove meta box"
53
  msgstr "メタボックス削除"
54
 
@@ -76,13 +76,20 @@ msgstr "設定を適用する権限が選択されていません。<a href=\"%s
76
  msgid "Apply user roles"
77
  msgstr "適用されるユーザー権限"
78
 
79
- #: wp-admin-ui-customize.php:531
80
- #: wp-admin-ui-customize.php:653
81
  msgid "Sub Menus"
82
  msgstr "サブメニュー"
83
 
84
  #: inc/list_variables.php:17
85
  #: inc/setting_admin_bar_menu.php:30
 
 
 
 
 
 
 
86
  #: inc/setting_sidemenu.php:32
87
  msgid "Shortcodes"
88
  msgstr "ショートコード一覧"
@@ -146,7 +153,7 @@ msgstr "追加できるメニュー一覧"
146
  #: inc/setting_default.php:129
147
  #: inc/setting_loginscreen.php:143
148
  #: inc/setting_post_add_edit.php:106
149
- #: inc/setting_removemtabox.php:140
150
  #: inc/setting_sidemenu.php:230
151
  #: inc/setting_site.php:165
152
  msgid "Reset all settings?"
@@ -270,8 +277,8 @@ msgid "Allow people to post comments on new articles when hide to discussion of
270
  msgstr "ディスカッションメタボックスが非表示でも新しい投稿へのコメントを許可する"
271
 
272
  #: inc/setting_post_add_edit.php:53
273
- #: inc/setting_removemtabox.php:62
274
- #: inc/setting_removemtabox.php:109
275
  msgid "Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role."
276
  msgstr "注意: ディスカッションメタボックスを隠す場合、適用された権限の新規投稿はコメントが表示されません。"
277
 
@@ -293,23 +300,25 @@ msgstr "%s を選択してください。"
293
  msgid "Only appears when you have settings to the default permalink."
294
  msgstr "デフォルトのパーマリンクに設定している時のみ表示されます。"
295
 
296
- #: inc/setting_removemtabox.php:23
297
  msgid "Please update or add a \"post\" and a \"page\" to load the available meta boxes."
298
  msgstr "新しいプラグインのメタボックスを読み込むには編集画面に一度アクセスしてください。"
299
 
300
- #: inc/setting_removemtabox.php:44
301
- #: inc/setting_removemtabox.php:91
 
302
  msgid "Could not read the meta box."
303
  msgstr "メタボックスの読み込みができませんでした。"
304
 
305
- #: inc/setting_removemtabox.php:45
306
- #: inc/setting_removemtabox.php:92
 
307
  #, php-format
308
  msgid "Meta boxes will be loaded automatically when you Edit %s."
309
  msgstr "%s 編集画面を一度表示すると自動でメタボックスが読み込まれます。"
310
 
311
- #: inc/setting_removemtabox.php:64
312
- #: inc/setting_removemtabox.php:111
313
  msgid "Please set from here if you want to view the comments on screen."
314
  msgstr "コメントが表示されるようにしたい場合はここから設定してください。"
315
 
2
  msgstr ""
3
  "Project-Id-Version: WP Admin UI Customize\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-09-12 01:33+0900\n"
6
+ "PO-Revision-Date: 2013-09-12 01:43+0900\n"
7
  "Last-Translator: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
8
  "Language-Team: gqevu6bsiz@gmail.com <gqevu6bsiz@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
48
  msgstr "サイドメニュー"
49
 
50
  #: wp-admin-ui-customize.php:148
51
+ #: inc/setting_removemtabox.php:24
52
  msgid "Remove meta box"
53
  msgstr "メタボックス削除"
54
 
76
  msgid "Apply user roles"
77
  msgstr "適用されるユーザー権限"
78
 
79
+ #: wp-admin-ui-customize.php:529
80
+ #: wp-admin-ui-customize.php:651
81
  msgid "Sub Menus"
82
  msgstr "サブメニュー"
83
 
84
  #: inc/list_variables.php:17
85
  #: inc/setting_admin_bar_menu.php:30
86
+ #: inc/setting_admin_general.php:130
87
+ #: inc/setting_admin_general.php:153
88
+ #: inc/setting_loginscreen.php:55
89
+ #: inc/setting_loginscreen.php:68
90
+ #: inc/setting_loginscreen.php:80
91
+ #: inc/setting_loginscreen.php:108
92
+ #: inc/setting_loginscreen.php:120
93
  #: inc/setting_sidemenu.php:32
94
  msgid "Shortcodes"
95
  msgstr "ショートコード一覧"
153
  #: inc/setting_default.php:129
154
  #: inc/setting_loginscreen.php:143
155
  #: inc/setting_post_add_edit.php:106
156
+ #: inc/setting_removemtabox.php:190
157
  #: inc/setting_sidemenu.php:230
158
  #: inc/setting_site.php:165
159
  msgid "Reset all settings?"
277
  msgstr "ディスカッションメタボックスが非表示でも新しい投稿へのコメントを許可する"
278
 
279
  #: inc/setting_post_add_edit.php:53
280
+ #: inc/setting_removemtabox.php:65
281
+ #: inc/setting_removemtabox.php:108
282
  msgid "Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role."
283
  msgstr "注意: ディスカッションメタボックスを隠す場合、適用された権限の新規投稿はコメントが表示されません。"
284
 
300
  msgid "Only appears when you have settings to the default permalink."
301
  msgstr "デフォルトのパーマリンクに設定している時のみ表示されます。"
302
 
303
+ #: inc/setting_removemtabox.php:25
304
  msgid "Please update or add a \"post\" and a \"page\" to load the available meta boxes."
305
  msgstr "新しいプラグインのメタボックスを読み込むには編集画面に一度アクセスしてください。"
306
 
307
+ #: inc/setting_removemtabox.php:47
308
+ #: inc/setting_removemtabox.php:90
309
+ #: inc/setting_removemtabox.php:142
310
  msgid "Could not read the meta box."
311
  msgstr "メタボックスの読み込みができませんでした。"
312
 
313
+ #: inc/setting_removemtabox.php:48
314
+ #: inc/setting_removemtabox.php:91
315
+ #: inc/setting_removemtabox.php:143
316
  #, php-format
317
  msgid "Meta boxes will be loaded automatically when you Edit %s."
318
  msgstr "%s 編集画面を一度表示すると自動でメタボックスが読み込まれます。"
319
 
320
+ #: inc/setting_removemtabox.php:67
321
+ #: inc/setting_removemtabox.php:110
322
  msgid "Please set from here if you want to view the comments on screen."
323
  msgstr "コメントが表示されるようにしたい場合はここから設定してください。"
324
 
languages/wauc.pot CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Admin UI Customize\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-09-07 12:24+0900\n"
6
- "PO-Revision-Date: 2013-09-07 12:24+0900\n"
7
  "Last-Translator: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
8
  "Language-Team: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -45,7 +45,7 @@ msgid "Side Menu"
45
  msgstr ""
46
 
47
  #: wp-admin-ui-customize.php:148
48
- #: inc/setting_removemtabox.php:22
49
  msgid "Remove meta box"
50
  msgstr ""
51
 
@@ -73,13 +73,20 @@ msgstr ""
73
  msgid "Apply user roles"
74
  msgstr ""
75
 
76
- #: wp-admin-ui-customize.php:531
77
- #: wp-admin-ui-customize.php:653
78
  msgid "Sub Menus"
79
  msgstr ""
80
 
81
  #: inc/list_variables.php:17
82
  #: inc/setting_admin_bar_menu.php:30
 
 
 
 
 
 
 
83
  #: inc/setting_sidemenu.php:32
84
  msgid "Shortcodes"
85
  msgstr ""
@@ -143,7 +150,7 @@ msgstr ""
143
  #: inc/setting_default.php:129
144
  #: inc/setting_loginscreen.php:143
145
  #: inc/setting_post_add_edit.php:106
146
- #: inc/setting_removemtabox.php:140
147
  #: inc/setting_sidemenu.php:230
148
  #: inc/setting_site.php:165
149
  msgid "Reset all settings?"
@@ -267,8 +274,8 @@ msgid "Allow people to post comments on new articles when hide to discussion of
267
  msgstr ""
268
 
269
  #: inc/setting_post_add_edit.php:53
270
- #: inc/setting_removemtabox.php:62
271
- #: inc/setting_removemtabox.php:109
272
  msgid "Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role."
273
  msgstr ""
274
 
@@ -290,23 +297,25 @@ msgstr ""
290
  msgid "Only appears when you have settings to the default permalink."
291
  msgstr ""
292
 
293
- #: inc/setting_removemtabox.php:23
294
  msgid "Please update or add a \"post\" and a \"page\" to load the available meta boxes."
295
  msgstr ""
296
 
297
- #: inc/setting_removemtabox.php:44
298
- #: inc/setting_removemtabox.php:91
 
299
  msgid "Could not read the meta box."
300
  msgstr ""
301
 
302
- #: inc/setting_removemtabox.php:45
303
- #: inc/setting_removemtabox.php:92
 
304
  #, php-format
305
  msgid "Meta boxes will be loaded automatically when you Edit %s."
306
  msgstr ""
307
 
308
- #: inc/setting_removemtabox.php:64
309
- #: inc/setting_removemtabox.php:111
310
  msgid "Please set from here if you want to view the comments on screen."
311
  msgstr ""
312
 
2
  msgstr ""
3
  "Project-Id-Version: WP Admin UI Customize\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-09-12 01:33+0900\n"
6
+ "PO-Revision-Date: 2013-09-12 01:33+0900\n"
7
  "Last-Translator: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
8
  "Language-Team: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
45
  msgstr ""
46
 
47
  #: wp-admin-ui-customize.php:148
48
+ #: inc/setting_removemtabox.php:24
49
  msgid "Remove meta box"
50
  msgstr ""
51
 
73
  msgid "Apply user roles"
74
  msgstr ""
75
 
76
+ #: wp-admin-ui-customize.php:529
77
+ #: wp-admin-ui-customize.php:651
78
  msgid "Sub Menus"
79
  msgstr ""
80
 
81
  #: inc/list_variables.php:17
82
  #: inc/setting_admin_bar_menu.php:30
83
+ #: inc/setting_admin_general.php:130
84
+ #: inc/setting_admin_general.php:153
85
+ #: inc/setting_loginscreen.php:55
86
+ #: inc/setting_loginscreen.php:68
87
+ #: inc/setting_loginscreen.php:80
88
+ #: inc/setting_loginscreen.php:108
89
+ #: inc/setting_loginscreen.php:120
90
  #: inc/setting_sidemenu.php:32
91
  msgid "Shortcodes"
92
  msgstr ""
150
  #: inc/setting_default.php:129
151
  #: inc/setting_loginscreen.php:143
152
  #: inc/setting_post_add_edit.php:106
153
+ #: inc/setting_removemtabox.php:190
154
  #: inc/setting_sidemenu.php:230
155
  #: inc/setting_site.php:165
156
  msgid "Reset all settings?"
274
  msgstr ""
275
 
276
  #: inc/setting_post_add_edit.php:53
277
+ #: inc/setting_removemtabox.php:65
278
+ #: inc/setting_removemtabox.php:108
279
  msgid "Notice: If hide the Discussion on metabox, comments does not display of Add New Post on apply user role."
280
  msgstr ""
281
 
297
  msgid "Only appears when you have settings to the default permalink."
298
  msgstr ""
299
 
300
+ #: inc/setting_removemtabox.php:25
301
  msgid "Please update or add a \"post\" and a \"page\" to load the available meta boxes."
302
  msgstr ""
303
 
304
+ #: inc/setting_removemtabox.php:47
305
+ #: inc/setting_removemtabox.php:90
306
+ #: inc/setting_removemtabox.php:142
307
  msgid "Could not read the meta box."
308
  msgstr ""
309
 
310
+ #: inc/setting_removemtabox.php:48
311
+ #: inc/setting_removemtabox.php:91
312
+ #: inc/setting_removemtabox.php:143
313
  #, php-format
314
  msgid "Meta boxes will be loaded automatically when you Edit %s."
315
  msgstr ""
316
 
317
+ #: inc/setting_removemtabox.php:67
318
+ #: inc/setting_removemtabox.php:110
319
  msgid "Please set from here if you want to view the comments on screen."
320
  msgstr ""
321
 
languages/wauc_plugin-ja.mo CHANGED
Binary file
languages/wauc_plugin-ja.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Admin UI Customize sub\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-09-07 12:24+0900\n"
6
- "PO-Revision-Date: 2013-09-07 13:46+0900\n"
7
  "Last-Translator: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
8
  "Language-Team: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -17,16 +17,17 @@ msgstr ""
17
  "X-Poedit-SourceCharset: utf-8\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
 
20
- #: wp-admin-ui-customize.php:838
21
  #: inc/setting_default.php:185
22
  msgid "Thank you for your donation."
23
  msgstr "寄付いただきありがとうございます。"
24
 
25
- #: wp-admin-ui-customize.php:1757
26
  msgid "Thank you for considering donate."
27
  msgstr "寄付のご検討宜しくお願いします。"
28
 
29
- #: wp-admin-ui-customize.php:1757
 
30
  msgid "Donate"
31
  msgstr "寄付について"
32
 
2
  msgstr ""
3
  "Project-Id-Version: WP Admin UI Customize sub\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-09-12 01:33+0900\n"
6
+ "PO-Revision-Date: 2013-09-12 01:43+0900\n"
7
  "Last-Translator: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
8
  "Language-Team: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
17
  "X-Poedit-SourceCharset: utf-8\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
 
20
+ #: wp-admin-ui-customize.php:855
21
  #: inc/setting_default.php:185
22
  msgid "Thank you for your donation."
23
  msgstr "寄付いただきありがとうございます。"
24
 
25
+ #: wp-admin-ui-customize.php:1770
26
  msgid "Thank you for considering donate."
27
  msgstr "寄付のご検討宜しくお願いします。"
28
 
29
+ #: wp-admin-ui-customize.php:1770
30
+ #: inc/setting_default.php:38
31
  msgid "Donate"
32
  msgstr "寄付について"
33
 
languages/wauc_plugin.pot CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Admin UI Customize sub\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-09-07 12:24+0900\n"
6
- "PO-Revision-Date: 2013-09-07 12:24+0900\n"
7
  "Last-Translator: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
8
  "Language-Team: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -14,16 +14,17 @@ msgstr ""
14
  "Plural-Forms: nplurals=1; plural=0;\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
- #: wp-admin-ui-customize.php:838
18
  #: inc/setting_default.php:185
19
  msgid "Thank you for your donation."
20
  msgstr ""
21
 
22
- #: wp-admin-ui-customize.php:1757
23
  msgid "Thank you for considering donate."
24
  msgstr ""
25
 
26
- #: wp-admin-ui-customize.php:1757
 
27
  msgid "Donate"
28
  msgstr ""
29
 
@@ -139,3 +140,4 @@ msgstr ""
139
  msgid "Contact me"
140
  msgstr ""
141
 
 
2
  msgstr ""
3
  "Project-Id-Version: WP Admin UI Customize sub\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-09-12 01:33+0900\n"
6
+ "PO-Revision-Date: 2013-09-12 01:33+0900\n"
7
  "Last-Translator: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
8
  "Language-Team: gqevu6bsiz <gqevu6bsiz@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
14
  "Plural-Forms: nplurals=1; plural=0;\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
+ #: wp-admin-ui-customize.php:855
18
  #: inc/setting_default.php:185
19
  msgid "Thank you for your donation."
20
  msgstr ""
21
 
22
+ #: wp-admin-ui-customize.php:1770
23
  msgid "Thank you for considering donate."
24
  msgstr ""
25
 
26
+ #: wp-admin-ui-customize.php:1770
27
+ #: inc/setting_default.php:38
28
  msgid "Donate"
29
  msgstr ""
30
 
140
  msgid "Contact me"
141
  msgstr ""
142
 
143
+
readme.txt CHANGED
@@ -1,167 +1,171 @@
1
- === WP Admin UI Customize ===
2
- Contributors: gqevu6bsiz
3
- Donate link: http://gqevu6bsiz.chicappa.jp/please-donation/?utm_source=wporg&utm_medium=donate&utm_content=wauc&utm_campaign=1_3_8_2
4
- Tags: admin, post, posts, page, option, sitemenu, menu, custom, customize, dashboard, admin_bar
5
- Requires at least: 3.5.2
6
- Tested up to: 3.6
7
- Stable tag: 1.3.8.2
8
- License: GPL2
9
-
10
- Customize the management screen UI.
11
-
12
- == Description ==
13
-
14
- * Dashboard
15
- * Display options tab
16
- * Output-meta site
17
- * Admin bar
18
- * Admin menu (Side menu)
19
- * Management of meta box
20
- * Login screen
21
-
22
- These to Customization is possible.
23
-
24
- == Installation ==
25
-
26
- 1. Upload the entire wp-admin-ui-customize folder to the /wp-content/plugins/ directory.
27
- 2. Activate the plugin through the 'Plugins' menu in WordPress.
28
- 3. You will find 'WP Admin UI Customize' menu in your WordPress admin panel.
29
-
30
- == Frequently Asked Questions ==
31
-
32
- = A question that someone might have =
33
-
34
- = What about foo bar? =
35
-
36
- == Screenshots ==
37
-
38
- 1. Set the user role apply
39
- 2. Site Settings
40
- 3. Admin Screen Settings
41
- 4. Admin Screen Customized
42
- 5. Dashboard Settings
43
- 6. Dashboard Screen Customized
44
- 7. Admin Menu Settings
45
- 8. Admin Menu Customized
46
- 9. Metabox Settings
47
- 10. Login Screen Settings
48
- 11. Login Screen Customized
49
-
50
- == Changelog ==
51
-
52
- = 1.3.8.2 =
53
- * Added to expansion of Admin bar settings (new window).
54
- * Update: Translate.
55
-
56
- = 1.3.8.1 =
57
- * Change mechanism : multiple form tag to error on Admin bar settings.
58
- * Supported compatible to 3.6.
59
- * Added to comments show on hide to discussion of metabox.
60
-
61
- = 1.3.8 =
62
- * Fixed bug : Sortables settings of Admin bar settings and Side menu settings.
63
- * Fixed bug : Get the directory URL on use SSL.
64
- * Modified the HTML of some settings screen.
65
-
66
- = 1.3.7.1 =
67
- * Fixed : Translate.
68
- * Fixed : Misspelling.
69
-
70
- = 1.3.7 =
71
- * Added some filters.
72
- * Modified the HTML of some settings screen.
73
- * Changed some initial values of stored in database.
74
- * Added a confirmation of Nonce field.
75
-
76
- = 1.3.6 =
77
- * Added the User roles reset.
78
- * Show the User role to Sidemenu.
79
- * Settings of empty when Sidemenu and Admin Bar to change worked.
80
- * Fixed bug : Thumbnail of appearance menu.
81
-
82
- = 1.3.5.2 =
83
- * Added the use of variables in the footer text.
84
-
85
- = 1.3.5.1 =
86
- * Fixed bug : Get user role group.
87
-
88
- = 1.3.5 =
89
- * Changed the action timing of the side menu apply.
90
- * Fixed bug : Can not be acquired rights group.
91
-
92
- = 1.3.4 =
93
- * Only administrator has to perform of the Meta boxes read.
94
-
95
- = 1.3.3-beta =
96
- * Apply to admin bar on the front end also.
97
- * Edited the translation files.
98
- * Updated the Admin Bar.
99
-
100
- = 1.3.3 =
101
- * Fixed bug : Error when deleting plugins and themes.
102
-
103
- = 1.3.2 =
104
- * Added meta box other than the default.
105
-
106
- = 1.3.1 =
107
- * Added some variables.
108
- * Fixed bug : Error to does not exist sub menu in the side menu settings.
109
- * WordPress 3.6 compatibility
110
-
111
- = 1.3 =
112
- * Came to be able to use the various variables.
113
- * Removed the part menu from the Admin bar.
114
-
115
- = 1.2.3 =
116
- * Remove the "Wordpress" from the title tag of the Admin screen.
117
- * Added a preview of the logo image of the login screen.
118
- * Added a preview of the logo image of the login screen.
119
-
120
- = 1.2.2.2 =
121
- * Fix admin bar menu used the tags in the title.
122
- * Associate add_action to the function of some.
123
- * Movement restriction meta box for Dashboard.
124
-
125
- = 1.2.2.1 =
126
- I've added about donation.
127
-
128
- = 1.2.2 =
129
- Be able to changed more for the WP admin bar.
130
-
131
- = 1.2.1 =
132
- fixed because there was a mistake in the notation.
133
- Changed the layout.
134
- Priority of the side menu, and how to save slug was changed.
135
-
136
- = 1.2 =
137
- was be able to hide the menu add, and the delete menu, and the change permalink.
138
-
139
- = 1.1.3 =
140
- I fixed bug the remove metabox excerpt.
141
- I added a plug-in information.
142
-
143
- = 1.1.2 =
144
- I fixed bug the admin bar update.
145
-
146
- = 1.1.1 =
147
- I fixed bug the core update.
148
-
149
- = 1.1 =
150
- Possible to customize is the wp_admin_bar.
151
- will check whether the authority has been set.
152
-
153
- = 1.0.1 =
154
- bug that did not contain the separator line to the initial value of the side menu.
155
-
156
- = 1.0 =
157
- This is the initial release.
158
-
159
- == Upgrade Notice ==
160
-
161
- = 1.0 =
162
-
163
- == 日本語でのご説明 ==
164
-
165
- このプラグインは、管理画面UIのカスタマイズをするプラグインです。
166
- 「ダッシュボード」「オプションタブ」「サイトのメタタグ管理」「管理バー」「管理メニュー」「メタボックス」「ログイン画面」
167
- これらのカスタマイズを、このプラグインひとつで出来ます。
 
 
 
 
1
+ === WP Admin UI Customize ===
2
+ Contributors: gqevu6bsiz
3
+ Donate link: http://gqevu6bsiz.chicappa.jp/please-donation/?utm_source=wporg&utm_medium=donate&utm_content=wauc&utm_campaign=1_3_9
4
+ Tags: admin, post, posts, page, option, sitemenu, menu, custom, customize, dashboard, admin_bar
5
+ Requires at least: 3.5.2
6
+ Tested up to: 3.6
7
+ Stable tag: 1.3.9
8
+ License: GPL2
9
+
10
+ Customize the management screen UI.
11
+
12
+ == Description ==
13
+
14
+ * Dashboard
15
+ * Display options tab
16
+ * Output-meta site
17
+ * Admin bar
18
+ * Admin menu (Side menu)
19
+ * Management of meta box
20
+ * Login screen
21
+
22
+ These to Customization is possible.
23
+
24
+ == Installation ==
25
+
26
+ 1. Upload the entire wp-admin-ui-customize folder to the /wp-content/plugins/ directory.
27
+ 2. Activate the plugin through the 'Plugins' menu in WordPress.
28
+ 3. You will find 'WP Admin UI Customize' menu in your WordPress admin panel.
29
+
30
+ == Frequently Asked Questions ==
31
+
32
+ = A question that someone might have =
33
+
34
+ = What about foo bar? =
35
+
36
+ == Screenshots ==
37
+
38
+ 1. Set the user role apply
39
+ 2. Site Settings
40
+ 3. Admin Screen Settings
41
+ 4. Admin Screen Customized
42
+ 5. Dashboard Settings
43
+ 6. Dashboard Screen Customized
44
+ 7. Admin Menu Settings
45
+ 8. Admin Menu Customized
46
+ 9. Metabox Settings
47
+ 10. Login Screen Settings
48
+ 11. Login Screen Customized
49
+
50
+ == Changelog ==
51
+
52
+ = 1.3.9 =
53
+ * Added: Remove metaboxes on Custom post types.
54
+ * Change mechanism : Registration method of metabox.
55
+
56
+ = 1.3.8.2 =
57
+ * Added to expansion of Admin bar settings (new window).
58
+ * Update: Translate.
59
+
60
+ = 1.3.8.1 =
61
+ * Change mechanism : multiple form tag to error on Admin bar settings.
62
+ * Supported compatible to 3.6.
63
+ * Added to comments show on hide to discussion of metabox.
64
+
65
+ = 1.3.8 =
66
+ * Fixed bug : Sortables settings of Admin bar settings and Side menu settings.
67
+ * Fixed bug : Get the directory URL on use SSL.
68
+ * Modified the HTML of some settings screen.
69
+
70
+ = 1.3.7.1 =
71
+ * Fixed : Translate.
72
+ * Fixed : Misspelling.
73
+
74
+ = 1.3.7 =
75
+ * Added some filters.
76
+ * Modified the HTML of some settings screen.
77
+ * Changed some initial values of stored in database.
78
+ * Added a confirmation of Nonce field.
79
+
80
+ = 1.3.6 =
81
+ * Added the User roles reset.
82
+ * Show the User role to Sidemenu.
83
+ * Settings of empty when Sidemenu and Admin Bar to change worked.
84
+ * Fixed bug : Thumbnail of appearance menu.
85
+
86
+ = 1.3.5.2 =
87
+ * Added the use of variables in the footer text.
88
+
89
+ = 1.3.5.1 =
90
+ * Fixed bug : Get user role group.
91
+
92
+ = 1.3.5 =
93
+ * Changed the action timing of the side menu apply.
94
+ * Fixed bug : Can not be acquired rights group.
95
+
96
+ = 1.3.4 =
97
+ * Only administrator has to perform of the Meta boxes read.
98
+
99
+ = 1.3.3-beta =
100
+ * Apply to admin bar on the front end also.
101
+ * Edited the translation files.
102
+ * Updated the Admin Bar.
103
+
104
+ = 1.3.3 =
105
+ * Fixed bug : Error when deleting plugins and themes.
106
+
107
+ = 1.3.2 =
108
+ * Added meta box other than the default.
109
+
110
+ = 1.3.1 =
111
+ * Added some variables.
112
+ * Fixed bug : Error to does not exist sub menu in the side menu settings.
113
+ * WordPress 3.6 compatibility
114
+
115
+ = 1.3 =
116
+ * Came to be able to use the various variables.
117
+ * Removed the part menu from the Admin bar.
118
+
119
+ = 1.2.3 =
120
+ * Remove the "Wordpress" from the title tag of the Admin screen.
121
+ * Added a preview of the logo image of the login screen.
122
+ * Added a preview of the logo image of the login screen.
123
+
124
+ = 1.2.2.2 =
125
+ * Fix admin bar menu used the tags in the title.
126
+ * Associate add_action to the function of some.
127
+ * Movement restriction meta box for Dashboard.
128
+
129
+ = 1.2.2.1 =
130
+ I've added about donation.
131
+
132
+ = 1.2.2 =
133
+ Be able to changed more for the WP admin bar.
134
+
135
+ = 1.2.1 =
136
+ fixed because there was a mistake in the notation.
137
+ Changed the layout.
138
+ Priority of the side menu, and how to save slug was changed.
139
+
140
+ = 1.2 =
141
+ was be able to hide the menu add, and the delete menu, and the change permalink.
142
+
143
+ = 1.1.3 =
144
+ I fixed bug the remove metabox excerpt.
145
+ I added a plug-in information.
146
+
147
+ = 1.1.2 =
148
+ I fixed bug the admin bar update.
149
+
150
+ = 1.1.1 =
151
+ I fixed bug the core update.
152
+
153
+ = 1.1 =
154
+ Possible to customize is the wp_admin_bar.
155
+ will check whether the authority has been set.
156
+
157
+ = 1.0.1 =
158
+ bug that did not contain the separator line to the initial value of the side menu.
159
+
160
+ = 1.0 =
161
+ This is the initial release.
162
+
163
+ == Upgrade Notice ==
164
+
165
+ = 1.0 =
166
+
167
+ == 日本語でのご説明 ==
168
+
169
+ このプラグインは、管理画面UIのカスタマイズをするプラグインです。
170
+ 「ダッシュボード」「オプションタブ」「サイトのメタタグ管理」「管理バー」「管理メニュー」「メタボックス」「ログイン画面」
171
+ これらのカスタマイズを、このプラグインひとつで出来ます。
wp-admin-ui-customize.css CHANGED
@@ -1,178 +1,178 @@
1
- /* layout */
2
-
3
-
4
- #poststuff #post-body.columns-2 {
5
- margin-right: 400px;
6
- }
7
- #post-body.columns-2 #postbox-container-1 {
8
- margin-right: -400px;
9
- width: 380px;
10
- }
11
-
12
- #wauc_setting_admin_bar_menu #poststuff #post-body.columns-2 {
13
- margin-right: 50%;
14
- }
15
- #wauc_setting_admin_bar_menu #post-body.columns-2 #postbox-container-1 {
16
- margin-right: -100%;
17
- width: 98%;
18
- }
19
-
20
- #wauc_setting_sidemenu #poststuff #post-body {
21
- margin-right: auto;
22
- margin-left: 500px;
23
- }
24
- #wauc_setting_sidemenu #poststuff #post-body #postbox-container-1 {
25
- margin-right: auto;
26
- width: 100%;
27
- }
28
- #wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 {
29
- width: 480px;
30
- margin-left: -500px
31
- }
32
- .postbox-container .postbox .hndle {
33
- cursor: default;
34
- }
35
-
36
-
37
-
38
-
39
-
40
-
41
- .postbox-container #donationbox {
42
- background: #87BCE4;
43
- border: 3px solid #227499;
44
- }
45
- .postbox-container #donationbox .inside {
46
- padding: 6px 10px 10px 10px;
47
- }
48
- .postbox-container #donationbox .inside .donation_memo {
49
- background: #FFF8D9;
50
- padding: 2px 10px;
51
- }
52
-
53
- #list_variables {
54
- display: none;
55
- }
56
- .list_variables_wrap {
57
- padding: 16px 0 0 0;
58
- }
59
-
60
-
61
-
62
- /* sidemenu */
63
-
64
- #wauc_setting_sidemenu .postbox .inside {
65
- padding: 10px;
66
- }
67
- #wauc_setting_sidemenu .postbox .inside .widget-placeholder {
68
- width: auto;
69
- }
70
- #wauc_setting_sidemenu .postbox .inside .widget .widget-top .widget-title .in-widget-title {
71
- opacity: 0.7;
72
- font-weight: normal;
73
- }
74
- #wauc_setting_sidemenu .postbox .inside .widget .widget-inside .settings {
75
- margin-bottom: 12px;
76
- }
77
- #wauc_setting_sidemenu .postbox .inside .widget .widget-inside .submenu {
78
- padding: 5px 5px 20px 5px;
79
- border: 1px solid #DFDFDF;
80
- }
81
- #wauc_setting_sidemenu .postbox .inside .widget .widget-inside input.regular-text {
82
- width: 300px;
83
- }
84
-
85
- #wauc_setting_sidemenu #can_menus .postbox .inside .widget .widget-top .widget-title-action,
86
- #wauc_setting_sidemenu #setting_menus .postbox .inside .widget.separator .widget-top .widget-title-action,
87
- #wauc_setting_sidemenu #setting_menus .postbox .inside .widget .widget-inside .submenu .widget .widget-inside .submenu {
88
- display: none;
89
- }
90
-
91
- #wauc_setting_sidemenu #can_menus .postbox .inside .widget {
92
- width: 170px;
93
- float: left;
94
- margin: 0 4px 4px 0;
95
- }
96
-
97
- #wauc_setting_sidemenu #setting_menus .postbox .inside .settings ul.display_roles {
98
- display: block;
99
- }
100
- #wauc_setting_sidemenu #setting_menus .postbox .inside .settings ul.display_roles li {
101
- display: inline-block;
102
- color: #DDD;
103
- margin-right: 6px;
104
- }
105
- #wauc_setting_sidemenu #setting_menus .postbox .inside .settings ul.display_roles li.has_cap {
106
- font-weight: bold;
107
- color: #000;
108
- }
109
-
110
-
111
-
112
-
113
- /* admin_bar */
114
-
115
-
116
- #wauc_setting_admin_bar_menu {}
117
- #wauc_setting_admin_bar_menu .postbox .inside {
118
- padding: 10px;
119
- }
120
- #wauc_setting_admin_bar_menu .postbox .inside .widget-placeholder {
121
- width: auto;
122
- }
123
- #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-top .widget-title .in-widget-title {
124
- opacity: 0.7;
125
- font-weight: normal;
126
- }
127
- #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-inside .submenu {
128
- padding: 5px 5px 20px 5px;
129
- border: 1px solid #DFDFDF;
130
- margin: 8px 0 0 0;
131
- }
132
-
133
- #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-top {
134
- height: auto;
135
- }
136
- #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-top .widget-title h4 {
137
- line-height: 20px;
138
- }
139
- #wauc_setting_admin_bar_menu .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon,
140
- #wauc_setting_admin_bar_menu .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
141
- #wauc_setting_admin_bar_menu .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
142
- #wauc_setting_admin_bar_menu .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon {
143
- width: 20px;
144
- height: 20px;
145
- background-repeat: no-repeat;
146
- display: block;
147
- float: left;
148
- margin: 0 2px 0 0;
149
- }
150
- #wauc_setting_admin_bar_menu .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon {
151
- background-position: 0 -104px;
152
- }
153
- #wauc_setting_admin_bar_menu .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon {
154
- background-position: -2px -159px;
155
- }
156
- #wauc_setting_admin_bar_menu .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon {
157
- background-position: -2px -135px;
158
- }
159
- #wauc_setting_admin_bar_menu .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon {
160
- background-position: -2px -202px;
161
- }
162
-
163
-
164
- #wauc_setting_admin_bar_menu #can_menus .postbox .inside .widget .widget-top .widget-title-action,
165
- #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-inside .submenu .widget .widget-inside .submenu {
166
- display: none;
167
- }
168
-
169
-
170
- #wauc_setting_admin_bar_menu .columns-1 .postbox .inside h3 {
171
- cursor: default;
172
- border-bottom: none;
173
- }
174
- #wauc_setting_admin_bar_menu .columns-1 .postbox .inside .widget {
175
- width: 170px;
176
- float: left;
177
- margin: 0 4px 4px 0;
178
- }
1
+ /* layout */
2
+
3
+
4
+ #poststuff #post-body.columns-2 {
5
+ margin-right: 400px;
6
+ }
7
+ #post-body.columns-2 #postbox-container-1 {
8
+ margin-right: -400px;
9
+ width: 380px;
10
+ }
11
+
12
+ #wauc_setting_admin_bar_menu #poststuff #post-body.columns-2 {
13
+ margin-right: 50%;
14
+ }
15
+ #wauc_setting_admin_bar_menu #post-body.columns-2 #postbox-container-1 {
16
+ margin-right: -100%;
17
+ width: 98%;
18
+ }
19
+
20
+ #wauc_setting_sidemenu #poststuff #post-body {
21
+ margin-right: auto;
22
+ margin-left: 500px;
23
+ }
24
+ #wauc_setting_sidemenu #poststuff #post-body #postbox-container-1 {
25
+ margin-right: auto;
26
+ width: 100%;
27
+ }
28
+ #wauc_setting_sidemenu #poststuff #post-body #postbox-container-2 {
29
+ width: 480px;
30
+ margin-left: -500px
31
+ }
32
+ .postbox-container .postbox .hndle {
33
+ cursor: default;
34
+ }
35
+
36
+
37
+
38
+
39
+
40
+
41
+ .postbox-container #donationbox {
42
+ background: #87BCE4;
43
+ border: 3px solid #227499;
44
+ }
45
+ .postbox-container #donationbox .inside {
46
+ padding: 6px 10px 10px 10px;
47
+ }
48
+ .postbox-container #donationbox .inside .donation_memo {
49
+ background: #FFF8D9;
50
+ padding: 2px 10px;
51
+ }
52
+
53
+ #list_variables {
54
+ display: none;
55
+ }
56
+ .list_variables_wrap {
57
+ padding: 16px 0 0 0;
58
+ }
59
+
60
+
61
+
62
+ /* sidemenu */
63
+
64
+ #wauc_setting_sidemenu .postbox .inside {
65
+ padding: 10px;
66
+ }
67
+ #wauc_setting_sidemenu .postbox .inside .widget-placeholder {
68
+ width: auto;
69
+ }
70
+ #wauc_setting_sidemenu .postbox .inside .widget .widget-top .widget-title .in-widget-title {
71
+ opacity: 0.7;
72
+ font-weight: normal;
73
+ }
74
+ #wauc_setting_sidemenu .postbox .inside .widget .widget-inside .settings {
75
+ margin-bottom: 12px;
76
+ }
77
+ #wauc_setting_sidemenu .postbox .inside .widget .widget-inside .submenu {
78
+ padding: 5px 5px 20px 5px;
79
+ border: 1px solid #DFDFDF;
80
+ }
81
+ #wauc_setting_sidemenu .postbox .inside .widget .widget-inside input.regular-text {
82
+ width: 300px;
83
+ }
84
+
85
+ #wauc_setting_sidemenu #can_menus .postbox .inside .widget .widget-top .widget-title-action,
86
+ #wauc_setting_sidemenu #setting_menus .postbox .inside .widget.separator .widget-top .widget-title-action,
87
+ #wauc_setting_sidemenu #setting_menus .postbox .inside .widget .widget-inside .submenu .widget .widget-inside .submenu {
88
+ display: none;
89
+ }
90
+
91
+ #wauc_setting_sidemenu #can_menus .postbox .inside .widget {
92
+ width: 170px;
93
+ float: left;
94
+ margin: 0 4px 4px 0;
95
+ }
96
+
97
+ #wauc_setting_sidemenu #setting_menus .postbox .inside .settings ul.display_roles {
98
+ display: block;
99
+ }
100
+ #wauc_setting_sidemenu #setting_menus .postbox .inside .settings ul.display_roles li {
101
+ display: inline-block;
102
+ color: #DDD;
103
+ margin-right: 6px;
104
+ }
105
+ #wauc_setting_sidemenu #setting_menus .postbox .inside .settings ul.display_roles li.has_cap {
106
+ font-weight: bold;
107
+ color: #000;
108
+ }
109
+
110
+
111
+
112
+
113
+ /* admin_bar */
114
+
115
+
116
+ #wauc_setting_admin_bar_menu {}
117
+ #wauc_setting_admin_bar_menu .postbox .inside {
118
+ padding: 10px;
119
+ }
120
+ #wauc_setting_admin_bar_menu .postbox .inside .widget-placeholder {
121
+ width: auto;
122
+ }
123
+ #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-top .widget-title .in-widget-title {
124
+ opacity: 0.7;
125
+ font-weight: normal;
126
+ }
127
+ #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-inside .submenu {
128
+ padding: 5px 5px 20px 5px;
129
+ border: 1px solid #DFDFDF;
130
+ margin: 8px 0 0 0;
131
+ }
132
+
133
+ #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-top {
134
+ height: auto;
135
+ }
136
+ #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-top .widget-title h4 {
137
+ line-height: 20px;
138
+ }
139
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon,
140
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
141
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
142
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon {
143
+ width: 20px;
144
+ height: 20px;
145
+ background-repeat: no-repeat;
146
+ display: block;
147
+ float: left;
148
+ margin: 0 2px 0 0;
149
+ }
150
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon {
151
+ background-position: 0 -104px;
152
+ }
153
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon {
154
+ background-position: -2px -159px;
155
+ }
156
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon {
157
+ background-position: -2px -135px;
158
+ }
159
+ #wauc_setting_admin_bar_menu .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon {
160
+ background-position: -2px -202px;
161
+ }
162
+
163
+
164
+ #wauc_setting_admin_bar_menu #can_menus .postbox .inside .widget .widget-top .widget-title-action,
165
+ #wauc_setting_admin_bar_menu .postbox .inside .widget .widget-inside .submenu .widget .widget-inside .submenu {
166
+ display: none;
167
+ }
168
+
169
+
170
+ #wauc_setting_admin_bar_menu .columns-1 .postbox .inside h3 {
171
+ cursor: default;
172
+ border-bottom: none;
173
+ }
174
+ #wauc_setting_admin_bar_menu .columns-1 .postbox .inside .widget {
175
+ width: 170px;
176
+ float: left;
177
+ margin: 0 4px 4px 0;
178
+ }
wp-admin-ui-customize.js CHANGED
@@ -1,9 +1,9 @@
1
- jQuery(document).ready(function($) {
2
-
3
- var $Form = $(".wauc_form");
4
-
5
- $('.handlediv' , $Form).live( 'click', function() {
6
- $(this).parent().toggleClass('closed');
7
- });
8
-
9
- });
1
+ jQuery(document).ready(function($) {
2
+
3
+ var $Form = $(".wauc_form");
4
+
5
+ $('.handlediv' , $Form).live( 'click', function() {
6
+ $(this).parent().toggleClass('closed');
7
+ });
8
+
9
+ });
wp-admin-ui-customize.php CHANGED
@@ -1,1762 +1,1777 @@
1
- <?php
2
- /*
3
- Plugin Name: WP Admin UI Customize
4
- Description: An excellent plugin to customize the management screens.
5
- Plugin URI: http://wpadminuicustomize.com/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=1_3_8_2
6
- Version: 1.3.8.2
7
- Author: gqevu6bsiz
8
- Author URI: http://gqevu6bsiz.chicappa.jp/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=1_3_8_2
9
- Text Domain: wauc
10
- Domain Path: /languages
11
- */
12
-
13
- /* Copyright 2012 gqevu6bsiz (email : gqevu6bsiz@gmail.com)
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License, version 2, as
17
- published by the Free Software Foundation.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
23
-
24
- You should have received a copy of the GNU General Public License
25
- along with this program; if not, write to the Free Software
26
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
- */
28
-
29
-
30
-
31
- class WP_Admin_UI_Customize
32
- {
33
-
34
- var $Ver,
35
- $Name,
36
- $Dir,
37
- $Url,
38
- $Site,
39
- $AuthorUrl,
40
- $ltd,
41
- $Record,
42
- $PageSlug,
43
- $PluginSlug,
44
- $Nonces,
45
- $Schema,
46
- $UPFN,
47
- $DonateKey,
48
- $Menu,
49
- $SubMenu,
50
- $Admin_bar,
51
- $Msg;
52
-
53
-
54
- function __construct() {
55
- $this->Ver = '1.3.8.2';
56
- $this->Name = 'WP Admin UI Customize';
57
- $this->Dir = plugin_dir_path( __FILE__ );
58
- $this->Url = plugin_dir_url( __FILE__ );
59
- $this->Site = 'http://wpadminuicustomize.com/';
60
- $this->AuthorUrl = 'http://gqevu6bsiz.chicappa.jp/';
61
- $this->ltd = 'wauc';
62
- $this->ltd_p = $this->ltd . '_plugin';
63
- $this->Record = array(
64
- "user_role" => $this->ltd . '_user_role_setting',
65
- "site" => $this->ltd . '_site_setting',
66
- "admin_general" => $this->ltd . '_admin_general_setting',
67
- "dashboard" => $this->ltd . '_dashboard_setting',
68
- "admin_bar_menu" => $this->ltd . '_admin_bar_menu_setting',
69
- "sidemenu" => $this->ltd . '_sidemenu_setting',
70
- "removemetabox" => $this->ltd . '_removemetabox_setting',
71
- "regist_metabox" => $this->ltd . '_regist_metabox',
72
- "post_add_edit" => $this->ltd . '_post_add_edit_setting',
73
- "appearance_menus" => $this->ltd . '_appearance_menus_setting',
74
- "loginscreen" => $this->ltd . '_loginscreen_setting',
75
- "donate" => $this->ltd . '_donated',
76
- );
77
- $this->PageSlug = 'wp_admin_ui_customize';
78
- $this->PluginSlug = dirname( plugin_basename( __FILE__ ) );
79
- $this->Nonces = array( "field" => $this->ltd . '_field' , "value" => $this->ltd . '_value' );
80
- $this->Schema = is_ssl() ? 'https://' : 'http://';
81
- $this->UPFN = 'Y';
82
- $this->DonateKey = 'd77aec9bc89d445fd54b4c988d090f03';
83
-
84
- $this->PluginSetup();
85
- $this->FilterStart();
86
- }
87
-
88
-
89
-
90
-
91
-
92
- // PluginSetup
93
- function PluginSetup() {
94
- // load text domain
95
- load_plugin_textdomain( $this->ltd , false , $this->PluginSlug . '/languages' );
96
- load_plugin_textdomain( $this->ltd_p , false , $this->PluginSlug . '/languages' );
97
-
98
- // plugin links
99
- add_filter( 'plugin_action_links' , array( $this , 'plugin_action_links' ) , 10 , 2 );
100
-
101
- // plugin links
102
- add_filter( 'network_admin_plugin_action_links' , array( $this , 'network_admin_plugin_action_links' ) , 10 , 2 );
103
-
104
- // add menu
105
- add_action( 'admin_menu' , array( $this , 'admin_menu' ) , 2 );
106
-
107
- // setting check user role
108
- add_action( 'admin_notices' , array( $this , 'settingCheck' ) );
109
- }
110
-
111
- // PluginSetup
112
- function plugin_action_links( $links , $file ) {
113
- if( plugin_basename(__FILE__) == $file ) {
114
- $link = '<a href="' . self_admin_url( 'admin.php?page=' . $this->PageSlug ) . '">' . __( 'Settings' ) . '</a>';
115
- $support_link = '<a href="http://wordpress.org/support/plugin/' . $this->PluginSlug . '" target="_blank">' . __( 'Support Forums' ) . '</a>';
116
- $delete_userrole_link = '<a href="' . self_admin_url( 'admin.php?page=' . $this->PageSlug . '_reset_userrole' ) . '">' . __( 'Reset User Roles' , $this->ltd ) . '</a>';
117
- array_unshift( $links, $link , $delete_userrole_link , $support_link );
118
- }
119
- return $links;
120
- }
121
-
122
- // PluginSetup
123
- function network_admin_plugin_action_links( $links , $file ) {
124
- if( plugin_basename(__FILE__) == $file ) {
125
- $support_link = '<a href="' . $this->Site . 'multisite_about/?utm_source=use_plugin&utm_medium=list&utm_content=' . $this->ltd . '&utm_campaign=' . str_replace( '.' , '_' , $this->Ver ) . '" target="_blank">Multisite Add-on</a>';
126
- array_unshift( $links, $support_link );
127
- }
128
-
129
- return $links;
130
- }
131
-
132
- // PluginSetup
133
- function admin_menu() {
134
-
135
- if( !empty( $_GET["page"] ) ) {
136
- $page = strip_tags( $_GET["page"] );
137
- if( $page == $this->PageSlug . '_admin_bar' ) {
138
- @header("X-XSS-Protection: 0");
139
- }
140
- }
141
-
142
- add_menu_page( $this->Name , $this->Name , 'administrator', $this->PageSlug , array( $this , 'setting_default') );
143
- add_submenu_page( $this->PageSlug , __( 'Site Settings' , $this->ltd ) , __( 'Site Settings' , $this->ltd ) , 'administrator' , $this->PageSlug . '_setting_site' , array( $this , 'setting_site' ) );
144
- add_submenu_page( $this->PageSlug , __( 'General Screen Settings' , $this->ltd ) , __( 'General Screen Settings' , $this->ltd ) , 'administrator' , $this->PageSlug . '_admin_general_setting' , array( $this , 'setting_admin_general' ) );
145
- add_submenu_page( $this->PageSlug , __( 'Dashboard' ) , __( 'Dashboard' ) , 'administrator' , $this->PageSlug . '_dashboard' , array( $this , 'setting_dashboard' ) );
146
- add_submenu_page( $this->PageSlug , __( 'Admin Bar Menu' , $this->ltd ) , __( 'Admin Bar Menu' , $this->ltd ) , 'administrator' , $this->PageSlug . '_admin_bar' , array( $this , 'setting_admin_bar_menu' ) );
147
- add_submenu_page( $this->PageSlug , __( 'Side Menu' , $this->ltd ) , __( 'Side Menu' , $this->ltd ) , 'administrator' , $this->PageSlug . '_sidemenu' , array( $this , 'setting_sidemenu' ) );
148
- add_submenu_page( $this->PageSlug , __( 'Remove meta box' , $this->ltd ) , __( 'Remove meta box' , $this->ltd ) , 'administrator' , $this->PageSlug . '_removemtabox' , array( $this , 'setting_removemtabox' ) );
149
- add_submenu_page( $this->PageSlug , __( 'Add New Post and Edit Post Screen Setting' , $this->ltd ) , __( 'Add New Post and Edit Post Screen Setting' , $this->ltd ) , 'administrator' , $this->PageSlug . '_post_add_edit_screen' , array( $this , 'setting_post_add_edit' ) );
150
- add_submenu_page( $this->PageSlug , __( 'Appearance Menus Screen Setting' , $this->ltd ) , __( 'Appearance Menus Screen Setting' , $this->ltd ) , 'administrator' , $this->PageSlug . '_appearance_menus' , array( $this , 'setting_appearance_menus' ) );
151
- add_submenu_page( $this->PageSlug , __( 'Login Screen' , $this->ltd ) , __( 'Login Screen' , $this->ltd ) , 'administrator' , $this->PageSlug . '_loginscreen' , array( $this , 'setting_loginscreen' ) );
152
- add_submenu_page( $this->PageSlug , __( 'Reset User Roles' , $this->ltd ) , '<div style="display: none";>' . __( 'Reset User Roles' , $this->ltd ) . '</div>' , 'administrator' , $this->PageSlug . '_reset_userrole' , array( $this , 'reset_userrole' ) );
153
- }
154
-
155
-
156
-
157
-
158
-
159
- // SettingPage
160
- function setting_default() {
161
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
162
- include_once 'inc/setting_default.php';
163
- }
164
-
165
- // SettingPage
166
- function setting_site() {
167
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
168
- $this->DisplayDonation();
169
- include_once 'inc/setting_site.php';
170
- }
171
-
172
- // SettingPage
173
- function setting_admin_general() {
174
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
175
- $this->DisplayDonation();
176
- include_once 'inc/setting_admin_general.php';
177
- }
178
-
179
- // SettingPage
180
- function setting_dashboard() {
181
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
182
- $this->DisplayDonation();
183
- include_once 'inc/setting_dashboard.php';
184
- }
185
-
186
- // SettingPage
187
- function setting_admin_bar_menu() {
188
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
189
- $this->DisplayDonation();
190
- include_once 'inc/setting_admin_bar_menu.php';
191
- }
192
-
193
- // SettingPage
194
- function setting_sidemenu() {
195
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
196
- $this->DisplayDonation();
197
- include_once 'inc/setting_sidemenu.php';
198
- }
199
-
200
- // SettingPage
201
- function setting_removemtabox() {
202
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
203
- $this->DisplayDonation();
204
- include_once 'inc/setting_removemtabox.php';
205
- }
206
-
207
- // SettingPage
208
- function setting_post_add_edit() {
209
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
210
- $this->DisplayDonation();
211
- include_once 'inc/setting_post_add_edit.php';
212
- }
213
-
214
- // SettingPage
215
- function setting_appearance_menus() {
216
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
217
- $this->DisplayDonation();
218
- include_once 'inc/setting_appearance_menus.php';
219
- }
220
-
221
- // SettingPage
222
- function setting_loginscreen() {
223
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
224
- $this->DisplayDonation();
225
- include_once 'inc/setting_loginscreen.php';
226
- }
227
-
228
- // SettingPage
229
- function reset_userrole() {
230
- if( !empty( $_POST["reset"] ) ) {
231
- $this->update_reset( 'user_role' );
232
- }
233
- add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
234
- include_once 'inc/reset_userrole.php';
235
- }
236
-
237
-
238
-
239
-
240
-
241
- // GetData
242
- function get_data( $record ) {
243
- $GetData = get_option( $this->Record[$record] );
244
- $GetData = apply_filters( 'wauc_pre_get_data' , $GetData , $record );
245
-
246
- $Data = array();
247
- if( !empty( $GetData ) && !empty( $GetData["UPFN"] ) && $GetData["UPFN"] == $this->UPFN ) {
248
- $Data = $GetData;
249
- }
250
-
251
- return $Data;
252
- }
253
-
254
- // GetData
255
- function get_flit_data( $record ) {
256
- $GetData = get_option( $this->Record[$record] );
257
- $GetData = apply_filters( 'wauc_pre_get_filt_data' , $GetData , $record );
258
-
259
- $Data = array();
260
- if( !empty( $GetData ) && !empty( $GetData["UPFN"] ) && $GetData["UPFN"] == $this->UPFN ) {
261
- $Data = $GetData;
262
- }
263
-
264
- return $Data;
265
- }
266
-
267
-
268
-
269
- // Settingcheck
270
- function settingCheck() {
271
- global $current_screen;
272
-
273
- $Data = $this->get_data( 'user_role' );
274
- if( !empty( $Data["UPFN"] ) ) {
275
- unset( $Data["UPFN"] );
276
- }
277
- if( empty( $Data ) ) {
278
- if( $current_screen->parent_base == $this->PageSlug && $current_screen->id != 'toplevel_page_' . $this->PageSlug ) {
279
- echo '<div class="error"><p><strong>' . sprintf( __( 'Authority to apply the setting is not selected. <a href="%s">From here</a>, please select the permissions you want to set.' , $this->ltd ) , admin_url( 'admin.php?page=' . $this->PageSlug ) ) . '</strong></p></div>';
280
- }
281
- }
282
- }
283
-
284
-
285
-
286
-
287
-
288
- // SetList
289
- function get_user_role() {
290
- $editable_roles = get_editable_roles();
291
- foreach ( $editable_roles as $role => $details ) {
292
- $editable_roles[$role]["label"] = translate_user_role( $details['name'] );
293
- }
294
-
295
- return $editable_roles;
296
- }
297
-
298
- // SetList
299
- function get_apply_roles() {
300
-
301
- $apply_user_roles = $this->get_data( 'user_role' );
302
- unset( $apply_user_roles["UPFN"] );
303
-
304
- $Contents = __( 'Apply user roles' , $this->ltd ) . ' : ';
305
-
306
- if( !empty( $apply_user_roles ) ) {
307
- $UserRoles = $this->get_user_role();
308
- foreach( $apply_user_roles as $role => $v ) {
309
- $Contents .= '[ ' . $UserRoles[$role]["label"] . ' ]';
310
- }
311
- } else {
312
- $Contents .= __( 'None' );
313
- }
314
-
315
- $Contents = apply_filters( 'wauc_get_apply_roles' , $Contents );
316
-
317
- return $Contents;
318
-
319
- }
320
-
321
- // SetList
322
- function sidemenu_default_load() {
323
- global $menu , $submenu;
324
-
325
- $this->Menu = $menu;
326
- $this->SubMenu = $submenu;
327
- }
328
-
329
- // SetList
330
- function admin_bar_default_load( $wp_admin_bar ) {
331
- global $wp_admin_bar;
332
-
333
- $this->Admin_bar = $wp_admin_bar->get_nodes();
334
- }
335
-
336
- // SetList
337
- function admin_bar_filter_load() {
338
- $Default_bar = $this->Admin_bar;
339
-
340
- $Delete_bar = array( "user-actions" , "wp-logo-external" , "top-secondary" , "my-sites-super-admin" , "my-sites-list" );
341
- foreach( $Delete_bar as $del_name ) {
342
- if( !empty( $Default_bar[$del_name] ) ) {
343
- unset( $Default_bar[$del_name] );
344
- }
345
- }
346
- if( !empty( $Default_bar ) ) {
347
- foreach( $Default_bar as $node_id => $node ) {
348
- if( preg_match( "/blog-[0-9]/" , $node->parent ) ) {
349
- unset( $Default_bar[$node_id] );
350
- }
351
- }
352
- }
353
-
354
- // front
355
- $Default_bar["dashboard"] = (object) array( "id" => "dashboard" , "title" => __( 'Dashboard' ) , "parent" => "site-name" , "href" => admin_url() );
356
-
357
- foreach( $Default_bar as $node_id => $node ) {
358
- if( $node->id == 'my-account' ) {
359
- $Default_bar[$node_id]->title = sprintf( __( 'Howdy, %1$s' ) , '[user_name]' );
360
- } elseif( $node->id == 'user-info' ) {
361
- $Default_bar[$node_id]->title = '<span class="display-name">[user_name]</span>';
362
- } elseif( $node->id == 'logout' ) {
363
- $Default_bar[$node_id]->href = preg_replace( '/&amp(.*)/' , '' , $node->href );
364
- } elseif( $node->id == 'site-name' ) {
365
- $Default_bar[$node_id]->title = '[blog_name]';
366
- } elseif( $node->id == 'updates' ) {
367
- $Default_bar[$node_id]->title = '[update_total]';
368
- } elseif( $node->id == 'comments' ) {
369
- $Default_bar[$node_id]->title = '[comment_count]';
370
- }
371
- }
372
-
373
- $Filter_bar = array();
374
- $MainMenuIDs = array();
375
-
376
- foreach( $Default_bar as $node_id => $node ) {
377
- if( empty( $node->parent ) ) {
378
- $Filter_bar["left"]["main"][$node_id] = $node;
379
- $MainMenuIDs[$node_id] = "left";
380
- unset( $Default_bar[$node_id] );
381
- } elseif( $node->parent == 'top-secondary' ) {
382
- $Filter_bar["right"]["main"][$node_id] = $node;
383
- $MainMenuIDs[$node_id] = "right";
384
- unset( $Default_bar[$node_id] );
385
- }
386
- }
387
-
388
- foreach( $Default_bar as $node_id => $node ) {
389
- if( $node->parent == 'wp-logo-external' ) {
390
- $Default_bar[$node_id]->parent = 'wp-logo';
391
- } elseif( $node->parent == 'user-actions' ) {
392
- $Default_bar[$node_id]->parent = 'my-account';
393
- } elseif( $node->parent == 'my-sites-list' ) {
394
- $Default_bar[$node_id]->parent = 'my-sites';
395
- } else{
396
- if( !array_keys( $MainMenuIDs , $node->parent ) ) {
397
- if( !empty( $Default_bar[$node->parent] ) ) {
398
- $Default_bar[$node_id]->parent = $Default_bar[$node->parent]->parent;
399
- }
400
- }
401
- }
402
- }
403
-
404
- // meta field add
405
- foreach( $Default_bar as $node_id => $node ) {
406
- if( !isset( $node->meta ) ) {
407
- $Default_bar[$node_id]->meta = array();
408
- }
409
- }
410
-
411
- foreach( $MainMenuIDs as $parent_id => $menu_type ) {
412
-
413
- foreach( $Default_bar as $node_id => $node ) {
414
- if( $node->parent == $parent_id ) {
415
- $Filter_bar[$menu_type]["sub"][$node_id] = $node;
416
- unset( $Default_bar[$node_id] );
417
- }
418
- }
419
- }
420
-
421
- return $Filter_bar;
422
- }
423
-
424
- // SetList
425
- function post_meta_boxes_load() {
426
- global $current_screen;
427
-
428
- $UserRole = $this->current_user_role_group();
429
-
430
- if( $current_screen->base == 'post' && $current_screen->action != 'add' && $UserRole == 'administrator' ) {
431
- if( $current_screen->post_type == 'post' or $current_screen->post_type == 'page' ) {
432
-
433
- global $wp_meta_boxes;
434
- global $post_type;
435
-
436
- $GetData = $this->get_data( "regist_metabox" );
437
- $Metaboxes = $wp_meta_boxes[$post_type];
438
-
439
- $Update = array();
440
- if( empty( $GetData ) ) {
441
-
442
- $Update["UPFN"] = $this->UPFN;
443
- foreach( $Metaboxes as $context => $meta_box ) {
444
- foreach( $meta_box as $priority => $box ) {
445
- foreach( $box as $metabox_id => $b ) {
446
- $Update["metaboxes"][$post_type][$context][$priority][$b["id"]] = strip_tags( $b["title"] );
447
- }
448
- }
449
- }
450
-
451
- } else {
452
-
453
- unset( $GetData["metaboxes"][$post_type] );
454
- $Update = $GetData;
455
- foreach( $Metaboxes as $context => $meta_box ) {
456
- foreach( $meta_box as $priority => $box ) {
457
- foreach( $box as $metabox_id => $b ) {
458
- if( !empty( $GetData["metaboxes"][$post_type][$context][$priority][$b["id"]] ) ) {
459
- $Update["metaboxes"][$post_type][$context][$priority][$b["id"]] = strip_tags( $b["title"] );
460
- unset( $Metaboxes[$context][$priority][$b["id"]] );
461
- } else {
462
- $Update["metaboxes"][$post_type][$context][$priority][$b["id"]] = strip_tags( $b["title"] );
463
- }
464
- }
465
- }
466
- }
467
-
468
- }
469
-
470
- if( !empty( $Update ) ) {
471
- update_option( $this->Record["regist_metabox"] , $Update );
472
- }
473
-
474
- }
475
- }
476
-
477
- }
478
-
479
-
480
- // SetList
481
- function sidebar_menu_widget( $menu_widget ) {
482
- $UserRoles = $this->get_user_role();
483
- $new_widget = '';
484
- if( !empty( $menu_widget["new"] ) ) {
485
- $new_widget = 'new';
486
- }
487
- ?>
488
- <div class="widget <?php echo $menu_widget["slug"]; ?> <?php echo $new_widget; ?>">
489
-
490
- <div class="widget-top">
491
- <div class="widget-title-action">
492
- <a class="widget-action" href="#available"></a>
493
- </div>
494
- <div class="widget-title">
495
- <h4>
496
- <?php echo $menu_widget["title"]; ?>
497
- : <span class="in-widget-title"><?php echo $menu_widget["slug"]; ?></span>
498
- </h4>
499
- </div>
500
- </div>
501
-
502
- <div class="widget-inside">
503
- <div class="settings">
504
- <p class="description">
505
- <?php if( $menu_widget["slug"] == 'custom_menu' ) : ?>
506
- <?php _e( 'Url' ); ?>:
507
- <input type="text" class="slugtext" value="" name="data[][slug]">
508
- <?php else : ?>
509
- <?php _e( 'Slug' ); ?>: <?php echo $menu_widget["slug"]; ?>
510
- <input type="hidden" class="slugtext" value="<?php echo $menu_widget["slug"]; ?>" name="data[][slug]">
511
- <?php endif; ?>
512
- </p>
513
- <?php _e( 'User Roles' ); ?> :
514
- <ul class="display_roles">
515
- <?php foreach( $UserRoles as $role_name => $val ) : ?>
516
- <?php $has_cap = false; ?>
517
- <?php if( !empty( $val["capabilities"][$menu_widget["cap"]] ) or $role_name == $menu_widget["cap"] ) : ?>
518
- <?php $has_cap = 'has_cap'; ?>
519
- <?php endif; ?>
520
- <li class="<?php echo $role_name; ?> <?php echo $has_cap; ?>"><?php echo $val["label"]; ?></li>
521
- <?php endforeach ;?>
522
- </ul>
523
- <label>
524
- <?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_attr( $menu_widget["title"] ); ?>" name="data[][title]">
525
- </label>
526
- <input type="hidden" class="parent_slugtext" value="<?php echo $menu_widget["parent_slug"]; ?>" name="data[][parent_slug]">
527
- </div>
528
-
529
- <?php if( $menu_widget["slug"] != 'separator' ) : ?>
530
- <div class="submenu">
531
- <p class="description"><?php _e( 'Sub Menus' , $this->ltd ); ?></p>
532
- <?php if( empty( $menu_widget["new"] ) && !empty( $menu_widget["submenu"] ) ) : ?>
533
- <?php foreach( $menu_widget["submenu"] as $sm ) : ?>
534
- <?php $sepalator_widget = ''; ?>
535
- <?php if( $sm["slug"] == 'separator' ) : $sepalator_widget = $sm["slug"]; endif; ?>
536
-
537
- <div class="widget <?php echo $sepalator_widget; ?>">
538
-
539
- <div class="widget-top">
540
- <div class="widget-title-action">
541
- <a class="widget-action" href="#available"></a>
542
- </div>
543
- <div class="widget-title">
544
- <h4>
545
- <?php echo $sm["title"]; ?>
546
- : <span class="in-widget-title"><?php echo $sm["slug"]; ?></span>
547
- </h4>
548
- </div>
549
- </div>
550
-
551
- <div class="widget-inside">
552
- <div class="settings">
553
- <p class="description">
554
- <?php _e( 'Slug' ); ?>: <?php echo $sm["slug"]; ?>
555
- <input type="hidden" class="slugtext" value="<?php echo $sm["slug"]; ?>" name="data[][slug]">
556
- </p>
557
- <?php _e( 'User Roles' ); ?> :
558
- <ul class="display_roles">
559
- <?php foreach( $UserRoles as $role_name => $val ) : ?>
560
- <?php $has_cap = false; ?>
561
- <?php if( !empty( $val["capabilities"][$sm["cap"]] ) or $role_name == $sm["cap"] ) : ?>
562
- <?php $has_cap = 'has_cap'; ?>
563
- <?php endif; ?>
564
- <li class="<?php echo $role_name; ?> <?php echo $has_cap; ?>"><?php echo $val["label"]; ?></li>
565
- <?php endforeach ;?>
566
- </ul>
567
- <label>
568
- <?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_attr( $sm["title"] ); ?>" name="data[][title]">
569
- </label>
570
- <input type="hidden" class="parent_slugtext" value="<?php echo $sm["parent_slug"]; ?>" name="data[][parent_slug]">
571
- </div>
572
- <div class="widget-control-actions">
573
- <div class="alignleft">
574
- <a href="#remove"><?php _e( 'Remove' ); ?></a>
575
- </div>
576
- <div class="clear"></div>
577
- </div>
578
- </div>
579
- </div>
580
-
581
- <?php endforeach; ?>
582
- <?php endif; ?>
583
- </div>
584
- <div class="widget-control-actions">
585
- <div class="alignleft">
586
- <a href="#remove"><?php _e( 'Remove' ); ?></a>
587
- </div>
588
- <div class="clear"></div>
589
- </div>
590
-
591
- <?php endif; ?>
592
- </div>
593
-
594
- </div>
595
- <?php
596
- }
597
-
598
- // SetList
599
- function admin_bar_menu_widget( $menu_widget ) {
600
- $new_widget = '';
601
- if( !empty( $menu_widget["new"] ) ) {
602
- $new_widget = 'new';
603
- }
604
- ?>
605
- <div class="widget <?php echo $new_widget; ?> <?php echo $menu_widget["id"]; ?>">
606
-
607
- <div class="widget-top">
608
- <div class="widget-title-action">
609
- <a class="widget-action" href="#available"></a>
610
- </div>
611
- <div class="widget-title">
612
- <h4>
613
- <?php if( preg_match( '/\<form/' , $menu_widget["title"] ) ) : ?>
614
- <?php echo $menu_widget["id"]; ?>
615
- <?php else: ?>
616
- <?php echo $menu_widget["title"]; ?>
617
- : <span class="in-widget-title"><?php echo $menu_widget["id"]; ?></span>
618
- <?php endif; ?>
619
- </h4>
620
- </div>
621
- </div>
622
-
623
- <div class="widget-inside">
624
- <div class="settings">
625
- <p class="field-url description">
626
- <input type="hidden" class="idtext" value="<?php echo $menu_widget["id"]; ?>" name="data[][id]" />
627
- <?php if( $menu_widget["id"] == 'custom_node' ) : ?>
628
- URL: <input type="text" class="regular-text linktext" value="" name="data[][href]" placeholder="http://" />
629
- <?php else: ?>
630
- <a href="<?php echo $menu_widget["href"]; ?>" target="_blank"><?php echo $menu_widget["id"]; ?></a>
631
- <input type="hidden" class="linktext" value="<?php echo $menu_widget["href"]; ?>" name="data[][href]" />
632
- <?php endif; ?>
633
- </p>
634
- <p class="field-title description">
635
- <label>
636
- <?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" />
637
- </label>
638
- </p>
639
- <p class="field-meta description">
640
- <label class="description">
641
- <?php $checked = ""; ?>
642
- <?php if( !empty( $menu_widget["meta"]["target"] ) ) : ?>
643
- <?php $checked = checked( $menu_widget["meta"]["target"] , '_blank' , 0 ); ?>
644
- <?php endif; ?>
645
- <input type="checkbox" class="meta_target" value="_blank" name="data[][meta][target]" <?php echo $checked; ?> />
646
- <?php _e( 'Open link in a new window/tab' ); ?>
647
- </label>
648
- </p>
649
- <input type="hidden" class="parent" value="<?php echo $menu_widget["parent"]; ?>" name="data[][parent]" />
650
- </div>
651
-
652
- <div class="submenu">
653
- <p class="description"><?php _e( 'Sub Menus' , $this->ltd ); ?></p>
654
- <?php if( empty( $menu_widget["new"] ) && !empty( $menu_widget["subnode"] ) ) : ?>
655
- <?php foreach( $menu_widget["subnode"] as $sm ) : ?>
656
-
657
- <div class="widget">
658
-
659
- <div class="widget-top">
660
- <div class="widget-title-action">
661
- <a class="widget-action" href="#available"></a>
662
- </div>
663
- <div class="widget-title">
664
- <h4>
665
- <?php if( preg_match( '/\<form/' , $sm["title"] ) ) : ?>
666
- <?php echo $sm["id"]; ?>
667
- <?php else: ?>
668
- <?php echo $sm["title"]; ?>
669
- : <span class="in-widget-title"><?php echo $sm["id"]; ?></span>
670
- <?php endif; ?>
671
- </h4>
672
- </div>
673
- </div>
674
-
675
- <div class="widget-inside">
676
- <div class="settings">
677
- <p class="field-url description">
678
- <input type="hidden" class="idtext" value="<?php echo $sm["id"]; ?>" name="data[][id]" />
679
- <a href="<?php echo $sm["href"]; ?>" target="_blank"><?php echo $sm["id"]; ?></a>
680
- <input type="hidden" class="linktext" value="<?php echo $sm["href"]; ?>" name="data[][href]" />
681
- </p>
682
- <p class="field-title description">
683
- <label>
684
- <?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_html( $sm["title"] ); ?>" name="data[][title]" />
685
- </label>
686
- </p>
687
- <p class="field-meta description">
688
- <label class="description">
689
- <?php $checked = ""; ?>
690
- <?php if( !empty( $sm["meta"]["target"] ) ) : ?>
691
- <?php $checked = checked( $sm["meta"]["target"] , '_blank' , 0 ); ?>
692
- <?php endif; ?>
693
- <input type="checkbox" class="meta_target" value="_blank" name="data[][meta][target]" <?php echo $checked; ?> />
694
- <?php _e( 'Open link in a new window/tab' ); ?>
695
- </label>
696
- </p>
697
- <input type="hidden" class="parent" value="<?php echo $sm["parent"]; ?>" name="data[][parent]" />
698
- </div>
699
- <div class="widget-control-actions">
700
- <div class="alignleft">
701
- <a href="#remove"><?php _e( 'Remove' ); ?></a>
702
- </div>
703
- <div class="clear"></div>
704
- </div>
705
- </div>
706
- </div>
707
-
708
- <?php endforeach; ?>
709
- <?php endif; ?>
710
- </div>
711
- <div class="widget-control-actions">
712
- <div class="alignleft">
713
- <a href="#remove"><?php _e( 'Remove' ); ?></a>
714
- </div>
715
- <div class="clear"></div>
716
- </div>
717
- </div>
718
-
719
- </div>
720
- <?php
721
- }
722
-
723
- // SetList
724
- function val_replace( $str ) {
725
-
726
- if( !empty( $str ) ) {
727
-
728
- $update_data = wp_get_update_data();
729
- $awaiting_mod = wp_count_comments();
730
- $awaiting_mod = $awaiting_mod->moderated;
731
- $current_user = wp_get_current_user();
732
- if( is_multisite() ) {
733
- $current_site = get_current_site();
734
- }
735
-
736
- if( strstr( $str , '[blog_url]') ) {
737
- $str = str_replace( '[blog_url]' , get_bloginfo( 'url' ) , $str );
738
- }
739
- if( strstr( $str , '[template_directory_uri]') ) {
740
- $str = str_replace( '[template_directory_uri]' , get_bloginfo( 'template_directory' ) , $str );
741
- }
742
- if( strstr( $str , '[stylesheet_directory_uri]') ) {
743
- $str = str_replace( '[stylesheet_directory_uri]' , get_stylesheet_directory_uri() , $str );
744
- }
745
- if( strstr( $str , '[blog_name]') ) {
746
- $str = str_replace( '[blog_name]' , get_bloginfo( 'name' ) , $str );
747
- }
748
- if( strstr( $str , '[update_total]') ) {
749
- $str = str_replace( '[update_total]' , $update_data["counts"]["total"] , $str );
750
- }
751
- if( strstr( $str , '[update_total_format]') ) {
752
- $str = str_replace( '[update_total_format]' , number_format_i18n( $update_data["counts"]["total"] ) , $str );
753
- }
754
- if( strstr( $str , '[update_plugins]') ) {
755
- $str = str_replace( '[update_plugins]' , $update_data["counts"]["plugins"] , $str );
756
- }
757
- if( strstr( $str , '[update_plugins_format]') ) {
758
- $str = str_replace( '[update_plugins_format]' , number_format_i18n( $update_data["counts"]["plugins"] ) , $str );
759
- }
760
- if( strstr( $str , '[update_themes]') ) {
761
- $str = str_replace( '[update_themes]' , $update_data["counts"]["themes"] , $str );
762
- }
763
- if( strstr( $str , '[update_themes_format]') ) {
764
- $str = str_replace( '[update_themes_format]' , number_format_i18n( $update_data["counts"]["themes"] ) , $str );
765
- }
766
- if( strstr( $str , '[comment_count]') ) {
767
- $str = str_replace( '[comment_count]' , $awaiting_mod , $str );
768
- }
769
- if( strstr( $str , '[comment_count_format]') ) {
770
- $str = str_replace( '[comment_count_format]' , number_format_i18n( $awaiting_mod ) , $str );
771
- }
772
- if( strstr( $str , '[user_name]') ) {
773
- $str = str_replace( '[user_name]' , '<span class="display-name">' . $current_user->display_name . '</span>' , $str );
774
- }
775
-
776
- if( is_multisite() ) {
777
- if( strstr( $str , '[site_name]') ) {
778
- $str = str_replace( '[site_name]' , esc_attr( $current_site->site_name ) , $str );
779
- }
780
- if( strstr( $str , '[site_url]') ) {
781
- $str = str_replace( '[site_url]' , $this->Schema . esc_attr( $current_site->domain ) , $str );
782
- }
783
- }
784
-
785
- }
786
-
787
- return $str;
788
- }
789
-
790
- // SetList
791
- function current_user_role_group() {
792
- $UserRole = '';
793
- $User = wp_get_current_user();
794
- if( !empty( $User->roles ) ) {
795
- foreach( $User->roles as $role ) {
796
- $UserRole = $role;
797
- break;
798
- }
799
- }
800
- return $UserRole;
801
- }
802
-
803
-
804
-
805
- // DataUpdate
806
- function update_validate() {
807
- $Update = array();
808
-
809
- if( !empty( $_POST[$this->UPFN] ) ) {
810
- $UPFN = strip_tags( $_POST[$this->UPFN] );
811
- if( $UPFN == $this->UPFN ) {
812
- $Update["UPFN"] = strip_tags( $_POST[$this->UPFN] );
813
- }
814
- }
815
-
816
- return $Update;
817
- }
818
-
819
- // DataUpdate
820
- function update_reset( $record ) {
821
- $Update = $this->update_validate();
822
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
823
- $record = apply_filters( 'wauc_pre_delete' , $this->Record[$record] );
824
- delete_option( $record );
825
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
826
- }
827
- }
828
-
829
- // DataUpdate
830
- function DonatingCheck() {
831
- $Update = $this->update_validate();
832
-
833
- if( !empty( $Update ) ) {
834
- if( !empty( $_POST["donate_key"] ) ) {
835
- $SubmitKey = md5( strip_tags( $_POST["donate_key"] ) );
836
- if( $this->DonateKey == $SubmitKey ) {
837
- update_option( $this->Record["donate"] , $SubmitKey );
838
- $this->Msg .= '<div class="updated"><p><strong>' . __( 'Thank you for your donation.' , $this->ltd_p ) . '</strong></p></div>';
839
- }
840
- }
841
- }
842
-
843
- }
844
-
845
- // DataUpdate
846
- function update_userrole() {
847
- $Update = $this->update_validate();
848
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
849
-
850
- if( !empty( $_POST["data"]["user_role"] ) ) {
851
- foreach($_POST["data"]["user_role"] as $key => $val) {
852
- $tmpK = strip_tags( $key );
853
- $tmpV = strip_tags ( $val );
854
- $Update[$tmpK] = $tmpV;
855
- }
856
- }
857
-
858
- update_option( $this->Record["user_role"] , $Update );
859
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
860
- }
861
- }
862
-
863
- // DataUpdate
864
- function update_site() {
865
- $Update = $this->update_validate();
866
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
867
-
868
- if( !empty( $_POST["data"] ) ) {
869
- foreach($_POST["data"] as $key => $val) {
870
- $tmpK = strip_tags( $key );
871
- $tmpV = strip_tags ( $val );
872
- $Update[$tmpK] = $tmpV;
873
- }
874
- }
875
-
876
- $Record = apply_filters( 'wauc_pre_update' , $this->Record["site"] );
877
- update_option( $Record , $Update );
878
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
879
- }
880
- }
881
-
882
- // DataUpdate
883
- function update_admin_general() {
884
- $Update = $this->update_validate();
885
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
886
-
887
- if( !empty( $_POST["data"] ) ) {
888
- foreach($_POST["data"] as $key => $val) {
889
- $tmpK = strip_tags( $key );
890
- $tmpV = $val;
891
- $Update[$tmpK] = $tmpV;
892
- }
893
- }
894
-
895
- $Record = apply_filters( 'wauc_pre_update' , $this->Record["admin_general"] );
896
- update_option( $Record , $Update );
897
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
898
- }
899
- }
900
-
901
- // DataUpdate
902
- function update_dashboard() {
903
- $Update = $this->update_validate();
904
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
905
-
906
- if( !empty( $_POST["data"] ) ) {
907
- foreach($_POST["data"] as $key => $val) {
908
- $tmpK = strip_tags( $key );
909
- $tmpV = $val;
910
- $Update[$tmpK] = $tmpV;
911
- }
912
- }
913
-
914
- $Record = apply_filters( 'wauc_pre_update' , $this->Record["dashboard"] );
915
- update_option( $Record , $Update );
916
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
917
- }
918
- }
919
-
920
- // DataUpdate
921
- function update_admin_bar_menu() {
922
- $Update = $this->update_validate();
923
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
924
-
925
- if( !empty( $_POST["data"] ) ) {
926
- foreach($_POST["data"] as $boxtype => $nodes) {
927
- if( $boxtype === 'left' or $boxtype === 'right' ) {
928
- foreach($nodes as $key => $node) {
929
- $id = "";
930
- if( !empty( $node["id"] ) ) {
931
- $id = strip_tags( $node["id"] );
932
- }
933
- $title = "";
934
- if( !empty( $node["title"] ) ) {
935
- $title = stripslashes( $node["title"] );
936
- }
937
- $href = "";
938
- if( !empty( $node["href"] ) ) {
939
- $href = strip_tags( $node["href"] );
940
- }
941
- $parent = "";
942
- $depth = "main";
943
- if( !empty( $node["parent"] ) ) {
944
- $parent = strip_tags( $node["parent"] );
945
- $depth = 'sub';
946
- }
947
- $meta = array();
948
- if( !empty( $node["meta"] ) ) {
949
- foreach( $node["meta"] as $mk => $mv ) {
950
- if( !empty( $mv ) ) {
951
- $meta[strip_tags($mk)] = strip_tags($mv);
952
- }
953
- }
954
- }
955
-
956
- $Update[$boxtype][$depth][] = array( "id" => $id , "title" => $title , "href" => $href , "parent" => $parent , "meta" => $meta );
957
- }
958
- }
959
- }
960
- }
961
-
962
- $Record = apply_filters( 'wauc_pre_update' , $this->Record["admin_bar_menu"] );
963
- update_option( $Record , $Update );
964
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
965
- }
966
- }
967
-
968
- // DataUpdate
969
- function update_sidemenu() {
970
- $Update = $this->update_validate();
971
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
972
-
973
- if( !empty( $_POST["data"] ) ) {
974
- foreach($_POST["data"] as $menu) {
975
- if( !empty( $menu["title"] ) && !empty( $menu["slug"] ) ) {
976
- $slug = htmlspecialchars( $menu["slug"] );
977
- $title = stripslashes( $menu["title"] );
978
- $parent_slug = '';
979
- $depth = 'main';
980
-
981
- if( !empty( $menu["parent_slug"] ) ) {
982
- $parent_slug = strip_tags( $menu["parent_slug"] );
983
- $depth = 'sub';
984
- }
985
-
986
- $Update[$depth][] = array( "slug" => $slug , "title" => $title , "parent_slug" => $parent_slug );
987
- }
988
- }
989
- }
990
-
991
- $Record = apply_filters( 'wauc_pre_update' , $this->Record["sidemenu"] );
992
- update_option( $Record , $Update );
993
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
994
- }
995
- }
996
-
997
- // DataUpdate
998
- function update_removemetabox() {
999
- $Update = $this->update_validate();
1000
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
1001
-
1002
- if( !empty( $_POST["data"] ) ) {
1003
- foreach($_POST["data"] as $post_type => $val) {
1004
- $post_type = strip_tags( $post_type );
1005
- if( is_array( $val ) ) {
1006
- foreach($val as $id => $v) {
1007
- $tmpK = strip_tags( $id );
1008
- $tmpV = strip_tags ( $v );
1009
- $Update[$post_type][$tmpK] = $tmpV;
1010
- }
1011
- }
1012
- }
1013
- }
1014
-
1015
- $Record = apply_filters( 'wauc_pre_update' , $this->Record["removemetabox"] );
1016
- update_option( $Record , $Update );
1017
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
1018
- }
1019
- }
1020
-
1021
- // DataUpdate
1022
- function update_post_add_edit() {
1023
- $Update = $this->update_validate();
1024
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
1025
-
1026
- if( !empty( $_POST["data"] ) ) {
1027
- foreach($_POST["data"] as $edited => $val) {
1028
- $tmpK = strip_tags( $edited );
1029
- $tmpV = strip_tags ( $val );
1030
- $Update[$tmpK] = $tmpV;
1031
- }
1032
- }
1033
-
1034
- $Record = apply_filters( 'wauc_pre_update' , $this->Record["post_add_edit"] );
1035
- update_option( $Record , $Update );
1036
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
1037
- }
1038
- }
1039
-
1040
- // DataUpdate
1041
- function update_appearance_menus() {
1042
- $Update = $this->update_validate();
1043
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
1044
-
1045
- if( !empty( $_POST["data"] ) ) {
1046
- foreach($_POST["data"] as $edited => $val) {
1047
- $tmpK = strip_tags( $edited );
1048
- $tmpV = strip_tags ( $val );
1049
- $Update[$tmpK] = $tmpV;
1050
- }
1051
- }
1052
-
1053
- $Record = apply_filters( 'wauc_pre_update' , $this->Record["appearance_menus"] );
1054
- update_option( $Record , $Update );
1055
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
1056
- }
1057
- }
1058
-
1059
- // DataUpdate
1060
- function update_loginscreen() {
1061
- $Update = $this->update_validate();
1062
- if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
1063
-
1064
- if( !empty( $_POST["data"] ) ) {
1065
- foreach($_POST["data"] as $key => $val) {
1066
- $tmpK = strip_tags( $key );
1067
- $tmpV = $val;
1068
- $Update[$tmpK] = $tmpV;
1069
- }
1070
- }
1071
-
1072
- $Record = apply_filters( 'wauc_pre_update' , $this->Record["loginscreen"] );
1073
- update_option( $Record , $Update );
1074
- $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
1075
-
1076
- }
1077
- }
1078
-
1079
-
1080
-
1081
-
1082
-
1083
- // FilterStart
1084
- function FilterStart() {
1085
-
1086
- // site
1087
- if( !is_admin() ) {
1088
- add_action( 'wp_loaded' , array( $this , 'remove_action_front' ) ) ;
1089
- add_filter( 'login_headerurl' , array( $this , 'login_headerurl' ) );
1090
- add_filter( 'login_headertitle' , array( $this , 'login_headertitle' ) );
1091
- add_action( 'login_head' , array( $this , 'login_head' ) );
1092
- add_action( 'login_footer' , array( $this , 'login_footer' ) );
1093
-
1094
- // front init
1095
- add_action( 'wp_loaded' , array( $this , 'front_init' ) );
1096
- }
1097
-
1098
- // admin UI
1099
- if( is_admin() && !is_network_admin () ) {
1100
- // default side menu load.
1101
- add_action( 'admin_menu' , array( $this , 'sidemenu_default_load' ) , 10000 );
1102
-
1103
- // default admin bar menu load.
1104
- add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_default_load' ) , 1 );
1105
-
1106
- // default post metabox load.
1107
- add_action( 'admin_head' , array( $this , 'post_meta_boxes_load' ) , 10 );
1108
-
1109
- // admin init
1110
- add_action( 'wp_loaded' , array( $this , 'admin_init' ) );
1111
- }
1112
- }
1113
-
1114
- // FilterStart
1115
- function admin_init() {
1116
-
1117
- $SettingRole = $this->get_data( 'user_role' );
1118
- $SettingRole = apply_filters( 'wauc_pre_setting_roles' , $SettingRole );
1119
-
1120
- if( !empty( $SettingRole ) ) {
1121
- unset($SettingRole["UPFN"]);
1122
-
1123
- $UserRole = $this->current_user_role_group();
1124
-
1125
- if( !is_network_admin() && !empty( $UserRole ) ) {
1126
- if( array_key_exists( $UserRole , $SettingRole ) ) {
1127
- add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_menu') , 25 );
1128
- add_action( 'wp_loaded' , array( $this , 'notice_dismiss' ) , 2 );
1129
- add_action( 'admin_head' , array( $this , 'remove_tab' ) );
1130
- add_filter( 'admin_footer_text' , array( $this , 'admin_footer_text' ) );
1131
- add_action( 'admin_print_styles' , array( $this , 'load_css' ) );
1132
- add_action( 'wp_dashboard_setup' , array( $this , 'wp_dashboard_setup' ) );
1133
- add_action( 'admin_head' , array( $this , 'removemetabox' ) , 11 );
1134
- add_filter( 'admin_head', array( $this , 'sidemenu' ) );
1135
- add_filter( 'get_sample_permalink_html' , array( $this , 'add_edit_post_change_permalink' ) );
1136
- add_filter( 'edit_form_after_title' , array( $this , 'allow_comments' ) );
1137
- add_action( 'admin_print_styles-nav-menus.php', array( $this , 'nav_menus' ) );
1138
- add_filter( 'admin_title', array( $this, 'admin_title' ) );
1139
- }
1140
- }
1141
- }
1142
- }
1143
-
1144
- // FilterStart
1145
- function front_init() {
1146
-
1147
- $SettingRole = $this->get_flit_data( 'user_role' );
1148
- $SettingRole = apply_filters( 'wauc_pre_setting_roles' , $SettingRole );
1149
-
1150
- if( !empty( $SettingRole ) ) {
1151
- unset($SettingRole["UPFN"]);
1152
-
1153
- $UserRole = $this->current_user_role_group();
1154
-
1155
- if( !is_network_admin() && !empty( $UserRole ) ) {
1156
- if( array_key_exists( $UserRole , $SettingRole ) ) {
1157
-
1158
- $GetData = $this->get_flit_data( 'site' );
1159
-
1160
- if( !empty( $GetData["admin_bar"] ) ) {
1161
- if( $GetData["admin_bar"] == "hide" ) {
1162
- add_filter( 'show_admin_bar' , '__return_false' );
1163
- } elseif( $GetData["admin_bar"] == "front" ) {
1164
- add_action( 'init' , array( $this , 'notice_dismiss' ) , 2 );
1165
- add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_menu') , 25 );
1166
- }
1167
- }
1168
- }
1169
- }
1170
- }
1171
- }
1172
-
1173
- // FilterStart
1174
- function remove_action_front() {
1175
- $GetData = get_option( $this->Record['site'] );
1176
-
1177
- if( !empty( $GetData["UPFN"] ) ) {
1178
- unset( $GetData["UPFN"] );
1179
- foreach($GetData as $key => $val) {
1180
- if( $key == 'feed_links' ) {
1181
- remove_action( 'wp_head', $key , 2 );
1182
- } elseif( $key == 'feed_links_extra' ) {
1183
- remove_action( 'wp_head', $key , 3 );
1184
- } else {
1185
- remove_action( 'wp_head', $key );
1186
- }
1187
- }
1188
- }
1189
- }
1190
-
1191
- // FilterStart
1192
- function login_headerurl() {
1193
- $GetData = get_option( $this->Record["loginscreen"] );
1194
-
1195
- $url = __( 'http://wordpress.org/' );
1196
- if( !empty( $GetData["UPFN"] ) ) {
1197
- unset( $GetData["UPFN"] );
1198
-
1199
- if( !empty( $GetData["login_headerurl"] ) ) {
1200
- $url = strip_tags( $GetData["login_headerurl"] );
1201
- $url = $this->val_replace( $url );
1202
- }
1203
- }
1204
-
1205
- return $url;
1206
- }
1207
-
1208
- // FilterStart
1209
- function login_headertitle() {
1210
- $GetData = get_option( $this->Record["loginscreen"] );
1211
-
1212
- $title = __( 'Powered by WordPress' );
1213
- if( !empty( $GetData["UPFN"] ) ) {
1214
- unset( $GetData["UPFN"] );
1215
-
1216
- if( !empty( $GetData["login_headertitle"] ) ) {
1217
- $title = strip_tags( $GetData["login_headertitle"] );
1218
- $title = $this->val_replace( $title );
1219
- }
1220
- }
1221
-
1222
- return $title;
1223
- }
1224
-
1225
- // FilterStart
1226
- function login_head() {
1227
- $GetData = get_option( $this->Record["loginscreen"] );
1228
-
1229
- if( !empty( $GetData["UPFN"] ) ) {
1230
- unset( $GetData["UPFN"] );
1231
-
1232
- if( !empty( $GetData["login_headerlogo"] ) ) {
1233
- $logo = strip_tags( $GetData["login_headerlogo"] );
1234
- $logo = $this->val_replace( $logo );
1235
-
1236
- echo '<style type="text/css">.login h1 a { background-image: url(' . $logo . '); }</style>';
1237
- }
1238
-
1239
- if( !empty( $GetData["login_css"] ) ) {
1240
- $css = strip_tags( $GetData["login_css"] );
1241
- $css = $this->val_replace( $css );
1242
-
1243
- wp_enqueue_style( $this->PageSlug , $css , array() , $this->Ver );
1244
- }
1245
-
1246
- }
1247
-
1248
- }
1249
-
1250
- // FilterStart
1251
- function login_footer() {
1252
- $GetData = get_option( $this->Record["loginscreen"] );
1253
-
1254
- if( !empty( $GetData["UPFN"] ) ) {
1255
- unset( $GetData["UPFN"] );
1256
-
1257
- if( !empty( $GetData["login_footer"] ) ) {
1258
- $text = $this->val_replace( stripslashes( $GetData["login_footer"] ) );
1259
-
1260
- echo $text;
1261
- }
1262
-
1263
- }
1264
- }
1265
-
1266
- // FilterStart
1267
- function admin_bar_menu() {
1268
- global $wp_admin_bar;
1269
-
1270
- $GetData = $this->get_flit_data( 'admin_bar_menu' );
1271
-
1272
- if( !empty( $GetData["UPFN"] ) ) {
1273
- unset( $GetData["UPFN"] );
1274
- if( is_array( $GetData ) ) {
1275
-
1276
- $update_data = wp_get_update_data();
1277
-
1278
- // remove all nodes
1279
- $All_Nodes = $wp_admin_bar->get_nodes();
1280
- foreach( $All_Nodes as $node ) {
1281
- if( $node->id != 'top-secondary' ) {
1282
- $wp_admin_bar->remove_node( $node->id );
1283
- }
1284
- }
1285
-
1286
- // add nodes
1287
- foreach($GetData as $Boxtype => $allnodes) {
1288
- foreach($allnodes as $depth => $nodes) {
1289
- foreach($nodes as $node) {
1290
- $args = array( "id" => $node["id"] , "title" => stripslashes( $node["title"] ) , "href" => $node["href"] , "parent" => "" , "meta" => array() );
1291
- if( strstr( $node["id"] , 'custom_node' ) ) {
1292
- $args["href"] = $this->val_replace( $node["href"] );
1293
- }
1294
- if( $depth == 'sub' ) {
1295
- $args["parent"] = $node["parent"];
1296
- }
1297
- if( $Boxtype == 'right' && $depth == 'main' ) {
1298
- $args["parent"] = "top-secondary";
1299
- }
1300
- if( !empty( $node["meta"] ) ) {
1301
- $args["meta"] = $node["meta"];
1302
- }
1303
- if( strstr( $args["title"] , '[comment_count]') ) {
1304
- if ( !current_user_can('edit_posts') ) {
1305
- continue;
1306
- } else {
1307
- $args["title"] = str_replace( '[comment_count]' , '<span class="ab-icon"></span><span id="ab-awaiting-mod" class="ab-label awaiting-mod pending-count count-[comment_count]">[comment_count_format]</span>' , $args["title"] );
1308
- }
1309
- }
1310
- if( strstr( $args["title"] , '[update_total]') ) {
1311
- if ( !$update_data['counts']['total'] ) {
1312
- continue;
1313
- } else {
1314
- $args["title"] = str_replace( '[update_total]' , '<span class="ab-icon"></span><span class="ab-label">[update_total_format]</span>' , $args["title"] );
1315
- }
1316
- }
1317
- if( strstr( $args["title"] , '[update_plugins]') ) {
1318
- if ( !$update_data['counts']['plugins'] ) {
1319
- continue;
1320
- } else {
1321
- $args["title"] = str_replace( '[update_plugins]' , '[update_plugins_format]' , $args["title"] );
1322
- }
1323
- }
1324
- if( strstr( $args["title"] , '[update_themes]') ) {
1325
- if ( !$update_data['counts']['themes'] ) {
1326
- continue;
1327
- } else {
1328
- $args["title"] = str_replace( '[update_themes]' , '[update_themes_format]' , $args["title"] );
1329
- }
1330
- }
1331
- $args["title"] = $this->val_replace( $args["title"] );
1332
-
1333
- if( $args["id"] == 'logout' ) {
1334
- $args["href"] = wp_logout_url();
1335
- }
1336
- $wp_admin_bar->add_menu( $args );
1337
- }
1338
- }
1339
- }
1340
- }
1341
- }
1342
- }
1343
-
1344
- // FilterStart
1345
- function notice_dismiss() {
1346
- $GetData = $this->get_flit_data( 'admin_general' );
1347
-
1348
- if( !empty( $GetData["UPFN"] ) ) {
1349
-
1350
- if( !empty( $GetData["notice_update_core"] ) ) {
1351
- add_filter( 'update_footer' , '__return_false' , 20) ;
1352
- add_filter( 'site_transient_update_core' , array( $this , 'notice_update_core' ) );
1353
- }
1354
-
1355
- if( !empty( $GetData["notice_update_plugin"] ) ) {
1356
- add_filter( 'site_transient_update_plugins' , array( $this , 'notice_update_plugin' ) );
1357
- }
1358
- if( !empty( $GetData["notice_update_theme"] ) ) {
1359
- add_filter( 'site_transient_update_themes' , array( $this , 'notice_update_theme' ) );
1360
- }
1361
-
1362
- }
1363
-
1364
- }
1365
-
1366
- // FilterStart
1367
- function notice_update_core( $site_transient_update_core ) {
1368
- $site_transient_update_core->updates[0]->response = 'latest';
1369
-
1370
- return $site_transient_update_core;
1371
- }
1372
-
1373
- // FilterStart
1374
- function notice_update_plugin( $site_transient_update_plugins ) {
1375
- unset( $site_transient_update_plugins->response );
1376
-
1377
- return $site_transient_update_plugins;
1378
- }
1379
-
1380
- // FilterStart
1381
- function notice_update_theme( $site_transient_update_themes ) {
1382
- unset( $site_transient_update_themes->response );
1383
-
1384
- return $site_transient_update_themes;
1385
- }
1386
-
1387
- // FilterStart
1388
- function remove_tab() {
1389
- $GetData = $this->get_flit_data( 'admin_general' );
1390
-
1391
- if( !empty( $GetData["UPFN"] ) ) {
1392
- unset( $GetData["UPFN"] );
1393
-
1394
- if( !empty( $GetData["help_tab"] ) ) {
1395
- $screen = get_current_screen();
1396
- $screen->remove_help_tabs();
1397
- }
1398
-
1399
- if( !empty( $GetData["screen_option_tab"] ) ) {
1400
- add_filter( 'screen_options_show_screen' , '__return_false' );
1401
- }
1402
- }
1403
-
1404
- }
1405
-
1406
- // FilterStart
1407
- function admin_footer_text( $text ) {
1408
- $GetData = $this->get_flit_data( 'admin_general' );
1409
-
1410
- $footer_text = $text;
1411
- if( !empty( $GetData["UPFN"] ) ) {
1412
- unset( $GetData["UPFN"] );
1413
-
1414
- $footer_text = $this->val_replace( stripslashes( $GetData["footer_text"] ) );
1415
- }
1416
-
1417
- return $footer_text;
1418
- }
1419
-
1420
- // FilterStart
1421
- function load_css() {
1422
- $GetData = $this->get_flit_data( 'admin_general' );
1423
-
1424
- if( !empty( $GetData["UPFN"] ) ) {
1425
- unset( $GetData["UPFN"] );
1426
-
1427
- if( !empty( $GetData["css"] ) ) {
1428
-
1429
- $css = strip_tags( $GetData["css"] );
1430
- $css = $this->val_replace( $css );
1431
-
1432
- wp_enqueue_style( $this->PageSlug , strip_tags( $css ) , array() , $this->Ver );
1433
- }
1434
-
1435
- }
1436
-
1437
- }
1438
-
1439
- // FilterStart
1440
- function wp_dashboard_setup() {
1441
- global $wp_meta_boxes;
1442
-
1443
- $GetData = $this->get_flit_data( 'dashboard' );
1444
-
1445
- if( !empty( $GetData ) && is_array( $GetData ) ) {
1446
- unset($GetData["UPFN"]);
1447
- $dashboard_widgets = array();
1448
- foreach($wp_meta_boxes["dashboard"] as $ns => $core) {
1449
- if( !empty( $core["core"] ) ) {
1450
- foreach($core["core"] as $id => $val) {
1451
- $dashboard_widgets[$id] = $ns;
1452
- }
1453
- }
1454
- }
1455
-
1456
- foreach($GetData as $id => $val) {
1457
- if( $id == 'show_welcome_panel' ) {
1458
- $user_id = get_current_user_id();
1459
- if( get_user_meta( $user_id , 'show_welcome_panel' , true ) == true ) {
1460
- update_user_meta( $user_id , 'show_welcome_panel' , 0 );
1461
- }
1462
- } elseif( array_key_exists( $id , $dashboard_widgets ) ){
1463
- remove_meta_box( $id , 'dashboard' , $dashboard_widgets[$id] );
1464
- } elseif( $id == 'metabox_move' ) {
1465
- wp_enqueue_script( 'not-move' , $this->Url . 'js/dashboard/not_move.js' , array( 'jquery' , 'jquery-ui-sortable' , 'dashboard' ) , $this->Ver , true );
1466
- }
1467
- }
1468
- }
1469
-
1470
- }
1471
-
1472
- // FilterStart
1473
- function removemetabox() {
1474
- global $wp_meta_boxes;
1475
- global $current_screen;
1476
-
1477
- $GetData = $this->get_flit_data( 'removemetabox' );
1478
-
1479
- if( !empty( $GetData["UPFN"] ) ) {
1480
- unset( $GetData["UPFN"] );
1481
-
1482
- if( !empty( $GetData ) && is_array( $GetData ) ) {
1483
-
1484
- if( $current_screen->base == 'post' ) {
1485
- if( $current_screen->post_type == 'post' or $current_screen->post_type == 'page' ) {
1486
-
1487
- global $post_type;
1488
-
1489
- if( !empty( $GetData[$post_type] ) ) {
1490
-
1491
- $Metaboxes = $wp_meta_boxes[$post_type];
1492
- $Data = $GetData[$post_type];
1493
-
1494
- $Remove_metaboxes = array();
1495
- foreach( $Metaboxes as $context => $meta_box ) {
1496
- foreach( $meta_box as $priority => $box ) {
1497
- foreach( $box as $metabox_id => $b ) {
1498
- if( array_key_exists( $metabox_id , $Data ) ) {
1499
- $Remove_metaboxes[$metabox_id] = array( "context" => $context , "priority" => $priority );
1500
- }
1501
- }
1502
- }
1503
- }
1504
-
1505
- }
1506
-
1507
- if( !empty( $Remove_metaboxes ) ) {
1508
- foreach( $Remove_metaboxes as $metabox_id => $box ) {
1509
- remove_meta_box( $metabox_id , $post_type , $box["context"] );
1510
- }
1511
- }
1512
-
1513
- }
1514
- }
1515
- }
1516
- }
1517
-
1518
- }
1519
-
1520
- // FilterStart
1521
- function sidemenu() {
1522
- global $menu;
1523
- global $submenu;
1524
-
1525
- $GetData = $this->get_flit_data( 'sidemenu' );
1526
- $General = $this->get_flit_data( 'admin_general' );
1527
-
1528
- if( !empty( $GetData["UPFN"] ) ) {
1529
- unset( $GetData["UPFN"] );
1530
-
1531
- if( !empty( $GetData ) && is_array( $GetData ) && !empty( $GetData["main"] ) ) {
1532
- $SetMain_menu = array();
1533
- $SetMain_submenu = array();
1534
-
1535
- $separator_menu = array();
1536
- foreach( $menu as $key => $ms ) {
1537
- if( strstr( $ms[2] , 'separator' ) ) {
1538
- $separator_menu = $ms;
1539
- break;
1540
- }
1541
- }
1542
-
1543
- foreach($GetData["main"] as $mm_pos => $mm) {
1544
- if($mm["slug"] == 'separator') {
1545
- $SetMain_menu[] = $separator_menu;
1546
- } else {
1547
- $gm_search = false;
1548
- foreach($menu as $gm_pos => $gm) {
1549
- if($mm["slug"] == $gm[2]) {
1550
- if( strstr( $mm["title"] , '[comment_count]') ) {
1551
- $mm["title"] = str_replace( '[comment_count]' , '<span class="update-plugins count-[comment_count]"><span class="theme-count">[comment_count_format]</span></span>' , $mm["title"] );
1552
- }
1553
- if( strstr( $mm["title"] , '[update_total]') ) {
1554
- $mm["title"] = str_replace( '[update_total]' , '<span class="update-plugins count-[update_total]"><span class="update-count">[update_total_format]</span></span>' , $mm["title"] );
1555
- }
1556
- if( strstr( $mm["title"] , '[update_plugins]') ) {
1557
- $mm["title"] = str_replace( '[update_plugins]' , '<span class="update-plugins count-[update_plugins]"><span class="plugin-count">[update_plugins_format]</span></span>' , $mm["title"] );
1558
- }
1559
- if( strstr( $mm["title"] , '[update_themes]') ) {
1560
- $mm["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $mm["title"] );
1561
- }
1562
- $menu[$gm_pos][0] = $this->val_replace( $mm["title"] );
1563
- $SetMain_menu[] = $menu[$gm_pos];
1564
- $gm_search = true;
1565
- break;
1566
- }
1567
- }
1568
- if( empty( $gm_search ) ) {
1569
- foreach($submenu as $gsm_parent_slug => $v) {
1570
- foreach($v as $gsm_pos => $gsm) {
1571
- if($mm["slug"] == $gsm[2]) {
1572
-
1573
- foreach($menu as $tmp_m) {
1574
- if( $tmp_m[2] == $gsm_parent_slug) {
1575
- $submenu[$gsm_parent_slug][$gsm_pos][4] = $tmp_m[4];
1576
- break;
1577
- }
1578
- }
1579
- if( strstr( $mm["title"] , '[comment_count]') ) {
1580
- $mm["title"] = str_replace( '[comment_count]' , '<span class="update-plugins count-[comment_count]"><span class="theme-count">[comment_count_format]</span></span>' , $mm["title"] );
1581
- }
1582
- if( strstr( $mm["title"] , '[update_total]') ) {
1583
- $mm["title"] = str_replace( '[update_total]' , '<span class="update-plugins count-[update_total]"><span class="update-count">[update_total_format]</span></span>' , $mm["title"] );
1584
- }
1585
- if( strstr( $mm["title"] , '[update_plugins]') ) {
1586
- $mm["title"] = str_replace( '[update_plugins]' , '<span class="update-plugins count-[update_plugins]"><span class="plugin-count">[update_plugins_format]</span></span>' , $mm["title"] );
1587
- }
1588
- if( strstr( $mm["title"] , '[update_themes]') ) {
1589
- $mm["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $mm["title"] );
1590
- }
1591
- $submenu[$gsm_parent_slug][$gsm_pos][0] = $this->val_replace( $mm["title"] );
1592
- $SetMain_menu[] = $submenu[$gsm_parent_slug][$gsm_pos];
1593
-
1594
- }
1595
- }
1596
- }
1597
- }
1598
- }
1599
- }
1600
-
1601
- if( !empty( $GetData["sub"] ) ) {
1602
- foreach($GetData["sub"] as $sm_pos => $sm) {
1603
- if($sm["slug"] == 'separator') {
1604
- $SetMain_submenu[$sm["parent_slug"]][] = $separator_menu;
1605
- } else {
1606
- $gm_search = false;
1607
- foreach($menu as $gm_pos => $gm) {
1608
- if($sm["slug"] == $gm[2]) {
1609
- if( strstr( $sm["title"] , '[comment_count]') ) {
1610
- $sm["title"] = str_replace( '[comment_count]' , '<span class="update-plugins count-[comment_count]"><span class="theme-count">[comment_count_format]</span></span>' , $sm["title"] );
1611
- }
1612
- if( strstr( $sm["title"] , '[update_total]') ) {
1613
- $sm["title"] = str_replace( '[update_total]' , '<span class="update-plugins count-[update_total]"><span class="update-count">[update_total_format]</span></span>' , $sm["title"] );
1614
- }
1615
- if( strstr( $sm["title"] , '[update_plugins]') ) {
1616
- $sm["title"] = str_replace( '[update_plugins]' , '<span class="update-plugins count-[update_plugins]"><span class="plugin-count">[update_plugins_format]</span></span>' , $sm["title"] );
1617
- }
1618
- if( strstr( $sm["title"] , '[update_themes]') ) {
1619
- $sm["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $sm["title"] );
1620
- }
1621
- $menu[$gm_pos][0] = $this->val_replace( $sm["title"] );
1622
- $SetMain_submenu[$sm["parent_slug"]][] = $menu[$gm_pos];
1623
- $gm_search = true;
1624
- break;
1625
- }
1626
- }
1627
- if( empty( $gm_search ) ) {
1628
- foreach($submenu as $gsm_parent_slug => $v) {
1629
- foreach($v as $gsm_pos => $gsm) {
1630
- if($sm["slug"] == $gsm[2]) {
1631
-
1632
- if( strstr( $sm["title"] , '[comment_count]') ) {
1633
- $sm["title"] = str_replace( '[comment_count]' , '<span class="update-plugins count-[comment_count]"><span class="theme-count">[comment_count_format]</span></span>' , $sm["title"] );
1634
- }
1635
- if( strstr( $sm["title"] , '[update_total]') ) {
1636
- $sm["title"] = str_replace( '[update_total]' , '<span class="update-plugins count-[update_total]"><span class="update-count">[update_total_format]</span></span>' , $sm["title"] );
1637
- }
1638
- if( strstr( $sm["title"] , '[update_plugins]') ) {
1639
- $sm["title"] = str_replace( '[update_plugins]' , '<span class="update-plugins count-[update_plugins]"><span class="plugin-count">[update_plugins_format]</span></span>' , $sm["title"] );
1640
- }
1641
- if( strstr( $sm["title"] , '[update_themes]') ) {
1642
- $sm["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $sm["title"] );
1643
- }
1644
- $submenu[$gsm_parent_slug][$gsm_pos][0] = $this->val_replace( $sm["title"] );
1645
- $SetMain_submenu[$sm["parent_slug"]][] = $submenu[$gsm_parent_slug][$gsm_pos];
1646
- }
1647
- }
1648
- }
1649
- }
1650
- }
1651
- }
1652
- }
1653
-
1654
- $menu = $SetMain_menu;
1655
- $submenu = $SetMain_submenu;
1656
-
1657
- } else {
1658
- // empty menu
1659
- $menu = array();
1660
- }
1661
- }
1662
- }
1663
-
1664
- // FilterStart
1665
- function add_edit_post_change_permalink( $permalink_html ) {
1666
- $GetData = $this->get_flit_data( 'post_add_edit' );
1667
-
1668
- if( !empty( $GetData["UPFN"] ) ) {
1669
- unset( $GetData["UPFN"] );
1670
-
1671
- if( !empty( $GetData ) && is_array( $GetData ) ) {
1672
- if( !empty( $GetData["default_permalink"] ) ) {
1673
- if( strpos( $permalink_html , 'change-permalinks' ) ) {
1674
-
1675
- $permalink_html = preg_replace( "/<span id=\"change-permalinks\">(.*)<\/span>/" , "" , $permalink_html );
1676
-
1677
- }
1678
- }
1679
- }
1680
- }
1681
-
1682
- return $permalink_html;
1683
- }
1684
-
1685
- // FilterStart
1686
- function allow_comments() {
1687
- global $current_screen;
1688
-
1689
- $PostAddEdit = $this->get_flit_data( 'post_add_edit' );
1690
- $RemoveMetaBox = $this->get_flit_data( 'removemetabox' );
1691
-
1692
- if( !empty( $PostAddEdit["UPFN"] ) && !empty( $RemoveMetaBox["UPFN"] ) ) {
1693
- if( $current_screen->action == 'add' ) {
1694
- if( !empty( $RemoveMetaBox[$current_screen->id]["commentstatusdiv"] ) && !empty( $PostAddEdit["allow_comments"] ) ) {
1695
- $comment_status = get_option( 'default_comment_status' );
1696
- $comment_status = apply_filters( 'wauc_pre_get_comment_status' , $comment_status );
1697
- if( $comment_status == 'open' ) {
1698
- echo '<input name="comment_status" type="hidden" id="comment_status" value="open" />';
1699
- }
1700
- }
1701
- }
1702
-
1703
- }
1704
-
1705
- }
1706
-
1707
- // FilterStart
1708
- function admin_title( $title ) {
1709
- $GetData = $this->get_flit_data( 'admin_general' );
1710
-
1711
- if( !empty( $GetData["UPFN"] ) ) {
1712
- unset( $GetData["UPFN"] );
1713
-
1714
- if( !empty( $GetData["title_tag"] ) ) {
1715
- if( strpos( $title , ' WordPress' ) ) {
1716
- $title = str_replace( " &#8212; WordPress" , "" , $title );
1717
- }
1718
- }
1719
- }
1720
-
1721
- return $title;
1722
- }
1723
-
1724
- // FilterStart
1725
- function nav_menus() {
1726
- $GetData = $this->get_flit_data( 'appearance_menus' );
1727
- if( !empty( $GetData["UPFN"] ) ) {
1728
- unset( $GetData["UPFN"] );
1729
-
1730
- if( !empty( $GetData["add_new_menu"] ) ) {
1731
- global $wp_version;
1732
- if ( version_compare( $wp_version , '3.6' , '>=' ) ) {
1733
- echo '<style>.wrap > .manage-menus, .locations-row-links .locations-add-menu-link { display: none; }</style>';
1734
- } else {
1735
- echo '<style>.nav-tabs .menu-add-new { display: none; }</style>';
1736
- }
1737
- }
1738
- if( !empty( $GetData["delete_menu"] ) ) {
1739
- echo '<style>.major-publishing-actions .delete-action { display: none; }</style>';
1740
- }
1741
-
1742
- }
1743
- }
1744
-
1745
- // FilterStart
1746
- function layout_footer( $text ) {
1747
- $text = '<img src="' . $this->Schema . 'www.gravatar.com/avatar/7e05137c5a859aa987a809190b979ed4?s=18" width="18" /> Plugin developer : <a href="' . $this->AuthorUrl . '?utm_source=use_plugin&utm_medium=footer&utm_content=' . $this->ltd . '&utm_campaign=' . str_replace( '.' , '_' , $this->Ver ) . '" target="_blank">gqevu6bsiz</a>';
1748
- return $text;
1749
- }
1750
-
1751
- // FilterStart
1752
- function DisplayDonation() {
1753
- $donation = get_option( $this->Record["donate"] );
1754
- if( $this->DonateKey != $donation ) {
1755
- $this->Msg .= '<div class="error"><p><strong>' . __( 'Thank you for considering donate.' , $this->ltd_p ) . '</strong> <a href="' . self_admin_url( 'admin.php?page=' . $this->PageSlug ) . '">' . __( 'Donate' , $this->ltd_p ) . '</a></p></div>';
1756
- }
1757
- }
1758
-
1759
- }
1760
- $wauc = new WP_Admin_UI_Customize();
1761
-
1762
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: WP Admin UI Customize
4
+ Description: An excellent plugin to customize the management screens.
5
+ Plugin URI: http://wpadminuicustomize.com/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=1_3_9
6
+ Version: 1.3.9
7
+ Author: gqevu6bsiz
8
+ Author URI: http://gqevu6bsiz.chicappa.jp/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=1_3_9
9
+ Text Domain: wauc
10
+ Domain Path: /languages
11
+ */
12
+
13
+ /* Copyright 2012 gqevu6bsiz (email : gqevu6bsiz@gmail.com)
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License, version 2, as
17
+ published by the Free Software Foundation.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
+ */
28
+
29
+
30
+
31
+ class WP_Admin_UI_Customize
32
+ {
33
+
34
+ var $Ver,
35
+ $Name,
36
+ $Dir,
37
+ $Url,
38
+ $Site,
39
+ $AuthorUrl,
40
+ $ltd,
41
+ $Record,
42
+ $PageSlug,
43
+ $PluginSlug,
44
+ $Nonces,
45
+ $Schema,
46
+ $UPFN,
47
+ $DonateKey,
48
+ $Menu,
49
+ $SubMenu,
50
+ $Admin_bar,
51
+ $Msg;
52
+
53
+
54
+ function __construct() {
55
+ $this->Ver = '1.3.9';
56
+ $this->Name = 'WP Admin UI Customize';
57
+ $this->Dir = plugin_dir_path( __FILE__ );
58
+ $this->Url = plugin_dir_url( __FILE__ );
59
+ $this->Site = 'http://wpadminuicustomize.com/';
60
+ $this->AuthorUrl = 'http://gqevu6bsiz.chicappa.jp/';
61
+ $this->ltd = 'wauc';
62
+ $this->ltd_p = $this->ltd . '_plugin';
63
+ $this->Record = array(
64
+ "user_role" => $this->ltd . '_user_role_setting',
65
+ "site" => $this->ltd . '_site_setting',
66
+ "admin_general" => $this->ltd . '_admin_general_setting',
67
+ "dashboard" => $this->ltd . '_dashboard_setting',
68
+ "admin_bar_menu" => $this->ltd . '_admin_bar_menu_setting',
69
+ "sidemenu" => $this->ltd . '_sidemenu_setting',
70
+ "removemetabox" => $this->ltd . '_removemetabox_setting',
71
+ "regist_metabox" => $this->ltd . '_regist_metabox',
72
+ "post_add_edit" => $this->ltd . '_post_add_edit_setting',
73
+ "appearance_menus" => $this->ltd . '_appearance_menus_setting',
74
+ "loginscreen" => $this->ltd . '_loginscreen_setting',
75
+ "donate" => $this->ltd . '_donated',
76
+ );
77
+ $this->PageSlug = 'wp_admin_ui_customize';
78
+ $this->PluginSlug = dirname( plugin_basename( __FILE__ ) );
79
+ $this->Nonces = array( "field" => $this->ltd . '_field' , "value" => $this->ltd . '_value' );
80
+ $this->Schema = is_ssl() ? 'https://' : 'http://';
81
+ $this->UPFN = 'Y';
82
+ $this->DonateKey = 'd77aec9bc89d445fd54b4c988d090f03';
83
+
84
+ $this->PluginSetup();
85
+ $this->FilterStart();
86
+ }
87
+
88
+
89
+
90
+
91
+
92
+ // PluginSetup
93
+ function PluginSetup() {
94
+ // load text domain
95
+ load_plugin_textdomain( $this->ltd , false , $this->PluginSlug . '/languages' );
96
+ load_plugin_textdomain( $this->ltd_p , false , $this->PluginSlug . '/languages' );
97
+
98
+ // plugin links
99
+ add_filter( 'plugin_action_links' , array( $this , 'plugin_action_links' ) , 10 , 2 );
100
+
101
+ // plugin links
102
+ add_filter( 'network_admin_plugin_action_links' , array( $this , 'network_admin_plugin_action_links' ) , 10 , 2 );
103
+
104
+ // add menu
105
+ add_action( 'admin_menu' , array( $this , 'admin_menu' ) , 2 );
106
+
107
+ // setting check user role
108
+ add_action( 'admin_notices' , array( $this , 'settingCheck' ) );
109
+ }
110
+
111
+ // PluginSetup
112
+ function plugin_action_links( $links , $file ) {
113
+ if( plugin_basename(__FILE__) == $file ) {
114
+ $link = '<a href="' . self_admin_url( 'admin.php?page=' . $this->PageSlug ) . '">' . __( 'Settings' ) . '</a>';
115
+ $support_link = '<a href="http://wordpress.org/support/plugin/' . $this->PluginSlug . '" target="_blank">' . __( 'Support Forums' ) . '</a>';
116
+ $delete_userrole_link = '<a href="' . self_admin_url( 'admin.php?page=' . $this->PageSlug . '_reset_userrole' ) . '">' . __( 'Reset User Roles' , $this->ltd ) . '</a>';
117
+ array_unshift( $links, $link , $delete_userrole_link , $support_link );
118
+ }
119
+ return $links;
120
+ }
121
+
122
+ // PluginSetup
123
+ function network_admin_plugin_action_links( $links , $file ) {
124
+ if( plugin_basename(__FILE__) == $file ) {
125
+ $support_link = '<a href="' . $this->Site . 'multisite_about/?utm_source=use_plugin&utm_medium=list&utm_content=' . $this->ltd . '&utm_campaign=' . str_replace( '.' , '_' , $this->Ver ) . '" target="_blank">Multisite Add-on</a>';
126
+ array_unshift( $links, $support_link );
127
+ }
128
+
129
+ return $links;
130
+ }
131
+
132
+ // PluginSetup
133
+ function admin_menu() {
134
+
135
+ if( !empty( $_GET["page"] ) ) {
136
+ $page = strip_tags( $_GET["page"] );
137
+ if( $page == $this->PageSlug . '_admin_bar' ) {
138
+ @header("X-XSS-Protection: 0");
139
+ }
140
+ }
141
+
142
+ add_menu_page( $this->Name , $this->Name , 'administrator', $this->PageSlug , array( $this , 'setting_default') );
143
+ add_submenu_page( $this->PageSlug , __( 'Site Settings' , $this->ltd ) , __( 'Site Settings' , $this->ltd ) , 'administrator' , $this->PageSlug . '_setting_site' , array( $this , 'setting_site' ) );
144
+ add_submenu_page( $this->PageSlug , __( 'General Screen Settings' , $this->ltd ) , __( 'General Screen Settings' , $this->ltd ) , 'administrator' , $this->PageSlug . '_admin_general_setting' , array( $this , 'setting_admin_general' ) );
145
+ add_submenu_page( $this->PageSlug , __( 'Dashboard' ) , __( 'Dashboard' ) , 'administrator' , $this->PageSlug . '_dashboard' , array( $this , 'setting_dashboard' ) );
146
+ add_submenu_page( $this->PageSlug , __( 'Admin Bar Menu' , $this->ltd ) , __( 'Admin Bar Menu' , $this->ltd ) , 'administrator' , $this->PageSlug . '_admin_bar' , array( $this , 'setting_admin_bar_menu' ) );
147
+ add_submenu_page( $this->PageSlug , __( 'Side Menu' , $this->ltd ) , __( 'Side Menu' , $this->ltd ) , 'administrator' , $this->PageSlug . '_sidemenu' , array( $this , 'setting_sidemenu' ) );
148
+ add_submenu_page( $this->PageSlug , __( 'Remove meta box' , $this->ltd ) , __( 'Remove meta box' , $this->ltd ) , 'administrator' , $this->PageSlug . '_removemtabox' , array( $this , 'setting_removemtabox' ) );
149
+ add_submenu_page( $this->PageSlug , __( 'Add New Post and Edit Post Screen Setting' , $this->ltd ) , __( 'Add New Post and Edit Post Screen Setting' , $this->ltd ) , 'administrator' , $this->PageSlug . '_post_add_edit_screen' , array( $this , 'setting_post_add_edit' ) );
150
+ add_submenu_page( $this->PageSlug , __( 'Appearance Menus Screen Setting' , $this->ltd ) , __( 'Appearance Menus Screen Setting' , $this->ltd ) , 'administrator' , $this->PageSlug . '_appearance_menus' , array( $this , 'setting_appearance_menus' ) );
151
+ add_submenu_page( $this->PageSlug , __( 'Login Screen' , $this->ltd ) , __( 'Login Screen' , $this->ltd ) , 'administrator' , $this->PageSlug . '_loginscreen' , array( $this , 'setting_loginscreen' ) );
152
+ add_submenu_page( $this->PageSlug , __( 'Reset User Roles' , $this->ltd ) , '<div style="display: none";>' . __( 'Reset User Roles' , $this->ltd ) . '</div>' , 'administrator' , $this->PageSlug . '_reset_userrole' , array( $this , 'reset_userrole' ) );
153
+ }
154
+
155
+
156
+
157
+
158
+
159
+ // SettingPage
160
+ function setting_default() {
161
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
162
+ include_once 'inc/setting_default.php';
163
+ }
164
+
165
+ // SettingPage
166
+ function setting_site() {
167
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
168
+ $this->DisplayDonation();
169
+ include_once 'inc/setting_site.php';
170
+ }
171
+
172
+ // SettingPage
173
+ function setting_admin_general() {
174
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
175
+ $this->DisplayDonation();
176
+ include_once 'inc/setting_admin_general.php';
177
+ }
178
+
179
+ // SettingPage
180
+ function setting_dashboard() {
181
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
182
+ $this->DisplayDonation();
183
+ include_once 'inc/setting_dashboard.php';
184
+ }
185
+
186
+ // SettingPage
187
+ function setting_admin_bar_menu() {
188
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
189
+ $this->DisplayDonation();
190
+ include_once 'inc/setting_admin_bar_menu.php';
191
+ }
192
+
193
+ // SettingPage
194
+ function setting_sidemenu() {
195
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
196
+ $this->DisplayDonation();
197
+ include_once 'inc/setting_sidemenu.php';
198
+ }
199
+
200
+ // SettingPage
201
+ function setting_removemtabox() {
202
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
203
+ $this->DisplayDonation();
204
+ include_once 'inc/setting_removemtabox.php';
205
+ }
206
+
207
+ // SettingPage
208
+ function setting_post_add_edit() {
209
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
210
+ $this->DisplayDonation();
211
+ include_once 'inc/setting_post_add_edit.php';
212
+ }
213
+
214
+ // SettingPage
215
+ function setting_appearance_menus() {
216
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
217
+ $this->DisplayDonation();
218
+ include_once 'inc/setting_appearance_menus.php';
219
+ }
220
+
221
+ // SettingPage
222
+ function setting_loginscreen() {
223
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
224
+ $this->DisplayDonation();
225
+ include_once 'inc/setting_loginscreen.php';
226
+ }
227
+
228
+ // SettingPage
229
+ function reset_userrole() {
230
+ if( !empty( $_POST["reset"] ) ) {
231
+ $this->update_reset( 'user_role' );
232
+ }
233
+ add_filter( 'admin_footer_text' , array( $this , 'layout_footer' ) );
234
+ include_once 'inc/reset_userrole.php';
235
+ }
236
+
237
+
238
+
239
+
240
+
241
+ // GetData
242
+ function get_data( $record ) {
243
+ $GetData = get_option( $this->Record[$record] );
244
+ $GetData = apply_filters( 'wauc_pre_get_data' , $GetData , $record );
245
+
246
+ $Data = array();
247
+ if( !empty( $GetData ) && !empty( $GetData["UPFN"] ) && $GetData["UPFN"] == $this->UPFN ) {
248
+ $Data = $GetData;
249
+ }
250
+
251
+ return $Data;
252
+ }
253
+
254
+ // GetData
255
+ function get_flit_data( $record ) {
256
+ $GetData = get_option( $this->Record[$record] );
257
+ $GetData = apply_filters( 'wauc_pre_get_filt_data' , $GetData , $record );
258
+
259
+ $Data = array();
260
+ if( !empty( $GetData ) && !empty( $GetData["UPFN"] ) && $GetData["UPFN"] == $this->UPFN ) {
261
+ $Data = $GetData;
262
+ }
263
+
264
+ return $Data;
265
+ }
266
+
267
+
268
+
269
+ // Settingcheck
270
+ function settingCheck() {
271
+ global $current_screen;
272
+
273
+ $Data = $this->get_data( 'user_role' );
274
+ if( !empty( $Data["UPFN"] ) ) {
275
+ unset( $Data["UPFN"] );
276
+ }
277
+ if( empty( $Data ) ) {
278
+ if( $current_screen->parent_base == $this->PageSlug && $current_screen->id != 'toplevel_page_' . $this->PageSlug ) {
279
+ echo '<div class="error"><p><strong>' . sprintf( __( 'Authority to apply the setting is not selected. <a href="%s">From here</a>, please select the permissions you want to set.' , $this->ltd ) , admin_url( 'admin.php?page=' . $this->PageSlug ) ) . '</strong></p></div>';
280
+ }
281
+ }
282
+ }
283
+
284
+
285
+
286
+
287
+
288
+ // SetList
289
+ function get_user_role() {
290
+ $editable_roles = get_editable_roles();
291
+ foreach ( $editable_roles as $role => $details ) {
292
+ $editable_roles[$role]["label"] = translate_user_role( $details['name'] );
293
+ }
294
+
295
+ return $editable_roles;
296
+ }
297
+
298
+ // SetList
299
+ function get_apply_roles() {
300
+
301
+ $apply_user_roles = $this->get_data( 'user_role' );
302
+ unset( $apply_user_roles["UPFN"] );
303
+
304
+ $Contents = __( 'Apply user roles' , $this->ltd ) . ' : ';
305
+
306
+ if( !empty( $apply_user_roles ) ) {
307
+ $UserRoles = $this->get_user_role();
308
+ foreach( $apply_user_roles as $role => $v ) {
309
+ $Contents .= '[ ' . $UserRoles[$role]["label"] . ' ]';
310
+ }
311
+ } else {
312
+ $Contents .= __( 'None' );
313
+ }
314
+
315
+ $Contents = apply_filters( 'wauc_get_apply_roles' , $Contents );
316
+
317
+ return $Contents;
318
+
319
+ }
320
+
321
+ // SetList
322
+ function sidemenu_default_load() {
323
+ global $menu , $submenu;
324
+
325
+ $this->Menu = $menu;
326
+ $this->SubMenu = $submenu;
327
+ }
328
+
329
+ // SetList
330
+ function admin_bar_default_load( $wp_admin_bar ) {
331
+ global $wp_admin_bar;
332
+
333
+ $this->Admin_bar = $wp_admin_bar->get_nodes();
334
+ }
335
+
336
+ // SetList
337
+ function admin_bar_filter_load() {
338
+ $Default_bar = $this->Admin_bar;
339
+
340
+ $Delete_bar = array( "user-actions" , "wp-logo-external" , "top-secondary" , "my-sites-super-admin" , "my-sites-list" );
341
+ foreach( $Delete_bar as $del_name ) {
342
+ if( !empty( $Default_bar[$del_name] ) ) {
343
+ unset( $Default_bar[$del_name] );
344
+ }
345
+ }
346
+ if( !empty( $Default_bar ) ) {
347
+ foreach( $Default_bar as $node_id => $node ) {
348
+ if( preg_match( "/blog-[0-9]/" , $node->parent ) ) {
349
+ unset( $Default_bar[$node_id] );
350
+ }
351
+ }
352
+ }
353
+
354
+ // front
355
+ $Default_bar["dashboard"] = (object) array( "id" => "dashboard" , "title" => __( 'Dashboard' ) , "parent" => "site-name" , "href" => admin_url() );
356
+
357
+ foreach( $Default_bar as $node_id => $node ) {
358
+ if( $node->id == 'my-account' ) {
359
+ $Default_bar[$node_id]->title = sprintf( __( 'Howdy, %1$s' ) , '[user_name]' );
360
+ } elseif( $node->id == 'user-info' ) {
361
+ $Default_bar[$node_id]->title = '<span class="display-name">[user_name]</span>';
362
+ } elseif( $node->id == 'logout' ) {
363
+ $Default_bar[$node_id]->href = preg_replace( '/&amp(.*)/' , '' , $node->href );
364
+ } elseif( $node->id == 'site-name' ) {
365
+ $Default_bar[$node_id]->title = '[blog_name]';
366
+ } elseif( $node->id == 'updates' ) {
367
+ $Default_bar[$node_id]->title = '[update_total]';
368
+ } elseif( $node->id == 'comments' ) {
369
+ $Default_bar[$node_id]->title = '[comment_count]';
370
+ }
371
+ }
372
+
373
+ $Filter_bar = array();
374
+ $MainMenuIDs = array();
375
+
376
+ foreach( $Default_bar as $node_id => $node ) {
377
+ if( empty( $node->parent ) ) {
378
+ $Filter_bar["left"]["main"][$node_id] = $node;
379
+ $MainMenuIDs[$node_id] = "left";
380
+ unset( $Default_bar[$node_id] );
381
+ } elseif( $node->parent == 'top-secondary' ) {
382
+ $Filter_bar["right"]["main"][$node_id] = $node;
383
+ $MainMenuIDs[$node_id] = "right";
384
+ unset( $Default_bar[$node_id] );
385
+ }
386
+ }
387
+
388
+ foreach( $Default_bar as $node_id => $node ) {
389
+ if( $node->parent == 'wp-logo-external' ) {
390
+ $Default_bar[$node_id]->parent = 'wp-logo';
391
+ } elseif( $node->parent == 'user-actions' ) {
392
+ $Default_bar[$node_id]->parent = 'my-account';
393
+ } elseif( $node->parent == 'my-sites-list' ) {
394
+ $Default_bar[$node_id]->parent = 'my-sites';
395
+ } else{
396
+ if( !array_keys( $MainMenuIDs , $node->parent ) ) {
397
+ if( !empty( $Default_bar[$node->parent] ) ) {
398
+ $Default_bar[$node_id]->parent = $Default_bar[$node->parent]->parent;
399
+ }
400
+ }
401
+ }
402
+ }
403
+
404
+ // meta field add
405
+ foreach( $Default_bar as $node_id => $node ) {
406
+ if( !isset( $node->meta ) ) {
407
+ $Default_bar[$node_id]->meta = array();
408
+ }
409
+ }
410
+
411
+ foreach( $MainMenuIDs as $parent_id => $menu_type ) {
412
+
413
+ foreach( $Default_bar as $node_id => $node ) {
414
+ if( $node->parent == $parent_id ) {
415
+ $Filter_bar[$menu_type]["sub"][$node_id] = $node;
416
+ unset( $Default_bar[$node_id] );
417
+ }
418
+ }
419
+ }
420
+
421
+ return $Filter_bar;
422
+ }
423
+
424
+ // SetList
425
+ function post_meta_boxes_load() {
426
+ global $current_screen;
427
+
428
+ $UserRole = $this->current_user_role_group();
429
+
430
+ if( $current_screen->base == 'post' && $current_screen->action != 'add' && $UserRole == 'administrator' ) {
431
+ global $wp_meta_boxes;
432
+
433
+ $GetData = $this->get_data( "regist_metabox" );
434
+ $post_type = $current_screen->post_type;
435
+ $Metaboxes = $wp_meta_boxes[$post_type];
436
+
437
+ $Update = array();
438
+ if( empty( $GetData ) ) {
439
+
440
+ $Update["UPFN"] = $this->UPFN;
441
+ foreach( $Metaboxes as $context => $meta_box ) {
442
+ foreach( $meta_box as $priority => $box ) {
443
+ foreach( $box as $metabox_id => $b ) {
444
+ $Update["metaboxes"][$post_type][$context][$priority][$b["id"]] = strip_tags( $b["title"] );
445
+ }
446
+ }
447
+ }
448
+
449
+ } else {
450
+
451
+ if( !empty( $GetData["metaboxes"][$post_type] ) ) {
452
+ $Update = $GetData;
453
+ }
454
+ foreach( $Metaboxes as $context => $meta_box ) {
455
+ foreach( $meta_box as $priority => $box ) {
456
+ if( is_array( $box ) ) {
457
+ foreach( $box as $metabox_id => $b ) {
458
+ if( !empty( $GetData["metaboxes"][$post_type][$context][$priority][$b["id"]] ) ) {
459
+ $Update["metaboxes"][$post_type][$context][$priority][$b["id"]] = strip_tags( $b["title"] );
460
+ } else {
461
+ $Update["metaboxes"][$post_type][$context][$priority][$b["id"]] = strip_tags( $b["title"] );
462
+ }
463
+ }
464
+ }
465
+ }
466
+ }
467
+
468
+ }
469
+
470
+ if( !empty( $Update ) ) {
471
+ update_option( $this->Record["regist_metabox"] , $Update );
472
+ }
473
+ }
474
+
475
+ }
476
+
477
+
478
+ // SetList
479
+ function sidebar_menu_widget( $menu_widget ) {
480
+ $UserRoles = $this->get_user_role();
481
+ $new_widget = '';
482
+ if( !empty( $menu_widget["new"] ) ) {
483
+ $new_widget = 'new';
484
+ }
485
+ ?>
486
+ <div class="widget <?php echo $menu_widget["slug"]; ?> <?php echo $new_widget; ?>">
487
+
488
+ <div class="widget-top">
489
+ <div class="widget-title-action">
490
+ <a class="widget-action" href="#available"></a>
491
+ </div>
492
+ <div class="widget-title">
493
+ <h4>
494
+ <?php echo $menu_widget["title"]; ?>
495
+ : <span class="in-widget-title"><?php echo $menu_widget["slug"]; ?></span>
496
+ </h4>
497
+ </div>
498
+ </div>
499
+
500
+ <div class="widget-inside">
501
+ <div class="settings">
502
+ <p class="description">
503
+ <?php if( $menu_widget["slug"] == 'custom_menu' ) : ?>
504
+ <?php _e( 'Url' ); ?>:
505
+ <input type="text" class="slugtext" value="" name="data[][slug]">
506
+ <?php else : ?>
507
+ <?php _e( 'Slug' ); ?>: <?php echo $menu_widget["slug"]; ?>
508
+ <input type="hidden" class="slugtext" value="<?php echo $menu_widget["slug"]; ?>" name="data[][slug]">
509
+ <?php endif; ?>
510
+ </p>
511
+ <?php _e( 'User Roles' ); ?> :
512
+ <ul class="display_roles">
513
+ <?php foreach( $UserRoles as $role_name => $val ) : ?>
514
+ <?php $has_cap = false; ?>
515
+ <?php if( !empty( $val["capabilities"][$menu_widget["cap"]] ) or $role_name == $menu_widget["cap"] ) : ?>
516
+ <?php $has_cap = 'has_cap'; ?>
517
+ <?php endif; ?>
518
+ <li class="<?php echo $role_name; ?> <?php echo $has_cap; ?>"><?php echo $val["label"]; ?></li>
519
+ <?php endforeach ;?>
520
+ </ul>
521
+ <label>
522
+ <?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_attr( $menu_widget["title"] ); ?>" name="data[][title]">
523
+ </label>
524
+ <input type="hidden" class="parent_slugtext" value="<?php echo $menu_widget["parent_slug"]; ?>" name="data[][parent_slug]">
525
+ </div>
526
+
527
+ <?php if( $menu_widget["slug"] != 'separator' ) : ?>
528
+ <div class="submenu">
529
+ <p class="description"><?php _e( 'Sub Menus' , $this->ltd ); ?></p>
530
+ <?php if( empty( $menu_widget["new"] ) && !empty( $menu_widget["submenu"] ) ) : ?>
531
+ <?php foreach( $menu_widget["submenu"] as $sm ) : ?>
532
+ <?php $sepalator_widget = ''; ?>
533
+ <?php if( $sm["slug"] == 'separator' ) : $sepalator_widget = $sm["slug"]; endif; ?>
534
+
535
+ <div class="widget <?php echo $sepalator_widget; ?>">
536
+
537
+ <div class="widget-top">
538
+ <div class="widget-title-action">
539
+ <a class="widget-action" href="#available"></a>
540
+ </div>
541
+ <div class="widget-title">
542
+ <h4>
543
+ <?php echo $sm["title"]; ?>
544
+ : <span class="in-widget-title"><?php echo $sm["slug"]; ?></span>
545
+ </h4>
546
+ </div>
547
+ </div>
548
+
549
+ <div class="widget-inside">
550
+ <div class="settings">
551
+ <p class="description">
552
+ <?php _e( 'Slug' ); ?>: <?php echo $sm["slug"]; ?>
553
+ <input type="hidden" class="slugtext" value="<?php echo $sm["slug"]; ?>" name="data[][slug]">
554
+ </p>
555
+ <?php _e( 'User Roles' ); ?> :
556
+ <ul class="display_roles">
557
+ <?php foreach( $UserRoles as $role_name => $val ) : ?>
558
+ <?php $has_cap = false; ?>
559
+ <?php if( !empty( $val["capabilities"][$sm["cap"]] ) or $role_name == $sm["cap"] ) : ?>
560
+ <?php $has_cap = 'has_cap'; ?>
561
+ <?php endif; ?>
562
+ <li class="<?php echo $role_name; ?> <?php echo $has_cap; ?>"><?php echo $val["label"]; ?></li>
563
+ <?php endforeach ;?>
564
+ </ul>
565
+ <label>
566
+ <?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_attr( $sm["title"] ); ?>" name="data[][title]">
567
+ </label>
568
+ <input type="hidden" class="parent_slugtext" value="<?php echo $sm["parent_slug"]; ?>" name="data[][parent_slug]">
569
+ </div>
570
+ <div class="widget-control-actions">
571
+ <div class="alignleft">
572
+ <a href="#remove"><?php _e( 'Remove' ); ?></a>
573
+ </div>
574
+ <div class="clear"></div>
575
+ </div>
576
+ </div>
577
+ </div>
578
+
579
+ <?php endforeach; ?>
580
+ <?php endif; ?>
581
+ </div>
582
+ <div class="widget-control-actions">
583
+ <div class="alignleft">
584
+ <a href="#remove"><?php _e( 'Remove' ); ?></a>
585
+ </div>
586
+ <div class="clear"></div>
587
+ </div>
588
+
589
+ <?php endif; ?>
590
+ </div>
591
+
592
+ </div>
593
+ <?php
594
+ }
595
+
596
+ // SetList
597
+ function admin_bar_menu_widget( $menu_widget ) {
598
+ $new_widget = '';
599
+ if( !empty( $menu_widget["new"] ) ) {
600
+ $new_widget = 'new';
601
+ }
602
+ ?>
603
+ <div class="widget <?php echo $new_widget; ?> <?php echo $menu_widget["id"]; ?>">
604
+
605
+ <div class="widget-top">
606
+ <div class="widget-title-action">
607
+ <a class="widget-action" href="#available"></a>
608
+ </div>
609
+ <div class="widget-title">
610
+ <h4>
611
+ <?php if( preg_match( '/\<form/' , $menu_widget["title"] ) ) : ?>
612
+ <?php echo $menu_widget["id"]; ?>
613
+ <?php else: ?>
614
+ <?php echo $menu_widget["title"]; ?>
615
+ : <span class="in-widget-title"><?php echo $menu_widget["id"]; ?></span>
616
+ <?php endif; ?>
617
+ </h4>
618
+ </div>
619
+ </div>
620
+
621
+ <div class="widget-inside">
622
+ <div class="settings">
623
+ <p class="field-url description">
624
+ <input type="hidden" class="idtext" value="<?php echo $menu_widget["id"]; ?>" name="data[][id]" />
625
+ <?php if( $menu_widget["id"] == 'custom_node' ) : ?>
626
+ URL: <input type="text" class="regular-text linktext" value="" name="data[][href]" placeholder="http://" />
627
+ <?php else: ?>
628
+ <a href="<?php echo $menu_widget["href"]; ?>" target="_blank"><?php echo $menu_widget["id"]; ?></a>
629
+ <input type="hidden" class="linktext" value="<?php echo $menu_widget["href"]; ?>" name="data[][href]" />
630
+ <?php endif; ?>
631
+ </p>
632
+ <p class="field-title description">
633
+ <label>
634
+ <?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" />
635
+ </label>
636
+ </p>
637
+ <p class="field-meta description">
638
+ <label class="description">
639
+ <?php $checked = ""; ?>
640
+ <?php if( !empty( $menu_widget["meta"]["target"] ) ) : ?>
641
+ <?php $checked = checked( $menu_widget["meta"]["target"] , '_blank' , 0 ); ?>
642
+ <?php endif; ?>
643
+ <input type="checkbox" class="meta_target" value="_blank" name="data[][meta][target]" <?php echo $checked; ?> />
644
+ <?php _e( 'Open link in a new window/tab' ); ?>
645
+ </label>
646
+ </p>
647
+ <input type="hidden" class="parent" value="<?php echo $menu_widget["parent"]; ?>" name="data[][parent]" />
648
+ </div>
649
+
650
+ <div class="submenu">
651
+ <p class="description"><?php _e( 'Sub Menus' , $this->ltd ); ?></p>
652
+ <?php if( empty( $menu_widget["new"] ) && !empty( $menu_widget["subnode"] ) ) : ?>
653
+ <?php foreach( $menu_widget["subnode"] as $sm ) : ?>
654
+
655
+ <div class="widget">
656
+
657
+ <div class="widget-top">
658
+ <div class="widget-title-action">
659
+ <a class="widget-action" href="#available"></a>
660
+ </div>
661
+ <div class="widget-title">
662
+ <h4>
663
+ <?php if( preg_match( '/\<form/' , $sm["title"] ) ) : ?>
664
+ <?php echo $sm["id"]; ?>
665
+ <?php else: ?>
666
+ <?php echo $sm["title"]; ?>
667
+ : <span class="in-widget-title"><?php echo $sm["id"]; ?></span>
668
+ <?php endif; ?>
669
+ </h4>
670
+ </div>
671
+ </div>
672
+
673
+ <div class="widget-inside">
674
+ <div class="settings">
675
+ <p class="field-url description">
676
+ <input type="hidden" class="idtext" value="<?php echo $sm["id"]; ?>" name="data[][id]" />
677
+ <a href="<?php echo $sm["href"]; ?>" target="_blank"><?php echo $sm["id"]; ?></a>
678
+ <input type="hidden" class="linktext" value="<?php echo $sm["href"]; ?>" name="data[][href]" />
679
+ </p>
680
+ <p class="field-title description">
681
+ <label>
682
+ <?php _e( 'Title' ); ?> : <input type="text" class="regular-text titletext" value="<?php echo esc_html( $sm["title"] ); ?>" name="data[][title]" />
683
+ </label>
684
+ </p>
685
+ <p class="field-meta description">
686
+ <label class="description">
687
+ <?php $checked = ""; ?>
688
+ <?php if( !empty( $sm["meta"]["target"] ) ) : ?>
689
+ <?php $checked = checked( $sm["meta"]["target"] , '_blank' , 0 ); ?>
690
+ <?php endif; ?>
691
+ <input type="checkbox" class="meta_target" value="_blank" name="data[][meta][target]" <?php echo $checked; ?> />
692
+ <?php _e( 'Open link in a new window/tab' ); ?>
693
+ </label>
694
+ </p>
695
+ <input type="hidden" class="parent" value="<?php echo $sm["parent"]; ?>" name="data[][parent]" />
696
+ </div>
697
+ <div class="widget-control-actions">
698
+ <div class="alignleft">
699
+ <a href="#remove"><?php _e( 'Remove' ); ?></a>
700
+ </div>
701
+ <div class="clear"></div>
702
+ </div>
703
+ </div>
704
+ </div>
705
+
706
+ <?php endforeach; ?>
707
+ <?php endif; ?>
708
+ </div>
709
+ <div class="widget-control-actions">
710
+ <div class="alignleft">
711
+ <a href="#remove"><?php _e( 'Remove' ); ?></a>
712
+ </div>
713
+ <div class="clear"></div>
714
+ </div>
715
+ </div>
716
+
717
+ </div>
718
+ <?php
719
+ }
720
+
721
+ // SetList
722
+ function get_custom_posts() {
723
+ $args = array( );
724
+ $all_custom_posts = get_post_types( $args , 'objects' );
725
+
726
+ $exclusion = array( "post" , "page" , "attachment" , "revision" , "nav_menu_item");
727
+ $custom_posts = array();
728
+ foreach($all_custom_posts as $post_type => $cpt) {
729
+ if( !in_array( $post_type , $exclusion ) ) {
730
+ if( !empty( $cpt->show_ui ) ) {
731
+ $custom_posts[$post_type] = $cpt;
732
+ }
733
+ }
734
+ }
735
+
736
+ return $custom_posts;
737
+ }
738
+
739
+
740
+ // SetList
741
+ function val_replace( $str ) {
742
+
743
+ if( !empty( $str ) ) {
744
+
745
+ $update_data = wp_get_update_data();
746
+ $awaiting_mod = wp_count_comments();
747
+ $awaiting_mod = $awaiting_mod->moderated;
748
+ $current_user = wp_get_current_user();
749
+ if( is_multisite() ) {
750
+ $current_site = get_current_site();
751
+ }
752
+
753
+ if( strstr( $str , '[blog_url]') ) {
754
+ $str = str_replace( '[blog_url]' , get_bloginfo( 'url' ) , $str );
755
+ }
756
+ if( strstr( $str , '[template_directory_uri]') ) {
757
+ $str = str_replace( '[template_directory_uri]' , get_bloginfo( 'template_directory' ) , $str );
758
+ }
759
+ if( strstr( $str , '[stylesheet_directory_uri]') ) {
760
+ $str = str_replace( '[stylesheet_directory_uri]' , get_stylesheet_directory_uri() , $str );
761
+ }
762
+ if( strstr( $str , '[blog_name]') ) {
763
+ $str = str_replace( '[blog_name]' , get_bloginfo( 'name' ) , $str );
764
+ }
765
+ if( strstr( $str , '[update_total]') ) {
766
+ $str = str_replace( '[update_total]' , $update_data["counts"]["total"] , $str );
767
+ }
768
+ if( strstr( $str , '[update_total_format]') ) {
769
+ $str = str_replace( '[update_total_format]' , number_format_i18n( $update_data["counts"]["total"] ) , $str );
770
+ }
771
+ if( strstr( $str , '[update_plugins]') ) {
772
+ $str = str_replace( '[update_plugins]' , $update_data["counts"]["plugins"] , $str );
773
+ }
774
+ if( strstr( $str , '[update_plugins_format]') ) {
775
+ $str = str_replace( '[update_plugins_format]' , number_format_i18n( $update_data["counts"]["plugins"] ) , $str );
776
+ }
777
+ if( strstr( $str , '[update_themes]') ) {
778
+ $str = str_replace( '[update_themes]' , $update_data["counts"]["themes"] , $str );
779
+ }
780
+ if( strstr( $str , '[update_themes_format]') ) {
781
+ $str = str_replace( '[update_themes_format]' , number_format_i18n( $update_data["counts"]["themes"] ) , $str );
782
+ }
783
+ if( strstr( $str , '[comment_count]') ) {
784
+ $str = str_replace( '[comment_count]' , $awaiting_mod , $str );
785
+ }
786
+ if( strstr( $str , '[comment_count_format]') ) {
787
+ $str = str_replace( '[comment_count_format]' , number_format_i18n( $awaiting_mod ) , $str );
788
+ }
789
+ if( strstr( $str , '[user_name]') ) {
790
+ $str = str_replace( '[user_name]' , '<span class="display-name">' . $current_user->display_name . '</span>' , $str );
791
+ }
792
+
793
+ if( is_multisite() ) {
794
+ if( strstr( $str , '[site_name]') ) {
795
+ $str = str_replace( '[site_name]' , esc_attr( $current_site->site_name ) , $str );
796
+ }
797
+ if( strstr( $str , '[site_url]') ) {
798
+ $str = str_replace( '[site_url]' , $this->Schema . esc_attr( $current_site->domain ) , $str );
799
+ }
800
+ }
801
+
802
+ }
803
+
804
+ return $str;
805
+ }
806
+
807
+ // SetList
808
+ function current_user_role_group() {
809
+ $UserRole = '';
810
+ $User = wp_get_current_user();
811
+ if( !empty( $User->roles ) ) {
812
+ foreach( $User->roles as $role ) {
813
+ $UserRole = $role;
814
+ break;
815
+ }
816
+ }
817
+ return $UserRole;
818
+ }
819
+
820
+
821
+
822
+ // DataUpdate
823
+ function update_validate() {
824
+ $Update = array();
825
+
826
+ if( !empty( $_POST[$this->UPFN] ) ) {
827
+ $UPFN = strip_tags( $_POST[$this->UPFN] );
828
+ if( $UPFN == $this->UPFN ) {
829
+ $Update["UPFN"] = strip_tags( $_POST[$this->UPFN] );
830
+ }
831
+ }
832
+
833
+ return $Update;
834
+ }
835
+
836
+ // DataUpdate
837
+ function update_reset( $record ) {
838
+ $Update = $this->update_validate();
839
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
840
+ $record = apply_filters( 'wauc_pre_delete' , $this->Record[$record] );
841
+ delete_option( $record );
842
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
843
+ }
844
+ }
845
+
846
+ // DataUpdate
847
+ function DonatingCheck() {
848
+ $Update = $this->update_validate();
849
+
850
+ if( !empty( $Update ) ) {
851
+ if( !empty( $_POST["donate_key"] ) ) {
852
+ $SubmitKey = md5( strip_tags( $_POST["donate_key"] ) );
853
+ if( $this->DonateKey == $SubmitKey ) {
854
+ update_option( $this->Record["donate"] , $SubmitKey );
855
+ $this->Msg .= '<div class="updated"><p><strong>' . __( 'Thank you for your donation.' , $this->ltd_p ) . '</strong></p></div>';
856
+ }
857
+ }
858
+ }
859
+
860
+ }
861
+
862
+ // DataUpdate
863
+ function update_userrole() {
864
+ $Update = $this->update_validate();
865
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
866
+
867
+ if( !empty( $_POST["data"]["user_role"] ) ) {
868
+ foreach($_POST["data"]["user_role"] as $key => $val) {
869
+ $tmpK = strip_tags( $key );
870
+ $tmpV = strip_tags ( $val );
871
+ $Update[$tmpK] = $tmpV;
872
+ }
873
+ }
874
+
875
+ update_option( $this->Record["user_role"] , $Update );
876
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
877
+ }
878
+ }
879
+
880
+ // DataUpdate
881
+ function update_site() {
882
+ $Update = $this->update_validate();
883
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
884
+
885
+ if( !empty( $_POST["data"] ) ) {
886
+ foreach($_POST["data"] as $key => $val) {
887
+ $tmpK = strip_tags( $key );
888
+ $tmpV = strip_tags ( $val );
889
+ $Update[$tmpK] = $tmpV;
890
+ }
891
+ }
892
+
893
+ $Record = apply_filters( 'wauc_pre_update' , $this->Record["site"] );
894
+ update_option( $Record , $Update );
895
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
896
+ }
897
+ }
898
+
899
+ // DataUpdate
900
+ function update_admin_general() {
901
+ $Update = $this->update_validate();
902
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
903
+
904
+ if( !empty( $_POST["data"] ) ) {
905
+ foreach($_POST["data"] as $key => $val) {
906
+ $tmpK = strip_tags( $key );
907
+ $tmpV = $val;
908
+ $Update[$tmpK] = $tmpV;
909
+ }
910
+ }
911
+
912
+ $Record = apply_filters( 'wauc_pre_update' , $this->Record["admin_general"] );
913
+ update_option( $Record , $Update );
914
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
915
+ }
916
+ }
917
+
918
+ // DataUpdate
919
+ function update_dashboard() {
920
+ $Update = $this->update_validate();
921
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
922
+
923
+ if( !empty( $_POST["data"] ) ) {
924
+ foreach($_POST["data"] as $key => $val) {
925
+ $tmpK = strip_tags( $key );
926
+ $tmpV = $val;
927
+ $Update[$tmpK] = $tmpV;
928
+ }
929
+ }
930
+
931
+ $Record = apply_filters( 'wauc_pre_update' , $this->Record["dashboard"] );
932
+ update_option( $Record , $Update );
933
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
934
+ }
935
+ }
936
+
937
+ // DataUpdate
938
+ function update_admin_bar_menu() {
939
+ $Update = $this->update_validate();
940
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
941
+
942
+ if( !empty( $_POST["data"] ) ) {
943
+ foreach($_POST["data"] as $boxtype => $nodes) {
944
+ if( $boxtype === 'left' or $boxtype === 'right' ) {
945
+ foreach($nodes as $key => $node) {
946
+ $id = "";
947
+ if( !empty( $node["id"] ) ) {
948
+ $id = strip_tags( $node["id"] );
949
+ }
950
+ $title = "";
951
+ if( !empty( $node["title"] ) ) {
952
+ $title = stripslashes( $node["title"] );
953
+ }
954
+ $href = "";
955
+ if( !empty( $node["href"] ) ) {
956
+ $href = strip_tags( $node["href"] );
957
+ }
958
+ $parent = "";
959
+ $depth = "main";
960
+ if( !empty( $node["parent"] ) ) {
961
+ $parent = strip_tags( $node["parent"] );
962
+ $depth = 'sub';
963
+ }
964
+ $meta = array();
965
+ if( !empty( $node["meta"] ) ) {
966
+ foreach( $node["meta"] as $mk => $mv ) {
967
+ if( !empty( $mv ) ) {
968
+ $meta[strip_tags($mk)] = strip_tags($mv);
969
+ }
970
+ }
971
+ }
972
+
973
+ $Update[$boxtype][$depth][] = array( "id" => $id , "title" => $title , "href" => $href , "parent" => $parent , "meta" => $meta );
974
+ }
975
+ }
976
+ }
977
+ }
978
+
979
+ $Record = apply_filters( 'wauc_pre_update' , $this->Record["admin_bar_menu"] );
980
+ update_option( $Record , $Update );
981
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
982
+ }
983
+ }
984
+
985
+ // DataUpdate
986
+ function update_sidemenu() {
987
+ $Update = $this->update_validate();
988
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
989
+
990
+ if( !empty( $_POST["data"] ) ) {
991
+ foreach($_POST["data"] as $menu) {
992
+ if( !empty( $menu["title"] ) && !empty( $menu["slug"] ) ) {
993
+ $slug = htmlspecialchars( $menu["slug"] );
994
+ $title = stripslashes( $menu["title"] );
995
+ $parent_slug = '';
996
+ $depth = 'main';
997
+
998
+ if( !empty( $menu["parent_slug"] ) ) {
999
+ $parent_slug = strip_tags( $menu["parent_slug"] );
1000
+ $depth = 'sub';
1001
+ }
1002
+
1003
+ $Update[$depth][] = array( "slug" => $slug , "title" => $title , "parent_slug" => $parent_slug );
1004
+ }
1005
+ }
1006
+ }
1007
+
1008
+ $Record = apply_filters( 'wauc_pre_update' , $this->Record["sidemenu"] );
1009
+ update_option( $Record , $Update );
1010
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
1011
+ }
1012
+ }
1013
+
1014
+ // DataUpdate
1015
+ function update_removemetabox() {
1016
+ $Update = $this->update_validate();
1017
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
1018
+
1019
+ if( !empty( $_POST["data"] ) ) {
1020
+ foreach($_POST["data"] as $post_type => $val) {
1021
+ $post_type = strip_tags( $post_type );
1022
+ if( is_array( $val ) ) {
1023
+ foreach($val as $id => $v) {
1024
+ $tmpK = strip_tags( $id );
1025
+ $tmpV = strip_tags ( $v );
1026
+ $Update[$post_type][$tmpK] = $tmpV;
1027
+ }
1028
+ }
1029
+ }
1030
+ }
1031
+
1032
+ $Record = apply_filters( 'wauc_pre_update' , $this->Record["removemetabox"] );
1033
+ update_option( $Record , $Update );
1034
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
1035
+ }
1036
+ }
1037
+
1038
+ // DataUpdate
1039
+ function update_post_add_edit() {
1040
+ $Update = $this->update_validate();
1041
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
1042
+
1043
+ if( !empty( $_POST["data"] ) ) {
1044
+ foreach($_POST["data"] as $edited => $val) {
1045
+ $tmpK = strip_tags( $edited );
1046
+ $tmpV = strip_tags ( $val );
1047
+ $Update[$tmpK] = $tmpV;
1048
+ }
1049
+ }
1050
+
1051
+ $Record = apply_filters( 'wauc_pre_update' , $this->Record["post_add_edit"] );
1052
+ update_option( $Record , $Update );
1053
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
1054
+ }
1055
+ }
1056
+
1057
+ // DataUpdate
1058
+ function update_appearance_menus() {
1059
+ $Update = $this->update_validate();
1060
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
1061
+
1062
+ if( !empty( $_POST["data"] ) ) {
1063
+ foreach($_POST["data"] as $edited => $val) {
1064
+ $tmpK = strip_tags( $edited );
1065
+ $tmpV = strip_tags ( $val );
1066
+ $Update[$tmpK] = $tmpV;
1067
+ }
1068
+ }
1069
+
1070
+ $Record = apply_filters( 'wauc_pre_update' , $this->Record["appearance_menus"] );
1071
+ update_option( $Record , $Update );
1072
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
1073
+ }
1074
+ }
1075
+
1076
+ // DataUpdate
1077
+ function update_loginscreen() {
1078
+ $Update = $this->update_validate();
1079
+ if( !empty( $Update ) && check_admin_referer( $this->Nonces["value"] , $this->Nonces["field"] ) ) {
1080
+
1081
+ if( !empty( $_POST["data"] ) ) {
1082
+ foreach($_POST["data"] as $key => $val) {
1083
+ $tmpK = strip_tags( $key );
1084
+ $tmpV = $val;
1085
+ $Update[$tmpK] = $tmpV;
1086
+ }
1087
+ }
1088
+
1089
+ $Record = apply_filters( 'wauc_pre_update' , $this->Record["loginscreen"] );
1090
+ update_option( $Record , $Update );
1091
+ $this->Msg .= '<div class="updated"><p><strong>' . __('Settings saved.') . '</strong></p></div>';
1092
+
1093
+ }
1094
+ }
1095
+
1096
+
1097
+
1098
+
1099
+
1100
+ // FilterStart
1101
+ function FilterStart() {
1102
+
1103
+ // site
1104
+ if( !is_admin() ) {
1105
+ add_action( 'wp_loaded' , array( $this , 'remove_action_front' ) ) ;
1106
+ add_filter( 'login_headerurl' , array( $this , 'login_headerurl' ) );
1107
+ add_filter( 'login_headertitle' , array( $this , 'login_headertitle' ) );
1108
+ add_action( 'login_head' , array( $this , 'login_head' ) );
1109
+ add_action( 'login_footer' , array( $this , 'login_footer' ) );
1110
+
1111
+ // front init
1112
+ add_action( 'wp_loaded' , array( $this , 'front_init' ) );
1113
+ }
1114
+
1115
+ // admin UI
1116
+ if( is_admin() && !is_network_admin () ) {
1117
+ // default side menu load.
1118
+ add_action( 'admin_menu' , array( $this , 'sidemenu_default_load' ) , 10000 );
1119
+
1120
+ // default admin bar menu load.
1121
+ add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_default_load' ) , 1 );
1122
+
1123
+ // default post metabox load.
1124
+ add_action( 'admin_head' , array( $this , 'post_meta_boxes_load' ) , 10 );
1125
+
1126
+ // admin init
1127
+ add_action( 'wp_loaded' , array( $this , 'admin_init' ) );
1128
+ }
1129
+ }
1130
+
1131
+ // FilterStart
1132
+ function admin_init() {
1133
+
1134
+ $SettingRole = $this->get_data( 'user_role' );
1135
+ $SettingRole = apply_filters( 'wauc_pre_setting_roles' , $SettingRole );
1136
+
1137
+ if( !empty( $SettingRole ) ) {
1138
+ unset($SettingRole["UPFN"]);
1139
+
1140
+ $UserRole = $this->current_user_role_group();
1141
+
1142
+ if( !is_network_admin() && !empty( $UserRole ) ) {
1143
+ if( array_key_exists( $UserRole , $SettingRole ) ) {
1144
+ add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_menu') , 25 );
1145
+ add_action( 'wp_loaded' , array( $this , 'notice_dismiss' ) , 2 );
1146
+ add_action( 'admin_head' , array( $this , 'remove_tab' ) );
1147
+ add_filter( 'admin_footer_text' , array( $this , 'admin_footer_text' ) );
1148
+ add_action( 'admin_print_styles' , array( $this , 'load_css' ) );
1149
+ add_action( 'wp_dashboard_setup' , array( $this , 'wp_dashboard_setup' ) );
1150
+ add_action( 'admin_head' , array( $this , 'removemetabox' ) , 11 );
1151
+ add_filter( 'admin_head', array( $this , 'sidemenu' ) );
1152
+ add_filter( 'get_sample_permalink_html' , array( $this , 'add_edit_post_change_permalink' ) );
1153
+ add_filter( 'edit_form_after_title' , array( $this , 'allow_comments' ) );
1154
+ add_action( 'admin_print_styles-nav-menus.php', array( $this , 'nav_menus' ) );
1155
+ add_filter( 'admin_title', array( $this, 'admin_title' ) );
1156
+ }
1157
+ }
1158
+ }
1159
+ }
1160
+
1161
+ // FilterStart
1162
+ function front_init() {
1163
+
1164
+ $SettingRole = $this->get_flit_data( 'user_role' );
1165
+ $SettingRole = apply_filters( 'wauc_pre_setting_roles' , $SettingRole );
1166
+
1167
+ if( !empty( $SettingRole ) ) {
1168
+ unset($SettingRole["UPFN"]);
1169
+
1170
+ $UserRole = $this->current_user_role_group();
1171
+
1172
+ if( !is_network_admin() && !empty( $UserRole ) ) {
1173
+ if( array_key_exists( $UserRole , $SettingRole ) ) {
1174
+
1175
+ $GetData = $this->get_flit_data( 'site' );
1176
+
1177
+ if( !empty( $GetData["admin_bar"] ) ) {
1178
+ if( $GetData["admin_bar"] == "hide" ) {
1179
+ add_filter( 'show_admin_bar' , '__return_false' );
1180
+ } elseif( $GetData["admin_bar"] == "front" ) {
1181
+ add_action( 'init' , array( $this , 'notice_dismiss' ) , 2 );
1182
+ add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_menu') , 25 );
1183
+ }
1184
+ }
1185
+ }
1186
+ }
1187
+ }
1188
+ }
1189
+
1190
+ // FilterStart
1191
+ function remove_action_front() {
1192
+ $GetData = get_option( $this->Record['site'] );
1193
+
1194
+ if( !empty( $GetData["UPFN"] ) ) {
1195
+ unset( $GetData["UPFN"] );
1196
+ foreach($GetData as $key => $val) {
1197
+ if( $key == 'feed_links' ) {
1198
+ remove_action( 'wp_head', $key , 2 );
1199
+ } elseif( $key == 'feed_links_extra' ) {
1200
+ remove_action( 'wp_head', $key , 3 );
1201
+ } else {
1202
+ remove_action( 'wp_head', $key );
1203
+ }
1204
+ }
1205
+ }
1206
+ }
1207
+
1208
+ // FilterStart
1209
+ function login_headerurl() {
1210
+ $GetData = get_option( $this->Record["loginscreen"] );
1211
+
1212
+ $url = __( 'http://wordpress.org/' );
1213
+ if( !empty( $GetData["UPFN"] ) ) {
1214
+ unset( $GetData["UPFN"] );
1215
+
1216
+ if( !empty( $GetData["login_headerurl"] ) ) {
1217
+ $url = strip_tags( $GetData["login_headerurl"] );
1218
+ $url = $this->val_replace( $url );
1219
+ }
1220
+ }
1221
+
1222
+ return $url;
1223
+ }
1224
+
1225
+ // FilterStart
1226
+ function login_headertitle() {
1227
+ $GetData = get_option( $this->Record["loginscreen"] );
1228
+
1229
+ $title = __( 'Powered by WordPress' );
1230
+ if( !empty( $GetData["UPFN"] ) ) {
1231
+ unset( $GetData["UPFN"] );
1232
+
1233
+ if( !empty( $GetData["login_headertitle"] ) ) {
1234
+ $title = strip_tags( $GetData["login_headertitle"] );
1235
+ $title = $this->val_replace( $title );
1236
+ }
1237
+ }
1238
+
1239
+ return $title;
1240
+ }
1241
+
1242
+ // FilterStart
1243
+ function login_head() {
1244
+ $GetData = get_option( $this->Record["loginscreen"] );
1245
+
1246
+ if( !empty( $GetData["UPFN"] ) ) {
1247
+ unset( $GetData["UPFN"] );
1248
+
1249
+ if( !empty( $GetData["login_headerlogo"] ) ) {
1250
+ $logo = strip_tags( $GetData["login_headerlogo"] );
1251
+ $logo = $this->val_replace( $logo );
1252
+
1253
+ echo '<style type="text/css">.login h1 a { background-image: url(' . $logo . '); }</style>';
1254
+ }
1255
+
1256
+ if( !empty( $GetData["login_css"] ) ) {
1257
+ $css = strip_tags( $GetData["login_css"] );
1258
+ $css = $this->val_replace( $css );
1259
+
1260
+ wp_enqueue_style( $this->PageSlug , $css , array() , $this->Ver );
1261
+ }
1262
+
1263
+ }
1264
+
1265
+ }
1266
+
1267
+ // FilterStart
1268
+ function login_footer() {
1269
+ $GetData = get_option( $this->Record["loginscreen"] );
1270
+
1271
+ if( !empty( $GetData["UPFN"] ) ) {
1272
+ unset( $GetData["UPFN"] );
1273
+
1274
+ if( !empty( $GetData["login_footer"] ) ) {
1275
+ $text = $this->val_replace( stripslashes( $GetData["login_footer"] ) );
1276
+
1277
+ echo $text;
1278
+ }
1279
+
1280
+ }
1281
+ }
1282
+
1283
+ // FilterStart
1284
+ function admin_bar_menu() {
1285
+ global $wp_admin_bar;
1286
+
1287
+ $GetData = $this->get_flit_data( 'admin_bar_menu' );
1288
+
1289
+ if( !empty( $GetData["UPFN"] ) ) {
1290
+ unset( $GetData["UPFN"] );
1291
+ if( is_array( $GetData ) ) {
1292
+
1293
+ $update_data = wp_get_update_data();
1294
+
1295
+ // remove all nodes
1296
+ $All_Nodes = $wp_admin_bar->get_nodes();
1297
+ foreach( $All_Nodes as $node ) {
1298
+ if( $node->id != 'top-secondary' ) {
1299
+ $wp_admin_bar->remove_node( $node->id );
1300
+ }
1301
+ }
1302
+
1303
+ // add nodes
1304
+ foreach($GetData as $Boxtype => $allnodes) {
1305
+ foreach($allnodes as $depth => $nodes) {
1306
+ foreach($nodes as $node) {
1307
+ $args = array( "id" => $node["id"] , "title" => stripslashes( $node["title"] ) , "href" => $node["href"] , "parent" => "" , "meta" => array() );
1308
+ if( strstr( $node["id"] , 'custom_node' ) ) {
1309
+ $args["href"] = $this->val_replace( $node["href"] );
1310
+ }
1311
+ if( $depth == 'sub' ) {
1312
+ $args["parent"] = $node["parent"];
1313
+ }
1314
+ if( $Boxtype == 'right' && $depth == 'main' ) {
1315
+ $args["parent"] = "top-secondary";
1316
+ }
1317
+ if( !empty( $node["meta"] ) ) {
1318
+ $args["meta"] = $node["meta"];
1319
+ }
1320
+ if( strstr( $args["title"] , '[comment_count]') ) {
1321
+ if ( !current_user_can('edit_posts') ) {
1322
+ continue;
1323
+ } else {
1324
+ $args["title"] = str_replace( '[comment_count]' , '<span class="ab-icon"></span><span id="ab-awaiting-mod" class="ab-label awaiting-mod pending-count count-[comment_count]">[comment_count_format]</span>' , $args["title"] );
1325
+ }
1326
+ }
1327
+ if( strstr( $args["title"] , '[update_total]') ) {
1328
+ if ( !$update_data['counts']['total'] ) {
1329
+ continue;
1330
+ } else {
1331
+ $args["title"] = str_replace( '[update_total]' , '<span class="ab-icon"></span><span class="ab-label">[update_total_format]</span>' , $args["title"] );
1332
+ }
1333
+ }
1334
+ if( strstr( $args["title"] , '[update_plugins]') ) {
1335
+ if ( !$update_data['counts']['plugins'] ) {
1336
+ continue;
1337
+ } else {
1338
+ $args["title"] = str_replace( '[update_plugins]' , '[update_plugins_format]' , $args["title"] );
1339
+ }
1340
+ }
1341
+ if( strstr( $args["title"] , '[update_themes]') ) {
1342
+ if ( !$update_data['counts']['themes'] ) {
1343
+ continue;
1344
+ } else {
1345
+ $args["title"] = str_replace( '[update_themes]' , '[update_themes_format]' , $args["title"] );
1346
+ }
1347
+ }
1348
+ $args["title"] = $this->val_replace( $args["title"] );
1349
+
1350
+ if( $args["id"] == 'logout' ) {
1351
+ $args["href"] = wp_logout_url();
1352
+ }
1353
+ $wp_admin_bar->add_menu( $args );
1354
+ }
1355
+ }
1356
+ }
1357
+ }
1358
+ }
1359
+ }
1360
+
1361
+ // FilterStart
1362
+ function notice_dismiss() {
1363
+ $GetData = $this->get_flit_data( 'admin_general' );
1364
+
1365
+ if( !empty( $GetData["UPFN"] ) ) {
1366
+
1367
+ if( !empty( $GetData["notice_update_core"] ) ) {
1368
+ add_filter( 'update_footer' , '__return_false' , 20) ;
1369
+ add_filter( 'site_transient_update_core' , array( $this , 'notice_update_core' ) );
1370
+ }
1371
+
1372
+ if( !empty( $GetData["notice_update_plugin"] ) ) {
1373
+ add_filter( 'site_transient_update_plugins' , array( $this , 'notice_update_plugin' ) );
1374
+ }
1375
+ if( !empty( $GetData["notice_update_theme"] ) ) {
1376
+ add_filter( 'site_transient_update_themes' , array( $this , 'notice_update_theme' ) );
1377
+ }
1378
+
1379
+ }
1380
+
1381
+ }
1382
+
1383
+ // FilterStart
1384
+ function notice_update_core( $site_transient_update_core ) {
1385
+ $site_transient_update_core->updates[0]->response = 'latest';
1386
+
1387
+ return $site_transient_update_core;
1388
+ }
1389
+
1390
+ // FilterStart
1391
+ function notice_update_plugin( $site_transient_update_plugins ) {
1392
+ unset( $site_transient_update_plugins->response );
1393
+
1394
+ return $site_transient_update_plugins;
1395
+ }
1396
+
1397
+ // FilterStart
1398
+ function notice_update_theme( $site_transient_update_themes ) {
1399
+ unset( $site_transient_update_themes->response );
1400
+
1401
+ return $site_transient_update_themes;
1402
+ }
1403
+
1404
+ // FilterStart
1405
+ function remove_tab() {
1406
+ $GetData = $this->get_flit_data( 'admin_general' );
1407
+
1408
+ if( !empty( $GetData["UPFN"] ) ) {
1409
+ unset( $GetData["UPFN"] );
1410
+
1411
+ if( !empty( $GetData["help_tab"] ) ) {
1412
+ $screen = get_current_screen();
1413
+ $screen->remove_help_tabs();
1414
+ }
1415
+
1416
+ if( !empty( $GetData["screen_option_tab"] ) ) {
1417
+ add_filter( 'screen_options_show_screen' , '__return_false' );
1418
+ }
1419
+ }
1420
+
1421
+ }
1422
+
1423
+ // FilterStart
1424
+ function admin_footer_text( $text ) {
1425
+ $GetData = $this->get_flit_data( 'admin_general' );
1426
+
1427
+ $footer_text = $text;
1428
+ if( !empty( $GetData["UPFN"] ) ) {
1429
+ unset( $GetData["UPFN"] );
1430
+
1431
+ $footer_text = $this->val_replace( stripslashes( $GetData["footer_text"] ) );
1432
+ }
1433
+
1434
+ return $footer_text;
1435
+ }
1436
+
1437
+ // FilterStart
1438
+ function load_css() {
1439
+ $GetData = $this->get_flit_data( 'admin_general' );
1440
+
1441
+ if( !empty( $GetData["UPFN"] ) ) {
1442
+ unset( $GetData["UPFN"] );
1443
+
1444
+ if( !empty( $GetData["css"] ) ) {
1445
+
1446
+ $css = strip_tags( $GetData["css"] );
1447
+ $css = $this->val_replace( $css );
1448
+
1449
+ wp_enqueue_style( $this->PageSlug , strip_tags( $css ) , array() , $this->Ver );
1450
+ }
1451
+
1452
+ }
1453
+
1454
+ }
1455
+
1456
+ // FilterStart
1457
+ function wp_dashboard_setup() {
1458
+ global $wp_meta_boxes;
1459
+
1460
+ $GetData = $this->get_flit_data( 'dashboard' );
1461
+
1462
+ if( !empty( $GetData ) && is_array( $GetData ) ) {
1463
+ unset($GetData["UPFN"]);
1464
+ $dashboard_widgets = array();
1465
+ foreach($wp_meta_boxes["dashboard"] as $ns => $core) {
1466
+ if( !empty( $core["core"] ) ) {
1467
+ foreach($core["core"] as $id => $val) {
1468
+ $dashboard_widgets[$id] = $ns;
1469
+ }
1470
+ }
1471
+ }
1472
+
1473
+ foreach($GetData as $id => $val) {
1474
+ if( $id == 'show_welcome_panel' ) {
1475
+ $user_id = get_current_user_id();
1476
+ if( get_user_meta( $user_id , 'show_welcome_panel' , true ) == true ) {
1477
+ update_user_meta( $user_id , 'show_welcome_panel' , 0 );
1478
+ }
1479
+ } elseif( array_key_exists( $id , $dashboard_widgets ) ){
1480
+ remove_meta_box( $id , 'dashboard' , $dashboard_widgets[$id] );
1481
+ } elseif( $id == 'metabox_move' ) {
1482
+ wp_enqueue_script( 'not-move' , $this->Url . 'js/dashboard/not_move.js' , array( 'jquery' , 'jquery-ui-sortable' , 'dashboard' ) , $this->Ver , true );
1483
+ }
1484
+ }
1485
+ }
1486
+
1487
+ }
1488
+
1489
+ // FilterStart
1490
+ function removemetabox() {
1491
+ global $wp_meta_boxes;
1492
+ global $current_screen;
1493
+
1494
+ $GetData = $this->get_flit_data( 'removemetabox' );
1495
+
1496
+ if( !empty( $GetData["UPFN"] ) ) {
1497
+ unset( $GetData["UPFN"] );
1498
+
1499
+ if( !empty( $GetData ) && is_array( $GetData ) ) {
1500
+
1501
+ if( $current_screen->base == 'post' ) {
1502
+
1503
+ global $post_type;
1504
+
1505
+ if( !empty( $GetData[$post_type] ) ) {
1506
+
1507
+ $Metaboxes = $wp_meta_boxes[$post_type];
1508
+ $Data = $GetData[$post_type];
1509
+
1510
+ $Remove_metaboxes = array();
1511
+ foreach( $Metaboxes as $context => $meta_box ) {
1512
+ foreach( $meta_box as $priority => $box ) {
1513
+ foreach( $box as $metabox_id => $b ) {
1514
+ if( array_key_exists( $metabox_id , $Data ) ) {
1515
+ $Remove_metaboxes[$metabox_id] = array( "context" => $context , "priority" => $priority );
1516
+ }
1517
+ }
1518
+ }
1519
+ }
1520
+
1521
+ }
1522
+
1523
+ if( !empty( $Remove_metaboxes ) ) {
1524
+ foreach( $Remove_metaboxes as $metabox_id => $box ) {
1525
+ remove_meta_box( $metabox_id , $post_type , $box["context"] );
1526
+ }
1527
+ }
1528
+
1529
+ }
1530
+ }
1531
+ }
1532
+
1533
+ }
1534
+
1535
+ // FilterStart
1536
+ function sidemenu() {
1537
+ global $menu;
1538
+ global $submenu;
1539
+
1540
+ $GetData = $this->get_flit_data( 'sidemenu' );
1541
+ $General = $this->get_flit_data( 'admin_general' );
1542
+
1543
+ if( !empty( $GetData["UPFN"] ) ) {
1544
+ unset( $GetData["UPFN"] );
1545
+
1546
+ if( !empty( $GetData ) && is_array( $GetData ) && !empty( $GetData["main"] ) ) {
1547
+ $SetMain_menu = array();
1548
+ $SetMain_submenu = array();
1549
+
1550
+ $separator_menu = array();
1551
+ foreach( $menu as $key => $ms ) {
1552
+ if( strstr( $ms[2] , 'separator' ) ) {
1553
+ $separator_menu = $ms;
1554
+ break;
1555
+ }
1556
+ }
1557
+
1558
+ foreach($GetData["main"] as $mm_pos => $mm) {
1559
+ if($mm["slug"] == 'separator') {
1560
+ $SetMain_menu[] = $separator_menu;
1561
+ } else {
1562
+ $gm_search = false;
1563
+ foreach($menu as $gm_pos => $gm) {
1564
+ if($mm["slug"] == $gm[2]) {
1565
+ if( strstr( $mm["title"] , '[comment_count]') ) {
1566
+ $mm["title"] = str_replace( '[comment_count]' , '<span class="update-plugins count-[comment_count]"><span class="theme-count">[comment_count_format]</span></span>' , $mm["title"] );
1567
+ }
1568
+ if( strstr( $mm["title"] , '[update_total]') ) {
1569
+ $mm["title"] = str_replace( '[update_total]' , '<span class="update-plugins count-[update_total]"><span class="update-count">[update_total_format]</span></span>' , $mm["title"] );
1570
+ }
1571
+ if( strstr( $mm["title"] , '[update_plugins]') ) {
1572
+ $mm["title"] = str_replace( '[update_plugins]' , '<span class="update-plugins count-[update_plugins]"><span class="plugin-count">[update_plugins_format]</span></span>' , $mm["title"] );
1573
+ }
1574
+ if( strstr( $mm["title"] , '[update_themes]') ) {
1575
+ $mm["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $mm["title"] );
1576
+ }
1577
+ $menu[$gm_pos][0] = $this->val_replace( $mm["title"] );
1578
+ $SetMain_menu[] = $menu[$gm_pos];
1579
+ $gm_search = true;
1580
+ break;
1581
+ }
1582
+ }
1583
+ if( empty( $gm_search ) ) {
1584
+ foreach($submenu as $gsm_parent_slug => $v) {
1585
+ foreach($v as $gsm_pos => $gsm) {
1586
+ if($mm["slug"] == $gsm[2]) {
1587
+
1588
+ foreach($menu as $tmp_m) {
1589
+ if( $tmp_m[2] == $gsm_parent_slug) {
1590
+ $submenu[$gsm_parent_slug][$gsm_pos][4] = $tmp_m[4];
1591
+ break;
1592
+ }
1593
+ }
1594
+ if( strstr( $mm["title"] , '[comment_count]') ) {
1595
+ $mm["title"] = str_replace( '[comment_count]' , '<span class="update-plugins count-[comment_count]"><span class="theme-count">[comment_count_format]</span></span>' , $mm["title"] );
1596
+ }
1597
+ if( strstr( $mm["title"] , '[update_total]') ) {
1598
+ $mm["title"] = str_replace( '[update_total]' , '<span class="update-plugins count-[update_total]"><span class="update-count">[update_total_format]</span></span>' , $mm["title"] );
1599
+ }
1600
+ if( strstr( $mm["title"] , '[update_plugins]') ) {
1601
+ $mm["title"] = str_replace( '[update_plugins]' , '<span class="update-plugins count-[update_plugins]"><span class="plugin-count">[update_plugins_format]</span></span>' , $mm["title"] );
1602
+ }
1603
+ if( strstr( $mm["title"] , '[update_themes]') ) {
1604
+ $mm["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $mm["title"] );
1605
+ }
1606
+ $submenu[$gsm_parent_slug][$gsm_pos][0] = $this->val_replace( $mm["title"] );
1607
+ $SetMain_menu[] = $submenu[$gsm_parent_slug][$gsm_pos];
1608
+
1609
+ }
1610
+ }
1611
+ }
1612
+ }
1613
+ }
1614
+ }
1615
+
1616
+ if( !empty( $GetData["sub"] ) ) {
1617
+ foreach($GetData["sub"] as $sm_pos => $sm) {
1618
+ if($sm["slug"] == 'separator') {
1619
+ $SetMain_submenu[$sm["parent_slug"]][] = $separator_menu;
1620
+ } else {
1621
+ $gm_search = false;
1622
+ foreach($menu as $gm_pos => $gm) {
1623
+ if($sm["slug"] == $gm[2]) {
1624
+ if( strstr( $sm["title"] , '[comment_count]') ) {
1625
+ $sm["title"] = str_replace( '[comment_count]' , '<span class="update-plugins count-[comment_count]"><span class="theme-count">[comment_count_format]</span></span>' , $sm["title"] );
1626
+ }
1627
+ if( strstr( $sm["title"] , '[update_total]') ) {
1628
+ $sm["title"] = str_replace( '[update_total]' , '<span class="update-plugins count-[update_total]"><span class="update-count">[update_total_format]</span></span>' , $sm["title"] );
1629
+ }
1630
+ if( strstr( $sm["title"] , '[update_plugins]') ) {
1631
+ $sm["title"] = str_replace( '[update_plugins]' , '<span class="update-plugins count-[update_plugins]"><span class="plugin-count">[update_plugins_format]</span></span>' , $sm["title"] );
1632
+ }
1633
+ if( strstr( $sm["title"] , '[update_themes]') ) {
1634
+ $sm["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $sm["title"] );
1635
+ }
1636
+ $menu[$gm_pos][0] = $this->val_replace( $sm["title"] );
1637
+ $SetMain_submenu[$sm["parent_slug"]][] = $menu[$gm_pos];
1638
+ $gm_search = true;
1639
+ break;
1640
+ }
1641
+ }
1642
+ if( empty( $gm_search ) ) {
1643
+ foreach($submenu as $gsm_parent_slug => $v) {
1644
+ foreach($v as $gsm_pos => $gsm) {
1645
+ if($sm["slug"] == $gsm[2]) {
1646
+
1647
+ if( strstr( $sm["title"] , '[comment_count]') ) {
1648
+ $sm["title"] = str_replace( '[comment_count]' , '<span class="update-plugins count-[comment_count]"><span class="theme-count">[comment_count_format]</span></span>' , $sm["title"] );
1649
+ }
1650
+ if( strstr( $sm["title"] , '[update_total]') ) {
1651
+ $sm["title"] = str_replace( '[update_total]' , '<span class="update-plugins count-[update_total]"><span class="update-count">[update_total_format]</span></span>' , $sm["title"] );
1652
+ }
1653
+ if( strstr( $sm["title"] , '[update_plugins]') ) {
1654
+ $sm["title"] = str_replace( '[update_plugins]' , '<span class="update-plugins count-[update_plugins]"><span class="plugin-count">[update_plugins_format]</span></span>' , $sm["title"] );
1655
+ }
1656
+ if( strstr( $sm["title"] , '[update_themes]') ) {
1657
+ $sm["title"] = str_replace( '[update_themes]' , '<span class="update-plugins count-[update_themes]"><span class="theme-count">[update_themes_format]</span></span>' , $sm["title"] );
1658
+ }
1659
+ $submenu[$gsm_parent_slug][$gsm_pos][0] = $this->val_replace( $sm["title"] );
1660
+ $SetMain_submenu[$sm["parent_slug"]][] = $submenu[$gsm_parent_slug][$gsm_pos];
1661
+ }
1662
+ }
1663
+ }
1664
+ }
1665
+ }
1666
+ }
1667
+ }
1668
+
1669
+ $menu = $SetMain_menu;
1670
+ $submenu = $SetMain_submenu;
1671
+
1672
+ } else {
1673
+ // empty menu
1674
+ $menu = array();
1675
+ }
1676
+ }
1677
+ }
1678
+
1679
+ // FilterStart
1680
+ function add_edit_post_change_permalink( $permalink_html ) {
1681
+ $GetData = $this->get_flit_data( 'post_add_edit' );
1682
+
1683
+ if( !empty( $GetData["UPFN"] ) ) {
1684
+ unset( $GetData["UPFN"] );
1685
+
1686
+ if( !empty( $GetData ) && is_array( $GetData ) ) {
1687
+ if( !empty( $GetData["default_permalink"] ) ) {
1688
+ if( strpos( $permalink_html , 'change-permalinks' ) ) {
1689
+
1690
+ $permalink_html = preg_replace( "/<span id=\"change-permalinks\">(.*)<\/span>/" , "" , $permalink_html );
1691
+
1692
+ }
1693
+ }
1694
+ }
1695
+ }
1696
+
1697
+ return $permalink_html;
1698
+ }
1699
+
1700
+ // FilterStart
1701
+ function allow_comments() {
1702
+ global $current_screen;
1703
+
1704
+ $PostAddEdit = $this->get_flit_data( 'post_add_edit' );
1705
+ $RemoveMetaBox = $this->get_flit_data( 'removemetabox' );
1706
+
1707
+ if( !empty( $PostAddEdit["UPFN"] ) && !empty( $RemoveMetaBox["UPFN"] ) ) {
1708
+ if( $current_screen->action == 'add' ) {
1709
+ if( !empty( $RemoveMetaBox[$current_screen->id]["commentstatusdiv"] ) && !empty( $PostAddEdit["allow_comments"] ) ) {
1710
+ $comment_status = get_option( 'default_comment_status' );
1711
+ $comment_status = apply_filters( 'wauc_pre_get_comment_status' , $comment_status );
1712
+ if( $comment_status == 'open' ) {
1713
+ echo '<input name="comment_status" type="hidden" id="comment_status" value="open" />';
1714
+ }
1715
+ }
1716
+ }
1717
+
1718
+ }
1719
+
1720
+ }
1721
+
1722
+ // FilterStart
1723
+ function admin_title( $title ) {
1724
+ $GetData = $this->get_flit_data( 'admin_general' );
1725
+
1726
+ if( !empty( $GetData["UPFN"] ) ) {
1727
+ unset( $GetData["UPFN"] );
1728
+
1729
+ if( !empty( $GetData["title_tag"] ) ) {
1730
+ if( strpos( $title , ' WordPress' ) ) {
1731
+ $title = str_replace( " &#8212; WordPress" , "" , $title );
1732
+ }
1733
+ }
1734
+ }
1735
+
1736
+ return $title;
1737
+ }
1738
+
1739
+ // FilterStart
1740
+ function nav_menus() {
1741
+ $GetData = $this->get_flit_data( 'appearance_menus' );
1742
+ if( !empty( $GetData["UPFN"] ) ) {
1743
+ unset( $GetData["UPFN"] );
1744
+
1745
+ if( !empty( $GetData["add_new_menu"] ) ) {
1746
+ global $wp_version;
1747
+ if ( version_compare( $wp_version , '3.6' , '>=' ) ) {
1748
+ echo '<style>.wrap > .manage-menus, .locations-row-links .locations-add-menu-link { display: none; }</style>';
1749
+ } else {
1750
+ echo '<style>.nav-tabs .menu-add-new { display: none; }</style>';
1751
+ }
1752
+ }
1753
+ if( !empty( $GetData["delete_menu"] ) ) {
1754
+ echo '<style>.major-publishing-actions .delete-action { display: none; }</style>';
1755
+ }
1756
+
1757
+ }
1758
+ }
1759
+
1760
+ // FilterStart
1761
+ function layout_footer( $text ) {
1762
+ $text = '<img src="' . $this->Schema . 'www.gravatar.com/avatar/7e05137c5a859aa987a809190b979ed4?s=18" width="18" /> Plugin developer : <a href="' . $this->AuthorUrl . '?utm_source=use_plugin&utm_medium=footer&utm_content=' . $this->ltd . '&utm_campaign=' . str_replace( '.' , '_' , $this->Ver ) . '" target="_blank">gqevu6bsiz</a>';
1763
+ return $text;
1764
+ }
1765
+
1766
+ // FilterStart
1767
+ function DisplayDonation() {
1768
+ $donation = get_option( $this->Record["donate"] );
1769
+ if( $this->DonateKey != $donation ) {
1770
+ $this->Msg .= '<div class="error"><p><strong>' . __( 'Thank you for considering donate.' , $this->ltd_p ) . '</strong> <a href="' . self_admin_url( 'admin.php?page=' . $this->PageSlug ) . '">' . __( 'Donate' , $this->ltd_p ) . '</a></p></div>';
1771
+ }
1772
+ }
1773
+
1774
+ }
1775
+ $wauc = new WP_Admin_UI_Customize();
1776
+
1777
+