[wp-trac] [WordPress Trac] #38098: Use common naming for context switching functions / classes

WordPress Trac noreply at wordpress.org
Mon Sep 19 18:14:03 UTC 2016


#38098: Use common naming for context switching functions / classes
--------------------------+------------------------------
 Reporter:  swissspidy    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by ChriCo):

 Howdy and good evening.

 When i see the word "State", than the first think i think of is is somehow
 in the direction of the "State" or a "Memento"-Pattern.

 Also important should be the functionality {{{undo}}} and {{{redo}}} for
 quick access/switching between states. Clear naming is here very
 important. When choosing something like {{{clear}}} or {{{delete}}}, we
 need to add at least {{{state}}} to the -function name. Additionally it
 would be useful to remove the {{{switch_to}}}-functions completly - yep i
 know..in future! Set it to deprected and call the new class inside - and
 just use it in via the {{{WP_Service_Container}}} which is currently
 discussed in #37699.

 Just some random note: the {{{restore}}}-naming is also somehow
 missleading...''do i need a database backup to restore my blog?'' (just
 joking).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38098#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list