Skip to content

get_entries(has_enclosures=...) should be a plugin(?) #327

Description

@lemon24

The has_enclosures filter predates entry tags, and was meant as a proxy for "is a podcast item" (which works fine, at least with the feeds I'm subscribed to).

The same functionality can be obtained with a plugin that sets a tag, then used as a filter with get_entries(tags=['.has-enclosures']).

Some arguments for this:

  • Makes the core simpler (and lowers the burden on storage implementations).
  • Allows for more specific logic, e.g. .has-audio-enclosures.
  • Provides a reason to implement filtering by entry tags. Update: done in Filter entries by entry tags #328.
    • Update: ...and a reason for get_entry_counts() to be able to count tags! (kinda need to think how this would work)

Removing the has_enclosures argument is a compatibility break, so it needs to be done in 4.0, #291.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions