Skip to content

assets: conditionally load format assest #72

@ajitbohra

Description

@ajitbohra

What problem does this address?

Some formats need additional assets that currently load on every post/page, even if the format is not used.

Proposed solution

Conditionally load additional assets if formats is in use.

Additional context

Currently, there is no core API or helper to determine this, and it needs a custom helper.

We can introduce hasFormat, which accepts a classname or a tag name or both to evaluate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions