Disable WP REST API icon
Developer Tools

Disable WP REST API hooks reference

  • By Jeff Starr
  • v2.6.9
  • Updated

Disable WP REST API 2.6.9 has 0 actions and 3 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Change a value Disable WP REST API is about to use
add_filter( 'disable_wp_rest_api_error', function( $_ ) {
	// Change $_ here.
	return $_;
}, 10, 1 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • disable-wp-rest-api.php line 69
    apply_filters( 'disable_wp_rest_api_error', __('REST API restricted to authenticated users.', 'disable-wp-rest-api') );
  • disable-wp-rest-api.php line 81
    apply_filters( 'disable_wp_rest_api_post_var', false );
  • disable-wp-rest-api.php line 82
    apply_filters( 'disable_wp_rest_api_server_var', false );

Generated from Disable WP REST API's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: