mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-09-02 23:20:25 +00:00
Docs: Document globals in WP_Sitemaps_* classes the same way they are documented in the rest of core.
See #49572, #50117. git-svn-id: https://develop.svn.wordpress.org/trunk@48093 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -67,10 +67,11 @@ class WP_Sitemaps_Index {
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
||||
*
|
||||
* @return string The sitemap index url.
|
||||
*/
|
||||
public function get_index_url() {
|
||||
/* @var WP_Rewrite $wp_rewrite */
|
||||
global $wp_rewrite;
|
||||
|
||||
if ( ! $wp_rewrite->using_permalinks() ) {
|
||||
|
||||
@@ -136,12 +136,13 @@ abstract class WP_Sitemaps_Provider {
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
||||
*
|
||||
* @param string $name The name of the sitemap.
|
||||
* @param int $page The page of the sitemap.
|
||||
* @return string The composed URL for a sitemap entry.
|
||||
*/
|
||||
public function get_sitemap_url( $name, $page ) {
|
||||
/* @var WP_Rewrite $wp_rewrite */
|
||||
global $wp_rewrite;
|
||||
|
||||
if ( ! $wp_rewrite->using_permalinks() ) {
|
||||
|
||||
@@ -57,10 +57,11 @@ class WP_Sitemaps_Renderer {
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
||||
*
|
||||
* @return string The sitemap stylesheet url.
|
||||
*/
|
||||
public function get_sitemap_stylesheet_url() {
|
||||
/* @var WP_Rewrite $wp_rewrite */
|
||||
global $wp_rewrite;
|
||||
|
||||
$sitemap_url = home_url( '/wp-sitemap.xsl' );
|
||||
@@ -87,10 +88,11 @@ class WP_Sitemaps_Renderer {
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
||||
*
|
||||
* @return string The sitemap index stylesheet url.
|
||||
*/
|
||||
public function get_sitemap_index_stylesheet_url() {
|
||||
/* @var WP_Rewrite $wp_rewrite */
|
||||
global $wp_rewrite;
|
||||
|
||||
$sitemap_url = home_url( '/wp-sitemap-index.xsl' );
|
||||
|
||||
@@ -139,6 +139,8 @@ class WP_Sitemaps {
|
||||
* Renders sitemap templates based on rewrite rules.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query WordPress Query object.
|
||||
*/
|
||||
public function render_sitemaps() {
|
||||
global $wp_query;
|
||||
|
||||
Reference in New Issue
Block a user