Absolutely Glamorous Custom Admin - Version 1.2.6.3

Version Description

  • Included colorizer ON/OFF option to exported settings
  • Automaticaly saving settings after importing
  • Fixed issue with admin bar on site pages
  • Added option for switching between admin and site pages(on wp logo, top left corner on admin bar)
  • Fixed custom Howdy text for other languanges than English.
Download this release

Release Info

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

Code changes from version 1.2.6.2 to 1.2.6.3

Files changed (2) hide show
  1. plugin.php +55 -15
  2. readme.txt +11 -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.6.2
8
  Author URI: http://wordpress.argonius.com/ag-custom-admin
9
 
10
  Copyright 2011. Argonius (email : info@argonius.com)
@@ -32,6 +32,8 @@ class AGCA{
32
  private $colorizer="";
33
  private $active_plugin;
34
  private $agca_version;
 
 
35
  public function __construct()
36
  {
37
 
@@ -48,7 +50,7 @@ class AGCA{
48
  /*Initialize properties*/
49
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
50
  //fb($this->colorizer);
51
- $this->agca_version = "1.2.6.2";
52
  }
53
  // Add donate and support information
54
  function jk_filter_plugin_links($links, $file)
@@ -366,6 +368,7 @@ class AGCA{
366
  'agca_colorizer_turnonof',
367
  'agca_custom_js',
368
  'agca_custom_css',
 
369
  );
370
  }
371
 
@@ -425,6 +428,9 @@ class AGCA{
425
  }
426
 
427
  //echo $str;
 
 
 
428
  }
429
 
