WordPress filter hook · part of WordPress core
rest_enabled
A WordPress core filter that 26 plugins also fire themselves, running on 4M+ sites between them.
“This filter is documented in wp-includes/rest-api/class-wp-rest-server.php”
How to use rest_enabled
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'rest_enabled', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from Jetpack's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
26 plugins that fire rest_enabled
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Jetpack3+ million installs
apply_filters( 'rest_enabled', true )_inc/lib/admin-pages/class.jetpack-admin-page.php:163 -
Slider, Gallery, and Carousel by MetaSlider500,000+ installs
apply_filters( 'rest_enabled', true )admin/Pages.php:466 -
Jetpack Boost200,000+ installs
apply_filters( 'rest_enabled', true )jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php:1159 -
YARPP100,000+ installs
apply_filters( 'rest_enabled', true )classes/YARPP_Core.php:97 -
Jetpack Protect100,000+ installs
apply_filters( 'rest_enabled', true )jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php:1159 -
Jetpack VaultPress Backup20,000+ installs
apply_filters( 'rest_enabled', true )jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php:1091 -
Echo Knowledge Base10,000+ installs
apply_filters( 'rest_enabled', true )includes/ai/admin/class-epkb-ai-dashboard-tab.php:485 -
Stripe Payment Forms by WP Simple Pay8,000+ installs
apply_filters( 'rest_enabled', true )includes/core/functions/shared.php:183 -
Jetpack VideoPress7,000+ installs
apply_filters( 'rest_enabled', true )jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php:1049 -
Jetpack Search5,000+ installs
apply_filters( 'rest_enabled', true )jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php:1091 -
Squeeze3,000+ installs
apply_filters( 'rest_enabled', true )inc/helpers.php:1656 -
Vimeotheque2,000+ installs
apply_filters( 'rest_enabled', true )includes/libs/admin/page/status-page.class.php:387 -
Hippoo Mobile App for WooCommerce1,000+ installs
apply_filters( 'rest_enabled', true )app/utils.php:109 -
REST API Toolbox1,000+ installs
apply_filters( 'rest_enabled', true )includes/wp-cli/class-rest-api-toolbox-rest-api-command.php:107 -
Event Tickets with Ticket Scanner1,000+ installs
apply_filters( 'rest_enabled', true )sasoEventtickets_Options.php:369 -
StreamWeasels Twitch Integration1,000+ installs
apply_filters( 'rest_enabled', true )admin/partials/streamweasels-admin-sidebar.php:214 -
StreamWeasels YouTube Integration1,000+ installs
apply_filters( 'rest_enabled', true )admin/partials/streamweasels-youtube-admin-sidebar.php:162 -
Geo Controller1,000+ installs
apply_filters( 'rest_enabled', true )inc/classes/Utilities.php:1958 -
Chabok700+ installs
apply_filters( 'rest_enabled', true )includes/chabok-helper-functions.php:404 -
Peppol e-Invoicing Integration by SendPol80+ installs
apply_filters( 'rest_enabled', true )includes/class-sendpol-wc-admin.php:2072 -
Atlas for WP30+ installs
apply_filters( 'rest_enabled', true )includes/class-rest-availability.php:107 -
JorgeCastro30+ installs
apply_filters( 'rest_enabled', true )classes/Core/Plugin.php:261 -
GhostGate20+ installs
apply_filters( 'rest_enabled', true )inc/admin-ui.php:3403 -
Final POS10+ installs
apply_filters( 'rest_enabled', true )includes/common-functions.php:380 -
Xerotact SHIELD-X SecurityFewer than 10 installs
apply_filters( 'rest_enabled', true )includes/Admin/AdminPage.php:15187 -
Gexiro Content ProtectionFewer than 10 installs
apply_filters( 'rest_enabled', true )admin/class-admin-page.php:38
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.