Absolutely Glamorous Custom Admin - Version 1.2.5.1

Version Description

  • Plugin tested up to 3.3
  • Fixed major issues with WP 3.3. version
  • 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.1
Comparing to
See all releases

Code changes from version 1.2.5 to 1.2.5.1

Files changed (3) hide show
  1. plugin.php +38 -8
  2. readme.txt +10 -2
  3. script/ag_script.js +7 -6
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
8
  Author URI: http://wordpress.argonius.com/ag-custom-admin
9
 
10
  Copyright 2011. Argonius (email : info@argonius.com)
@@ -302,7 +302,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";
306
  var errors = false;
307
 
308
  /* <![CDATA[ */
@@ -390,6 +390,10 @@ try
390
  <?php } ?>
391
  <?php if(get_option('agca_custom_site_heading')!=""){ ?>
392
  jQuery("#wphead #site-heading").after('<h1><?php echo get_option('agca_custom_site_heading'); ?></h1>');
 
 
 
 
393
  <?php } ?>
394
  <?php if(get_option('agca_update_bar')==true){ ?>
395
  jQuery("#update-nag").css("display","none");
@@ -397,6 +401,9 @@ try
397
  <?php } ?>
398
  <?php if(get_option('agca_header')==true){ ?>
399
  jQuery("#wphead").css("display","none");
 
 
 
400
  <?php } ?>
401
  <?php if((get_option('agca_header')==true)&&(get_option('agca_header_show_logout')==true)){ ?>
402
  var clon ="";
@@ -411,19 +418,33 @@ try
411
  }
412
  jQuery("#wphead").after(clon);
413
 
 
 
 
 
 
 
414
  <?php } ?>
415
  <?php if(get_option('agca_footer')==true){ ?>
416
  jQuery("#footer").css("display","none");
417
  <?php } ?>
418
  <?php if(get_option('agca_howdy')!=""){ ?>
419
  <?php //code for wp version >= 3.2 ?>
420
- <?php if($wpversion >= 3.2 ){ ?>
421
  var alltext="";
422
  alltext="";
423
  alltext = jQuery('#user_info div.hide-if-no-js').html();
424
  alltext = alltext.replace('Howdy',"<?php echo get_option('agca_howdy'); ?>");
425
  jQuery("#user_info div.hide-if-no-js").html(alltext);
426
 
 
 
 
 
 
 
 
 
427
  <?php }else{ ?>
428
  <?php //code for wp version < 3.2 ?>
429
  var howdyText = jQuery("#user_info").html();
@@ -540,8 +561,10 @@ try
540
  $this->remove_dashboard_widget('dashboard_secondary','side');
541
  }else{
542
  ?>jQuery("#dashboard_secondary").css("display","block");<?php
543
- }
544
- ?>
 
 
545
 
546
 
547
  <?php /*ADMIN MENU*/ ?>
@@ -665,7 +688,7 @@ try
665
  <?php //COLORIZER END ?>
666
  <?php } //end of apply for any user except admin ?>
667
  /*Add user buttons*/
668
- jQuery('#ag_add_adminmenu').append(buttonsJq);
669
  }catch(err){
670
  errors = "AGCA - ADMIN ERROR: " + err.name + " / " + err.message;
671
  alert(errors);
@@ -686,6 +709,11 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
686
  .form-table th{
687
  width:300px;
688
  }
 
 
 
 
 
689
  </style>
690
  <?php
691
  }
@@ -699,7 +727,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
699
 
700
  <script type="text/javascript">
701
  document.write('<style type="text/css">html{display:none;}</style>');
702
- var agca_version = "1.2.5";
703
  var wpversion = "<?php echo $wpversion; ?>";
704
  /* <![CDATA[ */
