Better Notifications for WordPress - Version 1.8.9

Version Description

  • 8th February 2022 =
  • Fixed: HTML formatting wasn't being applied to notifications since WordPress 5.9.
  • Fixed: Searching/selecting users on smaller sites was not rendering any results.
  • Improved: Better compatibility with WordPress coding standards.
  • Improved: Further improvements to plugin structure, data sanitisation, and validation.
Download this release

Release Info

Developer voltronik
Plugin Icon 128x128 Better Notifications for WordPress
Version 1.8.9
Comparing to
See all releases

Code changes from version 1.8.8 to 1.8.9

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: notification, email, alert, message, notify, send, HTML, customize, bulk,
5
  Requires at least: 4.8
6
  Tested up to: 5.9
7
  Requires PHP: 7.0
8
- Stable tag: 1.8.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Update URI: https://wordpress.org/plugins/bnfw/
@@ -242,9 +242,15 @@ Yes, of course! The plugin is completely translation-friendly and if you send me
242
 
243
  == Changelog ==
244
 
 
 
 
 
 
 
245
  = 1.8.8 - 4th February 2022 =
246
  * Improved: Select2 library is now included with the plugin instead of being loaded from CDN.
247
- * Fixed: Various changes relating to plugin structure, data sanitisation, and validation.
248
 
249
  = 1.8.7 - 27th January 2022 =
250
  * IMPORTANT! It is recommended that you update this plugin to the latest version.
@@ -254,7 +260,7 @@ Yes, of course! The plugin is completely translation-friendly and if you send me
254
  * Fixed: Post Author and Update Author shortcodes now work as expected again following an issue introduced in WordPress 5.7.
255
  * Fixed: User Lost Password notifications now work correctly if users only log in with their email address.
256
  * Removed: `<div>` tags were being added when using the Insert Default Content button on a notification.
257
- * Updated persist-admin-noticed-dismissal 3rd party library to latest version.
258
  * Updated: EDD_SL_Plugin_Updater is now at the latest version for add-ons.
259
 
260
  = 1.8.5 - 18th December 2020 =
5
  Requires at least: 4.8
6
  Tested up to: 5.9
7
  Requires PHP: 7.0
8
+ Stable tag: 1.8.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Update URI: https://wordpress.org/plugins/bnfw/
242
 
243
  == Changelog ==
244
 
245
+ = 1.8.9 - 8th February 2022 =
246
+ * Fixed: HTML formatting wasn't being applied to notifications since WordPress 5.9.
247
+ * Fixed: Searching/selecting users on smaller sites was not rendering any results.
248
+ * Improved: Better compatibility with WordPress coding standards.
249
+ * Improved: Further improvements to plugin structure, data sanitisation, and validation.
250
+
251
  = 1.8.8 - 4th February 2022 =
252
  * Improved: Select2 library is now included with the plugin instead of being loaded from CDN.
253
+ * Improved: Various changes relating to plugin structure, data sanitisation, and validation.
254
 
255
  = 1.8.7 - 27th January 2022 =
256
  * IMPORTANT! It is recommended that you update this plugin to the latest version.
260
  * Fixed: Post Author and Update Author shortcodes now work as expected again following an issue introduced in WordPress 5.7.
261
  * Fixed: User Lost Password notifications now work correctly if users only log in with their email address.
262
  * Removed: `<div>` tags were being added when using the Insert Default Content button on a notification.
263
+ * Updated: persist-admin-noticed-dismissal 3rd party library to latest version.
264
  * Updated: EDD_SL_Plugin_Updater is now at the latest version for add-ons.
265
 
266
  = 1.8.5 - 18th December 2020 =
bnfw.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Better Notifications for WP
4
  * Plugin URI: https://wordpress.org/plugins/bnfw/
5
  * Description: Supercharge your WordPress notifications using a WYSIWYG editor and shortcodes. Default and new notifications available. Add more power with Add-ons.
6
- * Version: 1.8.8
7
  * Requires at least: 4.8
8
  * Requires PHP: 7.0
9
  * Author: Made with Fuel
