XML Sitemaps Manager icon
SEO

XML Sitemaps Manager hooks reference

XML Sitemaps Manager 0.8 has 1 actions and 10 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when XML Sitemaps Manager fires an action
add_action( 'xmlsm_clear_lastmod_meta', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value XML Sitemaps Manager is about to use
add_filter( 'xmlsm_lastmod_index_entry', function( $value, $entry, $post_type ) {
	// Change $value here.
	return $value;
}, 10, 3 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • includes/modules/class-lastmod.php line 78 · used in 3 places
    /**
     * Pre-filter for Lastmod date. Can be used to bypass the default
     * get_lastpostdate() for lastmod date retrieval. A falsy value other than NULL
     * will cause the lastmod to be skipped. Otherwise make sure to return a GMT
     * date.
     */
    apply_filters( 'xmlsm_lastmod_index_entry', null, $entry, $post_type );
  • includes/modules/class-lastmod.php line 255 · used in 2 places
    /**
     * Filters the lastmod metadata key.
     */
    apply_filters( 'xmlsm_lastmod_term_meta_key', 'term_modified_gmt' );
  • includes/modules/class-lastmod.php line 418 · used in 2 places
    /**
     * Filters the lastmod metadata key. Allows to change it depending on language
     * for example.
     */
    apply_filters( 'xmlsm_lastmod_user_meta_key', 'user_modified_gmt' );
  • includes/modules/class-lastmod.php line 144 · used in 2 places
    /**
     * Filters the post types present in the author archive. Must return a string
     * or an array of multiple post types. Allows to add or change post type when
     * theme author archive page shows custom post types.
     */
    apply_filters( 'xmlsm_user_archive_post_type', 'post' );
  • includes/modules/class-lastmod.php line 314
    /**
     * Filters the get_posts arguments array for retrieving the last post in
     * taxonomy term archive. Allows to add or change arguments before get_posts()
     * is executed.
     */
    apply_filters( 'xmlsm_lastmod_term_args', $args );
  • includes/modules/class-lastmod.php line 481
    /**
     * Filters the get_posts arguments array for retrieving the last post in user
     * archive. Allows to add or change arguments before get_posts() is executed.
     */
    apply_filters( 'xmlsm_lastmod_user_args', $args );
  • includes/modules/class-fixes.php line 98 · used in 2 places
    apply_filters( 'xmlsm_blog_page_post_type', 'post' );
  • includes/compat/class-polylang.php line 136 · used in 2 places
    apply_filters( 'xmlsm_home_post_type', 'post' );
  • includes/class-admin.php line 193
    do_action( 'xmlsm_clear_lastmod_meta' );
  • includes/modules/class-lastmod-home.php line 50
    apply_filters( 'xmlsm_front_page_post_type', 'post' );
  • includes/modules/class-lastmod.php line 56
    apply_filters( 'xmlsm_index_entry_subtype', $subtype );

Generated from XML Sitemaps Manager's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Done for you

Rather have it built for you?

Tell us what should change and we’ll write and test the code using these hooks.

Plugin customisation

from $149

New features or changed behaviour, without editing the plugin’s files.

  • Built as a companion plugin, so updates never wipe it
  • Exact quote before we start
  • Tested on staging, then deployed

Typical turnaround: 3–7 business days

Choose this

Not sure which fits? Describe what you need and we’ll suggest the simplest option.

Can't find the right hook?

We can build the customisation for you. Describe what you need: