settings = $settings; $this->factory = $factory; $this->mappings = $mappings; $this->integrations = $integrations; } /** * Render the page. * * @return void */ public function render(): void { $connected = $this->factory->isConfigured(); $ready = $this->settings->isReadyToIssue(); $issue = $this->settings->connectionIssue(); $last_check = $this->settings->getLastCheck(); $mapping_count = $this->mappings->count(); $active = count( $this->integrations->active() ); $workspace = $this->settings->getWorkspace(); $api_keys_url = Links::apiKeysUrl( $this->settings ); $app_url = Links::appUrl( $this->settings ); $mappings_url = add_query_arg( 'page', 'verifycate-mappings', admin_url( 'admin.php' ) ); $configure_url = add_query_arg( 'page', 'verifycate-configure', admin_url( 'admin.php' ) ); $map_url = $mapping_count > 0 ? $mappings_url : add_query_arg( array( 'page' => 'verifycate-mappings', 'action' => 'new', ), admin_url( 'admin.php' ) ); Notices::render(); ?>

0 ) : ?>

0 ) : ?>

renderShortcodeRow( Links::walletShortcode(), sprintf( /* translators: 1: title attribute, 2: empty_text attribute, 3: limit attribute. */ __( 'Shows the logged-in learner’s certificates from their Verifycate recipient record, including status, issue date and a View certificate link. Use it on a “My Certificates” page or learner dashboard. Optional attributes: %1$s, %2$s and %3$s.', 'verifycate' ), 'title', 'empty_text', 'limit' ) ); $this->renderShortcodeRow( Links::certificateShortcode(), __( 'Embeds one certificate card by public ID. Use it on a certificate landing page or a page linked from an email.', 'verifycate' ) ); $this->renderShortcodeRow( Links::verifyShortcode(), __( 'Shows a public form for looking up a certificate by public ID. Use it on a “Verify a certificate” page.', 'verifycate' ) ); ?>

factory->isConfigured(); $ready = $this->settings->isReadyToIssue(); $issue = $this->settings->connectionIssue(); $workspace = $this->settings->getWorkspace(); Notices::render(); ?>

renderConnectionForm( $connected ); ?>
settings->getMaskedApiKey(); ?>

do_action( 'verifycate_course_completed', $user_id, $course_id );

$last_check Last check. * @return string */ private function lastCheckMessage( array $last_check ): string { if ( ! empty( $last_check['message'] ) && is_scalar( $last_check['message'] ) ) { $message = (string) $last_check['message']; if ( ! empty( $last_check['time'] ) && is_numeric( $last_check['time'] ) ) { $message .= ' ' . sprintf( /* translators: %s: date and time. */ __( 'Checked %s.', 'verifycate' ), wp_date( 'Y-m-d H:i', (int) $last_check['time'] ) ); } return $message; } return __( 'Run a test to confirm the connection.', 'verifycate' ); } }