Absolutely Glamorous Custom Admin - Version 1.2.7.2

Version Description

  • Escaping characters (like single quote) in footer text
  • Fixed AGCA alert message issue
  • Prepared for 3.6. WordPress releas
  • Other bug fixes.
Download this release

Release Info

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

Code changes from version 1.2.7.1 to 1.2.7.2

Files changed (3) hide show
  1. plugin.php +28 -26
  2. readme.txt +11 -1
  3. script/ag_script.js +6 -2
plugin.php CHANGED
@@ -4,10 +4,10 @@ Plugin Name: AG Custom Admin
4
  Plugin URI: http://agca.argonius.com/ag-custom-admin/category/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.7.1
8
  Author URI: http://www.argonius.com/
9
 
10
- Copyright 2011. Argonius (email : info@argonius.com)
11
 
12
  This program is free software: you can redistribute it and/or modify
13
  it under the terms of the GNU General Public License as published by
@@ -22,9 +22,6 @@ Author URI: http://www.argonius.com/
22
  You should have received a copy of the GNU General Public License
23
  along with this program. If not, see <http://www.gnu.org/licenses/>.
24
  */
25
-
26
- //require_once('/../../../../../FirePHPCore/lib/FirePHPCore/fb.php');
27
- //fb($_POST);
28
 
29
  $agca = new AGCA();
30
 
@@ -52,7 +49,7 @@ class AGCA{
52
  /*Initialize properties*/
53
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
54
  //fb($this->colorizer);
55
- $this->agca_version = "1.2.7.1";
56
  }
57
  // Add donate and support information
58
  function jk_filter_plugin_links($links, $file)
@@ -128,9 +125,13 @@ class AGCA{
128
  <?php
129
  }
130
 
 
 
 
 
131
  function reloadScript(){
132
- if(in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) || WP_ADMIN == 1){
133
- wp_enqueue_script('jquery');
134
  }
135
  }
136
 
@@ -534,21 +535,22 @@ class AGCA{
534
  }
535
 
536
  function finalErrorCheck(){
537
- ?>
538
  function AGCAErrorPage(){
539
  if(document.getElementsByTagName('html')[0].style.visibility == ""){
540
- var txt = "";
541
- txt += 'AG Custom Admin Error\n\n\n';
542
- txt += 'AG Custom Admin is unable to correctly process this page. Probably there are some errors thrown from some of the installed plugins or templates.\n\n\n';
543
- txt += 'To resolve this issue please:\n\n';
544
- txt += '* Check browser\'s console for errors. Analyse .js script location which throws the error. Location of the script can give you more information about where is the source of the problem. Usualy it is a location of a plugin or a template. If there are more than one error, usualy the first one is the one which caused this problem.\n\n';
545
- txt += '* If you can\'t access your login page, please disable JavaScript in your browser. After you log in, you can remove or fix problematic plugin, and re-enable JavaScript again.\n\n';
546
- txt += '* If you can\'t find the source of the problem by yourself, please post this error to AGCA WordPress.org support page(http://wordpress.org/extend/plugins/ag-custom-admin/) or to AGCA support page(http://agca.argonius.com/ag-custom-admin/)';
547
- txt += '\n\nThank you.';
548
- alert(txt);
549
  }
550
- }
551
- window.setTimeout(AGCAErrorPage,4000);
 
552
  <?php
553
  }
554
 
@@ -1094,7 +1096,7 @@ try
1094
 
1095
 
1096
  <?php if(get_option('agca_footer_left')!=""){ ?>
1097
- jQuery("#footer-left").html('<?php echo get_option('agca_footer_left'); ?>');
1098
  <?php } ?>
