*/ protected function input_properties(): array { return array( 'fetch_index' => array( 'type' => 'boolean', 'default' => true, 'description' => __( 'Fetch the sitemap index over HTTP to confirm it is really served. Set false to report configuration only and make no request.', 'acrossai-abilities-manager' ), ), ); } /** * @since 0.0.44 * @return array */ protected function output_properties(): array { return array( 'enabled' => array( 'type' => 'boolean' ), 'index_url' => array( 'type' => 'string' ), 'sitemap_urls' => array( 'type' => 'array' ), 'post_types' => array( 'type' => 'array' ), 'taxonomies' => array( 'type' => 'array' ), 'indexes_enabled' => array( 'type' => 'boolean' ), 'links_per_index' => array( 'type' => 'integer' ), 'filename' => array( 'type' => 'string' ), 'author_sitemap' => array( 'type' => 'boolean' ), 'date_sitemap' => array( 'type' => 'boolean' ), 'static_file_mode' => array( 'type' => 'string' ), 'rss_enabled' => array( 'type' => 'boolean' ), 'html_enabled' => array( 'type' => 'boolean' ), 'llms_enabled' => array( 'type' => 'boolean' ), 'index_check' => array( 'type' => array( 'object', 'null' ) ), ); } /** * @since 0.0.44 * @return array */ protected function required_input(): array { return array(); } /** * @since 0.0.44 * @return array{readonly: bool, destructive: bool, idempotent: bool} */ protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } /** * @since 0.0.44 * @param array $input Input. * @return array|WP_Error */ protected function run( array $input ) { $fetch = ! isset( $input['fetch_index'] ) || (bool) $input['fetch_index']; return Sitemap_Repository::health( $fetch ); } }