Absolutely Glamorous Custom Admin - Version 1.2.5.2

Version Description

  • Fixed several issues with WP 3.3
  • Added options for hidding "comments" and "new" from admin bar
  • Support for custom admin bar images
  • Support for custom Log Out text
  • Hide everything except Log Out button works now
  • Removed few obsolete options
  • Removing "Edit My Profile"
  • Fixed bug when trying to edit custom buttons in admin menu
Download this release

Release Info

Developer argonius
Plugin Icon 128x128 Absolutely Glamorous Custom Admin
Version 1.2.5.2
Comparing to
See all releases

Code changes from version 1.2.5.1 to 1.2.5.2

Files changed (2) hide show
  1. plugin.php +91 -12
  2. readme.txt +14 -1
plugin.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: AG Custom Admin
4
  Plugin URI: http://wordpress.org/extend/plugins/ag-custom-admin
5
  Description: Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
6
  Author: Argonius
7
- Version: 1.2.5.1
8
  Author URI: http://wordpress.argonius.com/ag-custom-admin
9
 
10
  Copyright 2011. Argonius (email : info@argonius.com)
@@ -125,7 +125,12 @@ class AGCA{
125
  register_setting( 'agca-options-group', 'agca_dashboard_widget_rn' );
126
  register_setting( 'agca-options-group', 'agca_dashboard_widget_rd' );
127
  register_setting( 'agca-options-group', 'agca_dashboard_widget_primary' );
128
- register_setting( 'agca-options-group', 'agca_dashboard_widget_secondary' );
 
 
 
 
 
129
 
130
  /*Admin menu*/
131
  register_setting( 'agca-options-group', 'agca_admin_menu_turnonoff' );
@@ -182,6 +187,10 @@ class AGCA{
182
  delete_option( 'agca_dashboard_widget_rd' );
183
  delete_option( 'agca_dashboard_widget_primary' );
184
  delete_option( 'agca_dashboard_widget_secondary' );
 
 
 
 
185
 
186
  /*Admin menu*/
187
  delete_option( 'agca_admin_menu_turnonoff' );
@@ -302,7 +311,7 @@ class AGCA{
302
  <script type="text/javascript">
303
  document.write('<style type="text/css">html{visibility:hidden;}</style>');
304
  var wpversion = "<?php echo $wpversion; ?>";
305
- var agca_version = "1.2.5.1";
306
  var errors = false;
307
 
308
  /* <![CDATA[ */
@@ -369,8 +378,13 @@ try
369
  <?php } ?>
370
  <?php if(get_option('agca_header_logo')==true){ ?>
371
  jQuery("#wphead #header-logo").css("display","none");
 
 
 
372
  <?php } ?>
373
- <?php if(get_option('agca_header_logo_custom')!=""){ ?>
 
 
374
  jQuery("#wphead img#header-logo").attr('src','');
375
  jQuery("#wphead img#header-logo").hide();
376
  var img_url = '<?php echo get_option('agca_header_logo_custom'); ?>';
@@ -383,6 +397,20 @@ try
383
  jQuery("#wphead").css('height', (14 + this.height)+'px');
384
  jQuery("#wphead img#header-logo").show();
385
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
 
387
  <?php } ?>
388
  <?php if(get_option('agca_site_heading')==true){ ?>
@@ -395,6 +423,16 @@ try
395
  jQuery("#wp-admin-bar-site-name a:first").html('<?php echo get_option('agca_custom_site_heading'); ?>');
396
  }
397
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
398
  <?php if(get_option('agca_update_bar')==true){ ?>
399
  jQuery("#update-nag").css("display","none");
400
  jQuery(".update-nag").css("display","none");
@@ -457,7 +495,11 @@ try
457
  <?php //code for wp version >= 3.2 ?>
458
  <?php if($wpversion >= 3.2 ){ ?>
459
  jQuery("#user_info #user_info_links a:eq(1)").text("<?php echo get_option('agca_logout'); ?>");
460
- <?php }else{ ?>
 
 
 
 
461
  <?php //code for wp version < 3.2 ?>
462
  jQuery("#user_info a:eq(1)").text("<?php echo get_option('agca_logout'); ?>");
463
  <?php } ?>
@@ -466,6 +508,10 @@ try
466
  <?php if($wpversion >= 3.2 ){ ?>
467
  jQuery("#user_info #user_info_links li:eq(0)").remove();
468
  <?php }?>
 
 
 
 
469
  <?php } ?>
470
  <?php if(get_option('agca_logout_only')==true){ ?>
471
  <?php //code for wp version >= 3.2 ?>
@@ -476,8 +522,12 @@ try
476
  <?php } ?>
477
  var logoutLink = jQuery("#user_info a:nth-child(2)").attr("href");
478
  jQuery("#user_info").html("<a href=\""+logoutLink+"\" title=\"Log Out\">"+logoutText+"</a>");
479
- <?php }else{ ?>
480
- <?php //code for wp version < 3.2 ?>
 
 
 
 
481
  var logoutText = jQuery("#user_info a:nth-child(2)").text();
482
  var logoutLink = jQuery("#user_info a:nth-child(2)").attr("href");
483
  jQuery("#user_info").html("<a href=\""+logoutLink+"\" title=\"Log Out\">"+logoutText+"</a>");
@@ -727,7 +777,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
727
 
728
  <script type="text/javascript">
729
  document.write('<style type="text/css">html{display:none;}</style>');
730
- var agca_version = "1.2.5.1";
731
  var wpversion = "<?php echo $wpversion; ?>";
732
  /* <![CDATA[ */
733
  jQuery(document).ready(function() {
@@ -814,16 +864,16 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
814
  <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/agca_farbtastic.js"></script>
815
  <?php //includes ?>
816
  <div class="wrap">
817
- <h1 style="color:green">AG Custom Admin Settings <span style="font-size:15px;">(v1.2.5.1)</span></h1>
818
  <div id="agca_news">&nbsp;</div><br />
819
  <form method="post" id="agca_form" action="options.php">
820
  <?php settings_fields( 'agca-options-group' ); ?>
821
  <table>
822
  <tr valign="center" >
823
  <th scope="row">
824
- <label title="If checked, all users will be affected with these changes, except admin. Not checked = appy for all" for="agca_role_allbutadmin">Do not apply these settings for Admin&nbsp;&nbsp;</label>
825
  </th>
826
- <td><input title="If checked, all users will be affected with these changes, except admin. Not checked = appy for all" type="checkbox" name="agca_role_allbutadmin" value="true" <?php if (get_option('agca_role_allbutadmin')==true) echo 'checked="checked" '; echo get_option('agca_role_allbutadmin'); ?> />
827
  </td>
828
  </tr>
829
  </table>
@@ -894,6 +944,25 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
894
  <input title="Small Wordpress logo in admin top bar" type="checkbox" name="agca_header_logo" value="true" <?php if (get_option('agca_header_logo')==true) echo 'checked="checked" '; ?> />
895
  </td>
896
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
897
  <tr valign="center">
898
  <th scope="row">
899
  <label title="Adds custom text in admin top bar. Default Wordpress heading stays intact." for="agca_custom_site_heading">Custom blog heading</label>
@@ -910,6 +979,8 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
910
  <input title="Hides yellow bar with notifications of new Wordpress release" type="checkbox" name="agca_update_bar" value="true" <?php if (get_option('agca_update_bar')==true) echo 'checked="checked" '; ?> />
911
  </td>
912
  </tr>
 
 
913
  <tr valign="center">
914
  <th scope="row">
915
  <label for="agca_site_heading">Hide default blog heading</label>
@@ -918,6 +989,8 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
918
  <input type="checkbox" name="agca_site_heading" value="true" <?php if (get_option('agca_site_heading')==true) echo 'checked="checked" '; ?> />
919
  </td>
920
  </tr>
 
 
921
  <tr valign="center">
922
  <td colspan="2">
923
  <div class="ag_table_heading"><h3 tabindex="0">Elements on Right</h3></div>
@@ -962,9 +1035,15 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
962
  <td><input title="Put 'Exit', for example" type="text" size="47" name="agca_logout" value="<?php echo get_option('agca_logout'); ?>" /></td>
963
  </tr>
964
  <?php if($wpversion >= 3.2){ ?>
 
 
 
 
 
 
965
  <tr valign="center">
966
  <th scope="row">
967
- <label for="agca_remove_your_profile">Remove "Your profile" option from dropdown menu</label>
968
  </th>
969
  <td>
970
  <input type="checkbox" name="agca_remove_your_profile" value="true" <?php if (get_option('agca_remove_your_profile')==true) echo 'checked="checked" '; ?> />
4
  Plugin URI: http://wordpress.org/extend/plugins/ag-custom-admin
5
  Description: Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
6
  Author: Argonius
7
+ Version: 1.2.5.2
8
  Author URI: http://wordpress.argonius.com/ag-custom-admin
9
 
10
  Copyright 2011. Argonius (email : info@argonius.com)
125
  register_setting( 'agca-options-group', 'agca_dashboard_widget_rn' );
126
  register_setting( 'agca-options-group', 'agca_dashboard_widget_rd' );
127
  register_setting( 'agca-options-group', 'agca_dashboard_widget_primary' );
128
+ register_setting( 'agca-options-group', 'agca_dashboard_widget_secondary' );
129
+
130
+ //WP3.3
131
+ register_setting( 'agca-options-group', 'agca_admin_bar_comments' );
132
+ register_setting( 'agca-options-group', 'agca_admin_bar_new_content' );
133
+
134
 
135
  /*Admin menu*/
136
  register_setting( 'agca-options-group', 'agca_admin_menu_turnonoff' );
187
  delete_option( 'agca_dashboard_widget_rd' );
188
  delete_option( 'agca_dashboard_widget_primary' );
189
  delete_option( 'agca_dashboard_widget_secondary' );
190
+
191
+ //WP3.3
192
+ delete_option( 'agca_admin_bar_comments' );
193
+ delete_option( 'agca_admin_bar_new_content' );
194
 
195
  /*Admin menu*/
196
  delete_option( 'agca_admin_menu_turnonoff' );
311
  <script type="text/javascript">
312
  document.write('<style type="text/css">html{visibility:hidden;}</style>');
313
  var wpversion = "<?php echo $wpversion; ?>";
314
+ var agca_version = "1.2.5.2";
315
  var errors = false;
316
 
317
  /* <![CDATA[ */
378
  <?php } ?>
379
  <?php if(get_option('agca_header_logo')==true){ ?>
380
  jQuery("#wphead #header-logo").css("display","none");
381
+ if(wpversion=="3.3"){
382
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-wp-logo").css("display","none");
383
+ }
384
  <?php } ?>
385
+ <?php if(get_option('agca_header_logo_custom')!=""){ ?>
386
+
387
+ <?php if($wpversion < 3.3 ){ ?>
388
  jQuery("#wphead img#header-logo").attr('src','');
389
  jQuery("#wphead img#header-logo").hide();
390
  var img_url = '<?php echo get_option('agca_header_logo_custom'); ?>';
397
  jQuery("#wphead").css('height', (14 + this.height)+'px');
398
  jQuery("#wphead img#header-logo").show();
399
  });
400
+ <?php } else {?>
401
+ var img_url = '<?php echo get_option('agca_header_logo_custom'); ?>';
402
+ //advanced_url = img_url+ "?" + new Date().getTime();
403
+ advanced_url = img_url;
404
+ image = jQuery("<img />").attr("src",advanced_url);
405
+ jQuery(image).load(function() {
406
+ /*jQuery("#wphead img#header-logo").attr('src', advanced_url);
407
+ jQuery("#wphead img#header-logo").attr('width',this.width);
408
+ jQuery("#wphead img#header-logo").attr('height',this.height);
409
+ jQuery("#wphead").css('height', (14 + this.height)+'px');
410
+ jQuery("#wphead img#header-logo").show();*/
411
+ jQuery("#wpbody-content").prepend(image);
412
+ });
413
+ <?php } ?>
414
 
415
  <?php } ?>
416
  <?php if(get_option('agca_site_heading')==true){ ?>
423
  jQuery("#wp-admin-bar-site-name a:first").html('<?php echo get_option('agca_custom_site_heading'); ?>');
424
  }
425
  <?php } ?>
426
+
427
+ <?php if($wpversion >="3.3"){ ?>
428
+ <?php if(get_option('agca_admin_bar_comments')!=""){ ?>
429
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-comments").css("display","none");
430
+ <?php } ?>
431
+ <?php if(get_option('agca_admin_bar_new_content')!=""){ ?>
432
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content").css("display","none");
433
+ <?php } ?>
434
+ <?php } ?>
435
+
436
  <?php if(get_option('agca_update_bar')==true){ ?>
437
  jQuery("#update-nag").css("display","none");
438
  jQuery(".update-nag").css("display","none");
495
  <?php //code for wp version >= 3.2 ?>
496
  <?php if($wpversion >= 3.2 ){ ?>
497
  jQuery("#user_info #user_info_links a:eq(1)").text("<?php echo get_option('agca_logout'); ?>");
498
+ <?php }
499
+ if($wpversion >= 3.3 ){ ?>
500
+ jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-logout a").text("<?php echo get_option('agca_logout'); ?>");
501
+ <?php }
502
+ if($wpversion < 3.2){ ?>
503
  <?php //code for wp version < 3.2 ?>
504
  jQuery("#user_info a:eq(1)").text("<?php echo get_option('agca_logout'); ?>");
505
  <?php } ?>
508
  <?php if($wpversion >= 3.2 ){ ?>
509
  jQuery("#user_info #user_info_links li:eq(0)").remove();
510
  <?php }?>
511
+ <?php if($wpversion >= 3.3 ){ ?>
512
+ jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("visibility","hidden");
513
+ jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("height","10px");
514
+ <?php }?>
515
  <?php } ?>
516
  <?php if(get_option('agca_logout_only')==true){ ?>
517
  <?php //code for wp version >= 3.2 ?>
522
  <?php } ?>
523
  var logoutLink = jQuery("#user_info a:nth-child(2)").attr("href");
524
  jQuery("#user_info").html("<a href=\""+logoutLink+"\" title=\"Log Out\">"+logoutText+"</a>");
525
+ <?php } ?>
526
+ <?php if($wpversion >= 3.3 ){ ?>
527
+ var logout_content = jQuery("li#wp-admin-bar-logout").html();
528
+ jQuery("ul#wp-admin-bar-top-secondary").html('<li id="wp-admin-bar-logout">'+ logout_content +'</li>');
529
+ <?php } ?>
530
+ <?php if($wpversion < 3.2){ ?>
531
  var logoutText = jQuery("#user_info a:nth-child(2)").text();
532
  var logoutLink = jQuery("#user_info a:nth-child(2)").attr("href");
533
  jQuery("#user_info").html("<a href=\""+logoutLink+"\" title=\"Log Out\">"+logoutText+"</a>");
777
 
778
  <script type="text/javascript">
779
  document.write('<style type="text/css">html{display:none;}</style>');
780
+ var agca_version = "1.2.5.2";
781
  var wpversion = "<?php echo $wpversion; ?>";
782
  /* <![CDATA[ */
783
  jQuery(document).ready(function() {
864
  <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/agca_farbtastic.js"></script>
865
  <?php //includes ?>
866
  <div class="wrap">
867
+ <h1 style="color:green">AG Custom Admin Settings <span style="font-size:15px;">(v1.2.5.2)</span></h1>
868
  <div id="agca_news">&nbsp;</div><br />
869
  <form method="post" id="agca_form" action="options.php">
870
  <?php settings_fields( 'agca-options-group' ); ?>
871
  <table>
872
  <tr valign="center" >
873
  <th scope="row">
874
+ <label title="If checked, all users will be affected with these changes, except admin. Not checked = apply for all" for="agca_role_allbutadmin">Do not apply these settings for Admin&nbsp;&nbsp;</label>
875
  </th>
876
+ <td><input title="If checked, all users will be affected with these changes, except admin. Not checked = apply for all" type="checkbox" name="agca_role_allbutadmin" value="true" <?php if (get_option('agca_role_allbutadmin')==true) echo 'checked="checked" '; echo get_option('agca_role_allbutadmin'); ?> />
877
  </td>
878
  </tr>
879
  </table>
944
  <input title="Small Wordpress logo in admin top bar" type="checkbox" name="agca_header_logo" value="true" <?php if (get_option('agca_header_logo')==true) echo 'checked="checked" '; ?> />
945
  </td>
946
  </tr>
947
+ <?php if($wpversion>=3.3){?>
948
+ <tr valign="center">
949
+ <th >
950
+ <label title="Removes comments block from admin bar" for="agca_admin_bar_comments">Hide admin bar comments</label>
951
+ </th>
952
+ <td>
953
+ <input title="Removes comments block from admin bar" type="checkbox" name="agca_admin_bar_comments" value="true" <?php if (get_option('agca_admin_bar_comments')==true) echo 'checked="checked" '; ?> />
954
+ </td>
955
+ </tr>
956
+ <tr valign="center">
957
+ <th >
958
+ <label title="Removes 'New' block with its contents from admin bar" for="agca_admin_bar_new_content">Hide admin bar new content</label>
959
+ </th>
960
+ <td>
961
+ <input title="Removes 'New' block with its contents from admin bar" type="checkbox" name="agca_admin_bar_new_content" value="true" <?php if (get_option('agca_admin_bar_new_content')==true) echo 'checked="checked" '; ?> />
962
+ </td>
963
+ </tr>
964
+ <?php } ?>
965
+
966
  <tr valign="center">
967
  <th scope="row">
968
  <label title="Adds custom text in admin top bar. Default Wordpress heading stays intact." for="agca_custom_site_heading">Custom blog heading</label>
979
  <input title="Hides yellow bar with notifications of new Wordpress release" type="checkbox" name="agca_update_bar" value="true" <?php if (get_option('agca_update_bar')==true) echo 'checked="checked" '; ?> />
980
  </td>
981
  </tr>
982
+
983
+ <?php if($wpversion<3.3){ ?>
984
  <tr valign="center">
985
  <th scope="row">
986
  <label for="agca_site_heading">Hide default blog heading</label>
989
  <input type="checkbox" name="agca_site_heading" value="true" <?php if (get_option('agca_site_heading')==true) echo 'checked="checked" '; ?> />
990
  </td>
991
  </tr>
992
+ <?php } ?>
993
+
994
  <tr valign="center">
995
  <td colspan="2">
996
  <div class="ag_table_heading"><h3 tabindex="0">Elements on Right</h3></div>
1035
  <td><input title="Put 'Exit', for example" type="text" size="47" name="agca_logout" value="<?php echo get_option('agca_logout'); ?>" /></td>
1036
  </tr>
1037
  <?php if($wpversion >= 3.2){ ?>
1038
+ <?php
1039
+ $profile_text = 'Remove "Your profile" option from dropdown menu';
1040
+ if($wpversion >= 3.3){
1041
+ $profile_text = 'Remove "Edit My Profile" option from dropdown menu';
1042
+ }
1043
+ ?>
1044
  <tr valign="center">
1045
  <th scope="row">
1046
+ <label for="agca_remove_your_profile"><?php echo $profile_text; ?></label>
1047
  </th>
1048
  <td>
1049
  <input type="checkbox" name="agca_remove_your_profile" value="true" <?php if (get_option('agca_remove_your_profile')==true) echo 'checked="checked" '; ?> />
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wordpress.argonius.com/donate
4
  Tags: admin, customize, hide, change admin
5
  Requires at least: 3.0
6
  Tested up to: 3.3
7
- Stable tag: 1.2.5.1
8
 
9
  Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
10
 
@@ -88,6 +88,16 @@ Please use 'Reset Settings' button on Admin Menu page to reset menu configuratio
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
 
 
 
 
 
91
  = 1.2.5.1 =
92
  * Plugin tested up to 3.3
93
  * Fixed major issues with WP 3.3. version
@@ -155,6 +165,9 @@ Please use 'Reset Settings' button on Admin Menu page to reset menu configuratio
155
 
156
  == Upgrade Notice ==
157
 
 
 
 
158
  = 1.2.5.1 =
159
  Plugin is ready for 3.3. WordPress version. Major issues with WP 3.3 are fixed. However, some options are not fully functional, yet. Recommended only for users with 3.3. WP version. Fixed bug with custom admin menu buttons.
160
 
4
  Tags: admin, customize, hide, change admin
5
  Requires at least: 3.0
6
  Tested up to: 3.3
7
+ Stable tag: 1.2.5.2
8
 
9
  Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
10
 
88
 
89
  == Changelog ==
90
 
91
+ = 1.2.5.2 =
92
+ * Fixed several issues with WP 3.3
93
+ * Added options for hidding "comments" and "new" from admin bar
94
+ * Support for custom admin bar images
95
+ * Support for custom Log Out text
96
+ * Hide everything except Log Out button works now
97
+ * Removed few obsolete options
98
+ * Removing "Edit My Profile"
99
+ * Fixed bug when trying to edit custom buttons in admin menu
100
+
101
  = 1.2.5.1 =
102
  * Plugin tested up to 3.3
103
  * Fixed major issues with WP 3.3. version
165
 
166
  == Upgrade Notice ==
167
 
168
+ = 1.2.5.2 =
169
+ Full compatibility with WP 3.3. Fixed several issues with this version. Removed obsolete options for old WP versions, added new options to fit 3.3 version. Update is highly recommonded for WP 3.3 users.
170
+
171
  = 1.2.5.1 =
172
  Plugin is ready for 3.3. WordPress version. Major issues with WP 3.3 are fixed. However, some options are not fully functional, yet. Recommended only for users with 3.3. WP version. Fixed bug with custom admin menu buttons.
173