Skip to main content

DataDrivenNamespaceInterface

Opt-in extension for namespace handlers that render from the filtered benecaster_feed_channel_data / benecaster_feed_episode_data arrays instead of reading show and episode meta themselves. Extends FeedNamespaceInterface.

This is what makes those two filters authoritative. Before it existed, a handler like ItunesNamespace rebuilt its own data from meta, so a callback changing a key such as artwork, author, category, or new_feed_url changed nothing an app actually reads — <itunes:image> ignored the filter while the plain RSS <image> obeyed it. A handler that renders a tag some key of those arrays describes must implement this interface, or the key is decorative.

The flow, per channel and per item, in FeedCompiler: (1) core builds its array; (2) each implementer’s channel_data() / episode_data() is merged in with += — core keys win on a collision, so a handler adds keys but can never silently redefine one core already documents; (3) the filter runs once, with $tier_slug; (4) the implementer renders from the filtered array.

Additive, like the tier-aware interfaces: a handler registered through benecaster_feed_namespaces without it keeps its channel_tags() / episode_tags() path untouched. The FeedNamespaceInterface methods an implementer still carries must produce the same output as rendering its own unfiltered data, for callers outside the compiler.