Skip to content

Function

Determine whether it is time to ask for a review.

tml_admin_review_request_is_due( int|null $now = null )

Parameters

$now int|null Default null
The current time. Defaults to now.

Return

bool True if the review request should be shown.

Source

function tml_admin_review_request_is_due( $now = null ) {
    $installed_at = (int) get_site_option( '_tml_installed_at' );

    if ( ! $installed_at || tml_admin_notice_is_dismissed( 'review' ) ) {
        return false;
    }

    $now = null === $now ? time() : $now;

    return $now >= max( $installed_at + 30 * DAY_IN_SECONDS, (int) get_site_option( '_tml_review_later', 0 ) );
}

Uses

Used by

Changelog

VersionDescription
7.3 Introduced.