Absolutely Glamorous Custom Admin - Version 1.2.7.5

Version Description

  • Better style for close button
  • Removed deprecated jQuery live function
  • Including jQuery migrate plugin on Advanced tab
Download this release

Release Info

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

Code changes from version 1.2.7.4 to 1.2.7.5

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.4
8
  Author URI: http://www.argonius.com/
9
 
10
  Copyright 2013. Argonius (email : info@argonius.com)
@@ -33,9 +33,8 @@ class AGCA{
33
  private $context = "";
34
  private $saveAfterImport = false;
35
  public function __construct()
36
- {
37
-
38
- $this->reloadScript();
39
 
40
  add_filter('admin_title', array(&$this,'change_title'), 10, 2);
41
  add_filter('plugin_row_meta', array(&$this,'jk_filter_plugin_links'), 10, 2);
@@ -49,7 +48,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.4";
53
  }
54
  // Add donate and support information
55
  function jk_filter_plugin_links($links, $file)
@@ -129,7 +128,12 @@ class AGCA{
129
  }
130
 
131
  function agca_enqueue_scripts() {
132
- wp_enqueue_script('jquery');
 
 
 
 
 
133
  }
134
 
135
  function reloadScript(){
@@ -223,7 +227,8 @@ class AGCA{
223
  register_setting( 'agca-options-group', 'ag_edit_adminmenu_json' );
224
  register_setting( 'agca-options-group', 'ag_add_adminmenu_json' );
225
  register_setting( 'agca-options-group', 'ag_colorizer_json' );
226
- register_setting( 'agca-options-group', 'agca_colorizer_turnonoff' );
 
227
 
228
  register_setting( 'agca-options-group', 'agca_custom_js' );
229
  register_setting( 'agca-options-group', 'agca_custom_css' );
@@ -343,6 +348,7 @@ class AGCA{
343
  'agca_custom_js',
344
  'agca_custom_css',
345
  'agca_colorizer_turnonoff',
 
346
  'agca_disablewarning',
347
  );
348
  }
@@ -802,9 +808,11 @@ class AGCA{
802
 
803
  <?php } ?>
804
  <?php if((get_option('agca_header')==true)&&(get_option('agca_header_show_logout')==true)){ ?>
805
-
 
 
806
  if(isWPHigherOrEqualThan("3.3")){
807
- jQuery("#wpbody-content").prepend('<a href="../wp-login.php?action=logout" tabindex="10" style="float:right;margin-right:20px" class="ab-item">Log Out</a>');
808
  }else{
809
  var clon ="";
810
  jQuery("div#user_info a").each(function(){
@@ -814,7 +822,7 @@ class AGCA{
814
  });
815
  if(clon !=""){
816
  jQuery(clon).attr('style','float:right;padding:15px');
817
- jQuery(clon).html('<?php echo ((get_option('agca_logout')=="")?"Log Out":get_option('agca_logout')); ?>');
818
  }
819
  jQuery("#wphead").after(clon);
820
  }
@@ -2498,6 +2506,14 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
2498
  <td>
2499
  </td>
2500
  </tr>
 
 
 
 
 
 
 
 
2501
  <tr valign="center">
2502
  <td colspan="2">
2503
  <br />
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.5
8
  Author URI: http://www.argonius.com/
9
 
10
  Copyright 2013. Argonius (email : info@argonius.com)
33
  private $context = "";
34
  private $saveAfterImport = false;
35
  public function __construct()
36
+ {
37
+ $this->reloadScript();
 
38
 
39
  add_filter('admin_title', array(&$this,'change_title'), 10, 2);
40
  add_filter('plugin_row_meta', array(&$this,'jk_filter_plugin_links'), 10, 2);
48
  /*Initialize properties*/
49
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
50
  //fb($this->colorizer);
51
+ $this->agca_version = "1.2.7.5";
52
  }
53
  // Add donate and support information
54
  function jk_filter_plugin_links($links, $file)
128
  }
129
 
130
  function agca_enqueue_scripts() {
131
+ wp_enqueue_script('jquery');
132
+
133
+ if(get_option('agca_include_jquery_migrate') == 'true'){
134
+ wp_register_script('agca-jquery-migrate',trailingslashit(plugins_url(basename(dirname(__FILE__))))."script/jquery-migrate.js?ver=".$this->agca_version, array(), '1.2.1', true);
135
+ wp_enqueue_script( 'agca-jquery-migrate' );
136
+ }
137
  }
138
 
139
  function reloadScript(){
227
  register_setting( 'agca-options-group', 'ag_edit_adminmenu_json' );
228
  register_setting( 'agca-options-group', 'ag_add_adminmenu_json' );
229
  register_setting( 'agca-options-group', 'ag_colorizer_json' );
230
+ register_setting( 'agca-options-group', 'agca_colorizer_turnonoff' );
231
+ register_setting( 'agca-options-group', 'agca_include_jquery_migrate' );
232
 
233
  register_setting( 'agca-options-group', 'agca_custom_js' );
234
  register_setting( 'agca-options-group', 'agca_custom_css' );
348
  'agca_custom_js',
349
  'agca_custom_css',
350
  'agca_colorizer_turnonoff',
351
+ 'agca_include_jquery_migrate',
352
  'agca_disablewarning',
353
  );
354
  }
808
 
809
  <?php } ?>
810
  <?php if((get_option('agca_header')==true)&&(get_option('agca_header_show_logout')==true)){ ?>
811
+ <?php
812
+ $agca_logout_text = ((get_option('agca_logout')=="")?"Log Out":get_option('agca_logout'));
813
+ ?>
814
  if(isWPHigherOrEqualThan("3.3")){
815
+ jQuery("#wpbody-content").prepend('<a href="../wp-login.php?action=logout" tabindex="10" style="float:right;margin-right:20px" class="ab-item agca_logout_button"><?php echo $agca_logout_text; ?></a>');
816
  }else{
817
  var clon ="";
818
  jQuery("div#user_info a").each(function(){
822
  });
823
  if(clon !=""){
824
  jQuery(clon).attr('style','float:right;padding:15px');
825
+ jQuery(clon).html('<?php echo $agca_logout_text; ?>');
826
  }
827
  jQuery("#wphead").after(clon);
828
  }
2506
  <td>
2507
  </td>
2508
  </tr>
2509
+ <tr valign="center">
2510
+ <th scope="row">
2511
+ <label title="If you're using an older version of jQuery plugin which has some deprecated functions, please include this option to make plugin backward compatible with your WordPress." for="agca_include_jquery_migrate">Include jQuery migration script</label>
2512
+ </th>
2513
+ <td>
2514
+ <input title="If you're using an older version of jQuery plugin which has some deprecated functions, please include this option to make plugin backward compatible with your WordPress." type="checkbox" name="agca_include_jquery_migrate" value="true" <?php if (get_option('agca_include_jquery_migrate')==true) echo 'checked="checked" '; ?> />
2515
+ </td>
2516
+ </tr>
2517
  <tr valign="center">
2518
  <td colspan="2">
2519
  <br />
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.6
7
- Stable tag: 1.2.7.4
8
 
9
  Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
10
 
@@ -98,7 +98,7 @@ This is caused by JavaScript error thrown by AGCA or some other plugin. If you w
98
  Please use 'Reset Settings' button on Admin Menu page to reset menu configuration to defaults. Remember that you should postpone admin menu configuration to the very end of admin page customization, because, any changes made from other plugins to admin menu (e.g adding new button of plugin that is activated, or removing that button when plugin is deactivated) could corrupt admin menu configuration.
99
 
100
  = Some errors appear on my page =
101
- Go to browser's console and see if there are any errors. Try to locate them. If you can't fix error by yourself, post it back to plugin's support page.
102
 
103
  = Plugin does not work =
104
  Try clearing browser's cache. If that does not work, go to browser's console and see if there are any errors. Try to locate them. If you can't fix error by yourself, post it back to plugin's support page. When trying to locate the problem, the best way is to disable other plugins, because there could be a conflict with them. If there is a conflict with other plugin, it can be found by disabling one by one plugin, until the problem is solved.
@@ -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.4 =
117
  * Removing submenu box on mouseover, if all submenu items are hidden (Fixed empty box issue)
118
  * Added WYSIWYG editor for Dashboard page
@@ -294,6 +300,9 @@ Try clearing browser's cache. If that does not work, go to browser's console and
294
 
295
  == Upgrade Notice ==
296
 
 
 
 
297
  = 1.2.7.4 =
298
  Few improvements.
299
 
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.5
8
 
9
  Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
10
 
98
  Please use 'Reset Settings' button on Admin Menu page to reset menu configuration to defaults. Remember that you should postpone admin menu configuration to the very end of admin page customization, because, any changes made from other plugins to admin menu (e.g adding new button of plugin that is activated, or removing that button when plugin is deactivated) could corrupt admin menu configuration.
99
 
100
  = Some errors appear on my page =
101
+ Go to browser's console and see if there are any errors. Try to locate them. If you can't fix error by yourself, post it back to plugin's support page.
102
 
103
  = Plugin does not work =
104
  Try clearing browser's cache. If that does not work, go to browser's console and see if there are any errors. Try to locate them. If you can't fix error by yourself, post it back to plugin's support page. When trying to locate the problem, the best way is to disable other plugins, because there could be a conflict with them. If there is a conflict with other plugin, it can be found by disabling one by one plugin, until the problem is solved.
113
 
114
  == Changelog ==
115
 
116
+
117
+ = 1.2.7.5 =
118
+ * Better style for close button
119
+ * Removed deprecated jQuery live function
120
+ * Including jQuery migrate plugin on Advanced tab
121
+
122
  = 1.2.7.4 =
123
  * Removing submenu box on mouseover, if all submenu items are hidden (Fixed empty box issue)
124
  * Added WYSIWYG editor for Dashboard page
300
 
301
  == Upgrade Notice ==
302
 
303
+ = 1.2.7.5 =
304
+ Better style for close button. Removed deprecated jQuery live function.
305
+
306
  = 1.2.7.4 =
307
  Few improvements.
308
 
script/ag_script.js CHANGED
@@ -380,10 +380,10 @@ function savePluginSettings(){
380
  }
381
 
382
  jQuery(document).ready(function(){
383
- jQuery('a.button_remove').live("click", function(){
384
  jQuery(this).parent().parent().remove();
385
  });
386
- jQuery('a.button_edit').live("click", function(){
387
  if(editingButtonNow == false){
388
  var name = jQuery(this).parent().find('button').text();
389
  var url = jQuery(this).parent().find('button').attr('title');
@@ -394,7 +394,7 @@ jQuery(document).ready(function(){
394
  reloadRemoveButtonEvents();
395
  }
396
  });/*Save editing changes*/
397
- jQuery('#ag_add_adminmenu_button_edit').live("click", function(){
398
  //alert(jQuery(this).parent().html());
399
  var name = jQuery('#ag_add_adminmenu_name_edit').val();
400
  var url = jQuery('#ag_add_adminmenu_url_edit').val();
@@ -1055,7 +1055,7 @@ function isWPHigherOrEqualThan(targetVersion){
1055
 
1056
  //VALIDATION
1057
  jQuery(document).ready(function() {
1058
- jQuery(".validateNumber").live('keydown',function(event) {
1059
  // Allow only backspace and delete
1060
  var limit = jQuery(this).attr('limit');
1061
  var value = jQuery(this).val();
380
  }
381
 
382
  jQuery(document).ready(function(){
383
+ jQuery('a.button_remove').on("click", function(){
384
  jQuery(this).parent().parent().remove();
385
  });
386
+ jQuery('a.button_edit').on("click", function(){
387
  if(editingButtonNow == false){
388
  var name = jQuery(this).parent().find('button').text();
389
  var url = jQuery(this).parent().find('button').attr('title');
394
  reloadRemoveButtonEvents();
395
  }
396
  });/*Save editing changes*/
397
+ jQuery('#ag_add_adminmenu_button_edit').on("click", function(){
398
  //alert(jQuery(this).parent().html());
399
  var name = jQuery('#ag_add_adminmenu_name_edit').val();
400
  var url = jQuery('#ag_add_adminmenu_url_edit').val();
1055
 
1056
  //VALIDATION
1057
  jQuery(document).ready(function() {
1058
+ jQuery(".validateNumber").on('keydown',function(event) {
1059
  // Allow only backspace and delete
1060
  var limit = jQuery(this).attr('limit');
1061
  var value = jQuery(this).val();
script/jquery-migrate.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
2
+ jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
style/ag_style.css CHANGED
@@ -224,3 +224,12 @@ td.ag_admin_menu_parent:hover{
224
  .agca_editor{
225
  width:600px;
226
  }
 
 
 
 
 
 
 
 
 
224
  .agca_editor{
225
  width:600px;
226
  }
227
+ .agca_logout_button{
228
+ background: none repeat scroll 0 0 #dddddd;
229
+ float: right;
230
+ font-size: 15px;
231
+ font-weight: bold;
232
+ margin-right: 20px;
233
+ padding: 10px;
234
+ text-decoration: none
235
+ }