PATH:
home
/
infinityocean
/
public_html
/
wp-includes
<?php /** * Sitemaps: Public functions * * This file contains a variety of public functions developers can use to interact with * the XML Sitemaps API. * * @package WordPress * @subpackage Sitemaps * @since 5.5.0 */ /** * Retrieves the current Sitemaps server instance. * * @since 5.5.0 * * @global WP_Sitemaps $wp_sitemaps Global Core Sitemaps instance. * * @return WP_Sitemaps Sitemaps instance. */ function wp_sitemaps_get_server() { global $wp_sitemaps; // If there isn't a global instance, set and bootstrap the sitemaps system. if ( empty( $wp_sitemaps ) ) { $wp_sitemaps = new WP_Sitemaps(); $wp_sitemaps->init(); /** * Fires when initializing the Sitemaps object. * * Additional sitemaps should be registered on this hook. * * @since 5.5.0 * * @param WP_Sitemaps $wp_sitemaps Sitemaps object. */ do_action( 'wp_sitemaps_init', $wp_sitemaps ); } return $wp_sitemaps; } /** * Gets an array of sitemap providers. * * @since 5.5.0 * * @return WP_Sitemaps_Provider[] Array of sitemap providers. */ function wp_get_sitemap_providers() { $sitemaps = wp_sitemaps_get_server(); return $sitemaps->registry->get_providers(); } /** * Registers a new sitemap provider. * * @since 5.5.0 * * @param string $name Unique name for the sitemap provider. * @param WP_Sitemaps_Provider $provider The `Sitemaps_Provider` instance implementing the sitemap. * @return bool Whether the sitemap was added. */ function wp_register_sitemap_provider( $name, WP_Sitemaps_Provider $provider ) { $sitemaps = wp_sitemaps_get_server(); return $sitemaps->registry->add_provider( $name, $provider ); } /** * Gets the maximum number of URLs for a sitemap. * * @since 5.5.0 * * @param string $object_type Object type for sitemap to be filtered (e.g. 'post', 'term', 'user'). * @return int The maximum number of URLs. */ function wp_sitemaps_get_max_urls( $object_type ) { /** * Filters the maximum number of URLs displayed on a sitemap. * * @since 5.5.0 * * @param int $max_urls The maximum number of URLs included in a sitemap. Default 2000. * @param string $object_type Object type for sitemap to be filtered (e.g. 'post', 'term', 'user'). */ return apply_filters( 'wp_sitemaps_max_urls', 2000, $object_type ); } /** * Retrieves the full URL for a sitemap. * * @since 5.5.1 * * @param string $name The sitemap name. * @param string $subtype_name The sitemap subtype name. Default empty string. * @param int $page The page of the sitemap. Default 1. * @return string|false The sitemap URL or false if the sitemap doesn't exist. */ function get_sitemap_url( $name, $subtype_name = '', $page = 1 ) { $sitemaps = wp_sitemaps_get_server(); if ( ! $sitemaps ) { return false; } if ( 'index' === $name ) { return $sitemaps->index->get_index_url(); } $provider = $sitemaps->registry->get_provider( $name ); if ( ! $provider ) { return false; } if ( $subtype_name && ! in_array( $subtype_name, array_keys( $provider->get_object_subtypes() ), true ) ) { return false; } $page = absint( $page ); if ( 0 >= $page ) { $page = 1; } return $provider->get_sitemap_url( $subtype_name, $page ); }
[+]
..
[-] class-wp-image-editor.php
[edit]
[-] class-walker-category.php
[edit]
[-] ms-load.php
[edit]
[+]
block-bindings
[-] https-detection.php
[edit]
[-] theme-i18n.json
[edit]
[+]
abilities-api
[-] class-wp-block-metadata-registry.php
[edit]
[-] class-wp-comment-query.php
[edit]
[+]
html-api
[-] sitemaps.php
[edit]
[-] template-canvas.php
[edit]
[-] embed-template.php
[edit]
[+]
sodium_compat
[-] class-wp-block-editor-context.php
[edit]
[-] class-wp-simplepie-file.php
[edit]
[-] class-wp-theme-json-schema.php
[edit]
[-] compat-utf8.php
[edit]
[-] theme-previews.php
[edit]
[-] speculative-loading.php
[edit]
[-] ms-default-constants.php
[edit]
[-] revision.php
[edit]
[+]
blocks
[-] comment-template.php
[edit]
[-] class-wp-block-processor.php
[edit]
[-] compat.php
[edit]
[+]
widgets
[-] block-i18n.json
[edit]
[+]
SimplePie
[+]
ID3
[-] global-styles-and-settings.php
[edit]
[+]
css
[+]
php-compat
[-] class-wp-hook.php
[edit]
[-] cron.php
[edit]
[-] class-wp-metadata-lazyloader.php
[edit]
[-] class-wp-block-type-registry.php
[edit]
[-] class-wp-text-diff-renderer-inline.php
[edit]
[-] class-avif-info.php
[edit]
[+]
pomo
[-] capabilities.php
[edit]
[-] theme.php
[edit]
[+]
Text
[+]
images
[-] class-wp-block-styles-registry.php
[edit]
[-] class-wp-date-query.php
[edit]
[-] class-wp-recovery-mode-email-service.php
[edit]
[-] class-wp-role.php
[edit]
[-] class-wp-block-parser-frame.php
[edit]
[-] abilities-api.php
[edit]
[-] pluggable.php
[edit]
[-] class-wp-xmlrpc-server.php
[edit]
[-] class-wp-http-requests-response.php
[edit]
[-] class-wp-customize-manager.php
[edit]
[-] spl-autoload-compat.php
[edit]
[-] class-wp-object-cache.php
[edit]
[-] class-wp-block-parser-block.php
[edit]
[-] class-wp-recovery-mode-key-service.php
[edit]
[-] feed-rss2.php
[edit]
[-] class-wp-token-map.php
[edit]
[+]
l10n
[-] feed-atom-comments.php
[edit]
[+]
assets
[+]
block-supports
[-] class-wp-block-parser.php
[edit]
[-] class-wp-navigation-fallback.php
[edit]
[-] l10n.php
[edit]
[+]
interactivity-api
[+]
js
[-] class-wp-http-ixr-client.php
[edit]
[-] blocks.php
[edit]
[-] class-wp-user-meta-session-tokens.php
[edit]
[+]
block-patterns
[-] theme.json
[edit]
[-] class-wp-url-pattern-prefixer.php
[edit]
[-] class-wp-customize-panel.php
[edit]
[-] version.php
[edit]
[-] script-loader.php
[edit]
[-] class-wp-recovery-mode.php
[edit]
[-] category.php
[edit]
[-] canonical.php
[edit]
[+]
PHPMailer
[+]
fonts
[-] class-wp-query.php
[edit]
[+]
Requests
[-] class-wp-http.php
[edit]
[+]
sitemaps
[-] class-wp-application-passwords.php
[edit]
[+]
style-engine
[-] class-wp-image-editor-gd.php
[edit]
[+]
customize
[-] class-IXR.php
[edit]
[+]
certificates
[-] class-wp-theme-json-resolver.php
[edit]
[+]
theme-compat
[-] class-wp-block-bindings-registry.php
[edit]
[+]
rest-api
[-] class-wp-embed.php
[edit]