705
  jQuery(document).ready(function() {
@@ -786,7 +814,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
786
  <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/agca_farbtastic.js"></script>
787
  <?php //includes ?>
788
  <div class="wrap">
789
- <h1 style="color:green">AG Custom Admin Settings <span style="font-size:15px;">(v1.2.5)</span></h1>
790
  <div id="agca_news">&nbsp;</div><br />
791
  <form method="post" id="agca_form" action="options.php">
792
  <?php settings_fields( 'agca-options-group' ); ?>
@@ -839,6 +867,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
839
  </td>
840
  <td></td>
841
  </tr>
 
842
  <tr valign="center">
843
  <th >
844
  <label title="This is link next to heading in admin bar" for="agca_privacy_options">Hide Privacy link</label>
@@ -847,6 +876,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
847
  <input type="checkbox" title="This is link next to heading in admin bar" name="agca_privacy_options" value="true" <?php if (get_option('agca_privacy_options')==true) echo 'checked="checked" '; ?> />
848
  </td>
849
  </tr>
 
850
  <tr valign="center">
851
  <th >
852
  <label title="Change default WordPress logo with custom image." for="agca_header_logo_custom">Change WordPress logo</label>
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)
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[ */
390
  <?php } ?>
391
  <?php if(get_option('agca_custom_site_heading')!=""){ ?>
392
  jQuery("#wphead #site-heading").after('<h1><?php echo get_option('agca_custom_site_heading'); ?></h1>');
393
+ //3.3FIX
394
+ if(wpversion=="3.3"){
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");
401
  <?php } ?>
402
  <?php if(get_option('agca_header')==true){ ?>
403
  jQuery("#wphead").css("display","none");
404
+
405
+ //3.3FIX
406
+ jQuery("#wpadminbar").css("display","none");
407
  <?php } ?>
408
  <?php if((get_option('agca_header')==true)&&(get_option('agca_header_show_logout')==true)){ ?>
409
  var clon ="";
418
  }
419
  jQuery("#wphead").after(clon);
420
 
421
+ //3.3.FIX
422
+ if(wpversion == "3.3"){
423
+ jQuery("#wpbody-content").prepend('<a href="../wp-login.php?action=logout" tabindex="10" style="float:right;margin-right:20px" class="ab-item">Log Out</a>');
424
+
425
+ }
426
+
427
  <?php } ?>
428
  <?php if(get_option('agca_footer')==true){ ?>
429
  jQuery("#footer").css("display","none");
430
  <?php } ?>
431
  <?php if(get_option('agca_howdy')!=""){ ?>
432
  <?php //code for wp version >= 3.2 ?>
433
+ <?php if($wpversion >= 3.2 && $wpversion < 3.3){ ?>
434
  var alltext="";
435
  alltext="";
436
  alltext = jQuery('#user_info div.hide-if-no-js').html();
437
  alltext = alltext.replace('Howdy',"<?php echo get_option('agca_howdy'); ?>");
438
  jQuery("#user_info div.hide-if-no-js").html(alltext);
439
 
440
+ <?php }
441
+ //3.3FIX
442
+ else if($wpversion == 3.3){ ?>
443
+ var alltext="";
444
+ alltext="";
445
+ alltext = jQuery('li#wp-admin-bar-my-account').html();
446
+ alltext = alltext.replace('Howdy',"<?php echo get_option('agca_howdy'); ?>");
447
+ jQuery("li#wp-admin-bar-my-account").html(alltext);
448
  <?php }else{ ?>
449
  <?php //code for wp version < 3.2 ?>
450
  var howdyText = jQuery("#user_info").html();
561
  $this->remove_dashboard_widget('dashboard_secondary','side');
562
  }else{
563
  ?>jQuery("#dashboard_secondary").css("display","block");<?php
564
+ }
565
+
566
+ ?>
567
+
568
 
569
 
570
  <?php /*ADMIN MENU*/ ?>
688
  <?php //COLORIZER END ?>
689
  <?php } //end of apply for any user except admin ?>
690
  /*Add user buttons*/
691
+ jQuery('#ag_add_adminmenu').append(buttonsJq);
692
  }catch(err){
693
  errors = "AGCA - ADMIN ERROR: " + err.name + " / " + err.message;
694
  alert(errors);
709
  .form-table th{
710
  width:300px;
711
  }
712
+
713
+ /*3.3.FIX*/
714
+ #dashboard-widgets div.empty-container{
715
+ display:none;
716
+ }
717
  </style>
718
  <?php
719
  }
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
  <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' ); ?>
867
  </td>
868
  <td></td>
869
  </tr>
870
+ <?php if($wpversion<3.3){?>
871
  <tr valign="center">
872
  <th >
873
  <label title="This is link next to heading in admin bar" for="agca_privacy_options">Hide Privacy link</label>
876
  <input type="checkbox" title="This is link next to heading in admin bar" name="agca_privacy_options" value="true" <?php if (get_option('agca_privacy_options')==true) echo 'checked="checked" '; ?> />
877
  </td>
878
  </tr>
879
+ <?php } ?>
880
  <tr valign="center">
881
  <th >
882
  <label title="Change default WordPress logo with custom image." for="agca_header_logo_custom">Change WordPress logo</label>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: argonius
3
  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.2.1
