Closed tangrufus closed 7 years ago
agreed it's not needed: https://github.com/dmchale/disable-json-api/commit/c76e16649b5ac1722f5941f4da3b692ab1feceac
Happy to chat more about moving add_filter out, though in this specific context discussing pure OOP is probably irrelevant since this isn't a use-case where this object is ever meant to be instantiated more than once :)
Keeping
$dra_object
is unnecessary, though i think movingadd_filter
out ofDisable_REST_API
class is better OOP design.https://github.com/dmchale/disable-json-api/blob/f907172e83021f622b3007ef363bc5fa6c610cdc/disable-json-api.php#L21
Furthermore, admin page should have its own class.