' . esc_html__( '(opens in a new tab)', 'frontpagely' ) . ''; $frontpagely_seo_name = 'yoast' === $seo_plugin ? 'Yoast SEO' : ( 'rankmath' === $seo_plugin ? 'Rank Math' : '' ); // Step 1 — site key (made here, pasted into Frontpagely). if ( $frontpagely_has_key && $last_seen > 0 ) { $frontpagely_s1 = array( 'is-ok', __( 'Connected', 'frontpagely' ), true ); } elseif ( $frontpagely_has_key ) { $frontpagely_s1 = array( 'is-warn', __( 'Waiting for Frontpagely', 'frontpagely' ), false ); } else { $frontpagely_s1 = array( '', __( 'Not started', 'frontpagely' ), false ); } // Step 2 — plugin key + entity id (made in Frontpagely, pasted here). $frontpagely_has_metrics = '' !== (string) ( $opt['metrics_key'] ?? '' ) && '' !== (string) ( $opt['entity_id'] ?? '' ); if ( $frontpagely_has_metrics && is_array( $metrics_status ) && ! empty( $metrics_status['ok'] ) ) { $frontpagely_s2 = array( 'is-ok', __( 'Working', 'frontpagely' ), true ); } elseif ( $frontpagely_has_metrics && is_array( $metrics_status ) ) { $frontpagely_s2 = array( 'is-bad', __( 'Not working', 'frontpagely' ), false ); } elseif ( $frontpagely_has_metrics ) { $frontpagely_s2 = array( 'is-warn', __( 'Saved, not checked yet', 'frontpagely' ), false ); } elseif ( '' !== (string) ( $opt['metrics_key'] ?? '' ) || '' !== (string) ( $opt['entity_id'] ?? '' ) ) { $frontpagely_s2 = array( 'is-warn', __( 'Half done', 'frontpagely' ), false ); } else { $frontpagely_s2 = array( '', __( 'Not started', 'frontpagely' ), false ); } // Connected through the one-click flow (business name known, both keys set). $frontpagely_one_click = '' !== (string) ( $opt['connected_name'] ?? '' ) && $frontpagely_has_key && $frontpagely_has_metrics; $frontpagely_done = (int) $frontpagely_s1[2] + (int) $frontpagely_s2[2]; if ( 2 === $frontpagely_done ) { $frontpagely_overall = array( 'is-ok', __( 'Fully connected', 'frontpagely' ) ); } elseif ( 0 === $frontpagely_done ) { $frontpagely_overall = array( '', __( 'Not connected', 'frontpagely' ) ); } else { /* translators: %d: steps completed (0-2). */ $frontpagely_overall = array( $frontpagely_done ? 'is-warn' : '', sprintf( __( '%d of 2 steps done', 'frontpagely' ), $frontpagely_done ) ); } // Notes on features that defer to an active Yoast SEO / Rank Math. $frontpagely_note_sitemap = ''; $frontpagely_note_meta = ''; $frontpagely_note_schema = ''; $frontpagely_note_fields = ''; if ( '' !== $frontpagely_seo_name ) { /* translators: %s: SEO plugin name. */ $frontpagely_note_sitemap = sprintf( __( 'Uses the %s sitemap; it does not make a second one.', 'frontpagely' ), $frontpagely_seo_name ); /* translators: %s: SEO plugin name. */ $frontpagely_note_meta = sprintf( __( 'Paused while %s is active: it prints these tags instead.', 'frontpagely' ), $frontpagely_seo_name ); /* translators: %s: SEO plugin name. */ $frontpagely_note_schema = sprintf( __( 'Skipped on any page where %s already outputs the same schema type.', 'frontpagely' ), $frontpagely_seo_name ); /* translators: %s: SEO plugin name. */ $frontpagely_note_fields = sprintf( __( 'Written into the %s fields for the page.', 'frontpagely' ), $frontpagely_seo_name ); } $frontpagely_kind_names = array( 'meta' => __( 'Title and description', 'frontpagely' ), 'canonical' => __( 'Canonical URL', 'frontpagely' ), 'schema' => __( 'Schema', 'frontpagely' ), 'redirect' => __( 'Redirect', 'frontpagely' ), 'alt' => __( 'Image alt text', 'frontpagely' ), 'llms' => __( 'llms.txt', 'frontpagely' ), 'sitemap' => __( 'Sitemap', 'frontpagely' ), 'robots' => __( 'robots.txt', 'frontpagely' ), ); /** * One labelled switch row. The whole text is the label, so a click or tap on * the sentence toggles it, and screen readers announce it as a switch. * * @param string $name Input name. * @param bool $checked Current value. * @param string $title Short name. * @param string $desc One plain sentence on what it changes on the site. * @param string $note Optional caveat (e.g. defers to Yoast). * @param string $extra Extra row class. */ $frontpagely_switch = static function ( $name, $checked, $title, $desc, $note = '', $extra = '' ) { $id = 'frontpagely_' . $name; ?>
/>