430
  function exportSettings(){
@@ -554,10 +560,21 @@ class AGCA{
554
 
555
  function print_page()
556
  {
 
557
  $wpversion = $this->get_wp_version();
558
- ?><style type="text/css">
559
-
560
- </style>
 
 
 
 
 
 
 
 
 
 
561
  <script type="text/javascript">
562
  var wpversion = "<?php echo $wpversion; ?>";
563
  var agca_version = "<?php echo $this->agca_version; ?>";
@@ -576,6 +593,10 @@ class AGCA{
576
  jQuery(function() {
577
  try
578
  {
 
 
 
 
579
  <?php $this->print_admin_bar_scripts(); ?>
580
  }catch(ex){}
581
  });
@@ -696,6 +717,13 @@ class AGCA{
696
  if(isWPHigherOrEqualThan("3.3")){
697
  var href = "<?php echo get_option('agca_wp_logo_custom_link'); ?>";
698
  href = href.replace("%BLOG%", "<?php echo get_bloginfo('wpurl'); ?>");
 
 
 
 
 
 
 
699
  jQuery("li#wp-admin-bar-wp-logo a.ab-item").attr('href',href);
700
  }
701
  <?php }?>
@@ -712,7 +740,7 @@ class AGCA{
712
  <?php if(get_option('agca_header')==true){ ?>
713
  jQuery("#wpadminbar").css("display","none");
714
  jQuery("body.admin-bar").css("padding-top","0");
715
- jQuery("#wphead").css("display","none");
716
 
717
  <?php } ?>
718
  <?php if((get_option('agca_header')==true)&&(get_option('agca_header_show_logout')==true)){ ?>
@@ -738,9 +766,11 @@ class AGCA{
738
  if(isWPHigherOrEqualThan("3.3")){
739
  var alltext="";
740
  alltext="";
 
741
  alltext = jQuery('li#wp-admin-bar-my-account').html();
742
- if(alltext!=null){
743
- alltext = alltext.replace('Howdy',"<?php echo get_option('agca_howdy'); ?>");
 
744
  }
745
  jQuery("li#wp-admin-bar-my-account").html(alltext);
746
  }else if(isWPHigherOrEqualThan("3.2")){
@@ -748,7 +778,8 @@ class AGCA{
748
  alltext="";
749
  alltext = jQuery('#user_info div.hide-if-no-js').html();
750
  if(alltext!=null){
751
- alltext = alltext.replace('Howdy',"<?php echo get_option('agca_howdy'); ?>");
 
752
  }
753
  jQuery("#user_info div.hide-if-no-js").html(alltext);
754
 
@@ -807,7 +838,7 @@ class AGCA{
807
  function print_admin_css()
808
  {
809
  $this->agca_get_includes();
810
-
811
  get_currentuserinfo() ;
812
  global $user_level;
813
  $wpversion = $this->get_wp_version();
@@ -1176,7 +1207,16 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1176
  jQuery("#agca_form").html('<div style="height:500px"><p style="color:red"><strong>WARNING:</strong> AG Custom Admin stops its execution because of an error. Please resolve this error before continue: <br /><br /><strong>' + errors + '</strong></p></div>');
1177
  }
1178
  }
 
 
 
 
 
 
1179
  });
 
 
 
1180
  /* ]]> */
1181
 
1182
  </script>
@@ -1197,7 +1237,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1197
  }
1198
 
1199
  function print_login_head(){
1200
-
1201
  $this->reloadScript();
1202
  $this->agca_get_includes();
1203
  $wpversion = $this->get_wp_version();
@@ -1400,11 +1440,11 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1400
  </tr>
1401
  <tr valign="center">
1402
  <th>
1403
- <label title="Change admin bar logo link." for="agca_wp_logo_custom">Change admin bar logo link</label>
1404
  </th>
1405
  <td>
1406
  <input id="agca_wp_logo_custom_link" type="text" size="47" name="agca_wp_logo_custom_link" value="<?php echo get_option('agca_wp_logo_custom_link'); ?>" /><input type="button" onClick="jQuery('#agca_wp_logo_custom_link').val('');" value="Clear" />
1407
- &nbsp;<p><i>Put here a link for admin bar logo (Use %BLOG% for blog URL)</i>.</p>
1408
  </td>
1409
  </tr>
1410
  <tr valign="center">
@@ -1951,11 +1991,11 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1951
  </tr>
1952
  <tr valign="center">
1953
  <th>
1954
- <label title="Change branding logo link." for="agca_admin_menu_brand_link">Change branding logo link.</label>
1955
  </th>
1956
  <td>
1957
  <input id="agca_admin_menu_brand_link" type="text" size="47" name="agca_admin_menu_brand_link" value="<?php echo get_option('agca_admin_menu_brand_link'); ?>" /><input type="button" onClick="jQuery('#agca_admin_menu_brand_link').val('');" value="Clear" />
1958
- &nbsp;<p><i>Put here a link for branding logo (Use %BLOG% for blog URL)</i>.</p>
1959
  </td>
1960
  </tr>
1961
  <tr valign="center">
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.6.3
8
  Author URI: http://wordpress.argonius.com/ag-custom-admin
9
 
10
  Copyright 2011. Argonius (email : info@argonius.com)
32
  private $colorizer="";
33
  private $active_plugin;
34
  private $agca_version;
35
+ private $context = "";
36
+ private $saveAfterImport = false;
37
  public function __construct()
38
  {
39
 
50
  /*Initialize properties*/
51
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
52
  //fb($this->colorizer);
53
+ $this->agca_version = "1.2.6.3";
54
  }
55
  // Add donate and support information
56
  function jk_filter_plugin_links($links, $file)
368
  'agca_colorizer_turnonof',
369
  'agca_custom_js',
370
  'agca_custom_css',
371
+ 'agca_colorizer_turnonoff',
372
  );
373
  }
374
 
428
  }
429
 
430
  //echo $str;
431
+
432
+ //save imported settings
433
+ $this->saveAfterImport = true;
434
  }
435
 
436
  function exportSettings(){
560
 
561
  function print_page()
562
  {
563
+ $this->context = "page";
564
  $wpversion = $this->get_wp_version();
565
+ ?>
566
+ <style type="text/css">
567
+ #wpadminbar{
568
+ display: none;
569
+ }
570
+ </style>
571
+ <?php if(get_option('agca_header')==true){ ?>
572
+ <script type="text/javascript">
573
+ window.setTimeout(function(){document.getElementsByTagName('html')[0].setAttribute('style',"margin-top:0px !important");},50);
574
+ </script>
575
+
576
+ <?php } ?>
577
+
578
  <script type="text/javascript">
579
  var wpversion = "<?php echo $wpversion; ?>";
580
  var agca_version = "<?php echo $this->agca_version; ?>";
593
  jQuery(function() {
594
  try
595
  {
596
+ <?php if(get_option('agca_header')!=true){ ?>
597
+ jQuery('#wpadminbar').show();
598
+ <?php } ?>
599
+
600
  <?php $this->print_admin_bar_scripts(); ?>
601
  }catch(ex){}
602
  });
717
  if(isWPHigherOrEqualThan("3.3")){
718
  var href = "<?php echo get_option('agca_wp_logo_custom_link'); ?>";
719
  href = href.replace("%BLOG%", "<?php echo get_bloginfo('wpurl'); ?>");
720
+ if(href == "%SWITCH%"){
721
+ href = "<?php echo get_bloginfo('wpurl'); ?>";
722
+ <?php if($this->context == "page"){
723
+ ?>href+="/wp-admin";<?php
724
+ }
725
+ ?>
726
+ }
727
  jQuery("li#wp-admin-bar-wp-logo a.ab-item").attr('href',href);
728
  }
729
  <?php }?>
740
  <?php if(get_option('agca_header')==true){ ?>
741
  jQuery("#wpadminbar").css("display","none");
742
  jQuery("body.admin-bar").css("padding-top","0");
743
+ jQuery("#wphead").css("display","none");
744
 
745
  <?php } ?>
746
  <?php if((get_option('agca_header')==true)&&(get_option('agca_header_show_logout')==true)){ ?>
766
  if(isWPHigherOrEqualThan("3.3")){
767
  var alltext="";
768
  alltext="";
769
+ jQuery('li#wp-admin-bar-my-account').css('cursor','default');
770
  alltext = jQuery('li#wp-admin-bar-my-account').html();
771
+ if(alltext!=null){
772
+ var parts = alltext.split(',');
773
+ alltext = "<?php echo get_option('agca_howdy'); ?>" + ", " + parts[1];
774
  }
775
  jQuery("li#wp-admin-bar-my-account").html(alltext);
776
  }else if(isWPHigherOrEqualThan("3.2")){
778
  alltext="";
779
  alltext = jQuery('#user_info div.hide-if-no-js').html();
780
  if(alltext!=null){
781
+ var parts = alltext.split(',');
782
+ alltext = "<?php echo get_option('agca_howdy'); ?>" + ", " + parts[1];
783
  }
784
  jQuery("#user_info div.hide-if-no-js").html(alltext);
785
 
838
  function print_admin_css()
839
  {
840
  $this->agca_get_includes();
841
+ $this->context = "admin";
842
  get_currentuserinfo() ;
843
  global $user_level;
844
  $wpversion = $this->get_wp_version();
1207
  jQuery("#agca_form").html('<div style="height:500px"><p style="color:red"><strong>WARNING:</strong> AG Custom Admin stops its execution because of an error. Please resolve this error before continue: <br /><br /><strong>' + errors + '</strong></p></div>');
1208
  }
1209
  }
1210
+ <?php
1211
+ if($this->saveAfterImport == true){
1212
+ ?>savePluginSettings();<?php
1213
+ }
1214
+ ?>
1215
+
1216
  });
1217
+
1218
+
1219
+
1220
  /* ]]> */
1221
 
1222
  </script>
1237
  }
1238
 
1239
  function print_login_head(){
1240
+ $this->context = "login";
1241
  $this->reloadScript();
1242
  $this->agca_get_includes();
1243
  $wpversion = $this->get_wp_version();
1440
  </tr>
1441
  <tr valign="center">
1442
  <th>
1443
+ <label title="Change admin bar logo link.</br></br>Use:</br><strong>%BLOG%</strong> - for blog URL</br><strong>%SWITCH%</strong> - to switch betweent admin and site area" for="agca_wp_logo_custom">Change admin bar logo link</label>
1444
  </th>
1445
  <td>
1446
  <input id="agca_wp_logo_custom_link" type="text" size="47" name="agca_wp_logo_custom_link" value="<?php echo get_option('agca_wp_logo_custom_link'); ?>" /><input type="button" onClick="jQuery('#agca_wp_logo_custom_link').val('');" value="Clear" />
1447
+ &nbsp;<p><i>Put here a link for admin bar logo </i>.</p>
1448
  </td>
1449
  </tr>
1450
  <tr valign="center">
1991
  </tr>
1992
  <tr valign="center">
1993
  <th>
1994
+ <label title="Change branding logo link.</br></br>Use:</br><strong>%BLOG%</strong> - for blog URL" for="agca_admin_menu_brand_link">Change branding logo link.</label>
1995
  </th>
1996
  <td>
1997
  <input id="agca_admin_menu_brand_link" type="text" size="47" name="agca_admin_menu_brand_link" value="<?php echo get_option('agca_admin_menu_brand_link'); ?>" /><input type="button" onClick="jQuery('#agca_admin_menu_brand_link').val('');" value="Clear" />
1998
+ &nbsp;<p><i>Put here a link for branding logo</i>.</p>
1999
  </td>
2000
  </tr>
2001
  <tr valign="center">
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.4
7
- Stable tag: 1.2.6.2
8
 
9
  Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
10
 
@@ -108,6 +108,13 @@ Try clearing browser's cache. If that does not work, go to browser's console and
108
 
109
  == Changelog ==
110
 
 
 
 
 
 
 
 
111
  = 1.2.6.2 =
112
  * Added custom brand logo url
113
  * Added %BLOG% variables for custom urls
@@ -225,6 +232,9 @@ Try clearing browser's cache. If that does not work, go to browser's console and
225
 
226
  == Upgrade Notice ==
227
 
 
 
 
228
  = 1.2.6.2 =
229
  Ready for WordPress 3.4. A lot of improvements in 1.2.6 series, fixed issues with top bar, caching on updates, better styles... and new features: export/import new colorizer options, better admin menu styles, custom css, custom js, admin bar on site pages.. Fixed bugs since 1.2.6 version. Wrapped up 1.2.6 series release.
230
 
4
  Tags: admin, customize, hide, change admin
5
  Requires at least: 3.0
6
  Tested up to: 3.4
7
+ Stable tag: 1.2.6.3
8
 
9
  Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
10
 
108
 
109
  == Changelog ==
110
 
111
+ = 1.2.6.3 =
112
+ * Included colorizer ON/OFF option to exported settings
113
+ * Automaticaly saving settings after importing
114
+ * Fixed issue with admin bar on site pages
115
+ * Added option for switching between admin and site pages(on wp logo, top left corner on admin bar)
116
+ * Fixed custom Howdy text for other languanges than English.
117
+
118
  = 1.2.6.2 =
119
  * Added custom brand logo url
120
  * Added %BLOG% variables for custom urls
232
 
233
  == Upgrade Notice ==
234
 
235
+ = 1.2.6.3 =
236
+ Fixed several bugs: Admin bar issues, not saving settings after import, changing Howdy text in other languages, colorizer ON/OFF option in settings export.
237
+
238
  = 1.2.6.2 =
239
  Ready for WordPress 3.4. A lot of improvements in 1.2.6 series, fixed issues with top bar, caching on updates, better styles... and new features: export/import new colorizer options, better admin menu styles, custom css, custom js, admin bar on site pages.. Fixed bugs since 1.2.6 version. Wrapped up 1.2.6 series release.
240