'free', 'state' => 'free', 'version' => STORESUIT_VERSION, 'pro_url' => ProPage::url(), 'portal' => self::PORTAL, 'admin' => current_user_can( 'manage_options' ), 'actions' => array(), ); return $out; } /** * "Finish activation" (license-panel.js): a key waiting for Freemius's email goes to Freemius again (Licensing). 'done' * says whether the license is active now; otherwise 'error' carries Freemius's own reason, or nothing while it waits. */ public static function finish() : array { Store::require_cap( 'manage_options' ); $out = array( 'done' => false, 'error' => '', ); return $out; } /** A Freemius date (UTC, 'Y-m-d H:i:s') as a timestamp; 0 when there is none. */ private static function stamp( $value ) : int { if ( !is_string( $value ) || $value === '' ) { return 0; } $time = strtotime( $value . ' UTC' ); return ( $time ? (int) $time : 0 ); } private static function day( int $time ) : string { return ( $time ? wp_date( (string) get_option( 'date_format' ), $time ) : '' ); } }