Closed kadamwhite closed 4 years ago
The new overview language looks great to me.
The "namespaces vs classes" section feels weird to me. I think typically the distinction is using namespaces vs prefixes. So to me that section feels kinda apples and oranges. It is a coding style type of thing, though. For instance, I almost never follow the namespaced function pattern, instead opting to consolidate in a class.
Extending the base class provides so much functionality, that I’m kinda hesitant to recommend writing it as separate functions. To me, the separate functions approach (or writing your own class that does not extend WP_REST_Controller
) feels like the advanced option, and extending the base class is the most straightforward usage.
Looks good to me!
Because WordPress now supports 5.6, the note about namespaces on this page is no longer accurate. I've provisionally replaced it with a brief introduction to the code structure problem which classes solve, and a note that namespaces may be used in a similar fashion.
Fixes #79