dmchale / disable-json-api

Public repo for the "Disable REST API" WordPress plugin, currently with 90,000+ active installs in the wordpress.org repository
10 stars 9 forks source link

admin_notices hook and show_admin_notices method are unnecessary #13

Closed tangrufus closed 7 years ago

tangrufus commented 7 years ago

admin_notices hook and show_admin_notices method are unnecessary because admin.php already have settings_errors();.

https://github.com/dmchale/disable-json-api/blob/1bd871d0104fe7759f7d8615456ca163f142652f/classes/disable-rest-api.php#L193

https://github.com/dmchale/disable-json-api/blob/1bd871d0104fe7759f7d8615456ca163f142652f/admin.php#L23

dmchale commented 7 years ago

thanks for the catch, it was clearly too late when I was editing that code :) Fixed, and updated settings_errors() on admin page to only show DRA's notices : https://github.com/dmchale/disable-json-api/commit/a4f8cc57ca0558a0d5f9da8862e14e677076712a