Version Description
- Added: Compatible to Admin Bar on BuddyPress.
- Fixed: Separator settings on Sidemenu settings.
Download this release
Release Info
Developer | gqevu6bsiz |
Plugin | WP Admin UI Customize |
Version | 1.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.1.2 to 1.4.2
- readme.txt +6 -2
- wp-admin-ui-customize.php +103 -17
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: 3.5.2
|
6 |
Tested up to: 3.7.1
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
@@ -49,6 +49,10 @@ These to Customization is possible.
|
|
49 |
|
50 |
== Changelog ==
|
51 |
|
|
|
|
|
|
|
|
|
52 |
= 1.4.1.2 =
|
53 |
* Fixed: Can not dropped on Admin Bar settings.
|
54 |
|
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_4_2
|
4 |
Tags: admin, post, posts, page, option, sitemenu, menu, custom, customize, dashboard, admin_bar, multisite, network, metabox
|
5 |
Requires at least: 3.5.2
|
6 |
Tested up to: 3.7.1
|
7 |
+
Stable tag: 1.4.2
|
8 |
License: GPL2
|
9 |
|
10 |
Customize the management screen UI.
|
49 |
|
50 |
== Changelog ==
|
51 |
|
52 |
+
= 1.4.2 =
|
53 |
+
* Added: Compatible to Admin Bar on BuddyPress.
|
54 |
+
* Fixed: Separator settings on Sidemenu settings.
|
55 |
+
|
56 |
= 1.4.1.2 =
|
57 |
* Fixed: Can not dropped on Admin Bar settings.
|
58 |
|
wp-admin-ui-customize.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
/*
|
3 |
Plugin Name: WP Admin UI Customize
|
4 |
Description: An excellent plugin to customize the management screens.
|
5 |
-
Plugin URI: http://wpadminuicustomize.com/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=
|
6 |
-
Version: 1.4.
|
7 |
Author: gqevu6bsiz
|
8 |
-
Author URI: http://gqevu6bsiz.chicappa.jp/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=
|
9 |
Text Domain: wauc
|
10 |
Domain Path: /languages
|
11 |
*/
|
@@ -48,12 +48,14 @@ class WP_Admin_UI_Customize
|
|
48 |
$Menu,
|
49 |
$SubMenu,
|
50 |
$Admin_bar,
|
|
|
|
|
51 |
$MsgQ,
|
52 |
$Msg;
|
53 |
|
54 |
|
55 |
function __construct() {
|
56 |
-
$this->Ver = '1.4.
|
57 |
$this->Name = 'WP Admin UI Customize';
|
58 |
$this->Dir = plugin_dir_path( __FILE__ );
|
59 |
$this->Url = plugin_dir_url( __FILE__ );
|
@@ -79,6 +81,8 @@ class WP_Admin_UI_Customize
|
|
79 |
$this->PluginSlug = dirname( plugin_basename( __FILE__ ) );
|
80 |
$this->Nonces = array( "field" => $this->ltd . '_field' , "value" => $this->ltd . '_value' );
|
81 |
$this->Schema = is_ssl() ? 'https://' : 'http://';
|
|
|
|
|
82 |
$this->UPFN = 'Y';
|
83 |
$this->DonateKey = 'd77aec9bc89d445fd54b4c988d090f03';
|
84 |
$this->MsgQ = $this->ltd . '_msg';
|
@@ -109,6 +113,9 @@ class WP_Admin_UI_Customize
|
|
109 |
// setting check user role
|
110 |
add_action( 'admin_notices' , array( $this , 'settingCheck' ) );
|
111 |
|
|
|
|
|
|
|
112 |
// data update
|
113 |
add_action( 'admin_init' , array( $this , 'dataUpdate') );
|
114 |
|
@@ -187,6 +194,16 @@ class WP_Admin_UI_Customize
|
|
187 |
}
|
188 |
}
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
|
191 |
|
192 |
|
@@ -373,6 +390,32 @@ class WP_Admin_UI_Customize
|
|
373 |
global $wp_admin_bar;
|
374 |
|
375 |
$this->Admin_bar = $wp_admin_bar->get_nodes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
}
|
377 |
|
378 |
// SetList
|
@@ -672,7 +715,9 @@ class WP_Admin_UI_Customize
|
|
672 |
if ( is_object( $menu_widget ) ) $menu_widget = (array) $menu_widget;
|
673 |
if( !isset( $menu_widget["group"] ) ) $menu_widget["group"] = 0;
|
674 |
if( !isset( $menu_widget["meta"]["class"] ) ) $menu_widget["meta"]["class"] = "";
|
675 |
-
$no_submenu = array( 'search' );
|
|
|
|
|
676 |
|
677 |
$widget_class = $menu_widget["id"];
|
678 |
$new_widget = '';
|
@@ -727,13 +772,22 @@ class WP_Admin_UI_Customize
|
|
727 |
<?php if( !empty( $menu_widget["group"] ) ) : ?>
|
728 |
<input type="hidden" class="regular-text titletext" value="" name="data[][title]" />
|
729 |
<?php else : ?>
|
|
|
730 |
<?php if( $menu_widget["id"] == 'edit-post_type' or in_array( $menu_widget["id"] , $no_submenu ) ) : ?>
|
731 |
-
|
732 |
<?php if( $menu_widget["id"] == 'edit-post_type' ) : ?>
|
733 |
<span class="description"><?php _e( 'If you want edit to name, please edit of translation file(PO).' , $this->ltd ); ?></span><br />
|
734 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
735 |
<?php else : ?>
|
736 |
-
|
737 |
<?php endif; ?>
|
738 |
<?php endif; ?>
|
739 |
</label>
|
@@ -1290,15 +1344,16 @@ class WP_Admin_UI_Customize
|
|
1290 |
// default side menu load.
|
1291 |
add_action( 'admin_menu' , array( $this , 'sidemenu_default_load' ) , 10000 );
|
1292 |
|
1293 |
-
// default admin bar menu load.
|
1294 |
-
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_default_load' ) , 1 );
|
1295 |
-
|
1296 |
// default post metabox load.
|
1297 |
add_action( 'admin_head' , array( $this , 'post_meta_boxes_load' ) , 10 );
|
1298 |
|
1299 |
// admin init
|
1300 |
add_action( 'wp_loaded' , array( $this , 'admin_init' ) );
|
1301 |
}
|
|
|
|
|
|
|
|
|
1302 |
}
|
1303 |
|
1304 |
// FilterStart
|
@@ -1476,6 +1531,8 @@ class WP_Admin_UI_Customize
|
|
1476 |
$current_user = wp_get_current_user();
|
1477 |
$profile_url = get_edit_profile_url( $user_id );
|
1478 |
$update_data = wp_get_update_data();
|
|
|
|
|
1479 |
|
1480 |
// all nodes adjustment
|
1481 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
@@ -1564,6 +1621,41 @@ class WP_Admin_UI_Customize
|
|
1564 |
}
|
1565 |
}
|
1566 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1567 |
|
1568 |
// add main nodes
|
1569 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
@@ -1795,13 +1887,7 @@ class WP_Admin_UI_Customize
|
|
1795 |
$SetMain_menu = array();
|
1796 |
$SetMain_submenu = array();
|
1797 |
|
1798 |
-
$separator_menu = array();
|
1799 |
-
foreach( $menu as $key => $ms ) {
|
1800 |
-
if( strstr( $ms[2] , 'separator' ) ) {
|
1801 |
-
$separator_menu = $ms;
|
1802 |
-
break;
|
1803 |
-
}
|
1804 |
-
}
|
1805 |
|
1806 |
foreach($GetData["main"] as $mm_pos => $mm) {
|
1807 |
if($mm["slug"] == 'separator') {
|
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_4_2
|
6 |
+
Version: 1.4.2
|
7 |
Author: gqevu6bsiz
|
8 |
+
Author URI: http://gqevu6bsiz.chicappa.jp/?utm_source=use_plugin&utm_medium=list&utm_content=wauc&utm_campaign=1_4_2
|
9 |
Text Domain: wauc
|
10 |
Domain Path: /languages
|
11 |
*/
|
48 |
$Menu,
|
49 |
$SubMenu,
|
50 |
$Admin_bar,
|
51 |
+
$ActivatedPlugin,
|
52 |
+
$OtherPluginMenu,
|
53 |
$MsgQ,
|
54 |
$Msg;
|
55 |
|
56 |
|
57 |
function __construct() {
|
58 |
+
$this->Ver = '1.4.2';
|
59 |
$this->Name = 'WP Admin UI Customize';
|
60 |
$this->Dir = plugin_dir_path( __FILE__ );
|
61 |
$this->Url = plugin_dir_url( __FILE__ );
|
81 |
$this->PluginSlug = dirname( plugin_basename( __FILE__ ) );
|
82 |
$this->Nonces = array( "field" => $this->ltd . '_field' , "value" => $this->ltd . '_value' );
|
83 |
$this->Schema = is_ssl() ? 'https://' : 'http://';
|
84 |
+
$this->ActivatedPlugin = array();
|
85 |
+
$this->OtherPluginMenu = array();
|
86 |
$this->UPFN = 'Y';
|
87 |
$this->DonateKey = 'd77aec9bc89d445fd54b4c988d090f03';
|
88 |
$this->MsgQ = $this->ltd . '_msg';
|
113 |
// setting check user role
|
114 |
add_action( 'admin_notices' , array( $this , 'settingCheck' ) );
|
115 |
|
116 |
+
// compatible other plugin check
|
117 |
+
add_action( 'wp_loaded' , array( $this , 'activated_plugin' ) );
|
118 |
+
|
119 |
// data update
|
120 |
add_action( 'admin_init' , array( $this , 'dataUpdate') );
|
121 |
|
194 |
}
|
195 |
}
|
196 |
|
197 |
+
// PluginSetup
|
198 |
+
function activated_plugin() {
|
199 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
200 |
+
|
201 |
+
if( is_plugin_active( 'buddypress/bp-loader.php' ) ) {
|
202 |
+
$this->ActivatedPlugin["buddypress"] = true;
|
203 |
+
}
|
204 |
+
|
205 |
+
}
|
206 |
+
|
207 |
|
208 |
|
209 |
|
390 |
global $wp_admin_bar;
|
391 |
|
392 |
$this->Admin_bar = $wp_admin_bar->get_nodes();
|
393 |
+
|
394 |
+
// Other plugin
|
395 |
+
if( !empty( $this->ActivatedPlugin ) ) {
|
396 |
+
|
397 |
+
if( !empty( $this->ActivatedPlugin["buddypress"] ) ) {
|
398 |
+
$plugin_slug = 'buddypress';
|
399 |
+
foreach( $this->Admin_bar as $node_id => $node ) {
|
400 |
+
if( strstr( $node_id , $plugin_slug ) or strstr( $node_id , 'bp-' ) ) {
|
401 |
+
$this->OtherPluginMenu["admin_bar"][$plugin_slug][$node_id] = 1;
|
402 |
+
}
|
403 |
+
}
|
404 |
+
}
|
405 |
+
|
406 |
+
if( !empty( $this->OtherPluginMenu["admin_bar"] ) ) {
|
407 |
+
for($i = 0; $i < 4; $i++) {
|
408 |
+
foreach( $this->OtherPluginMenu["admin_bar"] as $plugin_slug => $plugin_menu ) {
|
409 |
+
foreach( $this->Admin_bar as $node_id => $node ) {
|
410 |
+
if( !empty( $node->parent ) && array_key_exists( $node->parent , $plugin_menu ) ) {
|
411 |
+
$this->OtherPluginMenu["admin_bar"][$plugin_slug][$node_id] = 1;
|
412 |
+
}
|
413 |
+
}
|
414 |
+
}
|
415 |
+
}
|
416 |
+
}
|
417 |
+
|
418 |
+
}
|
419 |
}
|
420 |
|
421 |
// SetList
|
715 |
if ( is_object( $menu_widget ) ) $menu_widget = (array) $menu_widget;
|
716 |
if( !isset( $menu_widget["group"] ) ) $menu_widget["group"] = 0;
|
717 |
if( !isset( $menu_widget["meta"]["class"] ) ) $menu_widget["meta"]["class"] = "";
|
718 |
+
$no_submenu = array( 'search' , 'bp-notifications' );
|
719 |
+
$activated_plugin = $this->ActivatedPlugin;
|
720 |
+
$other_plugin = $this->OtherPluginMenu;
|
721 |
|
722 |
$widget_class = $menu_widget["id"];
|
723 |
$new_widget = '';
|
772 |
<?php if( !empty( $menu_widget["group"] ) ) : ?>
|
773 |
<input type="hidden" class="regular-text titletext" value="" name="data[][title]" />
|
774 |
<?php else : ?>
|
775 |
+
<?php _e( 'Title' ); ?> :
|
776 |
<?php if( $menu_widget["id"] == 'edit-post_type' or in_array( $menu_widget["id"] , $no_submenu ) ) : ?>
|
777 |
+
<input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" readonly="readonly" /><br />
|
778 |
<?php if( $menu_widget["id"] == 'edit-post_type' ) : ?>
|
779 |
<span class="description"><?php _e( 'If you want edit to name, please edit of translation file(PO).' , $this->ltd ); ?></span><br />
|
780 |
<?php endif; ?>
|
781 |
+
<?php elseif( !empty( $activated_plugin ) ) : ?>
|
782 |
+
<?php foreach( $activated_plugin as $plugin_slug => $v ) : ?>
|
783 |
+
<?php if( !empty( $other_plugin["admin_bar"][$plugin_slug] ) && array_key_exists( $menu_widget["id"] , $other_plugin["admin_bar"][$plugin_slug] ) ) : ?>
|
784 |
+
<input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" readonly="readonly" /><br />
|
785 |
+
<?php else : ?>
|
786 |
+
<input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" />
|
787 |
+
<?php endif; ?>
|
788 |
+
<?php endforeach; ?>
|
789 |
<?php else : ?>
|
790 |
+
<input type="text" class="regular-text titletext" value="<?php echo esc_html( $menu_widget["title"] ); ?>" name="data[][title]" />
|
791 |
<?php endif; ?>
|
792 |
<?php endif; ?>
|
793 |
</label>
|
1344 |
// default side menu load.
|
1345 |
add_action( 'admin_menu' , array( $this , 'sidemenu_default_load' ) , 10000 );
|
1346 |
|
|
|
|
|
|
|
1347 |
// default post metabox load.
|
1348 |
add_action( 'admin_head' , array( $this , 'post_meta_boxes_load' ) , 10 );
|
1349 |
|
1350 |
// admin init
|
1351 |
add_action( 'wp_loaded' , array( $this , 'admin_init' ) );
|
1352 |
}
|
1353 |
+
|
1354 |
+
// default admin bar menu load.
|
1355 |
+
add_action( 'wp_before_admin_bar_render' , array( $this , 'admin_bar_default_load' ) , 1 );
|
1356 |
+
|
1357 |
}
|
1358 |
|
1359 |
// FilterStart
|
1531 |
$current_user = wp_get_current_user();
|
1532 |
$profile_url = get_edit_profile_url( $user_id );
|
1533 |
$update_data = wp_get_update_data();
|
1534 |
+
$activated_plugin = $this->ActivatedPlugin;
|
1535 |
+
$other_plugin = $this->OtherPluginMenu;
|
1536 |
|
1537 |
// all nodes adjustment
|
1538 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
1621 |
}
|
1622 |
}
|
1623 |
}
|
1624 |
+
|
1625 |
+
// other plugin nodes
|
1626 |
+
foreach($SettingNodes as $Boxtype => $allnodes) {
|
1627 |
+
foreach($allnodes as $node_type => $nodes) {
|
1628 |
+
foreach($nodes as $key => $node) {
|
1629 |
+
if( !empty( $activated_plugin ) ) {
|
1630 |
+
if( $node["id"] == 'bp-notifications' ) {
|
1631 |
+
foreach($All_Nodes as $default_node_id => $default_node) {
|
1632 |
+
if( $default_node->parent == $node["id"] ) {
|
1633 |
+
$subnode_type = '';
|
1634 |
+
if( $node_type == 'main' ) {
|
1635 |
+
$subnode_type = 'sub';
|
1636 |
+
} elseif( $node_type == 'sub' ) {
|
1637 |
+
$subnode_type = 'sub2';
|
1638 |
+
} elseif( $node_type == 'sub2' ) {
|
1639 |
+
$subnode_type = 'sub3';
|
1640 |
+
} elseif( $node_type == 'sub3' ) {
|
1641 |
+
$subnode_type = 'sub4';
|
1642 |
+
}
|
1643 |
+
if( !empty( $subnode_type ) ) {
|
1644 |
+
$SettingNodes[$Boxtype][$subnode_type][] = (array) $default_node;
|
1645 |
+
}
|
1646 |
+
}
|
1647 |
+
}
|
1648 |
+
}
|
1649 |
+
foreach( $activated_plugin as $plugin_slug => $v ) {
|
1650 |
+
if( !empty( $other_plugin["admin_bar"][$plugin_slug] ) && array_key_exists( $node["id"] , $other_plugin["admin_bar"][$plugin_slug] ) ) {
|
1651 |
+
$SettingNodes[$Boxtype][$node_type][$key]["title"] = $All_Nodes[$node["id"]]->title;
|
1652 |
+
$SettingNodes[$Boxtype][$node_type][$key]["href"] = $All_Nodes[$node["id"]]->href;
|
1653 |
+
}
|
1654 |
+
}
|
1655 |
+
}
|
1656 |
+
}
|
1657 |
+
}
|
1658 |
+
}
|
1659 |
|
1660 |
// add main nodes
|
1661 |
foreach($SettingNodes as $Boxtype => $allnodes) {
|
1887 |
$SetMain_menu = array();
|
1888 |
$SetMain_submenu = array();
|
1889 |
|
1890 |
+
$separator_menu = array( 0 => "" , 1 => 'read' , 2 => 'separator1' , 3 => "" , 4 => 'wp-menu-separator' );
|
|
|
|
|
|
|
|
|
|
|
|
|
1891 |
|
1892 |
foreach($GetData["main"] as $mm_pos => $mm) {
|
1893 |
if($mm["slug"] == 'separator') {
|