[wp-trac] [WordPress Trac] #16695: quicktags needs some refactoring
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 24 17:46:56 UTC 2011
#16695: quicktags needs some refactoring
----------------------------------------------+----------------------------
Reporter: garyc40 | Owner: scribu
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Awaiting
Component: Editor | Review
Severity: normal | Version: 3.1
Keywords: has-patch dev-feedback 3.2-early | Resolution:
----------------------------------------------+----------------------------
Comment (by garyc40):
OK, perhaps I should have explained a bit more.
- Providing backward-compatibility is not hard. I already made enough room
in this patch to support backward compat. I'll update the patch in a
couple of days.
- Creating a new tag button (equivalent to `new ed_button()` in the old
approach) is basically similar function call, just replace edButton() with
QuickTags.TagButton(). The argument order is the same.
So in short, when you look at it from outside, the interface is basically
the same. Only difference is proper namespaces.
I shouldn't have chosen the word "harder", but instead "more advanced",
since this new API allows devs to create new button classes that suit
their needs. For example, custom buttons that have a custom callback that
displays a lightbox etc.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16695#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list