PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/model/class-onboard.php +9 -3 5.5.1 → 6.3.0 View file →
@@ -19,15 +19,21 @@
19 19 * @return bool Returns true if the site is newly created, false otherwise.
20 20 */
21 21 public static function maybe_show_onboarding(): bool {
22 22 // First we need to check if the site is newly create.
23 + global $wpdb;
23 24 if ( ! is_multisite() ) {
24 - $res = get_option( 'wp_defender_shown_activator' );
25 + $res = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'wp_defender_shown_activator'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery
25 26 } else {
26 - $res = get_site_option( 'wp_defender_shown_activator' );
27 + $res = $wpdb->get_var( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
28 + $wpdb->prepare(
29 + "SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = 'wp_defender_shown_activator' AND site_id = %d",
30 + get_current_network_id()
31 + )
32 + );
27 33 }
28 34 // Get '1' for direct SQL request if Onboarding was already.
29 - if ( empty( $res ) ) {
35 + if ( '1' !== $res ) {
30 36 return true;
31 37 }
32 38
33 39 return false;