Version Description
- Added: Some filters/actions.
- Fixed: Show icon sidebar/admin bar customize settings.
Download this release
Release Info
Developer | gqevu6bsiz |
Plugin | WP Admin UI Customize |
Version | 1.5.11 |
Comparing to | |
See all releases |
Code changes from version 1.5.10 to 1.5.11
- inc/setting_admin_bar_menu.php +9 -5
- inc/setting_default.php +1 -1
- inc/setting_sidemenu.php +9 -0
- readme.txt +7 -3
- wp-admin-ui-customize.php +168 -27
inc/setting_admin_bar_menu.php
CHANGED
@@ -186,16 +186,20 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
186 |
<?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
|
187 |
|
188 |
<style>
|
189 |
-
body.wp-admin-ui-customize_page_wp_admin_ui_customize_admin_bar .postbox .inside .widget.wp-logo .widget-top .widget-title h4 .ab-icon,
|
190 |
-
body.wp-admin-ui-customize_page_wp_admin_ui_customize_admin_bar .postbox .inside .widget.updates .widget-top .widget-title h4 .ab-icon,
|
191 |
-
body.wp-admin-ui-customize_page_wp_admin_ui_customize_admin_bar .postbox .inside .widget.comments .widget-top .widget-title h4 .ab-icon,
|
192 |
-
body.wp-admin-ui-customize_page_wp_admin_ui_customize_admin_bar .postbox .inside .widget.new-content .widget-top .widget-title h4 .ab-icon
|
193 |
-
{ background-image: url(../wp-includes/images/admin-bar-sprite.png); }
|
194 |
.widget h4 {
|
195 |
padding: 10px 15px;
|
196 |
}
|
197 |
.widget-top a.widget-action {
|
198 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
200 |
.widget.ui-draggable-dragging {
|
201 |
min-width: 170px;
|
186 |
<?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>
|
187 |
|
188 |
<style>
|
|
|
|
|
|
|
|
|
|
|
189 |
.widget h4 {
|
190 |
padding: 10px 15px;
|
191 |
}
|
192 |
.widget-top a.widget-action {
|
193 |
cursor: pointer;
|
194 |
+
display: inline-block;
|
195 |
+
}
|
196 |
+
.widget-top a.widget-action:focus {
|
197 |
+
box-shadow: none;
|
198 |
+
}
|
199 |
+
.widget-top a.widget-action:before {
|
200 |
+
display: inline-block;
|
201 |
+
content: "\f140";
|
202 |
+
font: normal 20px/1 dashicons;
|
203 |
}
|
204 |
.widget.ui-draggable-dragging {
|
205 |
min-width: 170px;
|
inc/setting_default.php
CHANGED
@@ -31,7 +31,7 @@ WP Admin UI Customize allows the management UI for different user roles to be cu
|
|
31 |
<div class="stuffbox" id="aboutbox">
|
32 |
<h3><span class="hndle"><?php _e( 'About plugin' , 'wp-admin-ui-customize' ); ?></span></h3>
|
33 |
<div class="inside">
|
34 |
-
<p><?php _e( 'Tested with WordPress versions' , 'wp-admin-ui-customize' ); ?> : 4.2 - 4.
|
35 |
<ul>
|
36 |
<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 site' , 'wp-admin-ui-customize' ); ?></a></li>
|
37 |
<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 site' , 'wp-admin-ui-customize' ); ?></a></li>
|
31 |
<div class="stuffbox" id="aboutbox">
|
32 |
<h3><span class="hndle"><?php _e( 'About plugin' , 'wp-admin-ui-customize' ); ?></span></h3>
|
33 |
<div class="inside">
|
34 |
+
<p><?php _e( 'Tested with WordPress versions' , 'wp-admin-ui-customize' ); ?> : 4.2 - 4.8</p>
|
35 |
<ul>
|
36 |
<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 site' , 'wp-admin-ui-customize' ); ?></a></li>
|
37 |
<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 site' , 'wp-admin-ui-customize' ); ?></a></li>
|
inc/setting_sidemenu.php
CHANGED
@@ -250,6 +250,15 @@ wp_enqueue_style( $this->PageSlug , $this->Url . $this->PluginSlug . '.css', arr
|
|
250 |
}
|
251 |
.widget-top a.widget-action {
|
252 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
}
|
254 |
</style>
|
255 |
<script type="text/javascript">
|
250 |
}
|
251 |
.widget-top a.widget-action {
|
252 |
cursor: pointer;
|
253 |
+
display: inline-block;
|
254 |
+
}
|
255 |
+
.widget-top a.widget-action:focus {
|
256 |
+
box-shadow: none;
|
257 |
+
}
|
258 |
+
.widget-top a.widget-action:before {
|
259 |
+
display: inline-block;
|
260 |
+
content: "\f140";
|
261 |
+
font: normal 20px/1 dashicons;
|
262 |
}
|
263 |
</style>
|
264 |
<script type="text/javascript">
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WP Admin UI Customize ===
|
2 |
Contributors: gqevu6bsiz
|
3 |
-
Donate link: http://gqevu6bsiz.chicappa.jp/please-donation/?utm_source=wporg&utm_medium=donate&utm_content=wauc&utm_campaign=
|
4 |
Tags: admin, post, posts, page, option, sitemenu, menu, custom, customize, dashboard, admin_bar, multisite, network, metabox
|
5 |
Requires at least: 4.2
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
@@ -50,6 +50,10 @@ These to Customization is possible.
|
|
50 |
|
51 |
== Changelog ==
|
52 |
|
|
|
|
|
|
|
|
|
53 |
= 1.5.10 =
|
54 |
* Changed: More labels and texts.
|
55 |
* Removed: Donate message.
|
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_5_11
|
4 |
Tags: admin, post, posts, page, option, sitemenu, menu, custom, customize, dashboard, admin_bar, multisite, network, metabox
|
5 |
Requires at least: 4.2
|
6 |
+
Tested up to: 4.8
|
7 |
+
Stable tag: 1.5.11
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
50 |
|
51 |
== Changelog ==
|
52 |
|
53 |
+
= 1.5.11 =
|
54 |
+
* Added: Some filters/actions.
|
55 |
+
* Fixed: Show icon sidebar/admin bar customize settings.
|
56 |
+
|
57 |
= 1.5.10 =
|
58 |
* Changed: More labels and texts.
|
59 |
* Removed: Donate message.
|
wp-admin-ui-customize.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
/*
|
3 |
Plugin Name: WP Admin UI Customize
|
4 |
Description: An excellent plugin to customize the Wordpress management UI.
|
5 |
-
Plugin URI: http://wpadminuicustomize.com/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=
|
6 |
-
Version: 1.5.
|
7 |
Author: gqevu6bsiz
|
8 |
-
Author URI: http://gqevu6bsiz.chicappa.jp/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=
|
9 |
Text Domain: wp-admin-ui-customize
|
10 |
Domain Path: /languages
|
11 |
*/
|
@@ -57,7 +57,7 @@ class WP_Admin_UI_Customize
|
|
57 |
|
58 |
|
59 |
function __construct() {
|
60 |
-
$this->Ver = '1.5.
|
61 |
$this->Name = 'WP Admin UI Customize';
|
62 |
$this->Dir = plugin_dir_path( __FILE__ );
|
63 |
$this->Url = plugin_dir_url( __FILE__ );
|
@@ -412,7 +412,11 @@ class WP_Admin_UI_Customize
|
|
412 |
global $wp_admin_bar;
|
413 |
|
414 |
$this->Admin_bar = $wp_admin_bar->get_nodes();
|
415 |
-
|
|
|
|
|
|
|
|
|
416 |
// Other plugin
|
417 |
if( !empty( $this->ActivatedPlugin ) ) {
|
418 |
|
@@ -448,20 +452,42 @@ class WP_Admin_UI_Customize
|
|
448 |
}
|
449 |
}
|
450 |
}
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
}
|
460 |
}
|
461 |
}
|
462 |
}
|
463 |
|
464 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
}
|
466 |
|
467 |
// SetList
|
@@ -619,7 +645,15 @@ class WP_Admin_UI_Customize
|
|
619 |
}
|
620 |
|
621 |
}
|
622 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
623 |
return $Filter_bar;
|
624 |
}
|
625 |
|
@@ -838,6 +872,15 @@ class WP_Admin_UI_Customize
|
|
838 |
if( !isset( $menu_widget["group"] ) ) $menu_widget["group"] = 0;
|
839 |
if( !isset( $menu_widget["meta"]["class"] ) ) $menu_widget["meta"]["class"] = "";
|
840 |
$no_submenu = array( 'search' , 'bp-notifications' , 'languages' , 'menu-toggle' , 'post_list' , 'page_list' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
841 |
$activated_plugin = $this->ActivatedPlugin;
|
842 |
$other_plugin = $this->OtherPluginMenu;
|
843 |
|
@@ -865,7 +908,7 @@ class WP_Admin_UI_Customize
|
|
865 |
<?php elseif( preg_match( '/\<form/' , $menu_widget["title"] ) ) : ?>
|
866 |
<?php echo $menu_widget["id"]; ?>
|
867 |
<?php else: ?>
|
868 |
-
<?php echo $menu_widget["title"]; ?>
|
869 |
: <span class="in-widget-title"><?php echo $menu_widget["id"]; ?></span>
|
870 |
<?php endif; ?>
|
871 |
</h4>
|
@@ -909,7 +952,22 @@ class WP_Admin_UI_Customize
|
|
909 |
<?php endif; ?>
|
910 |
<?php endforeach; ?>
|
911 |
<?php endif; ?>
|
912 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
913 |
<input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" readonly="readonly" /><br />
|
914 |
<?php else : ?>
|
915 |
<input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" />
|
@@ -986,6 +1044,15 @@ class WP_Admin_UI_Customize
|
|
986 |
$all_custom_posts = get_post_types( $args , 'objects' );
|
987 |
|
988 |
$exclusion = array( "post" , "page" , "attachment" , "revision" , "nav_menu_item");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
989 |
$custom_posts = array();
|
990 |
foreach($all_custom_posts as $post_type => $cpt) {
|
991 |
if( !in_array( $post_type , $exclusion ) ) {
|
@@ -1155,6 +1222,14 @@ class WP_Admin_UI_Customize
|
|
1155 |
|
1156 |
}
|
1157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1158 |
}
|
1159 |
|
1160 |
return $str;
|
@@ -1360,7 +1435,14 @@ class WP_Admin_UI_Customize
|
|
1360 |
}
|
1361 |
}
|
1362 |
|
1363 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1364 |
update_option( $Record , $Update );
|
1365 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1366 |
exit;
|
@@ -1380,7 +1462,10 @@ class WP_Admin_UI_Customize
|
|
1380 |
}
|
1381 |
}
|
1382 |
|
1383 |
-
|
|
|
|
|
|
|
1384 |
update_option( $Record , $Update );
|
1385 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1386 |
exit;
|
@@ -1400,7 +1485,10 @@ class WP_Admin_UI_Customize
|
|
1400 |
}
|
1401 |
}
|
1402 |
|
1403 |
-
|
|
|
|
|
|
|
1404 |
update_option( $Record , $Update );
|
1405 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1406 |
exit;
|
@@ -1455,7 +1543,10 @@ class WP_Admin_UI_Customize
|
|
1455 |
}
|
1456 |
}
|
1457 |
|
1458 |
-
|
|
|
|
|
|
|
1459 |
update_option( $Record , $Update );
|
1460 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1461 |
exit;
|
@@ -1485,7 +1576,10 @@ class WP_Admin_UI_Customize
|
|
1485 |
}
|
1486 |
}
|
1487 |
|
1488 |
-
|
|
|
|
|
|
|
1489 |
update_option( $Record , $Update );
|
1490 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1491 |
exit;
|
@@ -1510,7 +1604,10 @@ class WP_Admin_UI_Customize
|
|
1510 |
}
|
1511 |
}
|
1512 |
|
1513 |
-
|
|
|
|
|
|
|
1514 |
update_option( $Record , $Update );
|
1515 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1516 |
exit;
|
@@ -1530,7 +1627,10 @@ class WP_Admin_UI_Customize
|
|
1530 |
}
|
1531 |
}
|
1532 |
|
1533 |
-
|
|
|
|
|
|
|
1534 |
update_option( $Record , $Update );
|
1535 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1536 |
exit;
|
@@ -1550,7 +1650,10 @@ class WP_Admin_UI_Customize
|
|
1550 |
}
|
1551 |
}
|
1552 |
|
1553 |
-
|
|
|
|
|
|
|
1554 |
update_option( $Record , $Update );
|
1555 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1556 |
exit;
|
@@ -1570,7 +1673,10 @@ class WP_Admin_UI_Customize
|
|
1570 |
}
|
1571 |
}
|
1572 |
|
1573 |
-
|
|
|
|
|
|
|
1574 |
update_option( $Record , $Update );
|
1575 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1576 |
exit;
|
@@ -1587,7 +1693,10 @@ class WP_Admin_UI_Customize
|
|
1587 |
$Update["edit_cap"] = strip_tags( $_POST["data"]["edit_cap"] );
|
1588 |
}
|
1589 |
|
1590 |
-
|
|
|
|
|
|
|
1591 |
update_option( $Record , $Update );
|
1592 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1593 |
exit;
|
@@ -2031,6 +2140,15 @@ class WP_Admin_UI_Customize
|
|
2031 |
}
|
2032 |
}
|
2033 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2034 |
// add main nodes
|
2035 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
2036 |
foreach($allnodes as $node_type => $nodes) {
|
@@ -2072,6 +2190,13 @@ class WP_Admin_UI_Customize
|
|
2072 |
}
|
2073 |
}
|
2074 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2075 |
}
|
2076 |
}
|
2077 |
|
@@ -2458,7 +2583,23 @@ class WP_Admin_UI_Customize
|
|
2458 |
|
2459 |
}
|
2460 |
$submenu = $SetMain_submenu;
|
2461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2462 |
} else {
|
2463 |
// empty menu
|
2464 |
$menu = array();
|
2 |
/*
|
3 |
Plugin Name: WP Admin UI Customize
|
4 |
Description: An excellent plugin to customize the Wordpress management UI.
|
5 |
+
Plugin URI: http://wpadminuicustomize.com/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=1_5_11
|
6 |
+
Version: 1.5.11
|
7 |
Author: gqevu6bsiz
|
8 |
+
Author URI: http://gqevu6bsiz.chicappa.jp/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=1_5_11
|
9 |
Text Domain: wp-admin-ui-customize
|
10 |
Domain Path: /languages
|
11 |
*/
|
57 |
|
58 |
|
59 |
function __construct() {
|
60 |
+
$this->Ver = '1.5.11';
|
61 |
$this->Name = 'WP Admin UI Customize';
|
62 |
$this->Dir = plugin_dir_path( __FILE__ );
|
63 |
$this->Url = plugin_dir_url( __FILE__ );
|
412 |
global $wp_admin_bar;
|
413 |
|
414 |
$this->Admin_bar = $wp_admin_bar->get_nodes();
|
415 |
+
|
416 |
+
if ( ! isset( $this->OtherPluginMenu["admin_bar"] ) ) {
|
417 |
+
$this->OtherPluginMenu["admin_bar"] = array();
|
418 |
+
}
|
419 |
+
|
420 |
// Other plugin
|
421 |
if( !empty( $this->ActivatedPlugin ) ) {
|
422 |
|
452 |
}
|
453 |
}
|
454 |
}
|
455 |
+
|
456 |
+
}
|
457 |
+
|
458 |
+
/**
|
459 |
+
* Change the default load for the admin bar other plugins.
|
460 |
+
* @since 1.5.11
|
461 |
+
* @param array $OtherPluginMenu The other plugin node IDs.
|
462 |
+
* @param array $Admin_bar The admin bar nodes.
|
463 |
+
* @return array
|
464 |
+
*/
|
465 |
+
$this->OtherPluginMenu["admin_bar"] = apply_filters(
|
466 |
+
'wauc_admin_bar_default_load_other_plugin_menu',
|
467 |
+
$this->OtherPluginMenu["admin_bar"],
|
468 |
+
$this->Admin_bar
|
469 |
+
);
|
470 |
+
|
471 |
+
if( !empty( $this->OtherPluginMenu["admin_bar"] ) ) {
|
472 |
+
for($i = 0; $i < 4; $i++) {
|
473 |
+
foreach( $this->OtherPluginMenu["admin_bar"] as $plugin_slug => $plugin_menu ) {
|
474 |
+
foreach( $this->Admin_bar as $node_id => $node ) {
|
475 |
+
if( !empty( $node->parent ) && array_key_exists( $node->parent , $plugin_menu ) ) {
|
476 |
+
$this->OtherPluginMenu["admin_bar"][$plugin_slug][$node_id] = 1;
|
477 |
}
|
478 |
}
|
479 |
}
|
480 |
}
|
481 |
|
482 |
}
|
483 |
+
|
484 |
+
/**
|
485 |
+
* Change the default load for the admin bar.
|
486 |
+
* @since 1.5.11
|
487 |
+
* @param array $Admin_bar The admin bar nodes.
|
488 |
+
* @return array
|
489 |
+
*/
|
490 |
+
$this->Admin_bar = apply_filters( 'wauc_admin_bar_default_load', $this->Admin_bar );
|
491 |
}
|
492 |
|
493 |
// SetList
|
645 |
}
|
646 |
|
647 |
}
|
648 |
+
|
649 |
+
/**
|
650 |
+
* Change the filtered load for the admin bar nodes.
|
651 |
+
* @since 1.5.11
|
652 |
+
* @param array $Filter_bar The admin bar nodes.
|
653 |
+
* @return array
|
654 |
+
*/
|
655 |
+
$Filter_bar = apply_filters( 'wauc_admin_bar_filter_load', $Filter_bar );
|
656 |
+
|
657 |
return $Filter_bar;
|
658 |
}
|
659 |
|
872 |
if( !isset( $menu_widget["group"] ) ) $menu_widget["group"] = 0;
|
873 |
if( !isset( $menu_widget["meta"]["class"] ) ) $menu_widget["meta"]["class"] = "";
|
874 |
$no_submenu = array( 'search' , 'bp-notifications' , 'languages' , 'menu-toggle' , 'post_list' , 'page_list' );
|
875 |
+
|
876 |
+
/**
|
877 |
+
* Add items to the "no_submenu" array.
|
878 |
+
* @since 1.5.11
|
879 |
+
* @param array
|
880 |
+
* @return array
|
881 |
+
*/
|
882 |
+
$no_submenu = array_merge( apply_filters( 'wauc_admin_bar_menu_widget_no_submenu', array() ), $no_submenu );
|
883 |
+
|
884 |
$activated_plugin = $this->ActivatedPlugin;
|
885 |
$other_plugin = $this->OtherPluginMenu;
|
886 |
|
908 |
<?php elseif( preg_match( '/\<form/' , $menu_widget["title"] ) ) : ?>
|
909 |
<?php echo $menu_widget["id"]; ?>
|
910 |
<?php else: ?>
|
911 |
+
<?php echo strip_tags( $menu_widget["title"] ); ?>
|
912 |
: <span class="in-widget-title"><?php echo $menu_widget["id"]; ?></span>
|
913 |
<?php endif; ?>
|
914 |
</h4>
|
952 |
<?php endif; ?>
|
953 |
<?php endforeach; ?>
|
954 |
<?php endif; ?>
|
955 |
+
<?php
|
956 |
+
/**
|
957 |
+
* Filter whether this menu widget title is readonly or not.
|
958 |
+
* Has two filter options:
|
959 |
+
* `wauc_admin_bar_menu_widget_title_readonly` for all.
|
960 |
+
* `wauc_admin_bar_menu_widget_title_readonly_{ID}` for ID specific.
|
961 |
+
*
|
962 |
+
* @since 1.5.11
|
963 |
+
* @param bool $readonly_field
|
964 |
+
* @param array $menu_widget
|
965 |
+
* @return bool
|
966 |
+
*/
|
967 |
+
$readonly_field = apply_filters( 'wauc_admin_bar_menu_widget_title_readonly', $readonly_field, $menu_widget );
|
968 |
+
$readonly_field = apply_filters( "wauc_admin_bar_menu_widget_title_readonly_{$menu_widget["id"]}", $readonly_field, $menu_widget );
|
969 |
+
if( $readonly_field ) :
|
970 |
+
?>
|
971 |
<input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" readonly="readonly" /><br />
|
972 |
<?php else : ?>
|
973 |
<input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" />
|
1044 |
$all_custom_posts = get_post_types( $args , 'objects' );
|
1045 |
|
1046 |
$exclusion = array( "post" , "page" , "attachment" , "revision" , "nav_menu_item");
|
1047 |
+
|
1048 |
+
/**
|
1049 |
+
* Add items to the get_custom_posts "exclusion" array.
|
1050 |
+
* @since 1.5.11
|
1051 |
+
* @param array
|
1052 |
+
* @return array
|
1053 |
+
*/
|
1054 |
+
$exclusion = array_merge( apply_filters( 'wauc_get_custom_posts_exclusion', array() ), $exclusion );
|
1055 |
+
|
1056 |
$custom_posts = array();
|
1057 |
foreach($all_custom_posts as $post_type => $cpt) {
|
1058 |
if( !in_array( $post_type , $exclusion ) ) {
|
1222 |
|
1223 |
}
|
1224 |
|
1225 |
+
/**
|
1226 |
+
* Apply custom shortcode replacements.
|
1227 |
+
* @since 1.5.11
|
1228 |
+
* @param array $str The admin bar nodes.
|
1229 |
+
* @return array
|
1230 |
+
*/
|
1231 |
+
$str = apply_filters( 'wauc_val_replace_shortcode', $str );
|
1232 |
+
|
1233 |
}
|
1234 |
|
1235 |
return $str;
|
1435 |
}
|
1436 |
}
|
1437 |
|
1438 |
+
/**
|
1439 |
+
* Change the update data.
|
1440 |
+
* @since 1.5.11 Added second context parameter.
|
1441 |
+
* @param mixed $record Update data.
|
1442 |
+
* @param string $context The data name of what is being updated.
|
1443 |
+
* @return mixed
|
1444 |
+
*/
|
1445 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["site"], 'site' );
|
1446 |
update_option( $Record , $Update );
|
1447 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1448 |
exit;
|
1462 |
}
|
1463 |
}
|
1464 |
|
1465 |
+
/**
|
1466 |
+
* Filter documented in WP_Admin_UI_Customize::update_site().
|
1467 |
+
*/
|
1468 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["admin_general"], 'admin_general' );
|
1469 |
update_option( $Record , $Update );
|
1470 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1471 |
exit;
|
1485 |
}
|
1486 |
}
|
1487 |
|
1488 |
+
/**
|
1489 |
+
* Filter documented in WP_Admin_UI_Customize::update_site().
|
1490 |
+
*/
|
1491 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["dashboard"], 'dashboard' );
|
1492 |
update_option( $Record , $Update );
|
1493 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1494 |
exit;
|
1543 |
}
|
1544 |
}
|
1545 |
|
1546 |
+
/**
|
1547 |
+
* Filter documented in WP_Admin_UI_Customize::update_site().
|
1548 |
+
*/
|
1549 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["admin_bar_menu"], 'admin_bar_menu' );
|
1550 |
update_option( $Record , $Update );
|
1551 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1552 |
exit;
|
1576 |
}
|
1577 |
}
|
1578 |
|
1579 |
+
/**
|
1580 |
+
* Filter documented in WP_Admin_UI_Customize::update_site().
|
1581 |
+
*/
|
1582 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["sidemenu"], 'sidemenu' );
|
1583 |
update_option( $Record , $Update );
|
1584 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1585 |
exit;
|
1604 |
}
|
1605 |
}
|
1606 |
|
1607 |
+
/**
|
1608 |
+
* Filter documented in WP_Admin_UI_Customize::update_site().
|
1609 |
+
*/
|
1610 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["manage_metabox"], 'manage_metabox' );
|
1611 |
update_option( $Record , $Update );
|
1612 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1613 |
exit;
|
1627 |
}
|
1628 |
}
|
1629 |
|
1630 |
+
/**
|
1631 |
+
* Filter documented in WP_Admin_UI_Customize::update_site().
|
1632 |
+
*/
|
1633 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["post_add_edit"], 'post_add_edit' );
|
1634 |
update_option( $Record , $Update );
|
1635 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1636 |
exit;
|
1650 |
}
|
1651 |
}
|
1652 |
|
1653 |
+
/**
|
1654 |
+
* Filter documented in WP_Admin_UI_Customize::update_site().
|
1655 |
+
*/
|
1656 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["appearance_menus"], 'appearance_menus' );
|
1657 |
update_option( $Record , $Update );
|
1658 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1659 |
exit;
|
1673 |
}
|
1674 |
}
|
1675 |
|
1676 |
+
/**
|
1677 |
+
* Filter documented in WP_Admin_UI_Customize::update_site().
|
1678 |
+
*/
|
1679 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["loginscreen"], 'loginscreen' );
|
1680 |
update_option( $Record , $Update );
|
1681 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1682 |
exit;
|
1693 |
$Update["edit_cap"] = strip_tags( $_POST["data"]["edit_cap"] );
|
1694 |
}
|
1695 |
|
1696 |
+
/**
|
1697 |
+
* Filter documented in WP_Admin_UI_Customize::update_site().
|
1698 |
+
*/
|
1699 |
+
$Record = apply_filters( 'wauc_pre_update' , $this->Record["plugin_cap"], 'plugin_cap' );
|
1700 |
update_option( $Record , $Update );
|
1701 |
wp_redirect( esc_url_raw( add_query_arg( $this->MsgQ , 'update' , stripslashes( $_POST["_wp_http_referer"] ) ) ) );
|
1702 |
exit;
|
2140 |
}
|
2141 |
}
|
2142 |
|
2143 |
+
/**
|
2144 |
+
* Change the adminbar nodes before they are added to WP admin bar.
|
2145 |
+
* @since 1.5.11
|
2146 |
+
* @param array $SettingNodes
|
2147 |
+
* @param array $All_Nodes
|
2148 |
+
* @return array
|
2149 |
+
*/
|
2150 |
+
$SettingNodes = apply_filters( 'wauc_admin_bar_menu_add_nodes', $SettingNodes, $All_Nodes );
|
2151 |
+
|
2152 |
// add main nodes
|
2153 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
2154 |
foreach($allnodes as $node_type => $nodes) {
|
2190 |
}
|
2191 |
}
|
2192 |
|
2193 |
+
/**
|
2194 |
+
* Add items to the admin bar after all WAUC nodes have been added.
|
2195 |
+
* @since 1.5.11
|
2196 |
+
* @param WP_Admin_Bar $wp_admin_bar
|
2197 |
+
*/
|
2198 |
+
do_action( 'wauc_admin_bar_menu_add_nodes_after', $wp_admin_bar );
|
2199 |
+
|
2200 |
}
|
2201 |
}
|
2202 |
|
2583 |
|
2584 |
}
|
2585 |
$submenu = $SetMain_submenu;
|
2586 |
+
|
2587 |
+
/**
|
2588 |
+
* Change the main menu nodes before they are added.
|
2589 |
+
* @since 1.5.11
|
2590 |
+
* @param array $submenu
|
2591 |
+
* @return array
|
2592 |
+
*/
|
2593 |
+
$menu = apply_filters( 'wauc_sidemenu_menu', $menu );
|
2594 |
+
|
2595 |
+
/**
|
2596 |
+
* Change the main menu submenu nodes before they are added.
|
2597 |
+
* @since 1.5.11
|
2598 |
+
* @param array $submenu
|
2599 |
+
* @return array
|
2600 |
+
*/
|
2601 |
+
$submenu = apply_filters( 'wauc_sidemenu_submenu', $submenu );
|
2602 |
+
|
2603 |
} else {
|
2604 |
// empty menu
|
2605 |
$menu = array();
|