Absolutely Glamorous Custom Admin - Version 1.2.7.3

Version Description

  • Fixed single quote character escaping on several settings
  • Added option for removing AGCA JS warning message
  • Fixed "Illegal string offset" server error
Download this release

Release Info

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

Code changes from version 1.2.7.2 to 1.2.7.3

Files changed (3) hide show
  1. plugin.php +28 -21
  2. readme.txt +9 -2
  3. uninstall.php +2 -0
plugin.php CHANGED
@@ -4,7 +4,7 @@ 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.2
8
  Author URI: http://www.argonius.com/
9
 
10
  Copyright 2013. Argonius (email : info@argonius.com)
@@ -49,7 +49,7 @@ class AGCA{
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)
@@ -201,6 +201,7 @@ class AGCA{
201
  register_setting( 'agca-options-group', 'agca_login_register_href' );
202
  register_setting( 'agca-options-group', 'agca_login_lostpassword_remove' );
203
  register_setting( 'agca-options-group', 'agca_admin_capability' );
 
204
 
205
 
206
 
@@ -247,9 +248,13 @@ class AGCA{
247
  }
248
  }else if(isset($_POST['_agca_export_settings']) && $_POST['_agca_export_settings']=="true"){
249
  $this->exportSettings();
250
- }else{
251
-
252
  }
 
 
 
 
 
 
253
  }
254
  }
255
 
@@ -335,6 +340,7 @@ class AGCA{
335
  'agca_custom_js',
336
  'agca_custom_css',
337
  'agca_colorizer_turnonoff',
 
338
  );
339
  }
340
 