7
- Stable tag: 1.2.5
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,11 @@ Please use 'Reset Settings' button on Admin Menu page to reset menu configuratio
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
91
  = 1.2.5 =
92
  * Plugin tested up to 3.2.1
93
  * Fixed some compatibility issues with other plugins
@@ -150,6 +155,9 @@ Please use 'Reset Settings' button on Admin Menu page to reset menu configuratio
150
 
151
  == Upgrade Notice ==
152
 
 
 
 
153
  = 1.2.5 =
154
  Improved compatibility with other plugins. Tested with Ozh' Admin Drop Down Menu and SexyBookmarks. Fixed screen freezing and white screen of death. Improved error handling and showing.
155
 
3
  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
 
89
  == Changelog ==
90
 
91
+ = 1.2.5.1 =
92
+ * Plugin tested up to 3.3
93
+ * Fixed major issues with WP 3.3. version
94
+ * Fixed bug when trying to edit custom buttons in admin menu
95
+
96
  = 1.2.5 =
97
  * Plugin tested up to 3.2.1
98
  * Fixed some compatibility issues with other plugins
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
+
161
  = 1.2.5 =
162
  Improved compatibility with other plugins. Tested with Ozh' Admin Drop Down Menu and SexyBookmarks. Fixed screen freezing and white screen of death. Improved error handling and showing.
163
 
script/ag_script.js CHANGED
@@ -161,7 +161,7 @@ function createEditMenuPageV32(checkboxes,textboxes){
161
  function showHideSection(text) {
162
  switch(text)
163
  {
164
- case 'Admin Bar': jQuery('#section_admin_bar').show(); jQuery('#section_admin_bar .section_title').trigger('focus');
165
  break;
166
  case 'Admin Footer': jQuery('#section_admin_footer').show(); jQuery('#section_admin_footer .section_title').trigger('focus');
167
  break;
@@ -187,12 +187,13 @@ function hideAllSections(){
187
  jQuery(this).hide();
188
  });
189
  }
190
-
191
  function reloadRemoveButtonEvents(){
192
- jQuery('a.button_remove').click(function(){
 
 
193
  jQuery(this).parent().parent().remove();
194
  });
195
- jQuery('a.button_edit').click(function(){
196
  if(editingButtonNow == false){
197
  var name = jQuery(this).parent().find('button').text();
198
  var url = jQuery(this).parent().find('button').attr('title');
@@ -201,7 +202,7 @@ function reloadRemoveButtonEvents(){
201
  reloadRemoveButtonEvents();
202
  }
203
  });/*Save editing changes*/
204
- jQuery('#ag_add_adminmenu_button_edit').click(function(){
205
  //alert(jQuery(this).parent().html());
206
  var name = jQuery('#ag_add_adminmenu_name_edit').val();
207
  var url = jQuery('#ag_add_adminmenu_url_edit').val();
@@ -222,7 +223,7 @@ function reloadRemoveButtonEvents(){
222
  });
223
  editingButtonNow = false;
224
  });
225
- };
226
 
227
  jQuery(document).ready(function(){
228
  /*Add click handler on main buttons*/
161
  function showHideSection(text) {
162
  switch(text)
163
  {
164
+ case 'Admin Bar': jQuery('#section_admin_bar').show(); jQuery('#section_admin_bar .section_title').trigger('focus');
165
  break;
166
  case 'Admin Footer': jQuery('#section_admin_footer').show(); jQuery('#section_admin_footer .section_title').trigger('focus');
167
  break;
187
  jQuery(this).hide();
188
  });
189
  }
 
190
  function reloadRemoveButtonEvents(){
191
+ }
192
+ jQuery(document).ready(function(){
193
+ jQuery('a.button_remove').live("click", function(){
194
  jQuery(this).parent().parent().remove();
195
  });
196
+ jQuery('a.button_edit').live("click", function(){
197
  if(editingButtonNow == false){
198
  var name = jQuery(this).parent().find('button').text();
199
  var url = jQuery(this).parent().find('button').attr('title');
202
  reloadRemoveButtonEvents();
203
  }
204
  });/*Save editing changes*/
205
+ jQuery('#ag_add_adminmenu_button_edit').live("click", function(){
206
  //alert(jQuery(this).parent().html());
207
  var name = jQuery('#ag_add_adminmenu_name_edit').val();
208
  var url = jQuery('#ag_add_adminmenu_url_edit').val();
223
  });
224
  editingButtonNow = false;
225
  });
226
+ });
227
 
228
  jQuery(document).ready(function(){
229
  /*Add click handler on main buttons*/