$steps icon, title, text */ public static function steps(array $steps): void { echo '
    '; foreach ($steps as [$icon, $title, $text]) { printf( '
  1. %s%s
  2. ', esc_attr($icon), esc_html($title), esc_html($text), ); } echo '
'; } public static function welcome(): void { $steps = [ ['dashicons-format-chat', __('Ask in plain words', 'sarcio'), __('Type what you want changed. Sarcio works out which pages, menus or styles that means.', 'sarcio')], ['dashicons-visibility', __('Preview before anything changes', 'sarcio'), __('Every change shows on a private copy of your pages that only you see. Nothing is live until you apply it.', 'sarcio')], ['dashicons-undo', __('Undo any time', 'sarcio'), __('Each change you apply keeps its own Undo. Visitors can also report a problem, and Sarcio drafts the fix for you to approve.', 'sarcio')], ]; echo '

' . esc_html__('Sarcio', 'sarcio') . '

'; echo '
'; echo '

' . esc_html__('Sarcio for WordPress', 'sarcio') . '

'; echo '

' . esc_html__('Change your site by asking.', 'sarcio') . '

'; echo '

' . esc_html__('Tell Sarcio what you want in plain words: new text, a fixed menu, a section that looks wrong. You see the change on a private preview of your own pages, apply it when it looks right, and undo it any time.', 'sarcio') . '

'; self::steps($steps); echo '
'; $canConnect = current_user_can('manage_options'); if ($canConnect) { echo wp_kses(Connect::button('signup', __('Start free', 'sarcio'), 'button button-primary button-hero', 'plugin-first-screen'), Connect::ALLOWED_HTML); echo wp_kses(Connect::button('connect', __('I have an account: connect', 'sarcio'), 'button button-hero', 'plugin-first-screen'), Connect::ALLOWED_HTML); } else { echo '

' . esc_html__('An administrator of this site can connect it to Sarcio.', 'sarcio') . '

'; } printf('%s', esc_url('https://www.sarcio.io/'), esc_html__('Learn more at sarcio.io', 'sarcio')); echo '
'; if ($canConnect) { echo '

' . esc_html__('Free for 14 days. No card needed to start.', 'sarcio') . '

'; } echo '
'; } public static function account(string $heading, string $workspace, string $newTab, bool $ended): void { echo '

' . esc_html($heading) . '

'; echo '
'; echo '

' . esc_html($ended ? __('Your Sarcio sign-in here has ended', 'sarcio') : __('Connect your Sarcio account', 'sarcio')) . '

'; echo '

' . esc_html($workspace !== '' ? sprintf( /* translators: %s: Sarcio workspace name. */ __('Sign in to %s once. WordPress then keeps you signed in here, and asks for your password again only when you approve a fix.', 'sarcio'), $workspace, ) : __('Sign in to Sarcio once. WordPress then keeps you signed in here, and asks for your password again only when you approve a fix.', 'sarcio')) . '

'; echo '
'; echo wp_kses(Connect::button('account', __('Connect your Sarcio account', 'sarcio'), 'button button-primary', 'plugin-account'), Connect::ALLOWED_HTML); printf('%s', esc_url($newTab), esc_html__('Open Sarcio in a new tab', 'sarcio')); echo '

' . esc_html__('No Sarcio account yet? Ask the person who set up Sarcio to add you under People.', 'sarcio') . '

'; } /** @param array $actions label, url, primary (a primary opens in this tab) */ public static function notice(string $heading, string $title, string $text, array $actions): void { echo '

' . esc_html($heading) . '

'; echo '

' . esc_html($title) . '

'; if ($text !== '') { echo '

' . esc_html($text) . '

'; } echo '
'; foreach ($actions as [$label, $url, $primary]) { printf( '%s', $primary ? ' button-primary' : '', esc_url($url), $primary ? '' : ' target="_blank" rel="noopener"', esc_html($label), ); } echo '
'; } }