Version Description
- Fixed custom Howdy issue
Download this release
Release Info
Developer | cusmin |
Plugin | Absolutely Glamorous Custom Admin |
Version | 6.4 |
Comparing to | |
See all releases |
Code changes from version 6.3 to 6.4
- plugin.php +33 -14
- readme.txt +5 -2
plugin.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Absolutely Glamorous Custom Admin
|
|
4 |
Plugin URI: https://wordpressadminpanel.com/ag-custom-admin/
|
5 |
Description: All-in-one tool for admin panel customization. Change almost everything: admin menu, dashboard, login page, admin bar etc. Apply admin panel themes.
|
6 |
Author: Cusmin
|
7 |
-
Version: 6.
|
8 |
Text Domain: ag-custom-admin
|
9 |
Domain Path: /languages
|
10 |
Author URI: https://cusmin.com
|
@@ -64,6 +64,8 @@ class AGCA{
|
|
64 |
|
65 |
add_action( 'customize_controls_enqueue_scripts', array(&$this,'agca_customizer_php') );
|
66 |
|
|
|
|
|
67 |
/* wp_localize_script(
|
68 |
'agca-script',//use agca enqueued script
|
69 |
'agca_string',
|
@@ -73,7 +75,7 @@ class AGCA{
|
|
73 |
/*Initialize properties*/
|
74 |
$this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
|
75 |
|
76 |
-
$this->agca_version = "6.
|
77 |
|
78 |
//TODO:upload images programmatically
|
79 |
}
|
@@ -1116,18 +1118,6 @@ class AGCA{
|
|
1116 |
jQuery("#wpbody-content").prepend('<a href="<?php echo wp_logout_url(); ?>" tabindex="10" style="float:right;margin-right:20px" class="ab-item agca_logout_button"><?php echo $agca_logout_text; ?></a>');
|
1117 |
|
1118 |
|
1119 |
-
<?php } ?>
|
1120 |
-
<?php if(get_option('agca_howdy')!=""){ ?>
|
1121 |
-
var alltext="";
|
1122 |
-
alltext="";
|
1123 |
-
jQuery('li#wp-admin-bar-my-account').css('cursor','default');
|
1124 |
-
alltext = jQuery('li#wp-admin-bar-my-account .ab-item:first').html();
|
1125 |
-
if(alltext!=null){
|
1126 |
-
var parts = alltext.split(' <span class="display-name"');
|
1127 |
-
alltext = "<?php echo get_option('agca_howdy'); ?>" + ', <span class="display-name"' + parts[1];
|
1128 |
-
}
|
1129 |
-
jQuery("li#wp-admin-bar-my-account .ab-item:first").html("<a href=\"#\" class=\"ab-item\">"+alltext+"</a>");
|
1130 |
-
|
1131 |
<?php } ?>
|
1132 |
<?php
|
1133 |
if(get_option('agca_custom_title')!=""){
|
@@ -1158,6 +1148,35 @@ class AGCA{
|
|
1158 |
|
1159 |
}
|
1160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1161 |
function updateAllColors(){
|
1162 |
|
1163 |
?>
|
4 |
Plugin URI: https://wordpressadminpanel.com/ag-custom-admin/
|
5 |
Description: All-in-one tool for admin panel customization. Change almost everything: admin menu, dashboard, login page, admin bar etc. Apply admin panel themes.
|
6 |
Author: Cusmin
|
7 |
+
Version: 6.4
|
8 |
Text Domain: ag-custom-admin
|
9 |
Domain Path: /languages
|
10 |
Author URI: https://cusmin.com
|
64 |
|
65 |
add_action( 'customize_controls_enqueue_scripts', array(&$this,'agca_customizer_php') );
|
66 |
|
67 |
+
add_action( 'admin_bar_menu', array(&$this,'wp_admin_bar_my_custom_account_menu'), 11 );
|
68 |
+
|
69 |
/* wp_localize_script(
|
70 |
'agca-script',//use agca enqueued script
|
71 |
'agca_string',
|
75 |
/*Initialize properties*/
|
76 |
$this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
|
77 |
|
78 |
+
$this->agca_version = "6.4";
|
79 |
|
80 |
//TODO:upload images programmatically
|
81 |
}
|
1118 |
jQuery("#wpbody-content").prepend('<a href="<?php echo wp_logout_url(); ?>" tabindex="10" style="float:right;margin-right:20px" class="ab-item agca_logout_button"><?php echo $agca_logout_text; ?></a>');
|
1119 |
|
1120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1121 |
<?php } ?>
|
1122 |
<?php
|
1123 |
if(get_option('agca_custom_title')!=""){
|
1148 |
|
1149 |
}
|
1150 |
|
1151 |
+
function wp_admin_bar_my_custom_account_menu( $wp_admin_bar ) {
|
1152 |
+
|
1153 |
+
if(empty(get_option('agca_howdy'))){
|
1154 |
+
return false;
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
$user_id = get_current_user_id();
|
1158 |
+
$current_user = wp_get_current_user();
|
1159 |
+
$profile_url = get_edit_profile_url( $user_id );
|
1160 |
+
|
1161 |
+
if ( 0 != $user_id ) {
|
1162 |
+
/* Add the "My Account" menu */
|
1163 |
+
$avatar = get_avatar( $user_id, 28 );
|
1164 |
+
$howdy = sprintf( __(get_option('agca_howdy').', %1$s'), $current_user->display_name );
|
1165 |
+
$class = empty( $avatar ) ? '' : 'with-avatar';
|
1166 |
+
|
1167 |
+
$wp_admin_bar->add_menu( array(
|
1168 |
+
'id' => 'my-account',
|
1169 |
+
'parent' => 'top-secondary',
|
1170 |
+
'title' => $howdy . $avatar,
|
1171 |
+
'href' => $profile_url,
|
1172 |
+
'meta' => array(
|
1173 |
+
'class' => $class,
|
1174 |
+
),
|
1175 |
+
) );
|
1176 |
+
|
1177 |
+
}
|
1178 |
+
}
|
1179 |
+
|
1180 |
function updateAllColors(){
|
1181 |
|
1182 |
?>
|
readme.txt
CHANGED
@@ -4,10 +4,10 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=agca@cus
|
|
4 |
Tags: admin, customize, hide, change admin, themes, admin themes, admin bar, login page
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9.5
|
7 |
-
Stable tag: 6.
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl.txt
|
10 |
-
|
11 |
All-in-one tool for admin panel customization. Change almost everything: admin menu, dashboard, login page, admin bar, add custom scripts and more.
|
12 |
|
13 |
== Description ==
|
@@ -148,6 +148,9 @@ If you have the latest WordPress and plugin versions and you still experience so
|
|
148 |
|
149 |
== Change Log ==
|
150 |
|
|
|
|
|
|
|
151 |
= 6.3 =
|
152 |
* Fixed custom Howdy for Netherland's WP
|
153 |
|
4 |
Tags: admin, customize, hide, change admin, themes, admin themes, admin bar, login page
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9.5
|
7 |
+
Stable tag: 6.4
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl.txt
|
10 |
+
|
11 |
All-in-one tool for admin panel customization. Change almost everything: admin menu, dashboard, login page, admin bar, add custom scripts and more.
|
12 |
|
13 |
== Description ==
|
148 |
|
149 |
== Change Log ==
|
150 |
|
151 |
+
= 6.4 =
|
152 |
+
* Fixed custom Howdy issue
|
153 |
+
|
154 |
= 6.3 =
|
155 |
* Fixed custom Howdy for Netherland's WP
|
156 |
|