Absolutely Glamorous Custom Admin - Version 6.7.1

Version Description

  • Removed support for AGCA themes
  • Added option to remove Site Health dashboard widget
  • Fixed issue not excluding AGCA admin when hiding admin bar on site pages
  • Styled AGCA on plugins page
Download this release

Release Info

Developer cusmin
Plugin Icon 128x128 Absolutely Glamorous Custom Admin
Version 6.7.1
Comparing to
See all releases

Code changes from version 6.7 to 6.7.1

ag-custom-admin.html CHANGED
@@ -1,5 +1,5 @@
1
  <html>
2
- <head><title>WordPress Admin Themes - Absolutely Glamorous Custom Admin Plugin</title></head>
3
  <body>
4
  <h1><a href="http://wordpress.org/plugins/ag-custom-admin/">What is Absolutely Glamorous Custom Admin?</a></h1>
5
  <p>Absolutely Glamorous Custom Admin is plugin for WordPress that can be used for WordPress admin panel customizations. There are dozens of options available for customizations:</p>
@@ -84,7 +84,7 @@
84
  <p>If you need even more features and premium support, you can upgrade to <a href="https://cusmin.com">Cusmin</a> - premium tool for advanced WordPress admin panel customization.</p>
85
  </br>
86
  <h1><a href="https://cusmin.com/agca">Support</a></h1>
87
- <p>Feel free to check our <a href="https://cusmin.com/agca">support page</a> in case you have found any issues with your AGCA or AGCA themes features.</p>
88
  <p>Happy blogging!</p>
89
  </br>
90
  </body>
1
  <html>
2
+ <head><title>WordPress Admin - Absolutely Glamorous Custom Admin Plugin</title></head>
3
  <body>
4
  <h1><a href="http://wordpress.org/plugins/ag-custom-admin/">What is Absolutely Glamorous Custom Admin?</a></h1>
5
  <p>Absolutely Glamorous Custom Admin is plugin for WordPress that can be used for WordPress admin panel customizations. There are dozens of options available for customizations:</p>
84
  <p>If you need even more features and premium support, you can upgrade to <a href="https://cusmin.com">Cusmin</a> - premium tool for advanced WordPress admin panel customization.</p>
85
  </br>
86
  <h1><a href="https://cusmin.com/agca">Support</a></h1>
87
+ <p>Feel free to check our <a href="https://cusmin.com/agca">support page</a> in case you have found any issues with your AGCA plugin.</p>
88
  <p>Happy blogging!</p>
89
  </br>
90
  </body>
plugin.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Absolutely Glamorous Custom Admin
4
  Plugin URI: https://cusmin.com/agca
5
  Description: All-in-one tool for admin panel customization. Change almost everything: admin menu, dashboard, login page, admin bar and much more.
6
  Author: Cusmin
7
- Version: 6.7
8
  Text Domain: ag-custom-admin
9
  Domain Path: /languages
10
  Author URI: https://cusmin.com
