> */ public static function definitions(): array { return array( 'general' => array( 'type' => 'object', 'properties' => array( 'delete_data_on_uninstall' => self::flag( false ), 'output_with_conflicts' => self::flag( false ), ), 'additionalProperties' => false, ), 'modules' => array( 'type' => 'object', 'properties' => array(), 'additionalProperties' => array( 'type' => 'boolean' ), ), 'titles' => array( 'type' => 'object', 'properties' => array( 'separator' => array( 'type' => 'string', 'enum' => self::separators(), 'default' => '-', ), 'home_title' => self::template( 300 ), 'home_description' => self::template( 500 ), 'post_types' => self::map(), 'taxonomies' => self::map(), 'post_type_archives' => self::map(), 'author_title' => self::template( 300 ), 'author_description' => self::template( 500 ), 'author_noindex' => self::flag( false ), 'author_noindex_single_author' => self::flag( true ), 'date_title' => self::template( 300 ), 'date_description' => self::template( 500 ), 'date_noindex' => self::flag( true ), 'search_title' => self::template( 300 ), 'search_noindex' => self::flag( true ), 'not_found_title' => self::template( 300 ), 'attachment_noindex' => self::flag( true ), 'attachment_redirect' => self::flag( true ), 'noindex_empty_taxonomies' => self::flag( true ), ), 'additionalProperties' => false, ), 'social' => array( 'type' => 'object', 'properties' => array( 'og_enabled' => self::flag( true ), 'twitter_enabled' => self::flag( true ), 'twitter_card_type' => array( 'type' => 'string', 'enum' => array( 'summary_large_image', 'summary' ), 'default' => 'summary_large_image', ), 'twitter_site' => array( 'type' => 'string', 'maxLength' => 16, 'default' => '', ), 'default_image_id' => self::attachment_id(), ), 'additionalProperties' => false, ), 'profile' => array( 'type' => 'object', 'properties' => array( 'site_type' => array( 'type' => 'string', 'enum' => array( '', 'blog', 'business', 'store', 'portfolio', 'other' ), 'default' => '', ), 'entity_type' => array( 'type' => 'string', 'enum' => array( 'organization', 'person' ), 'default' => 'organization', ), 'entity_name' => array( 'type' => 'string', 'maxLength' => 100, 'default' => '', ), 'entity_logo_id' => self::attachment_id(), 'facebook' => self::url(), 'x' => self::url(), 'instagram' => self::url(), 'linkedin' => self::url(), 'youtube' => self::url(), 'pinterest' => self::url(), ), 'additionalProperties' => false, ), 'sitemap' => array( 'type' => 'object', 'properties' => array( // Maps from a post type or taxonomy slug to whether it is listed. A slug that is not in the map is // listed when it is public (attachments and post formats excepted). 'post_types' => self::switches(), 'taxonomies' => self::switches(), 'max_urls' => array( 'type' => 'integer', 'minimum' => 1, 'maximum' => 50000, 'default' => 1000, ), 'images' => self::flag( true ), 'lastmod' => self::flag( true ), 'authors' => self::flag( false ), 'include_empty_terms' => self::flag( false ), 'exclude_posts' => self::ids(), 'exclude_terms' => self::ids(), ), 'additionalProperties' => false, ), 'robots' => array( 'type' => 'object', 'properties' => array( // An empty value means "use the default file". 'content' => array( 'type' => 'string', 'format' => 'elevenrank-robots-txt', 'maxLength' => 10000, 'default' => '', ), ), 'additionalProperties' => false, ), 'breadcrumbs' => array( 'type' => 'object', 'properties' => array( // Empty labels mean "use the built-in wording", which is translated when it is shown. 'separator' => array( 'type' => 'string', 'maxLength' => 10, 'default' => '›', ), 'home_label' => self::label(), 'archive_prefix' => self::label(), 'search_prefix' => self::label(), 'not_found_label' => self::label(), 'show_current' => self::flag( true ), 'hide_on_front' => self::flag( true ), 'post_taxonomy' => array( 'type' => 'string', 'maxLength' => 32, 'default' => 'category', ), 'styles' => self::flag( true ), ), 'additionalProperties' => false, ), 'images' => array( 'type' => 'object', 'properties' => array( // Patterns for images that have no alt text or title. Empty means "leave images alone". 'alt_pattern' => self::template( 200 ), 'title_pattern' => self::template( 200 ), ), 'additionalProperties' => false, ), 'schema' => array( 'type' => 'object', 'properties' => array( // Maps from a post type to the structured-data type its posts get by default: one of the // content types or `none`. A post type that is not in the map uses the built-in default. 'post_types' => array( 'type' => 'object', 'properties' => array(), 'additionalProperties' => array( 'type' => 'string', 'maxLength' => 20, 'enum' => array( 'none', 'Article', 'BlogPosting', 'NewsArticle', 'Product', 'Recipe', 'Event', 'VideoObject', 'Review' ), 'default' => 'none', ), 'default' => array(), ), 'include_breadcrumbs' => self::flag( true ), ), 'additionalProperties' => false, ), 'redirects' => array( 'type' => 'object', 'properties' => array( 'auto_create' => self::flag( true ), 'case_sensitive' => self::flag( false ), 'ignore_trailing_slash' => self::flag( true ), 'query_strings' => array( 'type' => 'string', 'enum' => array( 'ignore', 'exact' ), 'default' => 'ignore', ), ), 'additionalProperties' => false, ), 'monitor404' => array( 'type' => 'object', 'properties' => array( 'ignore_bots' => self::flag( true ), 'retention_days' => array( 'type' => 'integer', 'minimum' => 1, 'maximum' => 365, 'default' => 30, ), 'max_rows' => array( 'type' => 'integer', 'minimum' => 100, 'maximum' => 100000, 'default' => 5000, ), 'ignore_extensions' => array( 'type' => 'array', 'items' => array( 'type' => 'string', 'maxLength' => 10, ), 'maxItems' => 50, 'default' => array( 'css', 'js', 'map', 'png', 'jpg', 'jpeg', 'gif', 'webp', 'avif', 'svg', 'ico', 'woff', 'woff2', 'ttf', 'eot', 'otf', 'mp4', 'webm', 'mp3', 'txt' ), ), ), 'additionalProperties' => false, ), 'wizard_state' => array( 'type' => 'object', 'properties' => array( 'completed' => self::flag( false ), 'step' => array( 'type' => 'integer', 'minimum' => 0, 'maximum' => 5, 'default' => 0, ), ), 'additionalProperties' => false, ), ); } /** * A boolean property. * * @since 1.0.0 * * @param bool $initial Default value. * @return array */ private static function flag( bool $initial ): array { return array( 'type' => 'boolean', 'default' => $initial, ); } /** * A short plain-text label. Empty means "use the built-in wording". * * @since 1.0.0 * * @return array */ private static function label(): array { return array( 'type' => 'string', 'maxLength' => 100, 'default' => '', ); } /** * A list of positive integer ids. * * @since 1.0.0 * * @return array */ private static function ids(): array { return array( 'type' => 'array', 'items' => array( 'type' => 'integer' ), 'maxItems' => 1000, 'default' => array(), ); } /** * A map from a slug to an on/off switch. A slug that is not in the map has no explicit choice. * * @since 1.0.0 * * @return array */ private static function switches(): array { return array( 'type' => 'object', 'properties' => array(), 'additionalProperties' => array( 'type' => 'boolean' ), 'default' => array(), ); } /** * A title or description template property. * * An empty value means "use the built-in default template". * * @since 1.0.0 * * @param int $max_length Maximum number of characters. * @return array */ private static function template( int $max_length ): array { return array( 'type' => 'string', 'format' => 'elevenrank-template', 'maxLength' => $max_length, 'default' => '', ); } /** * An http(s) URL property. * * @since 1.0.0 * * @return array */ private static function url(): array { return array( 'type' => 'string', 'format' => 'elevenrank-url', 'maxLength' => 300, 'default' => '', ); } /** * A media library attachment id; 0 means "none". * * @since 1.0.0 * * @return array */ private static function attachment_id(): array { return array( 'type' => 'integer', 'minimum' => 0, 'default' => 0, ); } /** * A map from a post type, taxonomy or archive slug to its title/description/noindex overrides. * * Entries only hold the keys the site owner actually set, so "not set" and "false" differ. * * @since 1.0.0 * * @return array */ private static function map(): array { return array( 'type' => 'object', 'properties' => array(), 'additionalProperties' => array( 'type' => 'object', 'properties' => array( 'title' => self::template( 300 ), 'description' => self::template( 500 ), 'noindex' => array( 'type' => 'boolean' ), // Used by post types only: whether the SEO box shows in the editor (on unless set to false). 'seo_box' => array( 'type' => 'boolean' ), // Used by post types only: the content length the analysis recommends (0 = built-in default). 'min_words' => array( 'type' => 'integer', 'minimum' => 0, 'maximum' => 5000, ), ), 'additionalProperties' => false, ), 'default' => array(), ); } }