Make WordPress Core

Opened 12 years ago

Closed 10 years ago

#21649 closed enhancement (maybelater)

_WP_Editor class is currently marked as final

Reported by: marko-m's profile Marko-M Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords: dev-feedback close
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 (5)

#1 @SergeyBiryukov
12 years ago

  • Description modified (diff)

#2 follow-up: @nacin
12 years 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.

#3 in reply to: ↑ 2 @Marko-M
12 years 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 12 years ago by Marko-M (previous) (diff)

#4 @chriscct7
10 years ago

  • Keywords dev-feedback close added

Thinking maybelater on this?

#5 @helen
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

I think realistically the response to this ticket summary is "yep, it sure is" :) If some intrepid soul wants to think about a real WP_Editor someday we can revive and reframe this.

Note: See TracTickets for help on using tickets.