$time, 'dismissed' => false, ); $load = true; } else { // Check if it has been dismissed or not. if ( ( isset( $rating['dismissed'] ) && ! $rating['dismissed'] ) && ( isset( $rating['time'] ) && ( ( $rating['time'] ) <= $time ) ) ) { $load = true; } } // If we cannot load, return early. if ( ! $load ) { return; } // Update the review option now. update_option( 'socialsnap_rating', $rating ); // Fetch total shares. $shares = intval( socialsnap()->stats->get_stats( array( 'type' => 'share', ), true ) ); // Don't display the notice if share count is less than 30. if ( $shares < 50 ) { return; } $message = '
' . esc_html__( 'Hey, you just crossed 50 shares via Social Snap - that’s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress? Just to help us spread the word and boost our motivation.', 'socialsnap' ) . '
'; $message .= '~ Branko Conjic
' . __( 'Co-Founder of Social Snap', 'socialsnap' ) . '
' . esc_html__( 'Ok, you deserve it', 'socialsnap' ) . '
' . esc_html__( 'Nope, maybe later', 'socialsnap' ) . '
' . esc_html__( 'I already did', 'socialsnap' ) . '