Skip to content

Commit

Permalink
Hook into wp_sitemaps_add_provider from plugins_loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed Mar 15, 2024
1 parent 33d8cc3 commit 335eca5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

/**
Expand Down

0 comments on commit 335eca5

Please sign in to comment.