From 335eca5b246e3e41fcc0831ee6e4457cd96ae5dc Mon Sep 17 00:00:00 2001 From: Myrotvorets Date: Fri, 15 Mar 2024 09:02:59 +0200 Subject: [PATCH] Hook into `wp_sitemaps_add_provider` from `plugins_loaded` --- inc/class-plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/class-plugin.php b/inc/class-plugin.php index 6694190..1bd4db5 100644 --- a/inc/class-plugin.php +++ b/inc/class-plugin.php @@ -17,12 +17,12 @@ private function __construct() { public function plugins_loaded(): void { add_filter( 'wp_sitemaps_enabled', [ $this, 'wp_sitemaps_enabled' ] ); add_action( 'wp_sitemaps_init', [ WP_Sitemaps_Criminals::class, 'register' ] ); + add_filter( 'wp_sitemaps_add_provider', [ $this, 'wp_sitemaps_add_provider' ], 10, 2 ); } public function init(): void { add_filter( 'wp_sitemaps_post_types', [ $this, 'wp_sitemaps_post_types' ] ); add_filter( 'wp_sitemaps_max_urls', [ $this, 'wp_sitemaps_max_urls' ], 10, 2 ); - add_filter( 'wp_sitemaps_add_provider', [ $this, 'wp_sitemaps_add_provider' ], 10, 2 ); } /**