Absolutely Glamorous Custom Admin - Version 1.4.7

Version Description

  • Removed AG Custom Admin menu top item
  • Better error handling
Download this release

Release Info

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

Code changes from version 1.4.6 to 1.4.7

Files changed (2) hide show
  1. plugin.php +49 -22
  2. readme.txt +8 -1
plugin.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: AG Custom Admin
4
  Plugin URI: http://wordpressadminpanel.com/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.4.6
8
  Author URI: http://www.argonius.com/
9
 
10
  Copyright 2015. Argonius (email : info@argonius.com)
@@ -56,7 +56,7 @@ class AGCA{
56
  /*Initialize properties*/
57
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
58
 
59
- $this->agca_version = "1.4.6";
60
 
61
  /*upload images programmaticaly*/
62
  //TODO upload with AJAX one by one, use post data to send urls one by one
@@ -666,7 +666,7 @@ class AGCA{
666
 
667
 
668
  function agca_create_menu() {
669
- //create new top-level menu
670
  add_management_page( 'AG Custom Admin', 'AG Custom Admin', 'administrator', __FILE__, array(&$this,'agca_admin_page') );
671
  }
672
 
@@ -1184,18 +1184,17 @@ class AGCA{
1184
  ?>
1185
  <script type="text/javascript">
1186
  function AGCAErrorPage(msg, url, line){
1187
- var agca_error_details = "___________________________________________________\n";
1188
- agca_error_details += '\n' + msg +'\nsource:' + url + '\nline:' + line + '\n';
1189
- agca_error_details += "___________________________________________________\n";
1190
- window.agca_error_details_alert = 'AG Custom Admin caught a JavaScript error on this site:\n'+ agca_error_details + '\nThis error prevents AG Custom Admin plugin to work properly. To fix this, please navigate to the link above in your browser and open the source of that page (right click -> view page source) and find the line in code where it fails. In most cases this error should be fixed there.\n\nAs an alternative solution, you could analyse the link above to find the plugin/theme where it was thrown. You can try to disable it or to report this error to their support.\n\nIf you\'re unable to fix this issue by yourself, you can also report it to AGCA support. Please select the content of the error first and press Ctrl+C(Win) or Cmd+C(Mac).\n\nConfirm this message to redirect to AGCA support page, or press Cancel to exit.';
1191
  document.getElementsByTagName('html')[0].style.visibility = "visible";
1192
- document.body.innerHTML += '<div style="background: #ff0000;border-radius: 3px;color: #ffffff;height: auto; margin-right: 13px;margin-top: 47px;padding: 1px 4px;position: fixed; right: 0;top: 0;width: auto;z-index: 99999;"><a target="_blank" href="#" onclick="if(confirm(window.agca_error_details_alert)){window.open(\'http://wordpressadminpanel.com/agca-support/ag_custom_admin/error-ocurred-javascript-error-caught/\')};return false;" title="AG Custom Admin caught a JavaScript error on this page. Please click here fore more info..." style="color: #ffffff !important;font-weight: bold;padding: 4px;text-decoration: none;">!</a></div>';
1193
-
1194
- if(typeof window.console === "object"){
1195
- console.log("___________________________________________________");
1196
- console.log("AG Custom Admin caught a JavaScript on your site:");
1197
- console.log(agca_error_details);
1198
- }
1199
  }
1200
  window.onerror = function(msg, url, line) {
1201
  window.onload = function() {
@@ -1206,13 +1205,38 @@ class AGCA{
1206
  </script>
1207
  <?php
1208
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1209
 
1210
  function print_admin_css()
1211
  {
1212
  $agcaTemplateSession = $this->agcaAdminSession();
1213
  $wpversion = $this->get_wp_version();
1214
  $this->context = "admin";
1215
- $this->agca_error_check();
 
1216
  ?>
1217
  <script type="text/javascript">
1218
  var wpversion = "<?php echo $wpversion; ?>";
@@ -1483,12 +1507,12 @@ try
1483
  jQuery(this).addClass('noclass');
1484
  }
1485
  });
 
 
 
 
1486
  <?php } ?>
1487
-
1488
- <?php /*Only admin see button*/
1489
- if (current_user_can($this->admin_capability())){ ?>
1490
- 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')); ?>');
1491
- <?php } ?>
1492
 
1493
  <?php /*EDIT MENU ITEMS*/?>
1494
  <?php if(get_option('ag_edit_adminmenu_json')!=""){
@@ -1636,8 +1660,9 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1636
 
1637
  function print_login_head(){
1638
  $this->context = "login";
 
1639
  $wpversion = $this->get_wp_version();
1640
- $this->agca_error_check();
1641
  ?>
1642
  <script type="text/javascript">
1643
  document.write('<style type="text/css">html{visibility:hidden;}</style>');
@@ -1769,6 +1794,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1769
  function agca_admin_page() {
1770
 
1771
  $wpversion = $this->get_wp_version();
 
1772
  ?>
1773
  <?php //includes ?>
1774
  <link rel="stylesheet" type="text/css" href="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>style/farbtastic.css?ver=<?php echo $wpversion; ?>" />
@@ -1784,7 +1810,8 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1784
  <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/agca_tmpl.js?ver=<?php echo $wpversion; ?>"></script>
1785
  <?php //includes ?>
1786
  <div class="wrap">
1787
- <h1 style="color:#005B69">AG Custom Admin Settings <span style="font-size:15px;">(v<?php echo $this->agca_version; ?>)</span></h1>
 
1788
  <div id="agca_news">&nbsp;</div><br />
1789
  <form method="post" id="agca_form" action="options.php">
1790
  <?php settings_fields( 'agca-options-group' ); ?>
4
  Plugin URI: http://wordpressadminpanel.com/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.4.7
8
  Author URI: http://www.argonius.com/
9
 
10
  Copyright 2015. Argonius (email : info@argonius.com)
56
  /*Initialize properties*/
57
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
58
 
59
+ $this->agca_version = "1.4.7";
60
 
61
  /*upload images programmaticaly*/
62
  //TODO upload with AJAX one by one, use post data to send urls one by one
666
 
667
 
668
  function agca_create_menu() {
669
+ //create new top-level menu
670
  add_management_page( 'AG Custom Admin', 'AG Custom Admin', 'administrator', __FILE__, array(&$this,'agca_admin_page') );
671
  }
672
 
1184
  ?>
1185
  <script type="text/javascript">
1186
  function AGCAErrorPage(msg, url, line){
1187
+ var agca_error_details = "___________________________________________________<br/>";
1188
+ agca_error_details += '<br/>' + msg +'<br/>source:' + url + '<br/>line:' + line + '<br/>';
1189
+ agca_error_details += "___________________________________________________<br/>";
1190
+ window.agca_error_details_text = agca_error_details + '<br/>This JavaScript error could stop AG Custom Admin plugin to work properly. If everything still works, you can ignore this notification. <br/><br/>Possible solutions:<br/><br/>1) Make sure to have everything up to date: WordPress site, plugins and themes.<br/><br/>2) Try disabling plugins one by one to see if problem can be resolved this way. If so, one of disabled plugins caused this error.<br/><br/>3) Check "source" path of this error. This could be indicator of the plugin/theme that caused the error.<br/><br/>4) If it\'s obvious that error is thrown from a particular plugin/theme, please report this error to their support. <br/><br/>5) Try activating default WordPress theme instead of your current theme.<br/><br/>6) Advanced: Try fixing this issue manually: Navigate to the link above in your browser and open the source of the page (right click -> view page source) and find the line in code where it fails. You should access this file via FTP and try to fix this error on that line.<br/><br/>7) Contact us if nothing above helps. Please do not post errors that are caused by other plugins/themes to our support page. Contact their support instead. If you think that error is somehow related to AG Custom Admin plugin, or something unexpected happens, please report that on our <a href="http://wordpressadminpanel.com/agca-support/ag_custom_admin/error-ocurred-javascript-error-caught/" target="_blank">SUPPORT PAGE</a>';
1191
  document.getElementsByTagName('html')[0].style.visibility = "visible";
1192
+ var errorDivHtml = '<div style="background: #f08080;border-radius: 3px;color: #ffffff;height: auto; margin-right: 13px;padding: 6px 14px;width: 450px;z-index: 99999; position:absolute;">\
1193
+ AG Custom Admin caught an error on your site!&nbsp;<a target="_blank" href="#" onclick="var aedt = document.getElementById(\'agca_error_details_text\'); if(aedt.style.display !== \'block\') {aedt.style.display = \'block\';} else{aedt.style.display = \'none\';} return false;" style="color: #ffffff !important;float:right;font-weight: bold;text-decoration: none;">(show/hide more...)</a><div id="agca_error_details_text" style="display:none;margin: 10px 0;background:#ffffff;border-radius: 5px;padding:8px;color: #777;">'+agca_error_details_text+'</div></div>';
1194
+
1195
+ var ph = document.getElementById('agca_error_placeholder');
1196
+ ph.innerHTML = errorDivHtml;
1197
+ document.getElementById('agca_news').style.visibility = "hidden";
 
1198
  }
1199
  window.onerror = function(msg, url, line) {
1200
  window.onload = function() {
1205
  </script>
1206
  <?php
1207
  }
1208
+ function error_check(){
1209
+ ?>
1210
+ <script type="text/javascript">
1211
+ function AGCAErrorOtherPages(msg, url, line){
1212
+ var agca_error_details = "___________________________________________________\n";
1213
+ agca_error_details += '\n' + msg +'\nsource:' + url + '\nline:' + line + '\n';
1214
+
1215
+ document.getElementsByTagName('html')[0].style.visibility = "visible";
1216
+
1217
+ if(typeof window.console === "object"){
1218
+ console.log("___________________________________________________");
1219
+ console.log("AG Custom Admin caught a JavaScript on your site:");
1220
+ console.log(agca_error_details);
1221
+ }
1222
+ }
1223
+ window.onerror = function(msg, url, line) {
1224
+ window.onload = function() {
1225
+ AGCAErrorOtherPages(msg, url, line);
1226
+ }
1227
+ return true;
1228
+ };
1229
+ </script>
1230
+ <?php
1231
+ }
1232
 
1233
  function print_admin_css()
1234
  {
1235
  $agcaTemplateSession = $this->agcaAdminSession();
1236
  $wpversion = $this->get_wp_version();
1237
  $this->context = "admin";
1238
+ $this->error_check();
1239
+
1240
  ?>
1241
  <script type="text/javascript">
1242
  var wpversion = "<?php echo $wpversion; ?>";
1507
  jQuery(this).addClass('noclass');
1508
  }
1509
  });
1510
+ <?php /*Only admin see button*/
1511
+ if (current_user_can($this->admin_capability())){ ?>
1512
+ 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')); ?>');
1513
+ <?php } ?>
1514
  <?php } ?>
1515
+
 
 
 
 
1516
 
1517
  <?php /*EDIT MENU ITEMS*/?>
1518
  <?php if(get_option('ag_edit_adminmenu_json')!=""){
1660
 
1661
  function print_login_head(){
1662
  $this->context = "login";
1663
+ $this->error_check();
1664
  $wpversion = $this->get_wp_version();
1665
+
1666
  ?>
1667
  <script type="text/javascript">
1668
  document.write('<style type="text/css">html{visibility:hidden;}</style>');
1794
  function agca_admin_page() {
1795
 
1796
  $wpversion = $this->get_wp_version();
1797
+ $this->agca_error_check();
1798
  ?>
1799
  <?php //includes ?>
1800
  <link rel="stylesheet" type="text/css" href="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>style/farbtastic.css?ver=<?php echo $wpversion; ?>" />
1810
  <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/agca_tmpl.js?ver=<?php echo $wpversion; ?>"></script>
1811
  <?php //includes ?>
1812
  <div class="wrap">
1813
+ <h1 style="color:#005B69">AG Custom Admin Settings <span style="font-size:15px;">(v<?php echo $this->agca_version; ?>)</span></h1>
1814
+ <div id="agca_error_placeholder"></div>
1815
  <div id="agca_news">&nbsp;</div><br />
1816
  <form method="post" id="agca_form" action="options.php">
1817
  <?php settings_fields( 'agca-options-group' ); ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wordpressadminpanel.com/ag-custom-admin/
4
  Tags: admin, customize, hide, change admin, themes, admin themes, admin bar, login page
5
  Requires at least: 3.0
6
  Tested up to: 4.1
7
- Stable tag: 1.4.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -154,6 +154,10 @@ Plugin should be always up-to-date with latest WordPress release. If you have fo
154
 
155
  == Changelog ==
156
 
 
 
 
 
157
  = 1.4.6 =
158
  * Removed obsolete Colorizer's border options
159
  * Removed obsolete code
@@ -423,6 +427,9 @@ Plugin should be always up-to-date with latest WordPress release. If you have fo
423
 
424
  == Upgrade Notice ==
425
 
 
 
 
426
  = 1.4.6 =
427
  * Refactoring. Removed obsolete code. Fixes some issues.
428
 
4
  Tags: admin, customize, hide, change admin, themes, admin themes, admin bar, login page
5
  Requires at least: 3.0
6
  Tested up to: 4.1
7
+ Stable tag: 1.4.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
154
 
155
  == Changelog ==
156
 
157
+ = 1.4.7 =
158
+ * Removed AG Custom Admin menu top item
159
+ * Better error handling
160
+
161
  = 1.4.6 =
162
  * Removed obsolete Colorizer's border options
163
  * Removed obsolete code
427
 
428
  == Upgrade Notice ==
429
 
430
+ = 1.4.7 =
431
+ * Improvements
432
+
433
  = 1.4.6 =
434
  * Refactoring. Removed obsolete code. Fixes some issues.
435