Absolutely Glamorous Custom Admin - Version 1.3.4

Version Description

  • Fixed add_filter undefined function error
  • Better exception handling
Download this release

Release Info

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

Code changes from version 1.3.3 to 1.3.4

Files changed (2) hide show
  1. plugin.php +37 -47
  2. readme.txt +9 -1
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: All-in-one tool for admin panel customization. Change almost everything: admin menu, dashboard, login page, admin bar etc. Apply admin panel themes.
6
  Author: Argonius
7
- Version: 1.3.3
8
  Author URI: http://www.argonius.com/
9
 
10
  Copyright 2014. Argonius (email : info@argonius.com)
@@ -31,8 +31,8 @@ class AGCA{
31
  private $agca_version;
32
  private $agca_debug = false;
33
  private $admin_capabilities;
34
- private $context = "";
35
- private $saveAfterImport = false;
36
  private $templateCustomizations = "";
37
  private $templates_ep = "http://wordpressadminpanel.com/configuration.php";
38
  public function __construct()
@@ -41,8 +41,10 @@ class AGCA{
41
  $this->checkPOST();
42
  $this->checkGET();
43
 
44
- add_filter('admin_title', array(&$this,'change_title'), 10, 2);
45
- add_filter('plugin_row_meta', array(&$this,'jk_filter_plugin_links'), 10, 2);
 
 
46
  add_action('admin_init', array(&$this,'agca_register_settings'));
47
  add_action('admin_init', array(&$this,'agca_init_session'));
48
  add_action('admin_head', array(&$this,'print_admin_css'));
@@ -54,7 +56,7 @@ class AGCA{
54
  /*Initialize properties*/
55
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
56
  //fb($this->colorizer);
57
- $this->agca_version = "1.3.3";
58
 
59
  /*upload images programmaticaly*/
60
  //TODO upload with AJAX one by one, use post data to send urls one by one
@@ -741,32 +743,7 @@ class AGCA{
741
  $version = $array[0];
742
  return $version;
743
  }
744
-
745
- function finalErrorCheck(){
746
- ?>
747
- function AGCAErrorPage(){
748
- if(document.getElementsByTagName('html')[0].style.visibility == ""){
749
- var ddf ="dfsfsfsfs";
750
- var txt = "";
751
- 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>';
752
- txt += 'To resolve this issue please:</br><ul style="list-style-type:disc;list-style-position: inside;">';
753
- 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>';
754
- 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>';
755
- 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>';
756
- 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>';
757
- txt += '</ul></br></br>Thank you';
758
- 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>';
759
- 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>';
760
- }
761
- }
762
- <?php
763
- if(get_option('agca_disablewarning')==""){
764
- ?>
765
- window.setTimeout(AGCAErrorPage, 15000);
766
- <?php
767
- }
768
- }
769
-
770
  function print_page()
771
  {
772
  if($this->isGuest()){
@@ -1282,13 +1259,32 @@ class AGCA{
1282
  }
1283
  }
1284
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1285
 
1286
  function print_admin_css()
1287
  {
1288
  $agcaTemplateSession = $this->agcaAdminSession();
1289
  $wpversion = $this->get_wp_version();
1290
  $this->context = "admin";
1291
- ?>
 
1292
  <script type="text/javascript">
1293
  var wpversion = "<?php echo $wpversion; ?>";
1294
  var agca_debug = <?php echo ($this->agca_debug)?"true":"false"; ?>;
@@ -1319,7 +1315,6 @@ class AGCA{
1319
  ?>
1320
  <script type="text/javascript">
1321
  document.write('<style type="text/css">html{visibility:hidden;}</style>');
1322
- <?php $this->finalErrorCheck(); ?>
1323
  <?php
1324
  if(isset($_POST['_agca_import_settings']) && $_POST['_agca_import_settings']=='true'){
1325
  echo 'isSettingsImport = true;';
@@ -1694,12 +1689,9 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1694
 
1695
  }catch(err){
1696
  errors = "AGCA - ADMIN ERROR: " + err.name + " / " + err.message;
1697
- alert(errors);
1698
  }finally{
1699
- jQuery('html').css('visibility','visible');
1700
- if(errors){
1701
- 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>');
1702
- }
1703
  }
1704
  <?php
1705
  if($this->saveAfterImport == true){
@@ -1737,10 +1729,10 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1737
  function print_login_head(){
1738
  $this->context = "login";
1739
  $wpversion = $this->get_wp_version();
 
1740
  ?>
1741
- <script type="text/javascript">
1742
- document.write('<style type="text/css">html{visibility:hidden;}</style>');
1743
- <?php $this->finalErrorCheck(); ?>
1744
  var agca_version = "<?php echo $this->agca_version; ?>";
1745
  <?php //var wpversion = "echo $wpversion; ?>
1746
  var agca_debug = <?php echo ($this->agca_debug)?"true":"false"; ?>;
@@ -1844,12 +1836,10 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1844
  } ?>
1845
  <?php //COLORIZER END ?>
1846
  }catch(err){
1847
- alert("AGCA - LOGIN ERROR: " + err.name + " / " + err.message);
1848
- }finally{
1849
-
1850
  jQuery('html').show();
1851
- jQuery('html').css('visibility','visible');
1852
-
1853
  }
1854
  });
1855
  /* ]]> */
4
  Plugin URI: http://agca.argonius.com/ag-custom-admin/category/ag_custom_admin
5
  Description: All-in-one tool for admin panel customization. Change almost everything: admin menu, dashboard, login page, admin bar etc. Apply admin panel themes.
6
  Author: Argonius
7
+ Version: 1.3.4
8
  Author URI: http://www.argonius.com/
9
 
10
  Copyright 2014. Argonius (email : info@argonius.com)
31
  private $agca_version;
32
  private $agca_debug = false;
33
  private $admin_capabilities;
34
+ private $context = "";
35
+ private $saveAfterImport = false;
36
  private $templateCustomizations = "";
37
  private $templates_ep = "http://wordpressadminpanel.com/configuration.php";
38
  public function __construct()
41
  $this->checkPOST();
42
  $this->checkGET();
43
 
44
+ if(function_exists("add_filter")){
45
+ add_filter('admin_title', array(&$this,'change_title'), 10, 2);
46
+ add_filter('plugin_row_meta', array(&$this,'jk_filter_plugin_links'), 10, 2);
47
+ }
48
  add_action('admin_init', array(&$this,'agca_register_settings'));
49
  add_action('admin_init', array(&$this,'agca_init_session'));
50
  add_action('admin_head', array(&$this,'print_admin_css'));
56
  /*Initialize properties*/
57
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
58
  //fb($this->colorizer);
59
+ $this->agca_version = "1.3.4";
60
 
61
  /*upload images programmaticaly*/
62
  //TODO upload with AJAX one by one, use post data to send urls one by one
743
  $version = $array[0];
744
  return $version;
745
  }
746
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
747
  function print_page()
748
  {
749
  if($this->isGuest()){
1259
  }
1260
  }
1261
  }
1262
+
1263
+ function agca_error_check(){
1264
+ ?>
1265
+ <script type="text/javascript">
1266
+ function AGCAErrorPage(msg, url, line){
1267
+ var title = 'AG Custom Admin just caught a JavaScript error on this site:\n\n '+ msg +'\n' + url + '\n' + line+'\n\nThis error prevents AG Custom Admin to work properly. To fix this, please analyse this error message and try to find the source. You can also check browser\'s console to see this error. \n\nIf you need more help, just click on this error message';
1268
+ document.getElementsByTagName('html')[0].style.visibility = "visible";
1269
+ document.body.innerHTML += '<div style="position:absolute;width:auto;height:auto;padding:4px;right:0;top:0;z-index:99999;background:#ff0000;color:#ffffff";border:3px solid #ffffff;><a target="_blank" href="http://agca.argonius.com/ag-custom-admin/ag_custom_admin/error-ocurred-javascript-error-caught" title="'+title+'" style="color:#ffffff;text-decoration:none;font-weight:bold;">Error Ocurred</a></div>';
1270
+ }
1271
+ window.onerror = function(msg, url, line) {
1272
+ window.onload = function() {
1273
+ AGCAErrorPage(msg, url, line);
1274
+ }
1275
+ return true;
1276
+ };
1277
+ </script>
1278
+ <?php
1279
+ }
1280
 
1281
  function print_admin_css()
1282
  {
1283
  $agcaTemplateSession = $this->agcaAdminSession();
1284
  $wpversion = $this->get_wp_version();
1285
  $this->context = "admin";
1286
+ $this->agca_error_check();
1287
+ ?>
1288
  <script type="text/javascript">
1289
  var wpversion = "<?php echo $wpversion; ?>";
1290
  var agca_debug = <?php echo ($this->agca_debug)?"true":"false"; ?>;
1315
  ?>
1316
  <script type="text/javascript">
1317
  document.write('<style type="text/css">html{visibility:hidden;}</style>');
 
1318
  <?php
1319
  if(isset($_POST['_agca_import_settings']) && $_POST['_agca_import_settings']=='true'){
1320
  echo 'isSettingsImport = true;';
1689
 
1690
  }catch(err){
1691
  errors = "AGCA - ADMIN ERROR: " + err.name + " / " + err.message;
1692
+ console.log(errors);
1693
  }finally{
1694
+ jQuery('html').css('visibility','visible');
 
 
 
1695
  }
1696
  <?php
1697
  if($this->saveAfterImport == true){
1729
  function print_login_head(){
1730
  $this->context = "login";
1731
  $wpversion = $this->get_wp_version();
1732
+ $this->agca_error_check();
1733
  ?>
1734
+ <script type="text/javascript">
1735
+ document.write('<style type="text/css">html{visibility:hidden;}</style>');
 
1736
  var agca_version = "<?php echo $this->agca_version; ?>";
1737
  <?php //var wpversion = "echo $wpversion; ?>
1738
  var agca_debug = <?php echo ($this->agca_debug)?"true":"false"; ?>;
1836
  } ?>
1837
  <?php //COLORIZER END ?>
1838
  }catch(err){
1839
+ console.log("AGCA - LOGIN ERROR: " + err.name + " / " + err.message);
1840
+ }finally{
 
1841
  jQuery('html').show();
1842
+ jQuery('html').css('visibility','visible');
 
1843
  }
1844
  });
1845
  /* ]]> */
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, themes, admin themes, admin bar, login page
5
  Requires at least: 3.0
6
  Tested up to: 3.8.1
7
- Stable tag: 1.3.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -145,6 +145,10 @@ Plugin should be always up-to-date with latest WordPress release. If you have fo
145
 
146
  == Changelog ==
147
 
 
 
 
 
148
  = 1.3.3 =
149
  * Fixed compatibility issues with MailPoet plugin
150
 
@@ -363,6 +367,10 @@ Plugin should be always up-to-date with latest WordPress release. If you have fo
363
 
364
  == Upgrade Notice ==
365
 
 
 
 
 
366
  = 1.3.3 =
367
  * Fixed compatibility issues with MailPoet plugin
368
 
4
  Tags: admin, customize, hide, change admin, themes, admin themes, admin bar, login page
5
  Requires at least: 3.0
6
  Tested up to: 3.8.1
7
+ Stable tag: 1.3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
145
 
146
  == Changelog ==
147
 
148
+ = 1.3.4 =
149
+ * Fixed add_filter undefined function error
150
+ * Better exception handling
151
+
152
  = 1.3.3 =
153
  * Fixed compatibility issues with MailPoet plugin
154
 
367
 
368
  == Upgrade Notice ==
369
 
370
+
371
+ = 1.3.4 =
372
+ Bug fixes. Better error handling.
373
+
374
  = 1.3.3 =
375
  * Fixed compatibility issues with MailPoet plugin
376