mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Docs: Miscellaneous DocBlock corrections.
See #52628. git-svn-id: https://develop.svn.wordpress.org/trunk@50916 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -51,6 +51,7 @@ function wp_sitemaps_get_server() {
|
||||
*/
|
||||
function wp_get_sitemap_providers() {
|
||||
$sitemaps = wp_sitemaps_get_server();
|
||||
|
||||
return $sitemaps->registry->get_providers();
|
||||
}
|
||||
|
||||
@@ -65,6 +66,7 @@ function wp_get_sitemap_providers() {
|
||||
*/
|
||||
function wp_register_sitemap_provider( $name, WP_Sitemaps_Provider $provider ) {
|
||||
$sitemaps = wp_sitemaps_get_server();
|
||||
|
||||
return $sitemaps->registry->add_provider( $name, $provider );
|
||||
}
|
||||
|
||||
@@ -94,12 +96,13 @@ function wp_sitemaps_get_max_urls( $object_type ) {
|
||||
* @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.
|
||||
* @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;
|
||||
}
|
||||
@@ -121,5 +124,6 @@ function get_sitemap_url( $name, $subtype_name = '', $page = 1 ) {
|
||||
if ( 0 >= $page ) {
|
||||
$page = 1;
|
||||
}
|
||||
|
||||
return $provider->get_sitemap_url( $subtype_name, $page );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user