403 ) ); } $flash = AgentMySite_Flash::take( get_current_user_id() ); $kind = null === $flash ? '' : $flash['kind']; $connected = AgentMySite_Options::is_connected(); ?>

·

id="ams-manual-key" data-testid="ams-manual-key">

0 ) { return sprintf( /* translators: %s: number of pages queued from the sitemap. */ _n( 'Your sitemap was added and %s page is being learned.', 'Your sitemap was added and %s pages are being learned.', $queued, 'agentmysite' ), number_format_i18n( $queued ) ); } return __( 'Your sitemap was added and your pages are being learned.', 'agentmysite' ); case 'skipped_for_catalog': return __( 'Your WooCommerce products are indexed from the store itself, so no pages were taken from the sitemap.', 'agentmysite' ); case 'not_added_page_limit': return __( 'Connected, but your sitemap was not added because it would exceed your plan\'s page allowance.', 'agentmysite' ); case 'not_added_invalid': return __( 'Connected, but the sitemap could not be added. You can add it from your AgentMySite dashboard.', 'agentmysite' ); default: return __( 'Connected. No sitemap was found, so no pages were added. You can add one from your AgentMySite dashboard.', 'agentmysite' ); } } /** * Copy for an exclude-pattern validation error. * * @param mixed $error Error code from AgentMySite_Exclude_Matcher::validate(). */ private static function pattern_error( $error ): string { switch ( $error ) { case 'too_many': return __( 'Use at most 50 patterns.', 'agentmysite' ); case 'too_long': return __( 'Each pattern can be at most 200 characters.', 'agentmysite' ); case 'invalid_characters': return __( 'Patterns cannot contain control characters.', 'agentmysite' ); case 'must_start_with_slash': return __( 'Each pattern must start with a slash, for example /cart.', 'agentmysite' ); default: return __( 'Check the patterns and try again.', 'agentmysite' ); } } /** * A one-line notice. * * @param string $variant success or error. * @param string $message Translated message. * @param string $testid Optional test id. */ private static function simple_notice( string $variant, string $message, string $testid = 'ams-notice' ): void { ?>

AgentMySite_Connect::PAGE_SLUG ), $extra ); return admin_url( 'options-general.php' ) . '?' . http_build_query( $params, '', '&', PHP_QUERY_RFC3986 ); } }