$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() ); if ( ! empty( $activated['installed_date'] ) ) { // Only continue if plugin has been installed for at least 14 days. if ( ( $activated['installed_date'] + ( DAY_IN_SECONDS * 14 ) ) > time() ) { return; } } else { $data = array( 'installed_version' => MONSTERINSIGHTS_VERSION, 'installed_date' => time(), 'installed_pro' => monsterinsights_is_pro_version(), ); update_option( 'monsterinsights_over_time', $data ); return; } // Only proceed with displaying if the user is tracking. $ua_code = monsterinsights_get_ua_to_output(); if ( empty( $ua_code ) ) { return; } // We have a candidate! Output a review message. ?>