rankmath / seo-by-rank-math

Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
https://rankmath.com
107 stars 52 forks source link

Beta filter hook sitemap/news/language not working #273

Closed RavanH closed 5 months ago

RavanH commented 6 months ago

Describe the bug The sitemap/news/language filter hook currently in the Pro 3.0.61-beta release, appears to be ignored.

To Reproduce

  1. Add these filters:
    add_filter( 'sitemap/news/language', function ( $lang, $entity ) {
    return 'xx';
    }, 10, 2 );
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false' );
  2. Check the news sitemap language node.

Expected behavior The news sitemap language node should read <news:language>xx</news:language> but it does not.

Additional context Reported here earlier: https://wordpress.org/support/topic/polylang-compatibility-47/page/2/#post-17707324

RavanH commented 5 months ago

My mistake, I did not prepend the hook slug with rank_math/ as pointed out to me on https://wordpress.org/support/topic/polylang-compatibility-47/page/2/#post-17713635