Skip to content

Commit

Permalink
moved deprecation function position
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Oct 26, 2023
1 parent 941682e commit 0bc24d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/sitemaps/class-sitemaps-router.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public function add_query_vars( $query_vars ) {
* @codeCoverageIgnore
*/
public function init() {
_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );

global $wp;

$wp->add_query_var( 'sitemap' );
Expand All @@ -72,8 +74,6 @@ public function init() {
add_rewrite_rule( 'sitemap_index\.xml$', 'index.php?sitemap=1', 'top' );
add_rewrite_rule( '([^/]+?)-sitemap([0-9]+)?\.xml$', 'index.php?sitemap=$matches[1]&sitemap_n=$matches[2]', 'top' );
add_rewrite_rule( '([a-z]+)?-?sitemap\.xsl$', 'index.php?yoast-sitemap-xsl=$matches[1]', 'top' );

_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
}

/**
Expand Down

0 comments on commit 0bc24d2

Please sign in to comment.