1099
  <?php if(get_option('agca_footer_left_hide')==true){ ?>
1100
  jQuery("#footer-left").css("display","none");
@@ -1325,7 +1327,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1325
  errors = "AGCA - ADMIN ERROR: " + err.name + " / " + err.message;
1326
  alert(errors);
1327
  }finally{
1328
- jQuery('html').css('visibility','visible');
1329
  if(errors){
1330
  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>');
1331
  }
@@ -1453,7 +1455,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1453
  jQuery('label,h1,h2,h3,h4,h5,h6,a,p,.form-table th,.form-wrap label').css('text-shadow','none');
1454
 
1455
  if(isWPHigherOrEqualThan("3.3")){
1456
- jQuery("body.login").css("background","<?php echo $this->colorizer['login_color_background'];?>");
1457
  }else{
1458
 
1459
  <?php
@@ -1524,7 +1526,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1524
  <table>
1525
  <tr valign="left" >
1526
  <th scope="row">
1527
- <label title="If checked, all users will be affected with these changes, except admin. Not checked = apply for all</br></br><strong>Q</strong>: Who is administrator?</br><strong>A</strong>: Go to <i>Advanced</i> tab and change capability option to define admin users." for="agca_role_allbutadmin">Do not apply these settings for Admin&nbsp;&nbsp;</label>
1528
  </th>
1529
  <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'); ?> />
1530
  </td>
@@ -1865,10 +1867,10 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1865
  </tr>
1866
  <tr valign="center">
1867
  <th scope="row">
1868
- <label title="Replaces text 'Thank you for creating with WordPress. | Documentation | Feedback' with custom text" for="agca_footer_left">Change footer text</label>
1869
  </th>
1870
  <td>
1871
- <textarea title="Replaces text 'Thank you for creating with WordPress. | Documentation | Feedback' with custom text" rows="5" name="agca_footer_left" cols="40"><?php echo htmlspecialchars(get_option('agca_footer_left')); ?></textarea>
1872
  </td>
1873
  </tr>
1874
  <tr valign="center">
4
  Plugin URI: http://agca.argonius.com/ag-custom-admin/category/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.7.2
8
  Author URI: http://www.argonius.com/
9
 
10
+ Copyright 2013. Argonius (email : info@argonius.com)
11
 
12
  This program is free software: you can redistribute it and/or modify
13
  it under the terms of the GNU General Public License as published by
22
  You should have received a copy of the GNU General Public License
23
  along with this program. If not, see <http://www.gnu.org/licenses/>.
24
  */
 
 
 
25
 
26
  $agca = new AGCA();
27
 
49
  /*Initialize properties*/
50
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
51
  //fb($this->colorizer);
52
+ $this->agca_version = "1.2.7.2";
53
  }
54
  // Add donate and support information
55
  function jk_filter_plugin_links($links, $file)
125
  <?php
126
  }
127
 
128
+ function agca_enqueue_scripts() {
129
+ wp_enqueue_script('jquery');
130
+ }
131
+
132
  function reloadScript(){
133
+ if(in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) || WP_ADMIN == 1){
134
+ add_action('init', array(&$this,'agca_enqueue_scripts'));
135
  }
136
  }
137
 
535
  }
536
 
537
  function finalErrorCheck(){
538
+ ?>
539
  function AGCAErrorPage(){
540
  if(document.getElementsByTagName('html')[0].style.visibility == ""){
541
+ var txt = "";
542
+ txt += '</br></br>AG Custom Admin is unable to correctly process this page. Probably there are some errors thrown from some of the installed plugins or templates.</br></br>';
543
+ txt += 'To resolve this issue please:</br><ul style="list-style-type:disc;list-style-position: inside;">';
544
+ txt += '<li><strong>Check browser\'s console for errors</strong>: Please analyse .js script location which throws the error. Location of the script can give you more information about where is the source of the problem. Usualy it is a location of a plugin or a template. If there are several errors, usualy the first one is the one which caused this problem, and you should try to resolve that one first.</li>';
545
+ txt += '<li><strong>Find the source of the problem</strong>: Please try disabling plugins/themes one by one, until the problem is solved. If you disable some plugin and the problem is solved after that, most likely is that plugin does not work well.</li>';
546
+ txt += '<li><strong>Can\'t access your login page?</strong> Please disable JavaScript in your browser. After you log in, you can remove or fix problematic plugin, and re-enable JavaScript again.</li>';
547
+ txt += '<li><strong>Still no progress?</strong> If you can\'t find the source of the problem by yourself, please check our <a target="_blank" href="http://agca.argonius.com/ag-custom-admin/ag_custom_admin/ag-custom-admin-js-error">support page for this error</a>. You can check also our <a target="_blank" href="http://wordpress.org/extend/plugins/ag-custom-admin/">AGCA WordPress.org support page</a></li>';
548
+ txt += '</ul></br>Thank you';
549
+ document.body.innerHTML = '<div style="border: 1px solid gray;width:500px;height:auto;color:gray;background:white;margin:10px;margin-left:auto;margin-right:auto;padding: 20px;"><strong>AG Custom Admin JS Error</strong></br></br>Please try again after clearing browser\'s cache and reloading the page. If problem persists, please contact your administrator.</br></br><a href="#" onclick="document.getElementById(\'agca_more_info_for_admin\').style.display = \'block\'">Debug Info (for site administrator)</a><span style="display:none" id="agca_more_info_for_admin">'+txt+'</span></div>';
550
  }
551
+ }
552
+ window.setTimeout(AGCAErrorPage, 15000);
553
+
554
  <?php
555
  }
556
 
1096
 
1097
 
1098
  <?php if(get_option('agca_footer_left')!=""){ ?>
1099
+ jQuery("#footer-left").html('<?php echo addslashes(get_option('agca_footer_left')); ?>');
1100
  <?php } ?>