@@ -446,12 +452,8 @@ class AGCA{
446
  $class="";
447
  $wpversion = $this->get_wp_version();
448
  $href = $arr["value"];
449
- $target =$arr["target"];;
450
- if($name == 'AG Custom Admin'){
451
- $class="agca_button_only";
452
- $target = "_self";
453
- $href = $arr;
454
- }
455
  $button ="";
456
 
457
  if($wpversion >=3.5 ){
@@ -537,7 +539,8 @@ class AGCA{
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;">';
@@ -545,13 +548,17 @@ class AGCA{
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
 
557
  function print_page()
@@ -708,7 +715,7 @@ class AGCA{
708
 
709
 
710
  if(isWPHigherOrEqualThan("3.3")){
711
- var img_url = '<?php echo get_option('agca_header_logo_custom'); ?>';
712
 
713
  advanced_url = img_url;
714
  image = jQuery("<img />").attr("src",advanced_url);
@@ -718,7 +725,7 @@ class AGCA{
718
  }else{
719
  jQuery("#wphead img#header-logo").attr('src','');
720
  jQuery("#wphead img#header-logo").hide();
721
- var img_url = '<?php echo get_option('agca_header_logo_custom'); ?>';
722
  advanced_url = img_url+ "?" + new Date().getTime();
723
  image = jQuery("<img />").attr("src",advanced_url);
724
  jQuery(image).load(function() {
@@ -763,10 +770,10 @@ class AGCA{
763
  jQuery("#wphead #site-heading").css("display","none");
764
  <?php } ?>
765
  <?php if(get_option('agca_custom_site_heading')!=""){ ?>
766
- jQuery("#wphead #site-heading").after('<h1><?php echo get_option('agca_custom_site_heading'); ?></h1>');
767
  //3.3FIX
768
  if(isWPHigherOrEqualThan("3.3")){
769
- jQuery("#wp-admin-bar-site-name a:first").html('<?php echo get_option('agca_custom_site_heading'); ?>');
770
  }
771
  <?php } ?>
772
  <?php if(get_option('agca_header')==true && $this->context =='admin'){
@@ -1217,7 +1224,7 @@ try
1217
 
1218
  <?php /*Only admin see button*/
1219
  if (current_user_can($this->admin_capability())){ ?>
1220
- jQuery('#adminmenu').append('<?php echo $this->agca_create_admin_button('AG Custom Admin','tools.php?page=ag-custom-admin/plugin.php'); ?>');
1221
  <?php } ?>
1222
 
1223
  <?php /*EDIT MENU ITEMS*/?>
@@ -1391,7 +1398,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1391
  jQuery("#backtoblog").css("display","none");
1392
  <?php } ?>
1393
  <?php if(get_option('agca_login_banner_text')==true){ ?>
1394
- jQuery("#backtoblog").html('<?php echo get_option('agca_login_banner_text'); ?>');
1395
  <?php } ?>
1396
  <?php if(get_option('agca_login_photo_url')==true){ ?>
1397
  advanced_url = "<?php echo get_option('agca_login_photo_url'); ?>";
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.3
8
  Author URI: http://www.argonius.com/
9
 
10
  Copyright 2013. Argonius (email : info@argonius.com)
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.3";
53
  }
54
  // Add donate and support information
55
  function jk_filter_plugin_links($links, $file)
201
  register_setting( 'agca-options-group', 'agca_login_register_href' );
202
  register_setting( 'agca-options-group', 'agca_login_lostpassword_remove' );
203
  register_setting( 'agca-options-group', 'agca_admin_capability' );
204
+ register_setting( 'agca-options-group', 'agca_disablewarning' );
205
 
206
 
207
 
248
  }
249
  }else if(isset($_POST['_agca_export_settings']) && $_POST['_agca_export_settings']=="true"){
250
  $this->exportSettings();
 
 
251
  }
252
+ }
253
+
254
+ if(isset($_GET['agca_action'])){
255
+ if($_GET['agca_action'] == "disablewarning"){
256
+ update_option('agca_disablewarning', true);
257
+ }
258
  }
259
  }
260
 
340
  'agca_custom_js',
341
  'agca_custom_css',
342
  'agca_colorizer_turnonoff',
343
+ 'agca_disablewarning',
344
  );
345
  }
346
 
452
  $class="";
453
  $wpversion = $this->get_wp_version();
454
  $href = $arr["value"];
455
+ $target =$arr["target"];
456
+
 
 
 
 
457
  $button ="";
458
 
459
  if($wpversion >=3.5 ){
539
  function finalErrorCheck(){
540
  ?>
541
  function AGCAErrorPage(){
542
+ if(document.getElementsByTagName('html')[0].style.visibility == ""){
543
+ var ddf ="dfsfsfsfs";
544
  var txt = "";
545
  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>';
546
  txt += 'To resolve this issue please:</br><ul style="list-style-type:disc;list-style-position: inside;">';
548
  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>';
549
  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>';
550
  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>';
551
+ txt += '</ul></br></br>Thank you';
552
+ txt += '</ul></br><a href="<?php echo $_SERVER['PHP_SELF']."?page=ag-custom-admin/plugin.php&agca_action=disablewarning"; ?>" style="color:red;float:right;text-decoration: none;margin-top:-15px;" onclick="return confirm(\'<?php echo "Are you sure you want to disable this message?&nbsp;&nbsp;&nbsp;&nbsp;Please be aware that in case of errors your page might become blank, and you need to check browsers console to find the errors."; ?>\');" >Never show this message again</a>';
553
  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>';
554
  }
555
+ }
556
+ <?php
557
+ if(get_option('agca_disablewarning')==""){
558
+ ?>
559
+ window.setTimeout(AGCAErrorPage, 15000);
560
+ <?php
561
  }
 
 
 
562
  }
563
 
564
  function print_page()
715
 
716
 
717
  if(isWPHigherOrEqualThan("3.3")){
718
+ var img_url = '<?php echo addslashes(get_option('agca_header_logo_custom')); ?>';
719
 
720
  advanced_url = img_url;
721
  image = jQuery("<img />").attr("src",advanced_url);
725
  }else{
726
  jQuery("#wphead img#header-logo").attr('src','');
727
  jQuery("#wphead img#header-logo").hide();
728
+ var img_url = '<?php echo addslashes(get_option('agca_header_logo_custom')); ?>';
729
  advanced_url = img_url+ "?" + new Date().getTime();
730
  image = jQuery("<img />").attr("src",advanced_url);
731
  jQuery(image).load(function() {
770
  jQuery("#wphead #site-heading").css("display","none");
771
  <?php } ?>
772
  <?php if(get_option('agca_custom_site_heading')!=""){ ?>
773
+ jQuery("#wphead #site-heading").after('<h1><?php echo addslashes(get_option('agca_custom_site_heading')); ?></h1>');
774
  //3.3FIX
775
  if(isWPHigherOrEqualThan("3.3")){
776
+ jQuery("#wp-admin-bar-site-name a:first").html('<?php echo addslashes(get_option('agca_custom_site_heading')); ?>');
777
  }
778
  <?php } ?>
779
  <?php if(get_option('agca_header')==true && $this->context =='admin'){
1224
 
1225
  <?php /*Only admin see button*/
1226
  if (current_user_can($this->admin_capability())){ ?>
1227
+ jQuery('#adminmenu').append('<?php echo $this->agca_create_admin_button('AG Custom Admin',array('value'=>'tools.php?page=ag-custom-admin/plugin.php','target'=>'_self')); ?>');
1228
  <?php } ?>
1229
 
1230
  <?php /*EDIT MENU ITEMS*/?>
1398
  jQuery("#backtoblog").css("display","none");
1399
  <?php } ?>
1400
  <?php if(get_option('agca_login_banner_text')==true){ ?>
1401
+ jQuery("#backtoblog").html('<?php echo addslashes(get_option('agca_login_banner_text')); ?>');
1402
  <?php } ?>
1403
  <?php if(get_option('agca_login_photo_url')==true){ ?>
1404
  advanced_url = "<?php echo get_option('agca_login_photo_url'); ?>";
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: argonius
3
  Donate link: http://agca.argonius.com/ag-custom-admin/support-for-future-development
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,6 +113,11 @@ Try clearing browser's cache. If that does not work, go to browser's console and
113
 
114
  == Changelog ==
115
 
 
 
 
 
 
116
  = 1.2.7.2 =
117
  * Escaping characters (like single quote) in footer text
118
  * Fixed AGCA alert message issue
@@ -285,6 +290,8 @@ Try clearing browser's cache. If that does not work, go to browser's console and
285
 
286
  == Upgrade Notice ==
287
 
 
 
288
 
289
  = 1.2.7.2 =
290
  Bug fixes. Preparation for 3.6 WordPress
3
  Donate link: http://agca.argonius.com/ag-custom-admin/support-for-future-development
4
  Tags: admin, customize, hide, change admin
5
  Requires at least: 3.0
6
+ Tested up to: 3.6
7
+ Stable tag: 1.2.7.3
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.3 =
117
+ * Fixed single quote character escaping on several settings
118
+ * Added option for removing AGCA JS warning message
119
+ * Fixed "Illegal string offset" server error
120
+
121
  = 1.2.7.2 =
122
  * Escaping characters (like single quote) in footer text
123
  * Fixed AGCA alert message issue
290
 
291
  == Upgrade Notice ==
292
 
293
+ = 1.2.7.3 =
294
+ Bug fixes.
295
 
296
  = 1.2.7.2 =
297
  Bug fixes. Preparation for 3.6 WordPress
uninstall.php CHANGED
@@ -78,5 +78,7 @@
78
 
79
  delete_option( 'agca_custom_js' );
80
  delete_option( 'agca_custom_css' );
 
 
81
  ?>
82
 
78
 
79
  delete_option( 'agca_custom_js' );
80
  delete_option( 'agca_custom_css' );
81
+
82
+ delete_option( 'agca_disablewarning' );
83
  ?>
84