White Label CMS - Version 2.2.5

Version Description

  • Fixed WooCommerce Home issue
  • Fixed Yoast Menu issue reported by @davidbawiec
  • Fixed the hiding of default footer link when "Hide WordPress Logo and Links" enabled

=

Download this release

Release Info

Developer VideoUserManuals
Plugin Icon 128x128 White Label CMS
Version 2.2.5
Comparing to
See all releases

Code changes from version 2.2.4 to 2.2.5

changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  == Changelog ==
2
 
 
 
 
3
  = 2.2.3 =
4
  * Fixed Dashboard RSS feed missing quotation marks reported by @carterfromsl
5
  * Changing WordPress Logo for Gutenberg fullscreen mode close button reported by @techiechic
1
  == Changelog ==
2
 
3
+ = 2.2.4 =
4
+ * Fixed javascript error reported by @davidbawiec
5
+
6
  = 2.2.3 =
7
  * Fixed Dashboard RSS feed missing quotation marks reported by @carterfromsl
8
  * Changing WordPress Logo for Gutenberg fullscreen mode close button reported by @techiechic
includes/classes/Admin_Menus.php CHANGED
@@ -9,13 +9,14 @@ class WLCMS_Admin_Menus
9
  private $admin_bar_menu_setting = false;
10
  private $submenu_placeholder = '_wlcms_';
11
  private $wlcms_admin_bar_menus_option = 'wlcms_admin_bar_menus';
 
12
 
13
  public function __construct()
14
  {
15
  add_action('init', array($this, 'set_wlcms_admin'), 10);
16
  add_action('admin_init', array($this, 'admin_init'));
17
  add_action('wlcms_save_addtional_settings', array($this, 'save'), 12, 1);
18
- add_action('admin_init', array($this, 'rebuild_user_admin_menu'), 9999999); // rebuild sidebar menu
19
  add_action('wp_before_admin_bar_render', array($this, 'init_admin_bar_menu'), 9999999); // setup admin bar menu
20
  }
21
 
@@ -302,8 +303,9 @@ class WLCMS_Admin_Menus
302
  $main_menu = $submenu_list[0];
303
  $main_submenu = $submenu_list[1];
304
  $this->remove_submenu_page($main_menu, $main_submenu);
305
-
306
  }
 
 
307
  }
308
  }
309
 
@@ -367,7 +369,10 @@ class WLCMS_Admin_Menus
367
  $submenu_item = sanitize_title($submenu_item);
368
 
369
  //Patch whitelist
370
- if( in_array($submenu_slug, array('wc-admin'))) continue;
 
 
 
371
 
372
  if ($submenu_slug == $submenu_item) {
373
  unset($submenu[$menu_slug][$i]);
@@ -378,6 +383,48 @@ class WLCMS_Admin_Menus
378
  return false;
379
  }
380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  public function init_admin_bar_menu()
382
  {
383
  $this->set_admin_bar_menu();
9
  private $admin_bar_menu_setting = false;
10
  private $submenu_placeholder = '_wlcms_';
11
  private $wlcms_admin_bar_menus_option = 'wlcms_admin_bar_menus';
12
+ private $hide_woo_home = false;
13
 
14
  public function __construct()
15
  {
16
  add_action('init', array($this, 'set_wlcms_admin'), 10);
17
  add_action('admin_init', array($this, 'admin_init'));
18
  add_action('wlcms_save_addtional_settings', array($this, 'save'), 12, 1);
19
+ add_action('admin_menu', array($this, 'rebuild_user_admin_menu'), 9999999); // rebuild sidebar menu
20
  add_action('wp_before_admin_bar_render', array($this, 'init_admin_bar_menu'), 9999999); // setup admin bar menu
21
  }
22
 
303
  $main_menu = $submenu_list[0];
304
  $main_submenu = $submenu_list[1];
305
  $this->remove_submenu_page($main_menu, $main_submenu);
 
306
  }
307
+ $this->fix_woocommerce();
308
+ $this->fix_yoast($setting_admin_menus['sub']);
309
  }
310
  }
311
 
369
  $submenu_item = sanitize_title($submenu_item);
370
 
371
  //Patch whitelist
372
+ if( in_array($submenu_slug, array('wc-admin'))) {
373
+ $this->hide_woo_home = true;
374
+ continue;
375
+ }
376
 
377
  if ($submenu_slug == $submenu_item) {
378
  unset($submenu[$menu_slug][$i]);
383
  return false;
384
  }
385
 