1101
  <?php if(get_option('agca_footer_left_hide')==true){ ?>
1102
  jQuery("#footer-left").css("display","none");
1327
  errors = "AGCA - ADMIN ERROR: " + err.name + " / " + err.message;
1328
  alert(errors);
1329
  }finally{
1330
+ jQuery('html').css('visibility','visible');
1331
  if(errors){
1332
  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>');
1333
  }
1455
  jQuery('label,h1,h2,h3,h4,h5,h6,a,p,.form-table th,.form-wrap label').css('text-shadow','none');
1456
 
1457
  if(isWPHigherOrEqualThan("3.3")){
1458
+ jQuery("body.login, html").css("background","<?php echo $this->colorizer['login_color_background'];?>");
1459
  }else{
1460
 
1461
  <?php
1526
  <table>
1527
  <tr valign="left" >
1528
  <th scope="row">
1529
+ <label title="If checked, all users will be affected with these changes, except admin. Not checked = apply for all</br></br><strong>Q</strong>: Who is administrator?</br><strong>A</strong>: Go to <i>Advanced</i> tab and change capability option to define admin users." for="agca_role_allbutadmin">Do not apply customizations for Administrator&nbsp;&nbsp;</label>
1530
  </th>
1531
  <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'); ?> />
1532
  </td>
1867
  </tr>
1868
  <tr valign="center">
1869
  <th scope="row">
1870
+ <label title="Replaces text 'Thank you for creating with WordPress' with custom text" for="agca_footer_left">Change footer text</label>
1871
  </th>
1872
  <td>
1873
+ <textarea title="Replaces text 'Thank you for creating with WordPress' with custom text" rows="5" name="agca_footer_left" cols="40"><?php echo htmlspecialchars(get_option('agca_footer_left')); ?></textarea>
1874
  </td>
1875
  </tr>
1876
  <tr valign="center">
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://agca.argonius.com/ag-custom-admin/support-for-future-develop
4
  Tags: admin, customize, hide, change admin
5
  Requires at least: 3.0
6
  Tested up to: 3.5.1
7
- Stable tag: 1.2.7.1
8
 
9
  Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
10
 
@@ -113,6 +113,12 @@ Try clearing browser's cache. If that does not work, go to browser's console and
113
 
114
  == Changelog ==
115
 
 
 
 
 
 
 
116
  = 1.2.7.1 =
117
  * Removed AGCA script on site pages automaticaly, if user is not logged in
118
  * Custom WordPress admin title. Using custom title templates
@@ -279,6 +285,10 @@ Try clearing browser's cache. If that does not work, go to browser's console and
279
 
280
  == Upgrade Notice ==
281
 
 
 
 
 
282
  = 1.2.7.1 =
283
  Bug fixes. Removing admin bar site title. Custom page titles in WP admin.
284
 
4
  Tags: admin, customize, hide, change admin
5
  Requires at least: 3.0
6
  Tested up to: 3.5.1
7
+ Stable tag: 1.2.7.2
8
 
9
  Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
10
 
113
 
114
  == Changelog ==
115
 
116
+ = 1.2.7.2 =
117
+ * Escaping characters (like single quote) in footer text
118
+ * Fixed AGCA alert message issue
119
+ * Prepared for 3.6. WordPress releas
120
+ * Other bug fixes.
121
+
122
  = 1.2.7.1 =
123
  * Removed AGCA script on site pages automaticaly, if user is not logged in
124
  * Custom WordPress admin title. Using custom title templates
285
 
286
  == Upgrade Notice ==
287
 
288
+
289
+ = 1.2.7.2 =
290
+ Bug fixes. Preparation for 3.6 WordPress
291
+
292
  = 1.2.7.1 =
293
  Bug fixes. Removing admin bar site title. Custom page titles in WP admin.
294
 
script/ag_script.js CHANGED
@@ -680,7 +680,7 @@ function updateTargetColor(id, color){
680
  case 'login_color_background':
681
  jQuery('body.login').css({
682
  'background-color':color
683
- });
684
  break;
685
 
686
  case 'color_header':
@@ -1034,7 +1034,11 @@ function isWPHigherOrEqualThan(targetVersion){
1034
  "3.5.2",
1035
  "3.5.3",
1036
  "3.5.4",
1037
- "3.6"];
 
 
 
 
1038
  //remove sufixes, beta RC etc
1039
  if (wpversion.indexOf("-")!=-1){
1040
  var parts = wpversion.split("-");
680
  case 'login_color_background':
681
  jQuery('body.login').css({
682
  'background-color':color
683
+ });
684
  break;
685
 
686
  case 'color_header':
1034
  "3.5.2",
1035
  "3.5.3",
1036
  "3.5.4",
1037
+ "3.6",
1038
+ "3.6.1",
1039
+ "3.6.2",
1040
+ "3.6.3",
1041
+ "3.7"];
1042
  //remove sufixes, beta RC etc
1043
  if (wpversion.indexOf("-")!=-1){
1044
  var parts = wpversion.split("-");