@@ -39,8 +39,7 @@ if ( ! class_exists( 'BNFW', false ) ) {
39
  *
40
  * @var string
41
  */
42
- public $bnfw_version = '1.8.8';
43
-
44
  /**
45
  * Class Constructor.
46
  *
@@ -645,8 +644,11 @@ if ( ! class_exists( 'BNFW', false ) ) {
645
  * @since 1.0
646
  */
647
  public function on_lost_password() {
648
- $user_login = sanitize_text_field( $_POST['user_login'] );// phpcs:ignore
649
- $user = get_user_by( 'login', $user_login ) ?: get_user_by( 'email', $user_login );// phpcs:ignore
 
 
 
650
  if ( $user ) {
651
  $this->send_notification( 'admin-password', $user->ID );
652
  }
@@ -744,7 +746,7 @@ if ( ! class_exists( 'BNFW', false ) ) {
744
  * @return bool
745
  */
746
  public function should_password_changed_email_be_sent( $send, $user, $userdata ) {
747
- $bnfw = BNFW::factory();// phpcs:ignore
748
 
749
  if ( ! $send ) {
750
  return $send;
@@ -777,7 +779,7 @@ if ( ! class_exists( 'BNFW', false ) ) {
777
  * @return bool
778
  */
779
  public function should_email_changed_email_be_sent( $send, $user_old_data, $user_new_data ) {
780
- $bnfw = BNFW::factory();// phpcs:ignore
781
 
782
  if ( $bnfw->notifier->notification_exists( 'admin-email-changed', false ) ) {
783
  $notifications = $bnfw->notifier->get_notifications( 'admin-email-changed' );
@@ -1120,12 +1122,12 @@ if ( ! class_exists( 'BNFW', false ) ) {
1120
  */
1121
  public function user_role_added( $user_id, $old_user_data ) {
1122
 
1123
- if ( isset( $_POST['members_user_roles'] ) && ! empty( $_POST['members_user_roles'] ) ) {// phpcs:ignore
1124
  // Get the current user roles.
1125
  $old_roles = (array) $old_user_data->roles;
1126
 
1127
  // Sanitize the posted roles.
1128
- $new_roles = array_map( array( $this, 'bnfw_members_sanitize_role' ), $_POST['members_user_roles'] );// phpcs:ignore
1129
 
1130
  sort( $old_roles );
1131
  sort( $new_roles );
@@ -1477,7 +1479,7 @@ if ( ! class_exists( 'BNFW', false ) ) {
1477
  * @return bool True if metabox request, False otherwise.
1478
  */
1479
  protected function is_metabox_request() {
1480
- return ( isset( $_GET['meta-box-loader'] ) || isset( $_GET['meta_box'] ) );// phpcs:ignore
1481
  }
1482
 
1483
  /**
3
  * Plugin Name: Better Notifications for WP
4
  * Plugin URI: https://wordpress.org/plugins/bnfw/
5
  * Description: Supercharge your WordPress notifications using a WYSIWYG editor and shortcodes. Default and new notifications available. Add more power with Add-ons.
6
+ * Version: 1.8.9
7
  * Requires at least: 4.8
8
  * Requires PHP: 7.0
9
  * Author: Made with Fuel
39
  *
40
  * @var string
41
  */
42
+ public $bnfw_version = '1.8.9';
 
43
  /**
44
  * Class Constructor.
45
  *
644
  * @since 1.0
645
  */
646
  public function on_lost_password() {
647
+ $user_login = ! empty( $_POST['user_login'] ) ? sanitize_text_field( wp_unslash( $_POST['user_login'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing
648
+ $user = get_user_by( 'login', $user_login );
649
+ if ( false === $user ) {
650
+ $user = get_user_by( 'email', $user_login );
651
+ }
652
  if ( $user ) {
653
  $this->send_notification( 'admin-password', $user->ID );
654
  }
746
  * @return bool
747
  */
748
  public function should_password_changed_email_be_sent( $send, $user, $userdata ) {
749
+ $bnfw = selff::factory();
750
 
751
  if ( ! $send ) {
752
  return $send;
779
  * @return bool
780
  */
781
  public function should_email_changed_email_be_sent( $send, $user_old_data, $user_new_data ) {
782
+ $bnfw = selff::factory();
783
 
784
  if ( $bnfw->notifier->notification_exists( 'admin-email-changed', false ) ) {
785
  $notifications = $bnfw->notifier->get_notifications( 'admin-email-changed' );
1122
  */
1123
  public function user_role_added( $user_id, $old_user_data ) {
1124
 
1125
+ if ( isset( $_POST['members_user_roles'] ) && ! empty( $_POST['members_user_roles'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1126
  // Get the current user roles.
1127
  $old_roles = (array) $old_user_data->roles;
1128
 
1129
  // Sanitize the posted roles.
1130
+ $new_roles = array_map( array( $this, 'bnfw_members_sanitize_role' ), $_POST['members_user_roles'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash
1131
 
1132
  sort( $old_roles );
1133
  sort( $new_roles );
1479
  * @return bool True if metabox request, False otherwise.
1480
  */
1481
  protected function is_metabox_request() {
1482
+ return ( isset( $_GET['meta-box-loader'] ) || isset( $_GET['meta_box'] ) );
1483
  }
1484
 
1485
  /**
includes/admin/class-bnfw-notification.php CHANGED
@@ -794,7 +794,7 @@ if ( ! class_exists( 'BNFW_Notification', false ) ) {
794
  $setting = array(
795
  'notification' => isset( $_POST['notification'] ) ? sanitize_text_field( wp_unslash( $_POST['notification'] ) ) : '',
796
  'subject' => $subject,
797
- 'message' => isset( $_POST['notification_message'] ) ? sanitize_text_field( wp_unslash( $_POST['notification_message'] ) ) : '',
798
  'disabled' => isset( $_POST['disabled'] ) ? sanitize_text_field( wp_unslash( $_POST['disabled'] ) ) : 'false',
799
  'email-formatting' => isset( $_POST['email-formatting'] ) ? sanitize_text_field( wp_unslash( $_POST['email-formatting'] ) ) : 'html',
800
  'disable-current-user' => isset( $_POST['disable-current-user'] ) ? sanitize_text_field( wp_unslash( $_POST['disable-current-user'] ) ) : 'false',
794
  $setting = array(
795
  'notification' => isset( $_POST['notification'] ) ? sanitize_text_field( wp_unslash( $_POST['notification'] ) ) : '',
796
  'subject' => $subject,
797
+ 'message' => isset( $_POST['notification_message'] ) ? wp_kses_post( wp_unslash( $_POST['notification_message'] ) ) : '',
798
  'disabled' => isset( $_POST['disabled'] ) ? sanitize_text_field( wp_unslash( $_POST['disabled'] ) ) : 'false',
799
  'email-formatting' => isset( $_POST['email-formatting'] ) ? sanitize_text_field( wp_unslash( $_POST['email-formatting'] ) ) : 'html',
800
  'disable-current-user' => isset( $_POST['disable-current-user'] ) ? sanitize_text_field( wp_unslash( $_POST['disable-current-user'] ) ) : 'false',
includes/admin/class-bnfw-settings.php CHANGED
@@ -57,7 +57,7 @@ if ( ! class_exists( 'BNFW_Settings', false ) ) {
57
  </div>
58
 
59
  <?php
60
- echo ob_get_clean(); // phpcs:ignore
61
  }
62
  /**
63
  * External Menu Item Links
@@ -77,21 +77,21 @@ if ( ! class_exists( 'BNFW_Settings', false ) ) {
77
  }
78
 
79
  // Documentation Link.
80
- $submenu['edit.php?post_type=bnfw_notification'][500] = array(// phpcs:ignore
81
  '<div id="bnfw-menu-item-documentation" style="color: #73daeb;">' . __( 'Documentation', 'bnfw' ) . '</div>',
82
  'bnfw',
83
  $doc_url,
84
  );
85
 
86
  // Add-ons Link.
87
- $submenu['edit.php?post_type=bnfw_notification'][600] = array(// phpcs:ignore
88
  '<div id="bnfw-menu-item-addons" style="color: #ff6f59;">' . __( 'Premium Add-ons', 'bnfw' ) . '</div>',
89
  'bnfw',
90
  $store_url,
91
  );
92
 
93
  // Add-ons Link.
94
- $submenu['edit.php?post_type=bnfw_notification'][700] = array(// phpcs:ignore
95
  '<div id="bnfw-menu-item-support" style="color: #f00001;">' . __( 'Priority Support', 'bnfw' ) . '</div>',
96
  'bnfw',
97
  $support_url,
57
  </div>
58
 
59
  <?php
60
+ echo ob_get_clean();// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
61
  }
62
  /**
63
  * External Menu Item Links
77
  }
78
 
79
  // Documentation Link.
80
+ $submenu['edit.php?post_type=bnfw_notification'][500] = array(// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
81
  '<div id="bnfw-menu-item-documentation" style="color: #73daeb;">' . __( 'Documentation', 'bnfw' ) . '</div>',
82
  'bnfw',
83
  $doc_url,
84
  );
85
 
86
  // Add-ons Link.
87
+ $submenu['edit.php?post_type=bnfw_notification'][600] = array(// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
88
  '<div id="bnfw-menu-item-addons" style="color: #ff6f59;">' . __( 'Premium Add-ons', 'bnfw' ) . '</div>',
89
  'bnfw',
90
  $store_url,
91
  );
92
 
93
  // Add-ons Link.
94
+ $submenu['edit.php?post_type=bnfw_notification'][700] = array(// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
95
  '<div id="bnfw-menu-item-support" style="color: #f00001;">' . __( 'Priority Support', 'bnfw' ) . '</div>',
96
  'bnfw',
97
  $support_url,
includes/helpers/helpers.php CHANGED
@@ -32,6 +32,24 @@ if ( ! function_exists( 'bnfw_expanded_alowed_tags' ) ) {
32
  * @return array
33
  */
34
  function bnfw_expanded_alowed_tags() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  $allowed_html['select'] = array(
36
  'class' => array(),
37
  'id' => array(),
@@ -43,6 +61,10 @@ if ( ! function_exists( 'bnfw_expanded_alowed_tags' ) ) {
43
  $allowed_html['option'] = array(
44
  'selected' => array(),
45
  );
 
 
 
 
46
  return $allowed_html;
47
  }
48
  }
@@ -83,7 +105,7 @@ if ( ! function_exists( 'bnfw_render_users_dropdown' ) ) {
83
  if ( isset( $user_count['avail_roles'][ $role_slug ] ) ) {
84
  $count = $user_count['avail_roles'][ $role_slug ];
85
  }
86
- echo wp_kses( '<option value="role-', esc_attr( $role_slug ), '" ', $selected, '>', esc_html( $role_name ), ' (', $count, ' ' . __( 'Users', 'bnfw' ) . ')', '</option>', $allowed_html );
87
  }
88
  ?>
89
  </optgroup>
@@ -120,7 +142,7 @@ if ( ! function_exists( 'bnfw_render_users_dropdown' ) ) {
120
  $non_wp_users = array_diff( $non_wp_users, array( $user->ID ) );
121
  }
122
 
123
- echo wp_kses( '<option value="', esc_attr( $user->ID ), '" ', $selected, '>', esc_html( $user->user_login ), '</option>', $allowed_html );
124
  }
125
 
126
  ?>
32
  * @return array
33
  */
34
  function bnfw_expanded_alowed_tags() {
35
+ $allowed_html = wp_kses_allowed_html( 'post' );
36
+ // iframe.
37
+ $allowed_html['iframe'] = array(
38
+ 'src' => array(),
39
+ 'height' => array(),
40
+ 'width' => array(),
41
+ 'frameborder' => array(),
42
+ 'allowfullscreen' => array(),
43
+ );
44
+ // form fields - input.
45
+ $allowed_html['input'] = array(
46
+ 'class' => array(),
47
+ 'id' => array(),
48
+ 'name' => array(),
49
+ 'value' => array(),
50
+ 'type' => array(),
51
+ );
52
+ // select.
53
  $allowed_html['select'] = array(
54
  'class' => array(),
55
  'id' => array(),
61
  $allowed_html['option'] = array(
62
  'selected' => array(),
63
  );
64
+ // style.
65
+ $allowed_html['style'] = array(
66
+ 'types' => array(),
67
+ );
68
  return $allowed_html;
69
  }
70
  }
105
  if ( isset( $user_count['avail_roles'][ $role_slug ] ) ) {
106
  $count = $user_count['avail_roles'][ $role_slug ];
107
  }
108
+ echo '<option value="role-', esc_attr( $role_slug ), '" ', $selected, '>', esc_html( $role_name ), ' (', $count, ' ' . __( 'Users', 'bnfw' ) . ')', '</option>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
109
  }
110
  ?>
111
  </optgroup>
142
  $non_wp_users = array_diff( $non_wp_users, array( $user->ID ) );
143
  }
144
 
145
+ echo '<option value="', esc_attr( $user->ID ), '" ', $selected, '>', esc_html( $user->user_login ), '</option>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
146
  }
147
 
148
  ?>
includes/libraries/class-edd-sl-plugin-updater.php CHANGED
@@ -91,7 +91,7 @@ if ( ! class_exists( 'EDD_SL_Plugin_Updater', false ) ) {
91
  $this->version = $_api_data['version'];
92
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
93
  $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
94
- $this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );// phpcs:ignore
95
 
96
  $edd_plugin_data[ $this->slug ] = $this->api_data;
97
 
@@ -144,7 +144,7 @@ if ( ! class_exists( 'EDD_SL_Plugin_Updater', false ) ) {
144
  global $pagenow;
145
 
146
  if ( ! is_object( $_transient_data ) ) {
147
- $_transient_data = new stdClass; // phpcs:ignore
148
  }
149
 
150
  if ( 'plugins.php' === $pagenow && is_multisite() ) {
@@ -321,7 +321,7 @@ if ( ! class_exists( 'EDD_SL_Plugin_Updater', false ) ) {
321
  );
322
  }
323
 
324
- do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );// phpcs:ignore
325
 
326
  echo '</div></td></tr>';
327
  }
@@ -678,7 +678,7 @@ if ( ! class_exists( 'EDD_SL_Plugin_Updater', false ) ) {
678
  update_option( $cache_key, $data, 'no' );
679
 
680
  // Delete the duplicate option.
681
- delete_option( 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ) );// phpcs:ignore
682
  }
683
 
684
  /**
91
  $this->version = $_api_data['version'];
92
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
93
  $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
94
+ $this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
95
 
96
  $edd_plugin_data[ $this->slug ] = $this->api_data;
97
 
144
  global $pagenow;
145
 
146
  if ( ! is_object( $_transient_data ) ) {
147
+ $_transient_data = new stdClass();
148
  }
149
 
150
  if ( 'plugins.php' === $pagenow && is_multisite() ) {
321
  );
322
  }
323
 
324
+ do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
325
 
326
  echo '</div></td></tr>';
327
  }
678
  update_option( $cache_key, $data, 'no' );
679
 
680
  // Delete the duplicate option.
681
+ delete_option( 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ) );
682
  }
683
 
684
  /**
includes/license/class-bnfw-license-setting.php CHANGED
@@ -41,7 +41,8 @@ if ( ! class_exists( 'BNFW_License_Setting', false ) ) {
41
  * @since 1.4
42
  */
43
  public function bnfw_render_license_page() {
44
- $settings = apply_filters( 'bnfw_settings_licenses', array() );
 
45
  ob_start(); ?>
46
 
47
  <div class="wrap">
@@ -69,7 +70,7 @@ if ( ! class_exists( 'BNFW_License_Setting', false ) ) {
69
  </div>
70
 
71
  <?php
72
- echo ob_get_clean();
73
  }
74
  /**
75
  * BNFW license settings.
@@ -127,7 +128,7 @@ if ( ! class_exists( 'BNFW_License_Setting', false ) ) {
127
  */
128
  public function bnfw_license_key_callback( $args ) {
129
  $bnfw_options = get_option( 'bnfw_licenses' );
130
-
131
  if ( isset( $bnfw_options[ $args['id'] ] ) ) {
132
  $value = $bnfw_options[ $args['id'] ];
133
  } else {
@@ -142,8 +143,7 @@ if ( ! class_exists( 'BNFW_License_Setting', false ) ) {
142
  }
143
 
144
  $html .= '<label for="bnfw_licenses[' . $args['id'] . ']"> ' . esc_html( $args['desc'] ) . '</label>';
145
-
146
- echo $html; // phpcs:ignore
147
  }
148
  }
149
  new BNFW_License_Setting();
41
  * @since 1.4
42
  */
43
  public function bnfw_render_license_page() {
44
+ $settings = apply_filters( 'bnfw_settings_licenses', array() );
45
+ $allowed_html = bnfw_expanded_alowed_tags();
46
  ob_start(); ?>
47
 
48
  <div class="wrap">
70
  </div>
71
 
72
  <?php
73
+ echo wp_kses( ob_get_clean(), $allowed_html );
74
  }
75
  /**
76
  * BNFW license settings.
128
  */
129
  public function bnfw_license_key_callback( $args ) {
130
  $bnfw_options = get_option( 'bnfw_licenses' );
131
+ $allowed_html = bnfw_expanded_alowed_tags();
132
  if ( isset( $bnfw_options[ $args['id'] ] ) ) {
133
  $value = $bnfw_options[ $args['id'] ];
134
  } else {
143
  }
144
 
145
  $html .= '<label for="bnfw_licenses[' . $args['id'] . ']"> ' . esc_html( $args['desc'] ) . '</label>';
146
+ echo wp_kses( $html, $allowed_html );
 
147
  }
148
  }
149
  new BNFW_License_Setting();
includes/license/class-bnfw-license.php CHANGED
@@ -123,7 +123,7 @@ if ( ! class_exists( 'BNFW_License', false ) ) {
123
 
124
  // Are there any icons set for the plugin?
125
  if ( isset( $plugin->icons ) ) {
126
- $icons = is_string( $plugin->icons ) ? unserialize( $plugin->icons ) : $plugin->icons; // phpcs:ignore
127
  $transient->response[ $basename ]->icons = $icons;
128
  }
129
  }
@@ -210,7 +210,7 @@ if ( ! class_exists( 'BNFW_License', false ) ) {
210
  $api_params = array(
211
  'edd_action' => 'activate_license',
212
  'license' => $license,
213
- 'item_name' => urlencode( $this->item_name ), // phpcs:ignore
214
  );
215
 
216
  if ( 'Multisite Add-on' === $this->item_name && is_multisite() ) {
@@ -260,7 +260,7 @@ if ( ! class_exists( 'BNFW_License', false ) ) {
260
  $api_params = array(
261
  'edd_action' => 'deactivate_license',
262
  'license' => $this->license,
263
- 'item_name' => urlencode( $this->item_name ), // phpcs:ignore
264
  );
265
 
266
  if ( 'Multisite Add-on' === $this->item_name && is_multisite() ) {
123
 
124
  // Are there any icons set for the plugin?
125
  if ( isset( $plugin->icons ) ) {
126
+ $icons = is_string( $plugin->icons ) ? unserialize( $plugin->icons ) : $plugin->icons;
127
  $transient->response[ $basename ]->icons = $icons;
128
  }
129
  }
210
  $api_params = array(
211
  'edd_action' => 'activate_license',
212
  'license' => $license,
213
+ 'item_name' => urlencode( $this->item_name ),
214
  );
215
 
216
  if ( 'Multisite Add-on' === $this->item_name && is_multisite() ) {
260
  $api_params = array(
261
  'edd_action' => 'deactivate_license',
262
  'license' => $this->license,
263
+ 'item_name' => urlencode( $this->item_name ),
264
  );
265
 
266
  if ( 'Multisite Add-on' === $this->item_name && is_multisite() ) {
includes/overrides.php CHANGED
@@ -96,7 +96,7 @@ if ( ! function_exists( 'wp_new_user_notification' ) ) {
96
  // Now insert the key, hashed, into the DB.
97
  if ( empty( $wp_hasher ) ) {
98
  require_once ABSPATH . WPINC . '/class-phpass.php';
99
- $wp_hasher = new PasswordHash( 8, true ); // phpcs:ignore
100
  }
101
  $hashed = time() . ':' . $wp_hasher->HashPassword( $key );
102
 
96
  // Now insert the key, hashed, into the DB.
97
  if ( empty( $wp_hasher ) ) {
98
  require_once ABSPATH . WPINC . '/class-phpass.php';
99
+ $wp_hasher = new PasswordHash( 8, true ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
100
  }
101
  $hashed = time() . ':' . $wp_hasher->HashPassword( $key );
102