[wp-trac] [WordPress Trac] #50493: more detailed notice for register_rest_route

WordPress Trac noreply at wordpress.org
Sun Jul 19 14:15:18 UTC 2020


#50493: more detailed notice for register_rest_route
--------------------------+-----------------------------
 Reporter:  Lwangaman     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  REST API      |     Version:  5.4.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  rest-api
--------------------------+-----------------------------

Comment (by Lwangaman):

 The reasoning behind the numbering order of the variables was the fact
 that logically, namespaces precede routes. So I ordered the sprintf
 variables logically: you will always find the namespace first and the
 route second.
 However in the error message itself, depending on the wording, sometimes
 the route might be mentioned before the namespace. That's the whole reason
 for using numbered variables: you can change the order in the sentence any
 which way without having to change the order of the variables as they are
 passed in. So I would really prefer not to change that order, I believe it
 is more clear to leave the logical ordering namespace->route for the order
 of the variables as they are passed in.

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


More information about the wp-trac mailing list