| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Yatra\Sitemap\Integrations; |
| 6 |
|
| 7 |
/** |
| 8 |
* Links Yatra's consolidated sitemap into Rank Math's sitemap index. Like |
| 9 |
* Yoast, Rank Math owns sitemap generation and exposes a filterable index XML |
| 10 |
* string. |
| 11 |
*/ |
| 12 |
class RankMathIntegration extends AbstractIndexIntegration |
| 13 |
{ |
| 14 |
public function register(): void |
| 15 |
{ |
| 16 |
// Priority 11: Rank Math builds the index at the default priority (10), |
| 17 |
// so we append after it (per Rank Math's documented example). |
| 18 |
add_filter('rank_math/sitemap/index', [$this, 'append'], 11); |
| 19 |
} |
| 20 |
} |
| 21 |
|