Skip to content

Event listener priority #169

Description

@BenRutlandWeb

Is your feature request related to a problem? Please describe.
I can't specify the event listener priority in the event service provider.

Describe the solution you'd like
A static property on the listener to set the priority.

Describe alternatives you've considered
Registering the listeners in a subscriber or with the facade directly.

Additional context
Laravel used to allow this, it was removed as it's not good practice - listeners should be order-agnostic, however, WordPress uses priorities for core events so the ability to set the priority is still relevant in certain circumstances. The static property should possibly not be exposed by default in listener stubs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions