Question: The REST API provides public data, which is accessible to any client anonymously, as well as private data available only after authentication. How could you ensure that no one can anonymously access site data via the REST API?

  1. Disable the REST API via the site's wp-config.php file.
  2. Use the `rest_authentication_errors()` filter along with the `is_user_logged_in()` conditional to limit access to logged in users.
  3. Use the `rest_authentication_errors()` filter along with cookie authentication to limit access to logged in users.
  4. Use the Disable REST API plugin.

Answer: The correct answer of the above question is Option D:Use the Disable REST API plugin.