From a7a9ff95031712a1d138d59d4d1a8bda0757894c Mon Sep 17 00:00:00 2001 From: thanghv Date: Mon, 1 Jun 2020 18:46:24 +0700 Subject: [PATCH] Fixed --- class/class-mainwp-child-stats.php | 1 + class/class-mainwp-client-report-base.php | 4 ++-- class/class-mainwp-client-report.php | 16 +++++----------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/class/class-mainwp-child-stats.php b/class/class-mainwp-child-stats.php index e2dccaf..c01f624 100644 --- a/class/class-mainwp-child-stats.php +++ b/class/class-mainwp-child-stats.php @@ -344,6 +344,7 @@ class MainWP_Child_Stats { if ( null !== $this->filterFunction ) { remove_filter( 'pre_transient_update_core', $this->filterFunction, 99 ); } + return $result; } private function check_premium_updates( &$information, &$premiumPlugins, &$premiumThemes ) { diff --git a/class/class-mainwp-client-report-base.php b/class/class-mainwp-client-report-base.php index 6554e63..1fa3d41 100644 --- a/class/class-mainwp-client-report-base.php +++ b/class/class-mainwp-client-report-base.php @@ -59,7 +59,7 @@ class MainWP_Client_Report_Base { $mapping_connectors = array( 'plugins' => 'installer', 'themes' => 'installer', - 'WordPress' => 'installer', + 'wordpress' => 'installer', // phpcs:ignore -- lowercase characters. 'profiles' => 'users', 'comments' => 'comments', 'settings' => 'settings', @@ -557,7 +557,7 @@ class MainWP_Client_Report_Base { if ( 'version' === $data ) { if ( 'old' === $str2 ) { $data = 'old_version'; - } elseif ( 'current' === $str2 && 'WordPress' === $str1 ) { + } elseif ( 'current' === $str2 && 'wordpress' === $str1 ) { // phpcs:ignore -- lowercase characters. $data = 'new_version'; } } diff --git a/class/class-mainwp-client-report.php b/class/class-mainwp-client-report.php index 1a03539..f7f6c78 100644 --- a/class/class-mainwp-client-report.php +++ b/class/class-mainwp-client-report.php @@ -60,7 +60,6 @@ class MainWP_Client_Report extends MainWP_Client_Report_Base { * @param string $agent User agent. * @return string $agent Current user agent. * - * @deprecated Unused element. */ public function current_agent( $agent ) { if ( isset( $_POST['function'] ) && isset( $_POST['mainwpsignature'] ) ) { @@ -94,8 +93,7 @@ class MainWP_Client_Report extends MainWP_Client_Report_Base { * Create reports log file. * * @param string $ext File extension. - * - * @deprecated Unused element. + * */ public static function do_reports_log( $ext = '' ) { switch ( $ext ) { @@ -260,8 +258,7 @@ class MainWP_Client_Report extends MainWP_Client_Report_Base { * * @param $slugs Slugs to hide. * @return array Slugs array. - * - * @deprecated Unused element. + * */ public function hide_update_notice( $slugs ) { @@ -274,8 +271,7 @@ class MainWP_Client_Report extends MainWP_Client_Report_Base { * * @param string $value Value to remove. * @return string Response. - * - * @deprecated Unused element. + * */ public function remove_update_nag( $value ) { @@ -299,8 +295,7 @@ class MainWP_Client_Report extends MainWP_Client_Report_Base { * * @param array $plugins Plugins array. * @return array Plugins array. - * - * @deprecated Unused element. + * */ public function creport_branding_plugin( $plugins ) { foreach ( $plugins as $key => $value ) { @@ -314,8 +309,7 @@ class MainWP_Client_Report extends MainWP_Client_Report_Base { /** * Client Remove Menu. - * - * @deprecated Unused element. + * */ public function creport_remove_menu() { remove_menu_page( 'mainwp_wp_stream' );