WordPress action hook · part of WordPress core

rss_tag_pre

A WordPress core action that 14 plugins also fire themselves, running on 104K+ sites between them.

“Fires between the xml and rss tags in a feed.”

How to use rss_tag_pre

It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'rss_tag_pre', function( $arg1 ) {
	// Your code runs here.
}, 10, 1 );

Argument names come from Media Library Assistant's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

14 plugins that fire rss_tag_pre

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Media Library Assistant icon Media Library Assistant70,000+ installs do_action( 'rss_tag_pre', MLACustomFeedExample::$active_feed['type'] ) examples/plugins/mla-custom-feed-example/mla-custom-feed-template.php:18
  2. GN Publisher: Google News Compatible RSS Feeds icon GN Publisher: Google News Compatible RSS Feeds20,000+ installs do_action( 'rss_tag_pre', 'rss2' ) templates/flipboard-news-feed.php:41
  3. WebberZone Top 10 icon WebberZone Top 1010,000+ installs do_action( 'rss_tag_pre', 'rss2' ) includes/frontend/feed-rss2-popular-posts.php:39
  4. SmartFormat feed for SmartNews icon SmartFormat feed for SmartNews1,000+ installs do_action( 'rss_tag_pre', 'smartformat' ) feed.php:20
  5. Smart Marketing SMS and Newsletters Forms icon Smart Marketing SMS and Newsletters Forms1,000+ installs do_action( 'rss_tag_pre', 'rss2' ) admin/class-egoi-for-wp-admin.php:1875
  6. Memberful icon Memberful900+ installs do_action( 'rss_tag_pre', 'rss2' ) views/private_user_feed_content.php:25
  7. RSS Control icon RSS Control300+ installs do_action( 'rss_tag_pre', 'rss2' ) public/feed-google-publisher-center.php:21
  8. RSS with Images icon RSS with Images300+ installs do_action( 'rss_tag_pre', 'rss2' ) feeds/mailchimp-feed-rss2-v2.0.php:22
  9. IndieBlocks icon IndieBlocks100+ installs do_action( 'rss_tag_pre', 'atom' ) templates/feed-atom.php:20
  10. SAPO Feed icon SAPO Feed70+ installs do_action( 'rss_tag_pre', 'rss2' ) templates/sapo_generic_rss_feed.php:64
  11. Authors as Taxonomy icon Authors as Taxonomy10+ installs do_action( 'rss_tag_pre', 'atom' ) integration/authors-as-taxonomy/feed-atom.php:16
  12. ProRank SEO icon ProRank SEO10+ installs do_action( 'rss_tag_pre', 'rss2' ) includes/Modules/Content/templates/feed-podcast.php:130
  13. Postqueue Feeds icon Postqueue FeedsFewer than 10 installs do_action( 'rss_tag_pre', 'rss2' ) template/postqueue-feed-rss2.php:25
  14. Nubus Portal Feed icon Nubus Portal FeedFewer than 10 installs do_action( 'rss_tag_pre', 'rss2' ) templates/feed-template.php:38

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.