WordPress.org

Make WordPress Core

Opened 20 months ago

Last modified 20 months ago

#21649 new enhancement

_WP_Editor class is currently marked as final

Reported by: Marko-M Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Revision [19420] turned

class _WP_Editors{}

from wp-includes/class-wp-editor.php into

final class _WP_Editors{}

I'm aware that editor API is currently under large changes but it would be great if plugins could extend _WP_Editors class by removing "final" keyword.

Change History (3)

comment:1 SergeyBiryukov20 months ago

  • Description modified (diff)

comment:2 follow-up: nacin20 months ago

The reason for this change is that _WP_Editors should be re-architected to be a WP_Editor class that is individually instantiated for each editor. Right now it is a singleton, and makes avoiding OOP an art form.

I'm -1 on just making this not final, but +1 on making it not suck for extensibility purposes. :-) A WP_Editor class would not be final.

comment:3 in reply to: ↑ 2 Marko-M20 months ago

Replying to nacin:

The reason for this change is that _WP_Editors should be re-architected to be a WP_Editor class that is individually instantiated for each editor. Right now it is a singleton, and makes avoiding OOP an art form.

I'm -1 on just making this not final, but +1 on making it not suck for extensibility purposes. :-) A WP_Editor class would not be final.

Yes I see that it's half-baked right now and I understand the reasons for making it final. It would be great if final class could give developers ability to easier get editor without WordPress releted plugins like wplink. Right now if you want any "link" button on quicktags this pulls in jquery-ui. This way WP_Editor would be more appropriate for frontend (more light weight) because placing jquery-ui (wplink dependency) on frontend is a bit too much for some sites. I can offer help in doing the work on re-architecting WP_Editor but you've done a lot of work on it and I guess you don't need another developer getting in the way?

Last edited 20 months ago by Marko-M (previous) (diff)
Note: See TracTickets for help on using tickets.