$time, 'dismissed' => false, ); update_option( 'monsterinsights_review', $review ); } else { // Check if it has been dismissed or not. if ( ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) && ( isset( $review['time'] ) && ( ( $review['time'] + DAY_IN_SECONDS ) <= $time ) ) ) { $load = true; } } // If we cannot load, return early. if ( ! $load ) { return; } $this->review(); } /** * Maybe show review request. * * @since 7.0.7 */ public function review() { // Fetch when plugin was initially installed. $activated = get_option( 'monsterinsights_over_time', array() ); $ua_code = monsterinsights_get_ua(); if ( ! empty( $activated['connected_date'] ) ) { // Only continue if plugin has been tracking for at least 14 days. $days = 14; if ( monsterinsights_get_option( 'gadwp_migrated', 0 ) > 0 ) { $days = 21; } if ( ( $activated['connected_date'] + ( DAY_IN_SECONDS * $days ) ) > time() ) { return; } } else { if ( empty( $activated ) ) { $data = array( 'installed_version' => MONSTERINSIGHTS_VERSION, 'installed_date' => time(), 'installed_pro' => monsterinsights_is_pro_version(), ); } else { $data = $activated; } // If already has a UA code mark as connected now. if ( ! empty( $ua_code ) ) { $data['connected_date'] = time(); } update_option( 'monsterinsights_over_time', $data, false ); return; } // Only proceed with displaying if the user is tracking. if ( empty( $ua_code ) ) { return; } $feedback_url = add_query_arg( array( 'wpf192157_24' => untrailingslashit( home_url() ), 'wpf192157_26' => monsterinsights_get_license_key(), 'wpf192157_27' => monsterinsights_is_pro_version() ? 'pro' : 'lite', 'wpf192157_28' => MONSTERINSIGHTS_VERSION, ), 'https://www.monsterinsights.com/plugin-feedback/' ); $feedback_url = monsterinsights_get_url( 'review-notice', 'feedback', $feedback_url ); // We have a candidate! Output a review message. ?>


blog_id ); update_option( 'monsterinsights_review', $review ); restore_current_blog(); } } die; } } new MonsterInsights_Review();