White Label CMS - Version 2.2.2

Version Description

  • WooCommerce Analytics menu patch
  • Side Menu Link URL opening in a new tab when external link was added. Requested by @Kosta X
  • WordPress 5.6.2 tested

=

Download this release

Release Info

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

Code changes from version 2.2.1 to 2.2.2

assets/images/Better-Clients-Banner-white-label-cms-m.jpg DELETED
Binary file
assets/images/Better-Clients-Banner.jpg DELETED
Binary file
assets/images/better-wordpress-for-client.jpg DELETED
Binary file
assets/images/better-wp-clients-m.jpg ADDED
Binary file
assets/images/better-wp-clients.jpg ADDED
Binary file
changelog.txt CHANGED
@@ -1,5 +1,10 @@
1
  == Changelog ==
2
 
 
 
 
 
 
3
  = 2.2 =
4
  * Custom Welcome Dashboard fixes
5
 
1
  == Changelog ==
2
 
3
+ = 2.2.1 =
4
+ * Refactoring / Security fixes reported by @twd
5
+ * Fixed override footer action reported by @simebern
6
+ * Custom Welcome Dashboard fixes
7
+
8
  = 2.2 =
9
  * Custom Welcome Dashboard fixes
10
 
includes/classes/Admin_Dashboard.php CHANGED
@@ -97,7 +97,6 @@ class WLCMS_Admin_Dashboard extends WLCMS_Previewable
97
  'right' => '0!important',
98
  'background' => 'white!important',
99
  'z-index' => '1000',
100
-
101
  )
102
  );
103
  }
97
  'right' => '0!important',
98
  'background' => 'white!important',
99
  'z-index' => '1000',
 
100
  )
101
  );
102
  }