' . esc_html( (string) $opt['connected_name'] ) . '' ); ?>

>
  1. Connections', 'frontpagely' ); ?> Connect by hand instead)', 'frontpagely' ); ?>

    ••••••

    0 ) { printf( /* translators: %s: "5 mins ago". */ esc_html__( 'Frontpagely last used this key %s. It can publish and apply approved fixes here.', 'frontpagely' ), esc_html( FRONTPAGELY_Settings::ago( $last_seen ) ) ); } elseif ( $frontpagely_has_key ) { esc_html_e( 'Frontpagely has not used this key yet. In Frontpagely, open Connections, then WordPress site > Connect by hand instead, paste the site URL and the key, and connect. This turns green within a minute.', 'frontpagely' ); } else { esc_html_e( 'Make a site key, then paste it with the site URL into Frontpagely > Connections.', 'frontpagely' ); } ?>

  2. Connections', 'frontpagely' ); ?>

.txt to prove ownership.', 'frontpagely' ); ?>

array( __( 'Titles, descriptions and social previews', 'frontpagely' ), __( 'Rewrites a page’s title, meta description and OpenGraph text.', 'frontpagely' ) ), 'canonical' => array( __( 'Canonical URLs', 'frontpagely' ), __( 'Sets which address search engines treat as the main copy of a page.', 'frontpagely' ) ), 'schema' => array( __( 'Schema', 'frontpagely' ), __( 'Adds or updates structured data on a page or for the whole site.', 'frontpagely' ) ), 'redirect' => array( __( 'Redirects', 'frontpagely' ), __( 'Adds a redirect from a broken or old address to a working page.', 'frontpagely' ) ), 'alt' => array( __( 'Image alt text', 'frontpagely' ), __( 'Fills in missing image descriptions for screen readers and search.', 'frontpagely' ) ), 'llms' => array( __( 'llms.txt entries', 'frontpagely' ), __( 'Adds your key pages to the llms.txt guide.', 'frontpagely' ) ), 'sitemap' => array( __( 'Sitemap and IndexNow', 'frontpagely' ), __( 'Adds missing pages to the sitemap and pings IndexNow.', 'frontpagely' ) ), 'robots' => array( __( 'robots.txt', 'frontpagely' ), __( 'Only adds a sitemap line or unblocks a path. It never blocks anything.', 'frontpagely' ) ), ); foreach ( $frontpagely_kinds as $frontpagely_kind => $frontpagely_k ) { $frontpagely_note = in_array( $frontpagely_kind, array( 'meta', 'canonical' ), true ) ? $frontpagely_note_fields : ''; $frontpagely_switch( 'apply_kind_' . $frontpagely_kind, ! empty( $frontpagely_apply_kinds[ $frontpagely_kind ] ), $frontpagely_k[0], $frontpagely_k[1], $frontpagely_note ); } ?>

__( '— none —', 'frontpagely' ), 'option_none_value' => 0, 'name' => 'default_category', 'id' => 'frontpagely_default_category', 'selected' => (int) ( $opt['default_category'] ?? 0 ), 'hide_empty' => false, ) ); ?>

array( 'is-ok', __( 'Applied', 'frontpagely' ) ), 'noop' => array( 'is-plain', __( 'Already in place', 'frontpagely' ) ), 'reverted' => array( 'is-plain', __( 'Reverted', 'frontpagely' ) ), 'revert' => array( 'is-plain', __( 'Revert record', 'frontpagely' ) ), ); $frontpagely_state = $frontpagely_states[ $frontpagely_result ] ?? array( 'is-warn', $frontpagely_result ); ?>