386
+ public function fix_woocommerce()
387
+ {
388
+ global $submenu;
389
+
390
+ if (!isset($submenu) || !$this->hide_woo_home) {
391
+ return false;
392
+ }
393
+
394
+ if (!isset($submenu['woocommerce'])) {
395
+ return false;
396
+ }
397
+
398
+ $home = $submenu['woocommerce'][0];
399
+ $home[1] = 'manage_woocommerce,vum';
400
+ unset($submenu['woocommerce'][0]);
401
+ $count = count($submenu['woocommerce']);
402
+
403
+ if($count == 0) {
404
+ wlcms_set_hidden_css('li.toplevel_page_woocommerce');
405
+ }
406
+
407
+ $submenu['woocommerce'] = array_values($submenu['woocommerce']);
408
+ $submenu['woocommerce'][$count] = $home;
409
+
410
+ }
411
+
412
+ public function fix_yoast($sub)
413
+ {
414
+ global $menu;
415
+
416
+ if(array_search('wpseo_dashboard_wlcms_wpseo_workouts', $sub) === false) {
417
+ return;
418
+ }
419
+
420
+ foreach($menu as $key => $item) {
421
+ if($item[2] == 'wpseo_workouts') {
422
+ unset($menu[$key]);
423
+ break;
424
+ }
425
+ }
426
+ }
427
+
428
  public function init_admin_bar_menu()
429
  {
430
  $this->set_admin_bar_menu();
includes/classes/Branding.php CHANGED
@@ -225,6 +225,11 @@ class WLCMS_Branding extends WLCMS_Previewable
225
  }
226
 
227
  if (empty($footer_main_text)) {
 
 
 
 
 
228
  return $original_text;
229
  }
230
 
225
  }
226
 
227
  if (empty($footer_main_text)) {
228
+
229
+ if (wlcms_field_setting('hide_wordpress_logo_and_links')) {
230
+ return '';
231
+ }
232
+
233
  return $original_text;
234
  }
235
 
readme.txt CHANGED
@@ -9,7 +9,7 @@ Author: Video User Manuals
9
  Requires at least: 3.3
10
  Requires PHP: 5.4
11
  Tested up to: 5.8
12
- Stable tag: 2.2.4
13
 
14
  Customise dashboard panels and branding, hide menus plus lots more.
15
 
@@ -66,8 +66,10 @@ There is so much that you can do with White Label CMS, but we want the experienc
66
 
67
  == Changelog ==
68
 
69
- = 2.2.4 =
70
- * Fixed javascript error reported by @davidbawiec
 
 
71
 
72
  == Frequently Asked Questions ==
73
  = Who is this plugin for?=
9
  Requires at least: 3.3
10
  Requires PHP: 5.4
11
  Tested up to: 5.8
12
+ Stable tag: 2.2.5
13
 
14
  Customise dashboard panels and branding, hide menus plus lots more.
15
 
66
 
67
  == Changelog ==
68
 
69
+ = 2.2.5 =
70
+ * Fixed WooCommerce Home issue
71
+ * Fixed Yoast Menu issue reported by @davidbawiec
72
+ * Fixed the hiding of default footer link when "Hide WordPress Logo and Links" enabled
73
 
74
  == Frequently Asked Questions ==
75
  = Who is this plugin for?=
wlcms-plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: White Label CMS
4
  Plugin URI: https://www.videousermanuals.com/white-label-cms/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
5
  Description: A plugin that allows you to brand WordPress CMS as your own
6
- Version: 2.2.4
7
  Author: www.videousermanuals.com
8
  Author URI: https://www.videousermanuals.com/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
9
  Text Domain: white-label-cms
@@ -13,7 +13,7 @@ Domain Path: /languages
13
 
14
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
15
 
16
- define('WLCMS_VERSION', '2.2.4');
17
  define("WLCMS_DIR", plugin_dir_path(__FILE__));
18
  define("WLCMS_ASSETS_URL", plugin_dir_url(__FILE__) . 'assets/');
19
  define("WLCMS_BASENAME", plugin_basename(__FILE__));
3
  Plugin Name: White Label CMS
4
  Plugin URI: https://www.videousermanuals.com/white-label-cms/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
5
  Description: A plugin that allows you to brand WordPress CMS as your own
6
+ Version: 2.2.5
7
  Author: www.videousermanuals.com
8
  Author URI: https://www.videousermanuals.com/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
9
  Text Domain: white-label-cms
13
 
14
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
15
 
16
+ define('WLCMS_VERSION', '2.2.5');
17
  define("WLCMS_DIR", plugin_dir_path(__FILE__));
18
  define("WLCMS_ASSETS_URL", plugin_dir_url(__FILE__) . 'assets/');
19
  define("WLCMS_BASENAME", plugin_basename(__FILE__));