Skip to content

Commit

Permalink
Add Post ID to msm_sitmap_skip_posts
Browse files Browse the repository at this point in the history
Adds the post ID to msm_sitmap_skip_posts

This is a backwards incompatible change, as it adds a second argument to the filter

Fixes #183
  • Loading branch information
BrookeDot committed Aug 22, 2024
1 parent c494c3a commit 54e3efc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion msm-sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,9 @@ public static function generate_sitemap_for_date( $sitemap_date ) {
$GLOBALS['post'] = get_post( $post_id );
setup_postdata( $GLOBALS['post'] );

if ( apply_filters( 'msm_sitemap_skip_post', false ) )
if ( apply_filters( 'msm_sitemap_skip_post', false, $post_id ) ) {
continue;
}

$url = $xml->addChild( 'url' );
$url->addChild( 'loc', esc_url( get_permalink() ) );
Expand Down

0 comments on commit 54e3efc

Please sign in to comment.