includes/classes/Admin_Menus.php CHANGED
@@ -336,7 +336,7 @@ class WLCMS_Admin_Menus
336
  foreach ($menu as $i => $item) {
337
 
338
  $menu_item = remove_query_arg('return', $item[2]);
339
- $menu_item = $menu_item;
340
 
341
  if ($menu_slug == $menu_item) {
342
  unset($menu[$i]);
@@ -366,6 +366,9 @@ class WLCMS_Admin_Menus
366
  $submenu_item = remove_query_arg('return', $item[2]);
367
  $submenu_item = sanitize_title($submenu_item);
368
 
 
 
 
369
  if ($submenu_slug == $submenu_item) {
370
  unset($submenu[$menu_slug][$i]);
371
  return $item;
336
  foreach ($menu as $i => $item) {
337
 
338
  $menu_item = remove_query_arg('return', $item[2]);
339
+ $menu_item = urldecode($menu_item);
340
 
341
  if ($menu_slug == $menu_item) {
342
  unset($menu[$i]);
366
  $submenu_item = remove_query_arg('return', $item[2]);
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]);
374
  return $item;
includes/classes/Admin_Settings.php CHANGED
@@ -15,12 +15,17 @@ class WLCMS_Admin_Settings
15
  public function init()
16
  {
17
  $this->set_admin_css();
 
18
  $this->hide_screen_options();
19
  }
20
 
21
- public function remove_admin_bar()
22
  {
 
 
23
 
 
 
24
 
25
  if (!wlcms_field_setting('hide_admin_bar_all')) {
26
  return;
@@ -33,7 +38,6 @@ class WLCMS_Admin_Settings
33
  private function disable_admin_bar_menu()
34
  {
35
  add_filter('show_admin_bar', '__return_false');
36
-
37
  }
38
 
39
  public function admin_menu()
15
  public function init()
16
  {
17
  $this->set_admin_css();
18
+ $this->remove_editor_wp_logo();
19
  $this->hide_screen_options();
20
  }
21
 
22
+ public function remove_editor_wp_logo()
23
  {
24
+ wlcms_add_js(';jQuery(".edit-post-header .edit-post-fullscreen-mode-close svg").remove();');
25
+ }
26
 
27
+ public function remove_admin_bar()
28
+ {
29
 
30
  if (!wlcms_field_setting('hide_admin_bar_all')) {
31
  return;
38
  private function disable_admin_bar_menu()
39
  {
40
  add_filter('show_admin_bar', '__return_false');
 
41
  }
42
 
43
  public function admin_menu()
includes/classes/Branding.php CHANGED
@@ -130,8 +130,18 @@ class WLCMS_Branding extends WLCMS_Previewable
130
 
131
  $logo = sprintf('<img src=\"%s\" title=\"%s\" class=\"large-side-bar-logo\" /><img src=\"%s\" alt=\"%s\" class=\"collapsed-side-bar-logo\" />', $sidebar_image, $sidebar_text, $collapsed_sidebar_image, $sidebar_text);
132
 
 
 
 
 
 
 
 
 
 
 
133
  if ($sidebar_url) {
134
- $logo = sprintf('<a href=\"%s\" target=\"_blank\" title=\"%s\">%s</a>', $sidebar_url, $sidebar_text, $logo);
135
  }
136
  wlcms_set_css('.collapsed-side-bar-logo', array('display' => 'none', 'padding' => '5px', 'max-width' => '36px'));
137
  wlcms_set_css('.folded .collapsed-side-bar-logo', array('display' => 'block', 'margin' => '0 auto', 'max-width' => '25px'));
130
 
131
  $logo = sprintf('<img src=\"%s\" title=\"%s\" class=\"large-side-bar-logo\" /><img src=\"%s\" alt=\"%s\" class=\"collapsed-side-bar-logo\" />', $sidebar_image, $sidebar_text, $collapsed_sidebar_image, $sidebar_text);
132
 
133
+ $target = '_self';
134
+ if($sidebar_url) {
135
+ $domain = wp_parse_url($sidebar_url);
136
+ if( isset($domain['host']) ){
137
+ if (strpos($_SERVER['HTTP_HOST'], $domain['host']) === false) {
138
+ $target = '_blank';
139
+ }
140
+ }
141
+ }
142
+
143
  if ($sidebar_url) {
144
+ $logo = sprintf('<a href=\"%s\" title=\"%s\" target=\"%s\">%s</a>', $sidebar_url, $sidebar_text, $target, $logo);
145
  }
146
  wlcms_set_css('.collapsed-side-bar-logo', array('display' => 'none', 'padding' => '5px', 'max-width' => '36px'));
147
  wlcms_set_css('.folded .collapsed-side-bar-logo', array('display' => 'block', 'margin' => '0 auto', 'max-width' => '25px'));
includes/classes/Login.php CHANGED
@@ -57,7 +57,8 @@ class WLCMS_Login extends WLCMS_Previewable
57
 
58
  private function compiled_login_css()
59
  {
60
- $content = $this->get_settings('login_custom_css');
 
61
  $content .= $this->set_background_css();
62
  $content .= $this->set_logo_css();
63
  $content .= $this->set_form_css();
@@ -242,6 +243,15 @@ class WLCMS_Login extends WLCMS_Previewable
242
  return $form_css;
243
  }
244
 
 
 
 
 
 
 
 
 
 
245
  private function set_custom_login_js()
246
  {
247
  return wlcms_esc_html_e($this->get_settings('login_custom_js'));
57
 
58
  private function compiled_login_css()
59
  {
60
+
61
+ $content = $this->set_custom_css();
62
  $content .= $this->set_background_css();
63
  $content .= $this->set_logo_css();
64
  $content .= $this->set_form_css();
243
  return $form_css;
244
  }
245
 
246
+ private function set_custom_css()
247
+ {
248
+ $content = $this->get_settings('login_custom_css');
249
+
250
+ $content = wp_kses( $content, array( '\'', '\"' ) );
251
+ $content = str_replace( '&gt;', '>', $content );
252
+ return $content;
253
+ }
254
+
255
  private function set_custom_login_js()
256
  {
257
  return wlcms_esc_html_e($this->get_settings('login_custom_js'));
readme.txt CHANGED
@@ -2,14 +2,14 @@
2
 
3
  Contributors: VideoUserManuals
4
  Plugin Name: White Label CMS
5
- Plugin URI: http://www.videousermanuals.com/white-label-cms/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
6
  Tags: cms, custom, admin, branding, dashboard, administration, plugin, login, client, menu, navigation, appearance, menus, widgets, custom login, custom login logo, custom wp-login, login customizer, wp login
7
  Author URI: http://www.videousermanuals.com/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
8
  Author: Video User Manuals
9
  Requires at least: 3.3
10
  Requires PHP: 5.4
11
- Tested up to: 5.4.2
12
- Stable tag: 2.2.1
13
 
14
  Customise dashboard panels and branding, hide menus plus lots more.
15
 
@@ -67,10 +67,10 @@ There is so much that you can do with White Label CMS, but we want the experienc
67
 
68
  == Changelog ==
69
 
70
- = 2.2.1 =
71
- * Refactoring / Security fixes reported by @twd
72
- * Fixed override footer action reported by @simebern
73
- * Custom Welcome Dashboard fixes
74
 
75
  == Frequently Asked Questions ==
76
  = Who is this plugin for?=
2
 
3
  Contributors: VideoUserManuals
4
  Plugin Name: White Label CMS
5
+ Plugin URI: https://www.videousermanuals.com/white-label-cms/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
6
  Tags: cms, custom, admin, branding, dashboard, administration, plugin, login, client, menu, navigation, appearance, menus, widgets, custom login, custom login logo, custom wp-login, login customizer, wp login
7
  Author URI: http://www.videousermanuals.com/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
8
  Author: Video User Manuals
9
  Requires at least: 3.3
10
  Requires PHP: 5.4
11
+ Tested up to: 5.6.2
12
+ Stable tag: 2.2.2
13
 
14
  Customise dashboard panels and branding, hide menus plus lots more.
15
 
67
 
68
  == Changelog ==
69
 
70
+ = 2.2.2 =
71
+ * WooCommerce Analytics menu patch
72
+ * Side Menu Link URL opening in a new tab when external link was added. Requested by @Kosta X
73
+ * WordPress 5.6.2 tested
74
 
75
  == Frequently Asked Questions ==
76
  = Who is this plugin for?=
view/admin/parts/advert.php CHANGED
@@ -1,8 +1,8 @@
1
  <div class="wlcms-advert-wrapper">
2
- <a href="http://wplinks.io/workshop-wlcms" target="_blank">
3
  <picture>
4
- <source srcset="<?php echo WLCMS_ASSETS_URL ?>images/Better-Clients-Banner-white-label-cms-m.jpg" media="(max-width: 480px)">
5
- <img srcset="<?php echo WLCMS_ASSETS_URL ?>images/Better-Clients-Banner.jpg" alt="3 secrets to Better Client, Better Projects & Better Fees">
6
  </picture>
7
  </a>
8
  </div>
1
  <div class="wlcms-advert-wrapper">
2
+ <a href="https://www.videousermanuals.com/a-better-wp-for-clients" target="_blank">
3
  <picture>
4
+ <source srcset="<?php echo WLCMS_ASSETS_URL ?>images/better-wp-clients-m.jpg" media="(max-width: 480px)">
5
+ <img srcset="<?php echo WLCMS_ASSETS_URL ?>images/better-wp-clients.jpg" alt="A Better WordPress for Clients">
6
  </picture>
7
  </a>
8
  </div>
view/admin/parts/branding-side-menu.php CHANGED
@@ -11,7 +11,7 @@
11
  <input type="url" name="side_menu_link_url" value="<?php echo esc_url(wlcms_field_setting('side_menu_link_url')) ?>" />
12
  </div>
13
  <div class="wlcms-help">
14
- <?php _e('URL the Side Menu Image will link to.', 'white-label-cms') ?>
15
  </div>
16
  </div>
17
  <div class="wlcms-input-group">
11
  <input type="url" name="side_menu_link_url" value="<?php echo esc_url(wlcms_field_setting('side_menu_link_url')) ?>" />
12
  </div>
13
  <div class="wlcms-help">
14
+ <?php _e('External links will open in a new window.', 'white-label-cms') ?>
15
  </div>
16
  </div>
17
  <div class="wlcms-input-group">
wlcms-plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: White Label CMS
4
  Plugin URI: http://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.1
7
  Author: www.videousermanuals.com
8
  Author URI: http://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.1');
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: http://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.2
7
  Author: www.videousermanuals.com
8
  Author URI: http://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.2');
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__));