' . 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'] ) . '' ); ?>
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' ); } ?>
Connections', 'frontpagely' ); ?>
|