@@ -34,8 +34,6 @@ class AGCA{
34
  private $admin_capabilities;
35
  private $context = "";
36
  private $saveAfterImport = false;
37
- private $templateCustomizations = "";
38
- private $templates_ep = "";
39
 
40
  public function __construct()
41
  {
@@ -75,7 +73,7 @@ class AGCA{
75
  /*Initialize properties*/
76
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
77
 
78
- $this->agca_version = "6.7";
79
  }
80
 
81
  function load_plugin_textdomain() {
@@ -89,7 +87,6 @@ class AGCA{
89
  {
90
  if(!is_network_admin()){
91
  $links[] = '<a href="tools.php?page=ag-custom-admin/plugin.php#general-settings">' . __('Settings', 'ag-custom-admin') . '</a>';
92
- //$links[] = '<a href="tools.php?page=ag-custom-admin/plugin.php#ag-templates">' . __('Admin Themes', 'ag-custom-admin') . '</a>';
93
  }
94
  $links[] = '<a target="_blank" href="https://wordpress.org/support/plugin/ag-custom-admin">' . __('Support', 'ag-custom-admin') . '</a>';
95
  $links[] = '<a target="_blank" href="https://cusmin.com/upgrade-to-cusmin?ref=plugins">' . __('Upgrade', 'ag-custom-admin') . '</a>';
@@ -139,11 +136,6 @@ class AGCA{
139
 
140
  function checkGET(){
141
  if(isset($_GET['agca_action'])){
142
- if($_GET['agca_action'] =="remove_templates"){
143
- $this->delete_template_images_all();
144
- update_option('agca_templates', "");
145
- update_option('agca_selected_template', "");
146
- }
147
  }
148
  if(isset($_GET['agca_debug'])){
149
  if($_GET['agca_debug'] =="true"){
@@ -155,112 +147,6 @@ class AGCA{
155
  }
156
 
157
  function checkPOST(){
158
- if(isset($_POST['_agca_save_template'])){
159
- $this->verifyPostRequest();
160
- //print_r($_POST);
161
- $data = $_POST['templates_data'];
162
- $parts = explode("|||",$data);
163
-
164
- $common_data = $parts [0];
165
- $admin_js = $parts [1];
166
- $admin_css = $parts [2];
167
- $login_js = $parts [3];
168
- $login_css = $parts [4];
169
- $settings = $parts [5];
170
- $images = $parts [6];
171
-
172
- $template_name = $_POST['templates_name'];
173
-
174
- update_option('agca_selected_template', $template_name);
175
-
176
- $templates = get_option( 'agca_templates' );
177
- if($templates == ""){
178
- $templates = array();
179
- }
180
-
181
- $templates[$template_name] = array(
182
- 'common'=>$common_data,
183
- 'admin'=>"",
184
- 'adminjs'=>$admin_js,
185
- 'admincss'=>$admin_css,
186
- 'login'=>"",
187
- 'loginjs'=>$login_js,
188
- 'logincss'=>$login_css,
189
- 'images'=>$images,
190
- 'settings'=>$settings
191
- );
192
- update_option('agca_templates', $templates);
193
-
194
- $_POST = array();
195
-
196
- }else if(isset($_POST['_agca_templates_session'])){
197
- $this->verifyPostRequest();
198
- $this->agcaAdminSession();
199
- if($_POST['template'] !="")
200
- $_SESSION["AGCA"]["Templates"][$_POST['template']] = array("license"=>$_POST['license']);
201
-
202
- //print_r($_SESSION);
203
- echo "_agca_templates_session:OK";
204
- exit;
205
- }else if(isset($_POST['_agca_templates_session_remove_license'])){
206
- $this->verifyPostRequest();
207
- $this->agcaAdminSession();
208
- if($_POST['template'] !="")
209
- $_SESSION["AGCA"]["Templates"][$_POST['template']] = null;
210
- print_r($_SESSION);
211
- echo "_agca_templates_session_remove_license:OK";
212
- exit;
213
- }else if(isset($_POST['_agca_get_templates'])){
214
- $this->verifyPostRequest();
215
- $templates = get_option( 'agca_templates' );
216
- if($templates == "") $templates = array();
217
- $results = array();
218
- foreach($templates as $key=>$val){
219
- $results[]=$key;
220
- }
221
- echo json_encode($results);
222
- exit;
223
- }else if(isset($_POST['_agca_activate_template'])){
224
- $this->verifyPostRequest();
225
- update_option('agca_selected_template', $_POST['_agca_activate_template']);
226
- $_POST = array();
227
- //unset($_POST);
228
- exit;
229
- }else if(isset($_POST['_agca_template_settings'])){
230
- $this->verifyPostRequest();
231
- $settings = $_POST['_agca_template_settings'];
232
-
233
- $templates = get_option( 'agca_templates' );
234
- if($templates == ""){
235
- $templates = array();
236
- }
237
- $template_name = $_POST["_agca_current_template"];
238
-
239
- $templates[$template_name]["settings"] = $settings;
240
- update_option('agca_templates', $templates);
241
-
242
- $_POST = array();
243
- //print_r($templates);
244
- exit;
245
- }else if(isset($_POST['_agca_upload_image'])){
246
- $this->verifyPostRequest();
247
- function my_sideload_image() {
248
- $remoteurl = $_POST['_agca_upload_image'];
249
- $file = media_sideload_image( $remoteurl, 0 ,__("Absolutely Glamorous Custom Admin theme image (do not delete)", 'ag-custom-admin'));
250
- try{
251
- $fileparts = explode("src='", $file);
252
- $url=explode("'",$fileparts[1]);
253
- echo $url[0];
254
- }catch (\Exception $e){}
255
- exit;
256
- }
257
- add_action( 'admin_init', 'my_sideload_image' );
258
-
259
- }else if(isset($_POST['_agca_remove_template_images'])){
260
- $this->verifyPostRequest();
261
- $this->delete_template_images($_POST['_agca_remove_template_images']);
262
- exit;
263
- }
264
  }
265
 
266
  function verifyPostRequest(){
@@ -317,65 +203,8 @@ class AGCA{
317
 
318
  function admin_bar_changes(){
319
  if( current_user_can( 'manage_options' )){
320
- global $wp_admin_bar;
321
- if(!is_network_admin()){
322
- $wp_admin_bar->add_menu( array(
323
- 'id' => 'agca-admin-themes',
324
- 'title' => '<span class="ab-icon"></span>'.__( 'Admin Themes', 'ag-custom-admin' ),
325
- 'href' => 'tools.php?page=ag-custom-admin/plugin.php#ag-templates'
326
- ));
327
- }
328
- }
329
- }
330
-
331
- function delete_template_images_all(){
332
- $templates = get_option('agca_templates');
333
- if($templates != null && $templates != ""){
334
- foreach($templates as $template){
335
- if($template != null && $template['images'] != null && $template['images'] != ""){
336
- //print_r($template['images']);
337
- $imgs = explode(',',$template['images']);
338
- foreach($imgs as $imageSrc){
339
- $this->delete_attachment_by_src($imageSrc);
340
- }
341
- //print_r($imgs);
342
- }
343
- }
344
- }
345
- //print_r($templates);
346
- }
347
-
348
- function delete_template_images($template_name){
349
- $templates = get_option('agca_templates');
350
- if($templates != null && $templates != ""){
351
- $template = $templates[$template_name];
352
- if($template != null && $template['images'] != null && $template['images'] != ""){
353
- //print_r($template['images']); exit;
354
- $imgs = explode(',',$template['images']);
355
- foreach($imgs as $imageSrc){
356
- $this->delete_attachment_by_src($imageSrc);
357
- }
358
- //print_r($imgs);
359
- }
360
- }
361
- //print_r($templates);
362
- }
363
-
364
- function delete_attachment_by_src ($image_src) {
365
- global $wpdb;
366
- $query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'";
367
- $id = $wpdb->get_var($query);
368
- wp_delete_attachment( $id, $true );
369
- }
370
 
371
- function get_installed_agca_templates(){
372
- $templates = get_option( 'agca_templates' );
373
- if($templates == "")return '[]';
374
- $results = array();
375
- foreach($templates as $key=>$val){
376
- $results[]=$key;
377
  }
378
- return json_encode($results);
379
  }
380
 
381
  function isGuest(){
@@ -408,9 +237,9 @@ class AGCA{
408
  ?>
409
  </script>
410
  <link rel="stylesheet" type="text/css" href="<?php echo $this->pluginUrl(); ?>style/ag_style.css?ver=<?php echo $this->agca_version; ?>" />
411
- <link rel="stylesheet" type="text/css" href="<?php echo $this->pluginUrl(); ?>require/dynamic.php?type=css&context=<?php echo $this->context; ?>&ver=<?php echo "changed_theme"; ?>" />
412
  <script type="text/javascript" src="<?php echo $this->pluginUrl(); ?>script/ag_script.js?ver=<?php echo $this->agca_version; ?>"></script>
413
- <script type="text/javascript" src="<?php echo $this->pluginUrl(); ?>require/dynamic.php?type=js&context=<?php echo $this->context; ?>&ver=<?php echo "changed_theme"; ?>"></script>
414
 
415
  <?php
416
  if($this->context == "login"){
@@ -424,8 +253,6 @@ class AGCA{
424
  }
425
  ?>
426
  <?php
427
- echo $this->templateCustomizations;
428
-
429
  if(!((get_option('agca_role_allbutadmin')==true) and (current_user_can($this->admin_capability())))){
430
  ?>
431
  <style type="text/css">
@@ -535,6 +362,7 @@ class AGCA{
535
  register_setting( 'agca-options-group', 'agca_dashboard_text' );
536
  register_setting( 'agca-options-group', 'agca_dashboard_text_paragraph' );
537
  register_setting( 'agca-options-group', 'agca_dashboard_widget_welcome' );
 
538
  register_setting( 'agca-options-group', 'agca_dashboard_widget_activity' );
539
  register_setting( 'agca-options-group', 'agca_dashboard_widget_il' );
540
  register_setting( 'agca-options-group', 'agca_dashboard_widget_plugins' );
@@ -553,7 +381,6 @@ class AGCA{
553
  register_setting( 'agca-options-group', 'agca_admin_bar_new_content_user' );
554
  register_setting( 'agca-options-group', 'agca_admin_bar_new_content_media' );
555
  register_setting( 'agca-options-group', 'agca_admin_bar_update_notifications' );
556
- register_setting( 'agca-options-group', 'agca_admin_bar_admin_themes' );
557
  register_setting( 'agca-options-group', 'agca_remove_top_bar_dropdowns' );
558
  register_setting( 'agca-options-group', 'agca_admin_bar_frontend' );
559
  register_setting( 'agca-options-group', 'agca_admin_bar_frontend_hide' );
@@ -562,10 +389,6 @@ class AGCA{
562
  register_setting( 'agca-options-group', 'agca_login_lostpassword_remove' );
563
  register_setting( 'agca-options-group', 'agca_admin_capability' );
564
  register_setting( 'agca-options-group', 'agca_disablewarning' );
565
- register_setting( 'agca-template-group', 'agca_selected_template' );
566
- register_setting( 'agca-template-group', 'agca_templates' );
567
- //delete_option( 'agca_templates' );
568
-
569
 
570
  /*Admin menu*/
571
  register_setting( 'agca-options-group', 'agca_admin_menu_turnonoff' );
@@ -674,6 +497,7 @@ class AGCA{
674
  'agca_dashboard_text',
675
  'agca_dashboard_text_paragraph',
676
  'agca_dashboard_widget_welcome',
 
677
  'agca_dashboard_widget_activity',
678
  'agca_dashboard_widget_il',
679
  'agca_dashboard_widget_plugins',
@@ -690,7 +514,6 @@ class AGCA{
690
  'agca_admin_bar_new_content_user',
691
  'agca_admin_bar_new_content_media',
692
  'agca_admin_bar_update_notifications',
693
- 'agca_admin_bar_admin_themes',
694
  'agca_remove_top_bar_dropdowns',
695
  'agca_admin_menu_turnonoff',
696
  'agca_admin_menu_agca_button_only',
@@ -715,8 +538,6 @@ class AGCA{
715
  'agca_disable_postver',
716
  'agca_menu_remove_client_profile',
717
  'agca_menu_remove_customize_button',
718
- 'agca_selected_template',
719
- 'agca_templates',
720
  );
721
  }
722
 
@@ -933,17 +754,19 @@ class AGCA{
933
  }
934
 
935
  if(get_option('agca_admin_bar_frontend_hide')==true){
936
- add_filter( 'show_admin_bar', '__return_false' );
937
- ?>
938
- <style type="text/css">
939
- #wpadminbar{
940
- display: none;
941
- }
942
- </style>
943
- <script type="text/javascript">
944
- window.setTimeout(function(){document.getElementsByTagName('html')[0].setAttribute('style',"margin-top:0px !important");},50);
945
- </script>
946
- <?php
 
 
947
  }
948
  if(get_option('agca_admin_bar_frontend')!=true && is_user_logged_in()){
949
 
@@ -1048,11 +871,6 @@ class AGCA{
1048
  <?php if(get_option('agca_admin_bar_update_notifications')!=""){ ?>
1049
  jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-updates").css("display","none");
1050
  <?php } ?>
1051
- <?php if(get_option('agca_admin_bar_admin_themes')!=""){ ?>
1052
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-agca-admin-themes").css("display","none");
1053
- <?php } ?>
1054
-
1055
-
1056
 
1057
  <?php if(get_option('agca_header_logo')==true){ ?>
1058
  jQuery("#wphead #header-logo").css("display","none");
@@ -1230,39 +1048,6 @@ class AGCA{
1230
  return $selectedValue;
1231
  }
1232
 
1233
- function JSPrintAGCATemplateSettingsVar($settings){
1234
- echo "\n<script type=\"text/javascript\">\n";
1235
- echo "var agca_template_settings = ".preg_replace('#<script(.*?)>(.*?)</script>#is', '', $settings).";\n"; //TODO: think about this
1236
- echo "</script>";
1237
- }
1238
-
1239
- function appendSettingsToAGCATemplateCustomizations($customizations, $settings){
1240
- $template_settings = json_decode($settings);
1241
- //print_r($template_settings);
1242
- foreach($template_settings as $sett){
1243
- $key = $sett->code;
1244
-
1245
- //use default value if user's value is not set
1246
- $value="";
1247
- if($sett->value != ""){
1248
- $value = $sett->value;
1249
- }else{
1250
- $value = $sett->default_value;
1251
- }
1252
-
1253
- //Prepare settings
1254
- if($sett->type == 6){
1255
- if($value !== null && (strtolower($value) == "on" || $value == "1")){
1256
- $value = "true";
1257
- }else{
1258
- $value = "false";
1259
- }
1260
- }
1261
- $customizations = str_replace("%".$key."%",$value, $customizations);
1262
- }
1263
- return $customizations;
1264
- }
1265
-
1266
  function enableSpecificWPVersionCustomizations($customizations){
1267
  /*enable special CSS for this WP version*/
1268
  $ver = $this->get_wp_version();
@@ -1276,40 +1061,7 @@ class AGCA{
1276
  return $customizations;
1277
  }
1278
 
1279
- function prepareAGCAAdminTemplates(){
1280
- if(get_option( 'agca_templates' ) != ""){
1281
- //print_r(get_option( 'agca_templates' ));
1282
- $themes = get_option( 'agca_templates' );
1283
- $selectedTheme = get_option('agca_selected_template');
1284
- if(isset($themes[$selectedTheme])){
1285
- $theme = $themes[$selectedTheme];
1286
- add_filter('get_user_option_admin_color', array(&$this,'change_admin_color'));
1287
-
1288
- echo (stripslashes($theme['common']));
1289
- echo "<!--AGCAIMAGES: ".$theme['images']."-->";
1290
-
1291
- //KEEP THIS FOR MIGRATION PURPOSE FOR SOME TIME
1292
- if(!((get_option('agca_role_allbutadmin')==true) and (current_user_can($this->admin_capability())))){
1293
- if($theme['settings'] == "" || $theme['settings'] == " ") $theme['settings'] = "{}";
1294
- //print_r($templdata);
1295
-
1296
- $this->JSPrintAGCATemplateSettingsVar($theme['settings']);
1297
-
1298
- $admindata = $this->appendSettingsToAGCATemplateCustomizations(stripslashes($theme['admin']), $theme['settings']);
1299
- $admindata = $this->enableSpecificWPVersionCustomizations($admindata);
1300
- $admindata = $this->removeCSSComments($admindata);
1301
-
1302
- //echo $admindata;
1303
- //REPLACE TAGS WITH CUSTOM TEMPLATE SETTINGS
1304
- $this->templateCustomizations = $admindata;
1305
- }
1306
- //KEEP THIS FOR MIGRATION PURPOSE FOR SOME TIME
1307
- }
1308
- }
1309
- }
1310
-
1311
  function agcaAdminSession(){
1312
- $agcaTemplatesSession = array();
1313
 
1314
  //session_destroy();
1315
  //session_unset();
@@ -1320,25 +1072,12 @@ class AGCA{
1320
 
1321
  if(!isset($_SESSION["AGCA"])){
1322
  $_SESSION["AGCA"] = array();
1323
- $_SESSION["AGCA"]["Templates"] = array();
1324
  }
1325
  //print_r($_SESSION);
1326
 
1327
  if(isset($_SESSION["AGCA"])){
1328
- if(isset($_SESSION["AGCA"]["Templates"])){
1329
- //print_r($_SESSION["AGCA"]["Templates"]);
1330
- $agcaTemplatesSession = json_encode($_SESSION["AGCA"]["Templates"]);
1331
- }
1332
- }
1333
-
1334
 
1335
- if($agcaTemplatesSession == '""' || $agcaTemplatesSession == '"[]"'){
1336
- $agcaTemplatesSession = array();
1337
  }
1338
-
1339
-
1340
- return $agcaTemplatesSession;
1341
-
1342
  }
1343
 
1344
  function getAGCAColor($name){
@@ -1347,28 +1086,6 @@ class AGCA{
1347
  }
1348
  }
1349
 
1350
- function prepareAGCALoginTemplates(){
1351
- if(get_option( 'agca_templates' ) != ""){
1352
- //print_r(get_option( 'agca_templates' ));
1353
- $templates = get_option( 'agca_templates' );
1354
- foreach($templates as $templname=>$templdata){
1355
- if($templname == get_option('agca_selected_template')){
1356
- echo (stripslashes($templdata['common']));
1357
-
1358
- if($templdata['settings'] == "" || $templdata['settings'] == " ") $templdata['settings'] = "{}";
1359
- $this->JSPrintAGCATemplateSettingsVar($templdata['settings']);
1360
-
1361
- $logindata = $this->appendSettingsToAGCATemplateCustomizations(stripslashes($templdata['login']), $templdata['settings']);
1362
- $logindata = $this->enableSpecificWPVersionCustomizations($logindata);
1363
- $logindata = $this->removeCSSComments($logindata);
1364
-
1365
- echo($logindata);
1366
- break;
1367
- }
1368
- }
1369
- }
1370
- }
1371
-
1372
  function agca_error_check(){
1373
  ?>
1374
  <script type="text/javascript">
@@ -1649,7 +1366,6 @@ class AGCA{
1649
  }
1650
  function print_admin_css()
1651
  {
1652
- $agcaTemplateSession = $this->agcaAdminSession();
1653
  $wpversion = $this->get_wp_version();
1654
  $this->context = "admin";
1655
  $this->error_check();
@@ -1659,13 +1375,11 @@ class AGCA{
1659
  var wpversion = "<?php echo $wpversion; ?>";
1660
  var agca_debug = <?php echo ($this->agca_debug)?"true":"false"; ?>;
1661
  var agca_version = "<?php echo $this->agca_version; ?>";
1662
- var agcaTemplatesSession = <?php echo ($agcaTemplateSession==null)?"[]":$agcaTemplateSession; ?>;
1663
  var errors = false;
1664
  var isSettingsImport = false;
1665
  var isCusminActive = <?php echo $this->isCusminActive()?'true':'false'; ?>;
1666
  var agca_context = "admin";
1667
  var roundedSidberSize = 0;
1668
- var agca_installed_templates = <?php echo $this->get_installed_agca_templates(); ?>;
1669
  var agca_admin_menu = <?php echo json_encode($this->get_menu_customizations()) ?>;
1670
  var agca_string = {
1671
  file_imp_not_sel: '<?php _e('File for import is not selected!', 'ag-custom-admin'); ?>',
@@ -1676,7 +1390,6 @@ class AGCA{
1676
  menu_login: '<?php _e('Login Page', 'ag-custom-admin'); ?>',
1677
  menu_admin_menu: '<?php _e('Admin Menu', 'ag-custom-admin'); ?>',
1678
  menu_colorizer: '<?php _e('Colorizer', 'ag-custom-admin'); ?>',
1679
- menu_themes: '<?php _e('Themes', 'ag-custom-admin'); ?>',
1680
  menu_upgrade: '<?php _e('Upgrade', 'ag-custom-admin'); ?>',
1681
  menu_advanced: '<?php _e('Advanced', 'ag-custom-admin'); ?>',
1682
  remove: '<?php _e('Remove', 'ag-custom-admin'); ?>',
@@ -1691,7 +1404,6 @@ class AGCA{
1691
  };
1692
  </script>
1693
  <?php
1694
- $this->prepareAGCAAdminTemplates();
1695
  $this->agca_get_includes();
1696
  $this->admin_capabilities();
1697
  wp_get_current_user() ;
@@ -1878,6 +1590,9 @@ class AGCA{
1878
  }else{
1879
  ?>jQuery("#welcome-panel").css("display","block");<?php
1880
  }
 
 
 
1881
  if(get_option('agca_dashboard_widget_il')==true){
1882
  $this->remove_dashboard_widget('dashboard_incoming_links','normal');
1883
  }else{
@@ -2053,7 +1768,6 @@ class AGCA{
2053
  var agca_context = "login";
2054
  </script>
2055
  <?php
2056
- $this->prepareAGCALoginTemplates();
2057
  $this->agca_get_includes();
2058
 
2059
  ?>
@@ -2189,12 +1903,7 @@ class AGCA{
2189
 
2190
  <link rel="stylesheet" type="text/css" href="<?php echo $this->pluginUrl(); ?>style/agca_farbtastic.css?ver=<?php echo $wpversion; ?>" />
2191
  <script type="text/javascript" src="<?php echo $this->pluginUrl(); ?>script/agca_farbtastic.js?ver=<?php echo $wpversion; ?>"></script>
2192
- <script type="text/javascript" src="<?php echo $this->pluginUrl(); ?>script/xd.js?ver=<?php echo $wpversion; ?>"></script>
2193
- <script type="text/javascript">
2194
- var templates_ep = "<?php echo $this->templates_ep; ?>";
2195
- var template_selected = '<?php echo get_option('agca_selected_template'); ?>';
2196
- </script>
2197
- <script type="text/javascript" src="<?php echo $this->pluginUrl(); ?>script/agca_tmpl.js?ver=<?php echo $wpversion; ?>"></script>
2198
  <?php //includes ?>
2199
  <div class="wrap">
2200
  <h1 id="agca-title"><img src="<?php echo plugins_url( 'images/agca-logo.svg', __FILE__ ) ?>" /><span class="title">absolutely glamorous custom admin</span> <span class="version">(v<?php echo $this->agca_version; ?>)</span></h1>
@@ -2228,9 +1937,6 @@ class AGCA{
2228
  <li class="normal" ><a href="#admin-menu-settings" class="dashicons-before dashicons-editor-justify" title="<?php _e('Settings for main admin menu', 'ag-custom-admin')?>"><?php _e('Admin Menu', 'ag-custom-admin')?></a></li>
2229
  <li class="normal"><a href="#ag-colorizer-settings" class="dashicons-before dashicons-admin-appearance agca-invert-icon" title="<?php _e('Colorizer settings', 'ag-custom-admin')?>"><?php _e('Colorizer', 'ag-custom-admin')?></a></li>
2230
  <li class="normal"><a href="#ag-advanced" class="dashicons-before dashicons-welcome-learn-more" title="<?php _e('My custom scripts', 'ag-custom-admin')?>"><?php _e('Advanced', 'ag-custom-admin')?></a></li>
2231
- <?php if(defined('AGCA_THEMES')){ ?>
2232
- <li class="normal" style=""><a href="#ag-templates" title="<?php _e('AGCA Themes', 'ag-custom-admin')?>"><?php _e('Themes', 'ag-custom-admin')?></a></li>
2233
- <?php } ?>
2234
  <li class="normal upgrade"><a href="https://cusmin.com/upgrade-to-cusmin?ref=menu" target="_blank" title="<?php _e('Upgrade to Cusmin </br>to unlock all premium features', 'ag-custom-admin')?>"><img src="<?php echo plugins_url( 'images/cusmin-logo.svg', __FILE__ ) ?>" /><?php _e('Upgrade', 'ag-custom-admin')?></a></li>
2235
 
2236
  <li style="background:none;border:none;padding:0;"><a id="agca_donate_button" target="_blank" style="margin-left:8px" title="<?php _e('Enjoying AGCA? Help us further develop it and support it!', 'ag-custom-admin')?> " href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=agca@cusmin.com&item_name=Support+for+AGCA+Development"><img alt="<?php _e('Donate', 'ag-custom-admin')?>" src="<?php echo $this->pluginUrl(); ?>images/donate-btn.png" /></a>
@@ -2326,17 +2032,9 @@ class AGCA{
2326
  <ul>
2327
  <li><a href="https://wordpress.org/support/plugin/ag-custom-admin" target="_blank"><span class="dashicons dashicons-megaphone"></span>&nbsp;&nbsp;<?php _e('Report an issue', 'ag-custom-admin'); ?></a> - <?php _e('If plugin does not work as expected', 'ag-custom-admin'); ?> </li>
2328
  </ul>
2329
- <?php /*<ul>
2330
- <li><a href="" target="_blank"><span class="dashicons dashicons-art"></span>&nbsp;&nbsp;<?php _e('Idea for admin theme', 'ag-custom-admin'); ?></a> - <?php _e('submit your idea for admin theme', 'ag-custom-admin'); ?> </li>
2331
- </ul>*/
2332
- ?>
2333
  <ul>
2334
  <li><a href="https://wordpress.org/support/view/plugin-reviews/ag-custom-admin" target="_blank"><span class="dashicons dashicons-awards"></span>&nbsp;&nbsp;<?php _e('Add a review on WordPress.org', 'ag-custom-admin'); ?></a> - <?php _e('add your review and rate us on WordPress.org', 'ag-custom-admin'); ?> </li>
2335
  </ul>
2336
- <?php /*<ul>
2337
- <li><a href="" target="_blank"><span class="dashicons dashicons-shield-alt"></span>&nbsp;&nbsp;<?php _e('Visit our support site', 'ag-custom-admin'); ?></a> - <?php _e('for any other questions, feel free to contact us', 'ag-custom-admin'); ?> </li>
2338
- </ul>*/
2339
- ?>
2340
  <ul>
2341
  <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=agca@cusmin.com&item_name=Support+for+AGCA+Development" target="_blank"><span class="dashicons dashicons-palmtree"></span>&nbsp;&nbsp;<?php _e('Donate', 'ag-custom-admin'); ?></a> - <?php _e('if you find this plugin helpful for your needs', 'ag-custom-admin'); ?> </li>
2342
  </ul>
@@ -2523,13 +2221,6 @@ class AGCA{
2523
  'label'=>'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.__('Hide <b>+ New > Media</b> sub-menu', 'ag-custom-admin')
2524
  ));
2525
 
2526
- /* $this->print_checkbox(array(
2527
- 'hide'=>true,
2528
- 'title'=>__('Hides "Admin themes" from admin bar', 'ag-custom-admin'),
2529
- 'name'=>'agca_admin_bar_admin_themes',
2530
- 'label'=>__('"Admin themes"', 'ag-custom-admin')
2531
- ));*/
2532
-
2533
  $this->print_input(array(
2534
  'title'=>__('Adds custom text in admin top bar.', 'ag-custom-admin'),
2535
  'name'=>'agca_custom_site_heading',
@@ -2670,6 +2361,13 @@ class AGCA{
2670
  'label'=>__('Hide <b>Welcome</b> widget', 'ag-custom-admin')
2671
  ));
2672
 
 
 
 
 
 
 
 
2673
  $this->print_checkbox(array(
2674
  'hide'=>true,
2675
  'title'=>__('Hides <b>Activity</b> dashboard widget', 'ag-custom-admin'),
@@ -3021,31 +2719,6 @@ class AGCA{
3021
  <input type="hidden" size="47" id="ag_colorizer_json" name="ag_colorizer_json" value="<?php echo htmlspecialchars(get_option('ag_colorizer_json')); ?>" />
3022
  <div id="picker"></div>
3023
  </div>
3024
- <?php if(defined('AGCA_THEMES')){ ?>
3025
- <div id="section_templates" style="display:none" class="ag_section">
3026
- <h2 class="section_title"><span style="float:left"><?php _e('Admin Themes', 'ag-custom-admin'); ?></span></h2>
3027
- <table class="form-table" width="500px">
3028
- <tr valign="center">
3029
- <td>
3030
- <p style="color: red; font-size:15px;font-weight:bold;margin-bottom:20px;">Note: AGCA Themes will be discontinued soon!</p>
3031
- <div id="agca_templates"></div>
3032
- </td>
3033
- </tr>
3034
- <tr>
3035
- <td>
3036
- <div id="advanced_template_options" style="display:none">
3037
- <div class="agca-feedback-and-support">
3038
- <ul>
3039
- <?php /* <li><a href="" title="<?php _e('If you have any ideas for theme improvements, or you have new themes requests, please feel free to send us a message', 'ag-custom-admin'); ?>" target="_blank"><span class="dashicons dashicons-art"></span>&nbsp;&nbsp;<?php _e('Submit your admin themes ideas', 'ag-custom-admin'); ?></a></li>*/ ?>
3040
- <li><a style="background: #f08080;color:#fff;" href="javascript:agca_removeAllTemplates();" title="<?php _e('WARNING: All installed themes will be removed. To activate them again, you would need to install theme and activate using valid license keys. Free themes can be installed again.', 'ag-custom-admin'); ?>"><span style="color:#fff" class="dashicons dashicons-trash"></span>&nbsp;&nbsp;<?php _e('Uninstall all installed themes', 'ag-custom-admin'); ?></a></li>
3041
- </ul>
3042
- </div>
3043
- </div>
3044
- </td>
3045
- </tr>
3046
- </table>
3047
- </div>
3048
- <?php } ?>
3049
  <div id="section_advanced" style="display:none" class="ag_section">
3050
  <h2 class="section_title"><?php _e('Advanced', 'ag-custom-admin'); ?></h2>
3051
  <?php $this->show_save_button_upper(); ?>
@@ -3094,12 +2767,6 @@ class AGCA{
3094
  </div>
3095
  <?php $this->show_save_button(); ?>
3096
  </form>
3097
- <form id="agca_templates_form" name="agca_templates_form" action="<?php echo htmlentities(get_site_url().$_SERVER['PHP_SELF']);?>?page=ag-custom-admin/plugin.php" method="post">
3098
- <?php wp_nonce_field('agca_form','_agca_token'); ?>
3099
- <input type="hidden" name="_agca_save_template" value="true" />
3100
- <input type="hidden" id="templates_data" name="templates_data" value="" />
3101
- <input type="hidden" id="templates_name" name="templates_name" value="" />
3102
- </form>
3103
  </div>
3104
  <?php
3105
  }
4
  Plugin URI: https://cusmin.com/agca
5
  Description: All-in-one tool for admin panel customization. Change almost everything: admin menu, dashboard, login page, admin bar and much more.
6
  Author: Cusmin
7
+ Version: 6.7.1
8
  Text Domain: ag-custom-admin
9
  Domain Path: /languages
10
  Author URI: https://cusmin.com
34
  private $admin_capabilities;
35
  private $context = "";
36
  private $saveAfterImport = false;
 
 
37
 
38
  public function __construct()
39
  {
73
  /*Initialize properties*/
74
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
75
 
76
+ $this->agca_version = "6.7.1";
77
  }
78
 
79
  function load_plugin_textdomain() {
87
  {
88
  if(!is_network_admin()){
89
  $links[] = '<a href="tools.php?page=ag-custom-admin/plugin.php#general-settings">' . __('Settings', 'ag-custom-admin') . '</a>';
 
90
  }
91
  $links[] = '<a target="_blank" href="https://wordpress.org/support/plugin/ag-custom-admin">' . __('Support', 'ag-custom-admin') . '</a>';
92
  $links[] = '<a target="_blank" href="https://cusmin.com/upgrade-to-cusmin?ref=plugins">' . __('Upgrade', 'ag-custom-admin') . '</a>';
136
 
137
  function checkGET(){
138
  if(isset($_GET['agca_action'])){
 
 
 
 
 
139
  }
140
  if(isset($_GET['agca_debug'])){
141
  if($_GET['agca_debug'] =="true"){
147
  }
148
 
149
  function checkPOST(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  }
151
 
152
  function verifyPostRequest(){
203
 
204
  function admin_bar_changes(){
205
  if( current_user_can( 'manage_options' )){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
 
 
 
 
 
 
 
207
  }
 
208
  }
209
 
210
  function isGuest(){
237
  ?>
238
  </script>
239
  <link rel="stylesheet" type="text/css" href="<?php echo $this->pluginUrl(); ?>style/ag_style.css?ver=<?php echo $this->agca_version; ?>" />
240
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->pluginUrl(); ?>require/dynamic.php?type=css&context=<?php echo $this->context; ?>&ver=<?php echo $this->agca_version; ?>" />
241
  <script type="text/javascript" src="<?php echo $this->pluginUrl(); ?>script/ag_script.js?ver=<?php echo $this->agca_version; ?>"></script>
242
+ <script type="text/javascript" src="<?php echo $this->pluginUrl(); ?>require/dynamic.php?type=js&context=<?php echo $this->context; ?>&ver=<?php echo $this->agca_version; ?>"></script>
243
 
244
  <?php
245
  if($this->context == "login"){
253
  }
254
  ?>
255
  <?php
 
 
256
  if(!((get_option('agca_role_allbutadmin')==true) and (current_user_can($this->admin_capability())))){
257
  ?>
258
  <style type="text/css">
362
  register_setting( 'agca-options-group', 'agca_dashboard_text' );
363
  register_setting( 'agca-options-group', 'agca_dashboard_text_paragraph' );
364
  register_setting( 'agca-options-group', 'agca_dashboard_widget_welcome' );
365
+ register_setting( 'agca-options-group', 'agca_dashboard_widget_health_status' );
366
  register_setting( 'agca-options-group', 'agca_dashboard_widget_activity' );
367
  register_setting( 'agca-options-group', 'agca_dashboard_widget_il' );
368
  register_setting( 'agca-options-group', 'agca_dashboard_widget_plugins' );
381
  register_setting( 'agca-options-group', 'agca_admin_bar_new_content_user' );
382
  register_setting( 'agca-options-group', 'agca_admin_bar_new_content_media' );
383
  register_setting( 'agca-options-group', 'agca_admin_bar_update_notifications' );
 
384
  register_setting( 'agca-options-group', 'agca_remove_top_bar_dropdowns' );
385
  register_setting( 'agca-options-group', 'agca_admin_bar_frontend' );
386
  register_setting( 'agca-options-group', 'agca_admin_bar_frontend_hide' );
389
  register_setting( 'agca-options-group', 'agca_login_lostpassword_remove' );
390
  register_setting( 'agca-options-group', 'agca_admin_capability' );
391
  register_setting( 'agca-options-group', 'agca_disablewarning' );
 
 
 
 
392
 
393
  /*Admin menu*/
394
  register_setting( 'agca-options-group', 'agca_admin_menu_turnonoff' );
497
  'agca_dashboard_text',
498
  'agca_dashboard_text_paragraph',
499
  'agca_dashboard_widget_welcome',
500
+ 'agca_dashboard_widget_health_status',
501
  'agca_dashboard_widget_activity',
502
  'agca_dashboard_widget_il',
503
  'agca_dashboard_widget_plugins',
514
  'agca_admin_bar_new_content_user',
515
  'agca_admin_bar_new_content_media',
516
  'agca_admin_bar_update_notifications',
 
517
  'agca_remove_top_bar_dropdowns',
518
  'agca_admin_menu_turnonoff',
519
  'agca_admin_menu_agca_button_only',
538
  'agca_disable_postver',
539
  'agca_menu_remove_client_profile',
540
  'agca_menu_remove_customize_button',
 
 
541
  );
542
  }
543
 
754
  }
755
 
756
  if(get_option('agca_admin_bar_frontend_hide')==true){
757
+ if(!((get_option('agca_role_allbutadmin')==true) and (current_user_can($this->admin_capability())))) {
758
+ add_filter( 'show_admin_bar', '__return_false' );
759
+ ?>
760
+ <style type="text/css">
761
+ #wpadminbar{
762
+ display: none;
763
+ }
764
+ </style>
765
+ <script type="text/javascript">
766
+ window.setTimeout(function(){document.getElementsByTagName('html')[0].setAttribute('style',"margin-top:0px !important");},50);
767
+ </script>
768
+ <?php
769
+ }
770
  }
771
  if(get_option('agca_admin_bar_frontend')!=true && is_user_logged_in()){
772
 
871
  <?php if(get_option('agca_admin_bar_update_notifications')!=""){ ?>
872
  jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-updates").css("display","none");
873
  <?php } ?>
 
 
 
 
 
874
 
875
  <?php if(get_option('agca_header_logo')==true){ ?>
876
  jQuery("#wphead #header-logo").css("display","none");
1048
  return $selectedValue;
1049
  }
1050
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1051
  function enableSpecificWPVersionCustomizations($customizations){
1052
  /*enable special CSS for this WP version*/
1053
  $ver = $this->get_wp_version();
1061
  return $customizations;
1062
  }
1063
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1064
  function agcaAdminSession(){
 
1065
 
1066
  //session_destroy();
1067
  //session_unset();
1072
 
1073
  if(!isset($_SESSION["AGCA"])){
1074
  $_SESSION["AGCA"] = array();
 
1075
  }
1076
  //print_r($_SESSION);
1077
 
1078
  if(isset($_SESSION["AGCA"])){
 
 
 
 
 
 
1079
 
 
 
1080
  }
 
 
 
 
1081
  }
1082
 
1083
  function getAGCAColor($name){
1086
  }
1087
  }
1088
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1089
  function agca_error_check(){
1090
  ?>
1091
  <script type="text/javascript">
1366
  }
1367
  function print_admin_css()
1368
  {
 
1369
  $wpversion = $this->get_wp_version();
1370
  $this->context = "admin";
1371
  $this->error_check();
1375
  var wpversion = "<?php echo $wpversion; ?>";
1376
  var agca_debug = <?php echo ($this->agca_debug)?"true":"false"; ?>;
1377
  var agca_version = "<?php echo $this->agca_version; ?>";
 
1378
  var errors = false;
1379
  var isSettingsImport = false;
1380
  var isCusminActive = <?php echo $this->isCusminActive()?'true':'false'; ?>;
1381
  var agca_context = "admin";
1382
  var roundedSidberSize = 0;
 
1383
  var agca_admin_menu = <?php echo json_encode($this->get_menu_customizations()) ?>;
1384
  var agca_string = {
1385
  file_imp_not_sel: '<?php _e('File for import is not selected!', 'ag-custom-admin'); ?>',
1390
  menu_login: '<?php _e('Login Page', 'ag-custom-admin'); ?>',
1391
  menu_admin_menu: '<?php _e('Admin Menu', 'ag-custom-admin'); ?>',
1392
  menu_colorizer: '<?php _e('Colorizer', 'ag-custom-admin'); ?>',
 
1393
  menu_upgrade: '<?php _e('Upgrade', 'ag-custom-admin'); ?>',
1394
  menu_advanced: '<?php _e('Advanced', 'ag-custom-admin'); ?>',
1395
  remove: '<?php _e('Remove', 'ag-custom-admin'); ?>',
1404
  };
1405
  </script>
1406
  <?php
 
1407
  $this->agca_get_includes();
1408
  $this->admin_capabilities();
1409
  wp_get_current_user() ;
1590
  }else{
1591
  ?>jQuery("#welcome-panel").css("display","block");<?php
1592
  }
1593
+ if(get_option('agca_dashboard_widget_health_status')==true){
1594
+ $this->remove_dashboard_widget('dashboard_site_health','normal');
1595
+ }
1596
  if(get_option('agca_dashboard_widget_il')==true){
1597
  $this->remove_dashboard_widget('dashboard_incoming_links','normal');
1598
  }else{
1768
  var agca_context = "login";
1769
  </script>
1770
  <?php
 
1771
  $this->agca_get_includes();
1772
 
1773
  ?>
1903
 
1904
  <link rel="stylesheet" type="text/css" href="<?php echo $this->pluginUrl(); ?>style/agca_farbtastic.css?ver=<?php echo $wpversion; ?>" />
1905
  <script type="text/javascript" src="<?php echo $this->pluginUrl(); ?>script/agca_farbtastic.js?ver=<?php echo $wpversion; ?>"></script>
1906
+
 
 
 
 
 
1907
  <?php //includes ?>
1908
  <div class="wrap">
1909
  <h1 id="agca-title"><img src="<?php echo plugins_url( 'images/agca-logo.svg', __FILE__ ) ?>" /><span class="title">absolutely glamorous custom admin</span> <span class="version">(v<?php echo $this->agca_version; ?>)</span></h1>
1937
  <li class="normal" ><a href="#admin-menu-settings" class="dashicons-before dashicons-editor-justify" title="<?php _e('Settings for main admin menu', 'ag-custom-admin')?>"><?php _e('Admin Menu', 'ag-custom-admin')?></a></li>
1938
  <li class="normal"><a href="#ag-colorizer-settings" class="dashicons-before dashicons-admin-appearance agca-invert-icon" title="<?php _e('Colorizer settings', 'ag-custom-admin')?>"><?php _e('Colorizer', 'ag-custom-admin')?></a></li>
1939
  <li class="normal"><a href="#ag-advanced" class="dashicons-before dashicons-welcome-learn-more" title="<?php _e('My custom scripts', 'ag-custom-admin')?>"><?php _e('Advanced', 'ag-custom-admin')?></a></li>
 
 
 
1940
  <li class="normal upgrade"><a href="https://cusmin.com/upgrade-to-cusmin?ref=menu" target="_blank" title="<?php _e('Upgrade to Cusmin </br>to unlock all premium features', 'ag-custom-admin')?>"><img src="<?php echo plugins_url( 'images/cusmin-logo.svg', __FILE__ ) ?>" /><?php _e('Upgrade', 'ag-custom-admin')?></a></li>
1941
 
1942
  <li style="background:none;border:none;padding:0;"><a id="agca_donate_button" target="_blank" style="margin-left:8px" title="<?php _e('Enjoying AGCA? Help us further develop it and support it!', 'ag-custom-admin')?> " href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=agca@cusmin.com&item_name=Support+for+AGCA+Development"><img alt="<?php _e('Donate', 'ag-custom-admin')?>" src="<?php echo $this->pluginUrl(); ?>images/donate-btn.png" /></a>
2032
  <ul>
2033
  <li><a href="https://wordpress.org/support/plugin/ag-custom-admin" target="_blank"><span class="dashicons dashicons-megaphone"></span>&nbsp;&nbsp;<?php _e('Report an issue', 'ag-custom-admin'); ?></a> - <?php _e('If plugin does not work as expected', 'ag-custom-admin'); ?> </li>
2034
  </ul>
 
 
 
 
2035
  <ul>
2036
  <li><a href="https://wordpress.org/support/view/plugin-reviews/ag-custom-admin" target="_blank"><span class="dashicons dashicons-awards"></span>&nbsp;&nbsp;<?php _e('Add a review on WordPress.org', 'ag-custom-admin'); ?></a> - <?php _e('add your review and rate us on WordPress.org', 'ag-custom-admin'); ?> </li>
2037
  </ul>
 
 
 
 
2038
  <ul>
2039
  <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=agca@cusmin.com&item_name=Support+for+AGCA+Development" target="_blank"><span class="dashicons dashicons-palmtree"></span>&nbsp;&nbsp;<?php _e('Donate', 'ag-custom-admin'); ?></a> - <?php _e('if you find this plugin helpful for your needs', 'ag-custom-admin'); ?> </li>
2040
  </ul>
2221
  'label'=>'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.__('Hide <b>+ New > Media</b> sub-menu', 'ag-custom-admin')
2222
  ));
2223
 
 
 
 
 
 
 
 
2224
  $this->print_input(array(
2225
  'title'=>__('Adds custom text in admin top bar.', 'ag-custom-admin'),
2226
  'name'=>'agca_custom_site_heading',
2361
  'label'=>__('Hide <b>Welcome</b> widget', 'ag-custom-admin')
2362
  ));
2363
 
2364
+ $this->print_checkbox(array(
2365
+ 'hide'=>true,
2366
+ 'title'=>__('Hides <b>Health Status</b> dashboard widget', 'ag-custom-admin'),
2367
+ 'name'=>'agca_dashboard_widget_health_status',
2368
+ 'label'=>__('Hide <b>Health Status</b> widget', 'ag-custom-admin')
2369
+ ));
2370
+
2371
  $this->print_checkbox(array(
2372
  'hide'=>true,
2373
  'title'=>__('Hides <b>Activity</b> dashboard widget', 'ag-custom-admin'),
2719
  <input type="hidden" size="47" id="ag_colorizer_json" name="ag_colorizer_json" value="<?php echo htmlspecialchars(get_option('ag_colorizer_json')); ?>" />
2720
  <div id="picker"></div>
2721
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2722
  <div id="section_advanced" style="display:none" class="ag_section">
2723
  <h2 class="section_title"><?php _e('Advanced', 'ag-custom-admin'); ?></h2>
2724
  <?php $this->show_save_button_upper(); ?>
2767
  </div>
2768
  <?php $this->show_save_button(); ?>
2769
  </form>
 
 
 
 
 
 
2770
  </div>
2771
  <?php
2772
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=agca@cus
4
  Tags: admin, customize, hide, change admin, admin bar, login page, admin menu, colors
5
  Requires at least: 3.0
6
  Tested up to: 5.7
7
- Stable tag: 6.7
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl.txt
10
 
@@ -145,6 +145,12 @@ If you have the latest WordPress and plugin versions and you still experience so
145
 
146
  == Change Log ==
147
 
 
 
 
 
 
 
148
  = 6.7 =
149
  * WP 5.7 compatibility
150
  * New AGCA brand
@@ -584,6 +590,10 @@ If you have the latest WordPress and plugin versions and you still experience so
584
 
585
  == Upgrade Notice ==
586
 
 
 
 
 
587
  = 6.7 =
588
  * WP 5.7 compatibility
589
  * New AGCA brand and improved admin UX
4
  Tags: admin, customize, hide, change admin, admin bar, login page, admin menu, colors
5
  Requires at least: 3.0
6
  Tested up to: 5.7
7
+ Stable tag: 6.7.1
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl.txt
10
 
145
 
146
  == Change Log ==
147
 
148
+ = 6.7.1 =
149
+ * Removed support for AGCA themes
150
+ * Added option to remove **Site Health** dashboard widget
151
+ * Fixed issue not excluding AGCA admin when hiding admin bar on site pages
152
+ * Styled AGCA on plugins page
153
+
154
  = 6.7 =
155
  * WP 5.7 compatibility
156
  * New AGCA brand
590
 
591
  == Upgrade Notice ==
592
 
593
+ = 6.7.1 =
594
+ * Removed support for AGCA themes. If you're using old AGCA themes, please don't upgrade AGCA.
595
+ * Cleanup and improvements
596
+
597
  = 6.7 =
598
  * WP 5.7 compatibility
599
  * New AGCA brand and improved admin UX
require/dynamic.php CHANGED
@@ -21,8 +21,6 @@ if (file_exists('../../../../wp-load.php')) {
21
  }
22
  }
23
 
24
- $themes = get_option('agca_templates');
25
- $selectedTheme = get_option('agca_selected_template');
26
  $type = "";
27
  $optionName = "";
28
  $agcaContext = "";
@@ -46,70 +44,11 @@ if ( $agcaContext != "login" && !is_user_logged_in()) {
46
  header('Content-type: application/javascript');
47
  $optionName = ($agcaContext == "login")? "loginjs":"adminjs";
48
  }
49
- if($type == "css" || $type == "js"){
50
- if(isset($themes[$selectedTheme])){
51
- $theme = $themes[$selectedTheme];
52
- $admin_capability = get_option('agca_admin_capability');
53
- if($admin_capability == ""){
54
- $admin_capability = "edit_dashboard";
55
- }
56
- if(!((get_option('agca_role_allbutadmin')==true) and (current_user_can($admin_capability )))){
57
- $adminscript = $theme[$optionName];
58
- $settings = $theme['settings'];
59
- if($settings == "" || $settings == " ") $settings = "{}";
60
- $adminscript = agcaAppendSettingsToAGCATemplateCustomizations($adminscript, $settings);
61
- $admindata = agcaEnableSpecificWPVersionCustomizations($admindata);
62
- $admindata = agcaRemoveCSSComments($admindata);
63
-
64
- echo $adminscript;
65
- }
66
- }
67
- }
68
-
69
- //print_r($themes); print_r($selectedTheme); die;
70
  die;
71
 
72
-
73
- function agcaEnableSpecificWPVersionCustomizations($customizations){
74
- /*enable special CSS for this WP version*/
75
- $ver = agcat_get_wp_version();
76
- $customizations = str_replace("/*".$ver," ", $customizations);
77
- $customizations = str_replace($ver."*/"," ", $customizations);
78
- return $customizations;
79
- }
80
- function agcat_get_wp_version(){
81
- global $wp_version;
82
- $array = explode('-', $wp_version);
83
- $version = $array[0];
84
- return $version;
85
- }
86
- function agcaAppendSettingsToAGCATemplateCustomizations($customizations, $settings){
87
- $template_settings = json_decode($settings);
88
- //print_r($template_settings);
89
- foreach($template_settings as $sett){
90
- $key = $sett->code;
91
-
92
- //use default value if user's value is not set
93
- $value="";
94
- if($sett->value != ""){
95
- $value = $sett->value;
96
- }else{
97
- $value = $sett->default_value;
98
- }
99
-
100
- //Prepare settings
101
- if($sett->type == 6){
102
- if($value !== null && (strtolower($value) == "on" || $value == "1")){
103
- $value = "true";
104
- }else{
105
- $value = "false";
106
- }
107
- }
108
- $customizations = str_replace("%".$key."%",$value, $customizations);
109
- }
110
- return $customizations;
111
- }
112
- function agcaRemoveCSSComments($customizations){
113
- $customizations = preg_replace('#/\*.*?\*/#si','',$customizations);
114
- return $customizations;
115
- }
21
  }
22
  }
23
 
 
 
24
  $type = "";
25
  $optionName = "";
26
  $agcaContext = "";
44
  header('Content-type: application/javascript');
45
  $optionName = ($agcaContext == "login")? "loginjs":"adminjs";
46
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  die;
48
 
49
+ function agcat_get_wp_version(){
50
+ global $wp_version;
51
+ $array = explode('-', $wp_version);
52
+ $version = $array[0];
53
+ return $version;
54
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
script/ag_script.js CHANGED
@@ -223,14 +223,6 @@ function showHideSection(text) {
223
  jQuery('#section_ag_colorizer_settings').show();
224
  jQuery('#section_ag_colorizer_settings .section_title').trigger('focus');
225
  break;
226
- case agca_string.menu_themes:
227
- if(!jQuery('#section_templates').hasClass("loaded")){
228
- jQuery('#section_templates').addClass('loaded');
229
- agca_client_init();
230
- }
231
- jQuery('#section_templates').show();
232
- jQuery('#section_templates .section_title').trigger('focus');
233
- break;
234
  case agca_string.menu_advanced:
235
  jQuery('#section_advanced').show();
236
  jQuery('#section_advanced .section_title').trigger('focus');
@@ -467,7 +459,7 @@ jQuery(document).ready(function(){
467
 
468
  if(typeof isCusminActive !== 'undefined' && isCusminActive){
469
  hideAllSections();
470
- jQuery('#section_templates, #section-cusmin').show();
471
  if(typeof agca_client_init === 'function'){
472
  agca_client_init();
473
  }
223
  jQuery('#section_ag_colorizer_settings').show();
224
  jQuery('#section_ag_colorizer_settings .section_title').trigger('focus');
225
  break;
 
 
 
 
 
 
 
 
226
  case agca_string.menu_advanced:
227
  jQuery('#section_advanced').show();
228
  jQuery('#section_advanced .section_title').trigger('focus');
459
 
460
  if(typeof isCusminActive !== 'undefined' && isCusminActive){
461
  hideAllSections();
462
+ jQuery('#section-cusmin').show();
463
  if(typeof agca_client_init === 'function'){
464
  agca_client_init();
465
  }
script/agca_tmpl.js DELETED
@@ -1,744 +0,0 @@
1
- var isAGCAPage = true;
2
- var template_name = "";
3
- var templates_installed = [];
4
- var xhr =null;
5
- var agcaLoadingTimeOut = null;
6
-
7
- function agca_getTemplateCallback(data){
8
- agcaDebug('FN:agca_getTemplateCallback()');
9
- agcaDebug(JSON.stringify(data));
10
- if(data.success == 0){
11
- //alert(data.data);
12
- agcaInfoMessage("Error",data.data);
13
- jQuery('#agca_template_popup').hide();
14
- }else{
15
- jQuery("#templates_name").val(template_name);
16
- var parts = data.data.split("||||");
17
- jQuery("#templates_data").val(parts[1]);
18
- //console.log(jQuery("#templates_data").val());
19
- jQuery("body").append(parts[0]);
20
-
21
- //load settings
22
- agca_loadTemplateSettingsInitial(template_name);
23
- }
24
- }
25
-
26
- function agca_getTemplateByLicenseKeyCallback(data){
27
- agcaDebug('FN:agca_getTemplateByLicenseKeyCallback()');
28
- agcaDebug(JSON.stringify(data));
29
- if(data.success == 0){
30
- agcaInfoMessage("Error",data.data);
31
- }else{
32
- if(data.data.length < 100){
33
- template_selected = data.data;
34
- var key = agcaTemplatesSessionGetLicenseKey(template_selected);
35
- agcaProgress('Loading theme... Please wait...');
36
- agca_getTemplate(template_selected,key);
37
- }else{
38
- agcaDebug("Uknown theme name" + data.data);
39
- }
40
-
41
- }
42
- }
43
-
44
- function agca_getTemplatesCallback(data){
45
- agcaDebug('FN:agca_getTemplatesCallback()');
46
- if(data.data == "CDbException"){
47
- data.data = "Service is temporary to busy. Please reload the page or try again later.";
48
- agcaDebugObj(data);
49
- }else if(data.data == "PHP Error"){
50
- data.data = "Error occurred on the server.";
51
- agcaDebugObj(data);
52
- }
53
- jQuery('#agca_templates').html(data.data);
54
- jQuery('#advanced_template_options').show();
55
- jQuery("#agca_installed_templates .template img").each(agcaApplyTooltip);
56
- jQuery("#agca_loaded_templates .template img").each(agcaApplyTooltip);
57
- jQuery('#advanced_template_options a').each(agcaApplyTooltip);
58
- }
59
- function agca_client_init(){
60
- agcaDebug('FN:agca_client_init()');
61
- agca_getLocalTemplates();
62
- checkIfTemplatesAreLoaded(1);
63
- jQuery('#agca_templates').html('<p class="initialLoader" style="font-size:18px;color:gray;font-style:italic">Loading themes...</p>');
64
- }
65
-
66
- function agca_setupXHR(){
67
- agcaDebug('FN:agca_setupXHR()');
68
- if(xhr != null) return false;
69
- xhr = new easyXDM.Rpc({
70
- remote:templates_ep
71
- //onReady: function () { alert('ready'); }
72
- }, {
73
- remote: {
74
- request: {
75
- }
76
- },
77
- handle: function(data, send){
78
- if(data.success){
79
- var callbackFname = data.url.split('callback=')[1];
80
- var fn = window[callbackFname];
81
- if(fn != undefined){
82
- fn(data);
83
- }
84
- }else{ console.log('errr');
85
- console.log(data.url);
86
- var url = data.url;
87
- if(url !== undefined && url != ""){
88
- var cb = url.split('callback=')[1];
89
- if(cb != ""){
90
- var fn = window[cb];
91
- if(fn != undefined){
92
- fn(data);
93
- }
94
- }
95
- }else{
96
- printInitialAGCAError("Please update your browser in order to view AG Custom Admin themes.");
97
- }
98
- }
99
- }
100
- });
101
- }
102
-
103
- function agca_getTemplates(){
104
- agcaDebug('FN:agca_getTemplates()');
105
- //agca_uploadRemoteImage('http://www.neowing.co.jp/idol_site2/image/FDGD-21/fdgd-21-top.jpg');
106
- agca_setupXHR();
107
- if(typeof agca_active_template_version === 'undefined'){
108
- agca_active_template_version = "";
109
- }
110
-
111
- xhr.request({
112
- url: templates_ep + "service/client" + "&callback=agca_getTemplatesCallback",
113
- method: "POST",
114
- callBack: agca_getTemplatesCallback,
115
- data: {isPost:true, wpv:wpversion, agcav:agca_version,selected:template_selected,installed:agca_installed_templates,template_version:agca_active_template_version}
116
- });
117
- }
118
-
119
- function agca_getConfiguration(){
120
- agcaDebug('FN:agca_getConfiguration()');
121
- /*xhr.request({
122
- url: templates_ep + "/configuration" + "?callback=agca_getConfigurationCallback",
123
- method: "POST",
124
- callBack: agca_getConfigurationCallback,
125
- data: {isPost:true}
126
- });*/
127
- jQuery.getJSON(templates_ep + "?callback=?",
128
- function(data){
129
- console.log("EP:"+data.ep);
130
- templates_ep = data.ep;
131
- if(data.error !=""){
132
- printInitialAGCAError(data.error);
133
- }else{
134
- agca_getTemplates();
135
- }
136
- }
137
- ).error(function(jqXHR, textStatus, errorThrown) {
138
- agca_error({url:templates_ep,data:textStatus + " " + jqXHR.responseText});
139
- /*console.log("error " + textStatus);
140
- console.log("incoming Text " + jqXHR.responseText);*/
141
- });
142
- }
143
-
144
- function printInitialAGCAError(err){
145
- jQuery('#agca_templates p.initialLoader').html(err);
146
- jQuery('#agca_templates p').removeClass('initialLoader');
147
- clearTimeout(agcaLoadingTimeOut);
148
- }
149
-
150
- function agca_getTemplate(template, key){
151
- agcaDebug('FN:agca_getTemplate()');
152
- template_name = template;
153
- if(!agcaTemplatesSessionIsLicenseSet(template)){
154
- agcaTemplatesSessionAdd(template, key);
155
- }
156
- xhr.request({
157
- url: templates_ep + "service/gettemplate"+"&tmpl="+template+"&key="+key+"&callback=agca_getTemplateCallback",
158
- method: "POST",
159
- callBack: agca_getTemplateCallback,
160
- data: {isPost:true, wpv:wpversion, agcav:agca_version}
161
- });
162
- }
163
-
164
- function agca_getTemplateByLicenseKey(key){
165
- agcaDebug('FN:agca_getTemplateByLicenseKey('+key+')');
166
- //template_name = template;
167
- xhr.request({
168
- url: templates_ep + "service/gettemplatebylk"+"&tmpl=&key="+key+"&callback=agca_getTemplateByLicenseKeyCallback",
169
- method: "POST",
170
- callBack: agca_getTemplateByLicenseKeyCallback,
171
- data: {isPost:true, wpv:wpversion, agcav:agca_version}
172
- });
173
- }
174
-
175
- function agca_loadTemplateSettingsInitial(template){
176
- agcaDebug('FN:agca_loadTemplateSettingsInitial()');
177
- agca_loadTemplateSettingsCore(template, true);
178
- }
179
-
180
- function agca_loadTemplateSettings(template){
181
- agcaDebug('FN:agca_loadTemplateSettings()');
182
- agca_loadTemplateSettingsCore(template, false);
183
- }
184
-
185
- function agca_loadTemplateSettingsCore(template, isInitial){
186
- agcaDebug('FN:agca_loadTemplateSettingsCore()');
187
- template_name = template;
188
- template_selected = template;
189
-
190
- var licenseKey = "";
191
- if(agcaTemplatesSession[template] != null && agcaTemplatesSession[template]['license'] != null){
192
- licenseKey = agcaTemplatesSession[template]['license'];
193
- }
194
-
195
- var calb = agca_getTemplateSettingsCallback;
196
- var calbName = "agca_getTemplateSettingsCallback";
197
-
198
- if(isInitial){
199
- agcaProgress("Loading theme settings...");
200
- calb = agca_getTemplateSettingsInitialCallback;
201
- calbName = "agca_getTemplateSettingsInitialCallback";
202
- }
203
- xhr.request({
204
- url: templates_ep + "service/gettemplatesettings"+"&tmpl="+template+"&key="+licenseKey+"&callback="+calbName,
205
- method: "POST",
206
- callBack: calb,
207
- data: {isPost:true, wpv:wpversion, agcav:agca_version}
208
- });
209
- //alert('saving template settings for template:' + template_name);
210
- }
211
-
212
- function agca_getTemplateSettingsInitialCallback(data){
213
- agcaDebug('FN:agca_getTemplateSettingsInitialCallback()');
214
- agcaDebug(JSON.stringify(data));
215
- if(data.success == 0){
216
- agcaInfoMessage("Error",data.data);
217
- //TODO - what if template is loaded, but settings are not?
218
- console.log('ERR:theme settings are not loaded');
219
- }else{
220
- var settings = "";
221
- var filteredSettings = {};
222
- try{
223
- settings = JSON.parse(data.data);
224
- if(settings.length == 0){
225
- }else{
226
- for(var ind in settings){
227
- var type = settings[ind].type;
228
- var text = "";
229
- var defaultValue = "";
230
- var newItem = {};
231
- newItem.code = settings[ind].name;
232
- newItem.type = settings[ind].type;
233
- newItem.value = settings[ind].value;
234
- newItem.default_value = settings[ind].default_value;
235
- filteredSettings[ind] = newItem;
236
- }
237
- agcaDebug("Selected theme:" + template_selected);
238
- console.log(filteredSettings);
239
-
240
- }
241
- }catch(e){
242
- console.log('Error while loading settings');
243
- console.log(e);
244
- }
245
- agca_saveTemplateSettingsInitial(template_selected, filteredSettings);
246
- }
247
- }
248
- /*template settings - load them to UI popup window*/
249
- function agca_getTemplateSettingsCallback(data){
250
- agcaDebug('FN:agca_getTemplateSettingsCallback()');
251
- //console.log(data.data);
252
-
253
- if(data.success == 0){
254
- agcaTemplatesSessionRemove(template_selected);
255
- //alert(data.data);
256
- jQuery('#agca_template_settings .agca_loader').html(data.data);
257
- }else{
258
-
259
- var settings = "";
260
- try{
261
- if(data.data.substring(0, "Exception:".length) === "Exception:"){
262
- var errr= data.data.substr(10);
263
- jQuery('#agca_template_settings .agca_loader').html(errr);
264
- return false;
265
- }
266
- settings = JSON.parse(data.data);
267
- if(settings.length == 0){
268
- jQuery('#agca_template_settings .agca_loader').html("Additional settings are not available for this theme");
269
- }else{
270
- jQuery('#agca_template_settings .agca_loader').hide();
271
- jQuery('#agca_save_template_settings').show();
272
-
273
- var currentSettings = (agca_template_settings != null && agca_template_settings != undefined)?agca_template_settings:{};
274
-
275
- //TODO: Change to use object name code object[code], instead of number object[i]
276
- for(var ind in settings){
277
- var type = settings[ind].type;
278
- var text = "";
279
- //console.log(settings[ind]);
280
- var currentValue = "";
281
-
282
- //get previously saved value
283
- for(var ind2 in currentSettings){
284
- if(currentSettings[ind2]!= null && currentSettings[ind2].code == settings[ind].name){
285
- currentValue = currentSettings[ind2].value;
286
- }
287
- }
288
-
289
- //if current value is still not defined, use default value
290
- if(currentValue == ""){
291
- currentValue = settings[ind].default_value;
292
- }
293
- /*text*/
294
- if(type==1){
295
- text = "<p>"+settings[ind].title+"</p><input type=\"text\" name=\"agcats_"+settings[ind].name+"\" value=\""+currentValue+"\" default_value=\""+settings[ind].default_value+"\" code=\""+settings[ind].name+"\" class=\"setting\" stype=\"1\" /></br>";
296
- }else if(type==2){
297
- text = "<p>"+settings[ind].title+"</p><textarea name=\"agcats_"+settings[ind].name+"\" class=\"setting\" code=\""+settings[ind].name+"\" default_value=\""+settings[ind].default_value+"\" stype=\"2\" >"+currentValue+"</textarea></br>";
298
- }else if(type==3){
299
- text = "<p>"+settings[ind].title+"</p><select name=\"agcats_"+settings[ind].name+"\" class=\"setting\" code=\""+settings[ind].name+"\" default_value=\""+settings[ind].default_value+"\" stype=\"3\" >";
300
- var options = settings[ind].default_value.split(',');
301
- for(var indopt in options){
302
- var sel = "";
303
- if(currentValue == options[indopt]){
304
- sel = " selected=\"selected\" ";
305
- }
306
- text+="<option value="+options[indopt]+" "+sel+">"+options[indopt]+"</option>";
307
- }
308
- text+="</select>";
309
- }else if(type==4){
310
- text = "<p>"+settings[ind].title+"</p><div class=\"agca_form_0100_div\"><input value=\""+currentValue+"\" type=\"text\" name=\"agcats_"+settings[ind].name+"\" class=\"setting agca_form_0100\" code=\""+settings[ind].name+"\" default_value=\""+settings[ind].default_value+"\" stype=\"4\" /><input type=\"button\" name=\"agca_form_decr\" class=\"agca_form_decr\" value=\"-\"/><input type=\"button\" name=\"agca_form_incr\" class=\"agca_form_incr\" value=\"+\"/>&nbsp;(0-100)</div></br>";
311
- }else if(type==6){
312
- if(currentValue == true){
313
- currentValue =" checked=\"checked\" ";
314
- }else{
315
- currentValue="";
316
- }
317
- text = "<p>"+settings[ind].title+"</p><input type=\"checkbox\" name=\"agcats_"+settings[ind].name+"\" class=\"setting\" default_value=\""+settings[ind].default_value+"\" code=\""+settings[ind].name+"\" stype=\"6\" "+currentValue+" /></br>";
318
- }else if(type==7){
319
- text = "<p>"+settings[ind].title+"</p><div name=\"agcats_"+settings[ind].name+"\" class=\"setting\" code=\""+settings[ind].name+"\" default_value=\""+settings[ind].default_value+"\" stype=\"7\" style=\"padding-left: 10px;color:white;\">";
320
- var options = settings[ind].default_value.split(',');
321
- for(var indopt in options){
322
- var sel = "";
323
- if(currentValue == options[indopt]){
324
- sel = " checked ";
325
- }
326
- text+="<input name=\"agcats_"+settings[ind].name+"_val\" style=\"margin-right:6px;\" type=\"radio\" value="+options[indopt]+" "+sel+" name=\"sd\"/>"+options[indopt]+"</br>";
327
- }
328
- text+="</div>";
329
- }
330
- jQuery('#agca_template_settings').append(text);
331
-
332
- //TODO: do similar to options above, clean a code up a litle bit, add them dinamicaly all attributes instead of inline adding
333
- jQuery('.agca_form_0100_div .agca_form_decr').click(function(){
334
- var val =jQuery(this).parent().find('.agca_form_0100').val();
335
- val = parseInt(val.replace(/\D/g,''));//leave only numbers
336
- if(isNaN(val)) val =0;
337
- val--;
338
- if(val < 0)val =0;
339
- if(val > 100)val=100;
340
- jQuery(this).parent().find('.agca_form_0100').val(val);
341
- });
342
- jQuery('.agca_form_0100_div .agca_form_incr').click(function(){
343
- var val =jQuery(this).parent().find('.agca_form_0100').val();
344
- val = parseInt(val.replace(/\D/g,''));//leave only numbers
345
- if(isNaN(val)) val =0;
346
- val++;
347
- if(val < 0)val =0;
348
- if(val > 100)val=100;
349
- jQuery(this).parent().find('.agca_form_0100').val(val);
350
- });
351
- jQuery('.agca_form_0100').keyup(function(){
352
-
353
- var val =jQuery(this).val();
354
- val = parseInt(val.replace(/\D/g,''));//leave only numbers
355
- if(val < 0 || isNaN(val))val =0;
356
- if(val > 100)val=100;
357
-
358
- jQuery(this).val(val);
359
-
360
- });
361
- }
362
- }
363
- }catch(e){
364
- console.log(e);
365
- }
366
- }
367
- //alert('callb');
368
- }
369
-
370
- function agca_saveTemplateSettingsInitial(template, settings){
371
- agcaDebug('FN:agca_saveTemplateSettingsInitial()');
372
- var originalText = jQuery("#templates_data").val();
373
- jQuery("#templates_data").val(originalText+"|||"+JSON.stringify(settings));
374
- agca_removeTemplateImages(template, agca_startUploadingRemoteImages);
375
- }
376
-
377
- function agca_saveTemplateSettingsFromForm(template){
378
- agcaDebug('FN:agca_saveTemplateSettingsFromForm()');
379
- template_name = template;
380
-
381
- //get settings from the form
382
- var settings = {};
383
-
384
- jQuery('#agca_template_settings .setting').each(function(ind){
385
- var setting_typ = jQuery(this).attr('stype');
386
- var setting_val = jQuery(this).val();
387
- var setting_cod = jQuery(this).attr('code');
388
- var setting_def = jQuery(this).attr('default_value');
389
-
390
- if(jQuery(this).attr('type')=="checkbox"){
391
- setting_val = jQuery(this).is(':checked');
392
- }
393
-
394
- //radio
395
- if(setting_typ == "7"){
396
- setting_val = jQuery('input[name="agcats_'+setting_cod+'_val"]:checked').val();
397
- }
398
-
399
- settings[ind] = {
400
- type: setting_typ,
401
- value: setting_val,
402
- code: setting_cod,
403
- default_value: setting_def
404
- };
405
-
406
- });
407
-
408
- jQuery('#agca_template_settings').html("<p>Applying theme settings...</p>");
409
- agca_saveTemplateSettingsCore(template, settings, function(data){
410
- window.location = 'tools.php?page=ag-custom-admin/plugin.php';
411
- });
412
- }
413
-
414
-
415
- function agca_saveTemplateSettingsCore(template, settings, callback){
416
- agcaDebug('FN:agca_saveTemplateSettingsCore()');
417
- var url = window.location;
418
- agca_POST(url,{"_agca_template_settings": JSON.stringify(settings),"_agca_current_template":template},
419
- callback,
420
- function(){
421
- console.log('AGCA Error: agca_saveTemplateSettingsCore()');
422
- }
423
- );
424
- }
425
-
426
- /*function agca_saveTemplateSettingsCore(template, settings){
427
- var settings = {};
428
- var url = window.location;
429
- jQuery.post(url,{"_agca_template_settings":settings,"_agca_current_template":template},
430
- function(data){
431
- window.location = 'tools.php?page=ag-custom-admin/plugin.php';
432
- //console.log('reload');
433
- })
434
- .fail(
435
- function(){
436
- console.log('AGCA Error: agca_saveTemplateSettingsCore()');
437
- });
438
- }*/
439
-
440
- function agca_activateTemplate(template){
441
- /*if(template_selected == ""){
442
- alert('There are no active templates to deactivate.');
443
- return false;
444
- };*/
445
- if(template == ""){
446
- agcaProgress('Deactivating theme... Please wait...');
447
- }else{
448
- agcaProgress('Activating theme... Please wait...');
449
- }
450
-
451
- agcaDebug('FN:agca_activateTemplate('+template+')');
452
- jQuery('input[name=agca_colorizer_turnonoff]').val("off");
453
-
454
- //ajax submit form
455
- var frm = jQuery('#agca_form');
456
- var data = frm.serialize();
457
- jQuery.ajax({
458
- type: frm.attr('method'),
459
- url: frm.attr('action'),
460
- data: data,
461
- success: function (data) {
462
- var url = window.location;
463
- agca_POST(url, {"_agca_activate_template":template},
464
- function(data){
465
- window.location = 'tools.php?page=ag-custom-admin/plugin.php';
466
- },
467
- function(){
468
- console.log('AGCA Error: agca_activateTemplate()');
469
- });
470
- }
471
- });
472
- }
473
-
474
- function agca_removeAllTemplates(){
475
- agcaDebug('FN:agca_removeAllTemplates()');
476
- yesnoPopup("Confirm","All installed themes will be uninstalled completely. You would need to re-activate your purchased themes with valid license keys in order to install them again. Are you sure?",agca_removeAllTemplatesConfirmed);
477
- }
478
-
479
- function agca_removeAllTemplatesConfirmed(){
480
- agcaDebug('FN:agca_removeAllTemplatesConfirmed()');
481
- agcaProgress('Removing all themes... Please wait...');
482
- window.setTimeout(function(){
483
- window.location = 'tools.php?page=ag-custom-admin/plugin.php&agca_action=remove_templates';
484
- },2000);
485
- }
486
-
487
- function handleLocalyStoredImages(){
488
- agcaDebug('FN:handleLocalyStoredImages()');
489
- agcaDebug(jQuery("#templates_data").val());
490
- var originalText = jQuery("#templates_data").val();
491
- var serializedImages = "";
492
- for(var tag in agca_local_images){
493
- if(tag != ""){
494
- if(serializedImages !=""){
495
- serializedImages+=",";
496
- }
497
- serializedImages+=agca_local_images[tag];
498
- originalText = originalText.replace(new RegExp(tag, 'g'), agca_local_images[tag]);
499
- }
500
- }
501
- jQuery("#templates_data").val(originalText+"|||"+serializedImages);
502
- //console.log(jQuery("#templates_data").val());
503
-
504
- //SAVE FINALY
505
- jQuery("#agca_templates_form").submit();
506
- }
507
-
508
- function agca_updateInstallProgress(){
509
- agcaDebug('FN:agca_updateInstallProgress()');
510
- agca_local_images_count++;
511
- var current = agca_remote_images_count - agca_local_images_count;
512
- var proc= (agca_local_images_count / (parseInt(agca_remote_images_count)-1)).toFixed(2) * 100;
513
-
514
- agcaProgress('Installing ('+proc+'%) ...');
515
- }
516
- function agca_removeTemplateImages(template_name, callBack){
517
- agcaDebug('FN:agca_removeTemplateImages()');
518
- var url = window.location;
519
- agca_POST(url,{"_agca_remove_template_images":template_name},
520
- function(data){
521
- console.log(data);
522
- if(callBack != null){
523
- callBack();
524
- }
525
- },
526
- function(e){
527
- console.log('AGCA Error: agca_removeTemplateImages()');
528
- console.log(e);
529
- if(callBack != null){
530
- callBack();
531
- }
532
- });
533
- }
534
- function agca_startUploadingRemoteImages(){
535
- agcaDebug('FN:agca_startUploadingRemoteImages()');
536
-
537
- //agcaDebug('templates data');
538
- //agcaDebug(jQuery("#templates_data").val());
539
- //upload remote images on callback
540
- if(typeof agca_remote_images != 'undefined'){
541
- agca_uploadRemoteImages();
542
- }else{
543
- jQuery("#templates_data").val(jQuery("#templates_data").val()+"|||");
544
-
545
- //SAVE FINALY PAYED
546
- jQuery("#agca_templates_form").submit();
547
- }
548
- }
549
-
550
- function agca_uploadRemoteImages(){
551
- agcaDebug('FN:agca_uploadRemoteImages()');
552
- var found = false;
553
- for(var tag in agca_remote_images){
554
- found = true;
555
- agca_updateInstallProgress();
556
- agca_uploadRemoteImage(agca_remote_images[tag], tag);
557
- break;
558
- }
559
- if(!found){
560
- //jQuery('.agca_content #activating').text('Installation successful. Reloading...');
561
- agcaProgress('Installation successful. Reloading...');
562
- window.setTimeout(handleLocalyStoredImages,2000);
563
- }
564
- }
565
-
566
- function agca_uploadRemoteImage(remoteUrl, tag){
567
- agcaDebug('FN:agca_uploadRemoteImage('+remoteUrl+', '+tag+')');
568
- var url = window.location;
569
- agca_POST(url,{"_agca_upload_image":remoteUrl},
570
- function(data){
571
- console.log(data);
572
- agca_local_images[tag] = data;
573
- delete agca_remote_images[tag];
574
- agca_uploadRemoteImages();
575
- //window.location = 'tools.php?page=ag-custom-admin/plugin.php';
576
- },
577
- function(){
578
- console.log('AGCA Error: agca_activateTemplate()');
579
- });
580
- }
581
-
582
- function agca_getLocalTemplates(){
583
- agcaDebug("FN:agca_getLocalTemplates()");
584
- var url = window.location;
585
- agca_POST(url,{"_agca_get_templates":true},
586
- function(data){
587
- try{
588
- templates_installed = JSON.parse(data);
589
- }catch(e){
590
- templates_installed = [];
591
- };
592
- //agca_getTemplates();
593
- agca_getConfiguration();
594
- },
595
- function(){
596
- console.log('AGCA Error: agca_getLocalTemplates()');
597
- });
598
- }
599
- function agca_error(data){
600
- agcaDebug("FN:agca_error()");
601
- clearTimeout(agcaLoadingTimeOut);
602
- if(jQuery('#agca_templates p:first').hasClass('initialLoader')){
603
- jQuery('#agca_templates p:first').text('Unable to load themes. Please submit this error to AGCA support. Thank you!');
604
- }
605
- alert('AG CUSTOM ADMIN TEMPLATE - ERROR\n\nError occured while loading configuration:\n'+data.url+'\n\n'+data.data);
606
- }
607
-
608
- //check if templates loaded
609
- function checkIfTemplatesAreLoaded(pass){
610
- agcaDebug('FN:checkIfTemplatesAreLoaded('+pass+')');
611
- if(pass == 1){
612
- agcaLoadingTimeOut = window.setTimeout(function(){
613
- if(jQuery('#agca_templates p:first').hasClass('initialLoader')){
614
- jQuery('#agca_templates p:first').text('Loading, please wait...');
615
- checkIfTemplatesAreLoaded(2);
616
- }
617
- },6000);
618
-
619
- }else if(pass == 2){
620
- agcaLoadingTimeOut = window.setTimeout(function(){
621
- if(jQuery('#agca_templates p:first').hasClass('initialLoader')){
622
- jQuery('#agca_templates p:first').text('Ready in a few moments...');
623
- checkIfTemplatesAreLoaded(3);
624
- }
625
- },6000);
626
-
627
- }
628
- else if(pass == 3){
629
- agcaLoadingTimeOut = window.setTimeout(function(){
630
- if(jQuery('#agca_templates p:first').hasClass('initialLoader')){
631
- jQuery('#agca_templates p:first').text('This takes a bit longer than usual, please wait...');
632
- checkIfTemplatesAreLoaded(4);
633
- }
634
- },7000);
635
- }
636
- else if(pass == 4){
637
- agcaLoadingTimeOut = window.setTimeout(function(){
638
- if(jQuery('#agca_templates p:first').hasClass('initialLoader')){
639
- jQuery('#agca_templates p:first').html('Sorry, unable to load themes right now. Please try again later.');
640
- agcaDebug('ERR:Unable to load themes');
641
- }
642
- },10000);
643
- }
644
- }
645
-
646
- function agcaTemplatesSessionIsLicenseSet(template){
647
- agcaDebug("FN:agcaTemplatesSessionIsLicenseSet(" + template + ")");
648
- if(agcaTemplatesSession[template] != null && agcaTemplatesSession[template]["license"] != null){
649
- return true;
650
- }
651
- return false;
652
- }
653
-
654
- function agcaTemplatesSessionGetLicenseKey(template){
655
- agcaDebug("FN:agcaTemplatesSessionGetLicenseKey(" + template + ")");
656
- if(agcaTemplatesSession[template] != null && agcaTemplatesSession[template]["license"] != null){
657
- return agcaTemplatesSession[template]["license"];
658
- }
659
- return "";
660
- }
661
-
662
- function agcaTemplatesSessionAdd(template, license, callback){
663
- agcaDebug("FN:agcaTemplatesSessionAdd(" + template + ", " + license + ", callback)");
664
- if(callback == null){
665
- callback = function(data){
666
- };
667
- }
668
- agcaTemplatesSession[template] = {};
669
- agcaTemplatesSession[template]["license"] = license;
670
- agca_POST(window.location, {
671
- "_agca_templates_session" : "true",
672
- "template":template,
673
- "license":license
674
- }, callback);
675
- }
676
-
677
- function agcaTemplatesSessionRemove(template, callback){
678
- agcaDebug("FN:agcaTemplatesSessionRemove(" + template + ", callback)");
679
- if(callback == null){
680
- callback = function(){};
681
- }
682
- agcaTemplatesSession[template]["license"] = null;
683
- agca_POST(window.location,{
684
- "_agca_templates_session_remove_license" : "true",
685
- "template":template
686
- }, callback);
687
- }
688
-
689
- function agca_POST(url, data, onSuccess, onError){
690
- data['_agca_token'] = jQuery('[name=_agca_token]').val();
691
- data['_wp_http_referer'] = jQuery('[name=_wp_http_referer]').val();
692
- jQuery.post(url, data,
693
- function(data){
694
- if(onSuccess){
695
- onSuccess(data);
696
- }
697
- })
698
- .fail(
699
- function(a,b,c){
700
- if(onError){
701
- onError(a,b,c);
702
- }
703
- });
704
- }
705
-
706
-
707
- /*FAQ: Invalid template license key: reopen browser and add key again,
708
- Wrong or expired license key. You can still use your template, but updates are not available any more.(1): reopen broeser
709
- */
710
-
711
- /*countdown*/
712
- function agcaCountDownTimer(now, expire, id)
713
- {
714
- var _second = 1;
715
- var _minute = _second * 60;
716
- var _hour = _minute * 60;
717
- var _day = _hour * 24;
718
- var _year = _day * 365;
719
-
720
- var nowParts = now.split('-');
721
- var expireParts = expire.split('-');
722
- var timer;
723
- var diff = expire - now;
724
-
725
- function showRemaining(df) {
726
- diff = diff-1;
727
- //console.log(diff);
728
-
729
- var days = Math.floor((diff % _year) / _day);
730
- var hours = Math.floor((diff % _day) / _hour);
731
- var minutes = Math.floor((diff % _hour) / _minute);
732
- var seconds = Math.floor((diff % _minute) / _second);
733
- var str = days +"d " + hours +"h "+ minutes +"min "+ seconds+"sec";
734
- jQuery(id+" .countdown").html("Available only for:</br>" + str);
735
- if (diff < 0) {
736
- clearInterval(timer);
737
- jQuery(id+" .countdown").html("</br>About to expire...");
738
- return;
739
- }
740
- }
741
- timer = setInterval(function(){
742
- showRemaining(diff);
743
- }, 1000);
744
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
script/xd.js DELETED
@@ -1 +0,0 @@
1
- (function(N,d,p,K,k,H){var b=this;var n=Math.floor(Math.random()*10000);var q=Function.prototype;var Q=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/;var R=/[\-\w]+\/\.\.\//;var F=/([^:])\/\//g;var I="";var o={};var M=N.easyXDM;var U="easyXDM_";var E;var y=false;var i;var h;function C(X,Z){var Y=typeof X[Z];return Y=="function"||(!!(Y=="object"&&X[Z]))||Y=="unknown"}function u(X,Y){return !!(typeof(X[Y])=="object"&&X[Y])}function r(X){return Object.prototype.toString.call(X)==="[object Array]"}function c(){try{var X=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");i=Array.prototype.slice.call(X.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1);h=parseInt(i[0],10)>9&&parseInt(i[1],10)>0;X=null;return true}catch(Y){return false}}var v,x;if(C(N,"addEventListener")){v=function(Z,X,Y){Z.addEventListener(X,Y,false)};x=function(Z,X,Y){Z.removeEventListener(X,Y,false)}}else{if(C(N,"attachEvent")){v=function(X,Z,Y){X.attachEvent("on"+Z,Y)};x=function(X,Z,Y){X.detachEvent("on"+Z,Y)}}else{throw new Error("Browser not supported")}}var W=false,J=[],L;if("readyState" in d){L=d.readyState;W=L=="complete"||(~navigator.userAgent.indexOf("AppleWebKit/")&&(L=="loaded"||L=="interactive"))}else{W=!!d.body}function s(){if(W){return}W=true;for(var X=0;X<J.length;X++){J[X]()}J.length=0}if(!W){if(C(N,"addEventListener")){v(d,"DOMContentLoaded",s)}else{v(d,"readystatechange",function(){if(d.readyState=="complete"){s()}});if(d.documentElement.doScroll&&N===top){var g=function(){if(W){return}try{d.documentElement.doScroll("left")}catch(X){K(g,1);return}s()};g()}}v(N,"load",s)}function G(Y,X){if(W){Y.call(X);return}J.push(function(){Y.call(X)})}function m(){var Z=parent;if(I!==""){for(var X=0,Y=I.split(".");X<Y.length;X++){Z=Z[Y[X]]}}return Z.easyXDM}function e(X){N.easyXDM=M;I=X;if(I){U="easyXDM_"+I.replace(".","_")+"_"}return o}function z(X){return X.match(Q)[3]}function f(X){return X.match(Q)[4]||""}function j(Z){Z=Z.replace('htttp','http');var X=Z.toLowerCase().match(Q);var aa=X[2],ab=X[3],Y=X[4]||"";if((aa=="http:"&&Y==":80")||(aa=="https:"&&Y==":443")){Y=""}return aa+"//"+ab+Y}function B(X){X=X.replace(F,"$1/");if(!X.match(/^(http||https):\/\//)){var Y=(X.substring(0,1)==="/")?"":p.pathname;if(Y.substring(Y.length-1)!=="/"){Y=Y.substring(0,Y.lastIndexOf("/")+1)}X=p.protocol+"//"+p.host+Y+X}while(R.test(X)){X=X.replace(R,"")}return X}function P(X,aa){var ac="",Z=X.indexOf("#");if(Z!==-1){ac=X.substring(Z);X=X.substring(0,Z)}var ab=[];for(var Y in aa){if(aa.hasOwnProperty(Y)){ab.push(Y+"="+H(aa[Y]))}}return X+(y?"#":(X.indexOf("?")==-1?"?":"&"))+ab.join("&")+ac}var S=(function(X){X=X.substring(1).split("&");var Z={},aa,Y=X.length;while(Y--){aa=X[Y].split("=");Z[aa[0]]=k(aa[1])}return Z}(/xdm_e=/.test(p.search)?p.search:p.hash));function t(X){return typeof X==="undefined"}var O=function(){var Y={};var Z={a:[1,2,3]},X='{"a":[1,2,3]}';if(typeof JSON!="undefined"&&typeof JSON.stringify==="function"&&JSON.stringify(Z).replace((/\s/g),"")===X){return JSON}if(Object.toJSON){if(Object.toJSON(Z).replace((/\s/g),"")===X){Y.stringify=Object.toJSON}}if(typeof String.prototype.evalJSON==="function"){Z=X.evalJSON();if(Z.a&&Z.a.length===3&&Z.a[2]===3){Y.parse=function(aa){return aa.evalJSON()}}}if(Y.stringify&&Y.parse){O=function(){return Y};return Y}return null};function T(X,Y,Z){var ab;for(var aa in Y){if(Y.hasOwnProperty(aa)){if(aa in X){ab=Y[aa];if(typeof ab==="object"){T(X[aa],ab,Z)}else{if(!Z){X[aa]=Y[aa]}}}else{X[aa]=Y[aa]}}}return X}function a(){var Y=d.body.appendChild(d.createElement("form")),X=Y.appendChild(d.createElement("input"));X.name=U+"TEST"+n;E=X!==Y.elements[X.name];d.body.removeChild(Y)}function A(X){X.props.src=X.props.src.replace("xdm_e=http","xdm_e=htttp");if(t(E)){a()}var Z;if(E){Z=d.createElement('<iframe name="'+X.props.name+'"/>')}else{Z=d.createElement("IFRAME");Z.name=X.props.name}Z.id=Z.name=X.props.name;delete X.props.name;if(X.onLoad){v(Z,"load",X.onLoad)}if(typeof X.container=="string"){X.container=d.getElementById(X.container)}if(!X.container){T(Z.style,{position:"absolute",top:"-2000px"});X.container=d.body}var Y=X.props.src;delete X.props.src;T(Z,X.props);Z.border=Z.frameBorder=0;Z.allowTransparency=true;X.container.appendChild(Z);Z.src=Y;X.props.src=Y;return Z}function V(aa,Z){if(typeof aa=="string"){aa=[aa]}var Y,X=aa.length;while(X--){Y=aa[X];Y=new RegExp(Y.substr(0,1)=="^"?Y:("^"+Y.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$"));if(Y.test(Z)){return true}}return false}function l(Z){var ae=Z.protocol,Y;Z.isHost=Z.isHost||t(S.xdm_p);y=Z.hash||false;if(!Z.props){Z.props={}}if(!Z.isHost){Z.channel=S.xdm_c;Z.secret=S.xdm_s;Z.remote=S.xdm_e;ae=S.xdm_p;if(Z.acl&&!V(Z.acl,Z.remote)){throw new Error("Access denied for "+Z.remote)}}else{Z.remote=B(Z.remote);Z.channel=Z.channel||"default"+n++;Z.secret=Math.random().toString(16).substring(2);if(t(ae)){if(j(p.href)==j(Z.remote)){ae="4"}else{if(C(N,"postMessage")||C(d,"postMessage")){ae="1"}else{if(Z.swf&&C(N,"ActiveXObject")&&c()){ae="6"}else{if(navigator.product==="Gecko"&&"frameElement" in N&&navigator.userAgent.indexOf("WebKit")==-1){ae="5"}else{if(Z.remoteHelper){Z.remoteHelper=B(Z.remoteHelper);ae="2"}else{ae="0"}}}}}}}Z.protocol=ae;switch(ae){case"0":T(Z,{interval:100,delay:2000,useResize:true,useParent:false,usePolling:false},true);if(Z.isHost){if(!Z.local){var ac=p.protocol+"//"+p.host,X=d.body.getElementsByTagName("img"),ad;var aa=X.length;while(aa--){ad=X[aa];if(ad.src.substring(0,ac.length)===ac){Z.local=ad.src;break}}if(!Z.local){Z.local=N}}var ab={xdm_c:Z.channel,xdm_p:0};if(Z.local===N){Z.usePolling=true;Z.useParent=true;Z.local=p.protocol+"//"+p.host+p.pathname+p.search;ab.xdm_e=Z.local;ab.xdm_pa=1}else{ab.xdm_e=B(Z.local)}if(Z.container){Z.useResize=false;ab.xdm_po=1}Z.remote=P(Z.remote,ab)}else{T(Z,{channel:S.xdm_c,remote:S.xdm_e,useParent:!t(S.xdm_pa),usePolling:!t(S.xdm_po),useResize:Z.useParent?false:Z.useResize})}Y=[new o.stack.HashTransport(Z),new o.stack.ReliableBehavior({}),new o.stack.QueueBehavior({encode:true,maxLength:4000-Z.remote.length}),new o.stack.VerifyBehavior({initiate:Z.isHost})];break;case"1":Y=[new o.stack.PostMessageTransport(Z)];break;case"2":Y=[new o.stack.NameTransport(Z),new o.stack.QueueBehavior(),new o.stack.VerifyBehavior({initiate:Z.isHost})];break;case"3":Y=[new o.stack.NixTransport(Z)];break;case"4":Y=[new o.stack.SameOriginTransport(Z)];break;case"5":Y=[new o.stack.FrameElementTransport(Z)];break;case"6":if(!i){c()}Y=[new o.stack.FlashTransport(Z)];break}Y.push(new o.stack.QueueBehavior({lazy:Z.lazy,remove:true}));return Y}function D(aa){var ab,Z={incoming:function(ad,ac){this.up.incoming(ad,ac)},outgoing:function(ac,ad){this.down.outgoing(ac,ad)},callback:function(ac){this.up.callback(ac)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}};for(var Y=0,X=aa.length;Y<X;Y++){ab=aa[Y];T(ab,Z,true);if(Y!==0){ab.down=aa[Y-1]}if(Y!==X-1){ab.up=aa[Y+1]}}return ab}function w(X){X.up.down=X.down;X.down.up=X.up;X.up=X.down=null}T(o,{version:"2.4.15.118",query:S,stack:{},apply:T,getJSONObject:O,whenReady:G,noConflict:e});o.DomHelper={on:v,un:x,requiresJSON:function(X){if(!u(N,"JSON")){d.write('<script type="text/javascript" src="'+X+'"><\/script>')}}};(function(){var X={};o.Fn={set:function(Y,Z){X[Y]=Z},get:function(Z,Y){var aa=X[Z];if(Y){delete X[Z]}return aa}}}());o.Socket=function(Y){var X=D(l(Y).concat([{incoming:function(ab,aa){Y.onMessage(ab,aa)},callback:function(aa){if(Y.onReady){Y.onReady(aa)}}}])),Z=j(Y.remote);this.origin=j(Y.remote);this.destroy=function(){X.destroy()};this.postMessage=function(aa){X.outgoing(aa,Z)};X.init()};o.Rpc=function(Z,Y){if(Y.local){for(var ab in Y.local){if(Y.local.hasOwnProperty(ab)){var aa=Y.local[ab];if(typeof aa==="function"){Y.local[ab]={method:aa}}}}}var X=D(l(Z).concat([new o.stack.RpcBehavior(this,Y),{callback:function(ac){if(Z.onReady){Z.onReady(ac)}}}]));this.origin=j(Z.remote);this.destroy=function(){X.destroy()};X.init()};o.stack.SameOriginTransport=function(Y){var Z,ab,aa,X;return(Z={outgoing:function(ad,ae,ac){aa(ad);if(ac){ac()}},destroy:function(){if(ab){ab.parentNode.removeChild(ab);ab=null}},onDOMReady:function(){X=j(Y.remote);if(Y.isHost){T(Y.props,{src:P(Y.remote,{xdm_e:p.protocol+"//"+p.host+p.pathname,xdm_c:Y.channel,xdm_p:4}),name:U+Y.channel+"_provider"});ab=A(Y);o.Fn.set(Y.channel,function(ac){aa=ac;K(function(){Z.up.callback(true)},0);return function(ad){Z.up.incoming(ad,X)}})}else{aa=m().Fn.get(Y.channel,true)(function(ac){Z.up.incoming(ac,X)});K(function(){Z.up.callback(true)},0)}},init:function(){G(Z.onDOMReady,Z)}})};o.stack.FlashTransport=function(aa){var ac,X,ab,ad,Y,ae;function af(ah,ag){K(function(){ac.up.incoming(ah,ad)},0)}function Z(ah){var ag=aa.swf+"?host="+aa.isHost;var aj="easyXDM_swf_"+Math.floor(Math.random()*10000);o.Fn.set("flash_loaded"+ah.replace(/[\-.]/g,"_"),function(){o.stack.FlashTransport[ah].swf=Y=ae.firstChild;var ak=o.stack.FlashTransport[ah].queue;for(var al=0;al<ak.length;al++){ak[al]()}ak.length=0});if(aa.swfContainer){ae=(typeof aa.swfContainer=="string")?d.getElementById(aa.swfContainer):aa.swfContainer}else{ae=d.createElement("div");T(ae.style,h&&aa.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0});d.body.appendChild(ae)}var ai="callback=flash_loaded"+ah.replace(/[\-.]/g,"_")+"&proto="+b.location.protocol+"&domain="+z(b.location.href)+"&port="+f(b.location.href)+"&ns="+I;ae.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+aj+"' data='"+ag+"'><param name='allowScriptAccess' value='always'></param><param name='wmode' value='transparent'><param name='movie' value='"+ag+"'></param><param name='flashvars' value='"+ai+"'></param><embed type='application/x-shockwave-flash' FlashVars='"+ai+"' allowScriptAccess='always' wmode='transparent' src='"+ag+"' height='1' width='1'></embed></object>"}return(ac={outgoing:function(ah,ai,ag){Y.postMessage(aa.channel,ah.toString());if(ag){ag()}},destroy:function(){try{Y.destroyChannel(aa.channel)}catch(ag){}Y=null;if(X){X.parentNode.removeChild(X);X=null}},onDOMReady:function(){ad=aa.remote;o.Fn.set("flash_"+aa.channel+"_init",function(){K(function(){ac.up.callback(true)})});o.Fn.set("flash_"+aa.channel+"_onMessage",af);aa.swf=B(aa.swf);var ah=z(aa.swf);var ag=function(){o.stack.FlashTransport[ah].init=true;Y=o.stack.FlashTransport[ah].swf;Y.createChannel(aa.channel,aa.secret,j(aa.remote),aa.isHost);if(aa.isHost){if(h&&aa.swfNoThrottle){T(aa.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"})}T(aa.props,{src:P(aa.remote,{xdm_e:j(p.href),xdm_c:aa.channel,xdm_p:6,xdm_s:aa.secret}),name:U+aa.channel+"_provider"});X=A(aa)}};if(o.stack.FlashTransport[ah]&&o.stack.FlashTransport[ah].init){ag()}else{if(!o.stack.FlashTransport[ah]){o.stack.FlashTransport[ah]={queue:[ag]};Z(ah)}else{o.stack.FlashTransport[ah].queue.push(ag)}}},init:function(){G(ac.onDOMReady,ac)}})};o.stack.PostMessageTransport=function(aa){var ac,ad,Y,Z;function X(ae){if(ae.origin){return j(ae.origin)}if(ae.uri){return j(ae.uri)}if(ae.domain){return p.protocol+"//"+ae.domain}throw"Unable to retrieve the origin of the event"}function ab(af){var ae=X(af);if(ae==Z&&af.data.substring(0,aa.channel.length+1)==aa.channel+" "){ac.up.incoming(af.data.substring(aa.channel.length+1),ae)}}return(ac={outgoing:function(af,ag,ae){Y.postMessage(aa.channel+" "+af,ag||Z);if(ae){ae()}},destroy:function(){x(N,"message",ab);if(ad){Y=null;ad.parentNode.removeChild(ad);ad=null}},onDOMReady:function(){Z=j(aa.remote);if(aa.isHost){var ae=function(af){if(af.data==aa.channel+"-ready"){Y=("postMessage" in ad.contentWindow)?ad.contentWindow:ad.contentWindow.document;x(N,"message",ae);v(N,"message",ab);K(function(){ac.up.callback(true)},0)}};v(N,"message",ae);T(aa.props,{src:P(aa.remote,{xdm_e:j(p.href),xdm_c:aa.channel,xdm_p:1}),name:U+aa.channel+"_provider"});ad=A(aa)}else{v(N,"message",ab);Y=("postMessage" in N.parent)?N.parent:N.parent.document;Y.postMessage(aa.channel+"-ready",Z);K(function(){ac.up.callback(true)},0)}},init:function(){G(ac.onDOMReady,ac)}})};o.stack.FrameElementTransport=function(Y){var Z,ab,aa,X;return(Z={outgoing:function(ad,ae,ac){aa.call(this,ad);if(ac){ac()}},destroy:function(){if(ab){ab.parentNode.removeChild(ab);ab=null}},onDOMReady:function(){X=j(Y.remote);if(Y.isHost){T(Y.props,{src:P(Y.remote,{xdm_e:j(p.href),xdm_c:Y.channel,xdm_p:5}),name:U+Y.channel+"_provider"});ab=A(Y);ab.fn=function(ac){delete ab.fn;aa=ac;K(function(){Z.up.callback(true)},0);return function(ad){Z.up.incoming(ad,X)}}}else{if(d.referrer&&j(d.referrer)!=S.xdm_e){N.top.location=S.xdm_e}aa=N.frameElement.fn(function(ac){Z.up.incoming(ac,X)});Z.up.callback(true)}},init:function(){G(Z.onDOMReady,Z)}})};o.stack.NameTransport=function(ab){var ac;var ae,ai,aa,ag,ah,Y,X;function af(al){var ak=ab.remoteHelper+(ae?"#_3":"#_2")+ab.channel;ai.contentWindow.sendMessage(al,ak)}function ad(){if(ae){if(++ag===2||!ae){ac.up.callback(true)}}else{af("ready");ac.up.callback(true)}}function aj(ak){ac.up.incoming(ak,Y)}function Z(){if(ah){K(function(){ah(true)},0)}}return(ac={outgoing:function(al,am,ak){ah=ak;af(al)},destroy:function(){ai.parentNode.removeChild(ai);ai=null;if(ae){aa.parentNode.removeChild(aa);aa=null}},onDOMReady:function(){ae=ab.isHost;ag=0;Y=j(ab.remote);ab.local=B(ab.local);if(ae){o.Fn.set(ab.channel,function(al){if(ae&&al==="ready"){o.Fn.set(ab.channel,aj);ad()}});X=P(ab.remote,{xdm_e:ab.local,xdm_c:ab.channel,xdm_p:2});T(ab.props,{src:X+"#"+ab.channel,name:U+ab.channel+"_provider"});aa=A(ab)}else{ab.remoteHelper=ab.remote;o.Fn.set(ab.channel,aj)}ai=A({props:{src:ab.local+"#_4"+ab.channel},onLoad:function ak(){var al=ai||this;x(al,"load",ak);o.Fn.set(ab.channel+"_load",Z);(function am(){if(typeof al.contentWindow.sendMessage=="function"){ad()}else{K(am,50)}}())}})},init:function(){G(ac.onDOMReady,ac)}})};o.stack.HashTransport=function(Z){var ac;var ah=this,af,aa,X,ad,am,ab,al;var ag,Y;function ak(ao){if(!al){return}var an=Z.remote+"#"+(am++)+"_"+ao;((af||!ag)?al.contentWindow:al).location=an}function ae(an){ad=an;ac.up.incoming(ad.substring(ad.indexOf("_")+1),Y)}function aj(){if(!ab){return}var an=ab.location.href,ap="",ao=an.indexOf("#");if(ao!=-1){ap=an.substring(ao)}if(ap&&ap!=ad){ae(ap)}}function ai(){aa=setInterval(aj,X)}return(ac={outgoing:function(an,ao){ak(an)},destroy:function(){N.clearInterval(aa);if(af||!ag){al.parentNode.removeChild(al)}al=null},onDOMReady:function(){af=Z.isHost;X=Z.interval;ad="#"+Z.channel;am=0;ag=Z.useParent;Y=j(Z.remote);if(af){Z.props={src:Z.remote,name:U+Z.channel+"_provider"};if(ag){Z.onLoad=function(){ab=N;ai();ac.up.callback(true)}}else{var ap=0,an=Z.delay/50;(function ao(){if(++ap>an){throw new Error("Unable to reference listenerwindow")}try{ab=al.contentWindow.frames[U+Z.channel+"_consumer"]}catch(aq){}if(ab){ai();ac.up.callback(true)}else{K(ao,50)}}())}al=A(Z)}else{ab=N;ai();if(ag){al=parent;ac.up.callback(true)}else{T(Z,{props:{src:Z.remote+"#"+Z.channel+new Date(),name:U+Z.channel+"_consumer"},onLoad:function(){ac.up.callback(true)}});al=A(Z)}}},init:function(){G(ac.onDOMReady,ac)}})};o.stack.ReliableBehavior=function(Y){var aa,ac;var ab=0,X=0,Z="";return(aa={incoming:function(af,ad){var ae=af.indexOf("_"),ag=af.substring(0,ae).split(",");af=af.substring(ae+1);if(ag[0]==ab){Z="";if(ac){ac(true)}}if(af.length>0){aa.down.outgoing(ag[1]+","+ab+"_"+Z,ad);if(X!=ag[1]){X=ag[1];aa.up.incoming(af,ad)}}},outgoing:function(af,ad,ae){Z=af;ac=ae;aa.down.outgoing(X+","+(++ab)+"_"+af,ad)}})};o.stack.QueueBehavior=function(Z){var ac,ad=[],ag=true,aa="",af,X=0,Y=false,ab=false;function ae(){if(Z.remove&&ad.length===0){w(ac);return}if(ag||ad.length===0||af){return}ag=true;var ah=ad.shift();ac.down.outgoing(ah.data,ah.origin,function(ai){ag=false;if(ah.callback){K(function(){ah.callback(ai)},0)}ae()})}return(ac={init:function(){if(t(Z)){Z={}}if(Z.maxLength){X=Z.maxLength;ab=true}if(Z.lazy){Y=true}else{ac.down.init()}},callback:function(ai){ag=false;var ah=ac.up;ae();ah.callback(ai)},incoming:function(ak,ai){if(ab){var aj=ak.indexOf("_"),ah=parseInt(ak.substring(0,aj),10);aa+=ak.substring(aj+1);if(ah===0){if(Z.encode){aa=k(aa)}ac.up.incoming(aa,ai);aa=""}}else{ac.up.incoming(ak,ai)}},outgoing:function(al,ai,ak){if(Z.encode){al=H(al)}var ah=[],aj;if(ab){while(al.length!==0){aj=al.substring(0,X);al=al.substring(aj.length);ah.push(aj)}while((aj=ah.shift())){ad.push({data:ah.length+"_"+aj,origin:ai,callback:ah.length===0?ak:null})}}else{ad.push({data:al,origin:ai,callback:ak})}if(Y){ac.down.init()}else{ae()}},destroy:function(){af=true;ac.down.destroy()}})};o.stack.VerifyBehavior=function(ab){var ac,aa,Y,Z=false;function X(){aa=Math.random().toString(16).substring(2);ac.down.outgoing(aa)}return(ac={incoming:function(af,ad){var ae=af.indexOf("_");if(ae===-1){if(af===aa){ac.up.callback(true)}else{if(!Y){Y=af;if(!ab.initiate){X()}ac.down.outgoing(af)}}}else{if(af.substring(0,ae)===Y){ac.up.incoming(af.substring(ae+1),ad)}}},outgoing:function(af,ad,ae){ac.down.outgoing(aa+"_"+af,ad,ae)},callback:function(ad){if(ab.initiate){X()}}})};o.stack.RpcBehavior=function(ad,Y){var aa,af=Y.serializer||O();var ae=0,ac={};function X(ag){ag.jsonrpc="2.0";aa.down.outgoing(af.stringify(ag))}function ab(ag,ai){var ah=Array.prototype.slice;return function(){var aj=arguments.length,al,ak={method:ai};if(aj>0&&typeof arguments[aj-1]==="function"){if(aj>1&&typeof arguments[aj-2]==="function"){al={success:arguments[aj-2],error:arguments[aj-1]};ak.params=ah.call(arguments,0,aj-2)}else{al={success:arguments[aj-1]};ak.params=ah.call(arguments,0,aj-1)}ac[""+(++ae)]=al;ak.id=ae}else{ak.params=ah.call(arguments,0)}if(ag.namedParams&&ak.params.length===1){ak.params=ak.params[0]}X(ak)}}function Z(an,am,ai,al){if(!ai){if(am){X({id:am,error:{code:-32601,message:"Procedure not found."}})}return}var ak,ah;if(am){ak=function(ao){ak=q;X({id:am,result:ao})};ah=function(ao,ap){ah=q;var aq={id:am,error:{code:-32099,message:ao}};if(ap){aq.error.data=ap}X(aq)}}else{ak=ah=q}if(!r(al)){al=[al]}try{var ag=ai.method.apply(ai.scope,al.concat([ak,ah]));if(!t(ag)){ak(ag)}}catch(aj){ah(aj.message)}}return(aa={incoming:function(ah,ag){var ai=af.parse(ah);if(ai.method){if(Y.handle){Y.handle(ai,X)}else{Z(ai.method,ai.id,Y.local[ai.method],ai.params)}}else{var aj=ac[ai.id];if(ai.error){if(aj.error){aj.error(ai.error)}}else{if(aj.success){aj.success(ai.result)}}delete ac[ai.id]}},init:function(){if(Y.remote){for(var ag in Y.remote){if(Y.remote.hasOwnProperty(ag)){ad[ag]=ab(Y.remote[ag],ag)}}}aa.down.init()},destroy:function(){for(var ag in Y.remote){if(Y.remote.hasOwnProperty(ag)&&ad.hasOwnProperty(ag)){delete ad[ag]}}aa.down.destroy()}})};b.easyXDM=o})(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent);
 
style/ag_style.css CHANGED
@@ -483,17 +483,6 @@ td.ag_admin_menu_parent:hover {
483
  text-shadow: none;
484
  }
485
 
486
- #agca_form #templates_head_buttons input[type=button] {
487
- background: #23395B;
488
- color: white;
489
- font-weight: bold;
490
- }
491
-
492
- #agca_form #templates_head_buttons input[type=button]:hover {
493
- background: white;
494
- color: var(--agca-color-gray);
495
- }
496
-
497
  .ag-custom-button {
498
 
499
  /* margin-bottom:-4px !important;*/
@@ -705,38 +694,6 @@ td.ag_admin_menu_parent:hover {
705
  width: 600px;
706
  }
707
 
708
- /*templates*/
709
- #agca_templates .error {
710
- padding: 8px;
711
- font-size: 14px;
712
- }
713
-
714
- .agca_template {
715
- display: block;
716
- float: left;
717
- border: 3px solid #aaa;
718
- margin: 10px;
719
- margin-top: 15px;
720
- cursor: pointer;
721
- }
722
-
723
- .agca_template:hover {
724
- border: 3px solid green;
725
- }
726
-
727
- .agca_template h3 {
728
- text-align: center;
729
- color: green;
730
- }
731
-
732
- .agca_template h3 span {
733
- color: #555;
734
- font-size: 16px;
735
- }
736
-
737
- .agca_template img {
738
- width: 250px;
739
- }
740
 
741
  .agca_logout_button {
742
  background: none repeat scroll 0 0 #dddddd;
@@ -903,22 +860,6 @@ td.ag_admin_menu_parent:hover {
903
  color: #ccc;
904
  }
905
 
906
- #agca_form #section_templates {
907
- background: transparent;
908
- }
909
-
910
- #wp-admin-bar-agca-admin-themes a {
911
- color: #def7c3 !important;
912
- }
913
-
914
- #wp-admin-bar-agca-admin-themes .ab-icon:before {
915
- font-family: "dashicons";
916
- content: "\f100";
917
- margin-top: 2px;
918
- display: block;
919
- color: #eef9d5 !important;
920
- }
921
-
922
  .agca-feedback-and-support a {
923
  border: medium none;
924
  border-radius: 4px;
@@ -1089,19 +1030,6 @@ td.ag_admin_menu_parent:hover {
1089
  box-shadow: none !important;
1090
  }
1091
 
1092
- .agca_template_block h3,
1093
- .agca_template_block span.price,
1094
- .agca_template_block a{
1095
- color: inherit !important;
1096
- }
1097
- #agca_template_popup .agca_content{
1098
- background: #bbb !important;
1099
- }
1100
-
1101
- .agca_template_block .template img{
1102
- box-shadow: none !important;
1103
- }
1104
-
1105
  #agca_form #ag_edit_adminmenu tr.top td{
1106
  background: var(--agca-color-gray);
1107
  filter: brightness(1.1);
@@ -1139,4 +1067,80 @@ td.ag_admin_menu_parent:hover {
1139
 
1140
  #agca_form #import_file_area .agca_button{
1141
  margin-bottom: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1142
  }
483
  text-shadow: none;
484
  }
485
 
 
 
 
 
 
 
 
 
 
 
 
486
  .ag-custom-button {
487
 
488
  /* margin-bottom:-4px !important;*/
694
  width: 600px;
695
  }
696
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
697
 
698
  .agca_logout_button {
699
  background: none repeat scroll 0 0 #dddddd;
860
  color: #ccc;
861
  }
862
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
863
  .agca-feedback-and-support a {
864
  border: medium none;
865
  border-radius: 4px;
1030
  box-shadow: none !important;
1031
  }
1032
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1033
  #agca_form #ag_edit_adminmenu tr.top td{
1034
  background: var(--agca-color-gray);
1035
  filter: brightness(1.1);
1067
 
1068
  #agca_form #import_file_area .agca_button{
1069
  margin-bottom: 5px;
1070
+ }
1071
+
1072
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active{
1073
+ background: radial-gradient(circle, #899492 20%, #23395B 75%);
1074
+ background-size: 200%;
1075
+ box-shadow: 14px 1px 10px black inset;
1076
+ transition: all .3s ease-in-out;
1077
+ }
1078
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active:hover{
1079
+ box-shadow: 14px 1px 2px black inset;
1080
+ }
1081
+
1082
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active td{
1083
+ background: transparent;
1084
+ transition: transform .3s ease-out;
1085
+ text-shadow: 2px 4px 2px #223859;
1086
+ color: #fdfeff;
1087
+ }
1088
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active:hover td{
1089
+ text-shadow: 1px 2px 2px #223859;
1090
+ }
1091
+
1092
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active td a{
1093
+ color: #fdfeff;
1094
+ font-weight: bold;
1095
+ transition: all .3s ease-in;
1096
+ border-bottom: 1px solid transparent;
1097
+ padding-bottom: 0;
1098
+ display: inline-block;
1099
+ }
1100
+
1101
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active td a:hover{
1102
+ transform: scale(1.3);
1103
+ }
1104
+
1105
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active td.column-description a:hover{
1106
+ transform: scaleY(1.1) scaleX(1);
1107
+ letter-spacing: 0.1em;
1108
+ border-bottom: 3px solid;
1109
+ padding-bottom: 3px;
1110
+ }
1111
+
1112
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active th.check-column {
1113
+ border-left-color: #fdfeff;
1114
+ background-color: #23395B;
1115
+ }
1116
+
1117
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active td.desc p{
1118
+ color: #fdfeff;
1119
+ }
1120
+
1121
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active td.plugin-title:before{
1122
+ display: block;
1123
+ content: "";
1124
+ background: url(../images/agca-logo.svg) no-repeat;
1125
+ width: 100%;
1126
+ max-width: 140px;
1127
+ height: 53px;
1128
+ background-size: contain;
1129
+ filter: brightness(100) drop-shadow(0px 0px 2px #fff) ;
1130
+ transition: transform .3s ease-in-out;
1131
+ }
1132
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active:hover td.plugin-title:before{
1133
+ transform: scale(1.1);
1134
+ }
1135
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active .plugin-version-author-uri a:last-child:after {
1136
+ content: "♥";
1137
+ opacity: 0;
1138
+ display: inline-block;
1139
+ width: 10px;
1140
+ height: 10px;
1141
+ padding-left: 3px;
1142
+ transition: all .3s ease-in;
1143
+ }
1144
+ .plugins-php .wp-list-table.plugins tr[data-slug=ag-custom-admin].active .plugin-version-author-uri a:last-child:hover:after {
1145
+ opacity: 1;
1146
  }
tests/acceptance/GeneralSettingsCest.php CHANGED
@@ -43,7 +43,6 @@ class GeneralSettingsCest
43
  ->seeMenu('Admin Menu')
44
  ->seeMenu('Colorizer')
45
  ->seeMenu('Advanced')
46
- ->seeMenu('Themes')
47
  ->seeMenu('Upgrade');
48
  }
49
 
@@ -71,7 +70,6 @@ class GeneralSettingsCest
71
 
72
  $I->see('Idea for improvement');
73
  $I->see('Report an issue');
74
- $I->see('Idea for admin theme');
75
  $I->see('Add a Review on WordPress.org');
76
  $I->see('Visit our support site');
77
  $I->see('Donate');
43
  ->seeMenu('Admin Menu')
44
  ->seeMenu('Colorizer')
45
  ->seeMenu('Advanced')
 
46
  ->seeMenu('Upgrade');
47
  }
48
 
70
 
71
  $I->see('Idea for improvement');
72
  $I->see('Report an issue');
 
73
  $I->see('Add a Review on WordPress.org');
74
  $I->see('Visit our support site');
75
  $I->see('Donate');
uninstall.php CHANGED
@@ -41,8 +41,9 @@
41
  delete_option( 'agca_dashboard_icon' );
42
  delete_option( 'agca_dashboard_text' );
43
  delete_option( 'agca_dashboard_text_paragraph' );
44
- delete_option( 'agca_dashboard_widget_welcome' );
45
- delete_option( 'agca_dashboard_widget_il' );
 
46
  delete_option( 'agca_dashboard_widget_plugins' );
47
  delete_option( 'agca_dashboard_widget_qp' );
48
  delete_option( 'agca_dashboard_widget_rn' );
@@ -60,7 +61,6 @@
60
  delete_option( 'agca_admin_bar_new_content_user' );
61
  delete_option( 'agca_admin_bar_new_content_media' );
62
  delete_option( 'agca_admin_bar_update_notifications' );
63
- delete_option( 'agca_admin_bar_admin_themes' );
64
  delete_option( 'agca_remove_top_bar_dropdowns' );
65
 
66
  /*Admin menu*/
@@ -84,8 +84,6 @@
84
  delete_option( 'agca_custom_js' );
85
  delete_option( 'agca_custom_css' );
86
 
87
- delete_option( 'agca_selected_template' );
88
- delete_option( 'agca_templates' );
89
  delete_option( 'agca_disablewarning' );
90
  delete_option( 'agca_disable_postver' );
91
  delete_option( 'agca_menu_remove_client_profile' );
41
  delete_option( 'agca_dashboard_icon' );
42
  delete_option( 'agca_dashboard_text' );
43
  delete_option( 'agca_dashboard_text_paragraph' );
44
+ delete_option( 'agca_dashboard_widget_welcome' );
45
+ delete_option( 'agca_dashboard_widget_health_status' );
46
+ delete_option( 'agca_dashboard_widget_il' );
47
  delete_option( 'agca_dashboard_widget_plugins' );
48
  delete_option( 'agca_dashboard_widget_qp' );
49
  delete_option( 'agca_dashboard_widget_rn' );
61
  delete_option( 'agca_admin_bar_new_content_user' );
62
  delete_option( 'agca_admin_bar_new_content_media' );
63
  delete_option( 'agca_admin_bar_update_notifications' );
 
64
  delete_option( 'agca_remove_top_bar_dropdowns' );
65
 
66
  /*Admin menu*/
84
  delete_option( 'agca_custom_js' );
85
  delete_option( 'agca_custom_css' );
86
 
 
 
87
  delete_option( 'agca_disablewarning' );
88
  delete_option( 'agca_disable_postver' );
89
  delete_option( 'agca_menu_remove_client_profile' );