WordPress filter hook · part of WordPress core
disable_captions
A WordPress core filter that 9 plugins also fire themselves, running on 1.2M+ sites between them.
“This filter is documented in wp-admin/includes/media.php”
How to use disable_captions
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( 'disable_captions', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from Complianz GDPR/CCPA Cookie Consent Banner'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 →
9 plugins that fire disable_captions
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Complianz GDPR/CCPA Cookie Consent Banner1+ million installs
apply_filters( 'disable_captions', '' )settings/media/wp_enqueue_media_override.php:115 -
Burst Statistics200,000+ installs
apply_filters( 'disable_captions', '' )includes/Admin/App/media/media-override.php:140 -
File Un-Attach300+ installs
apply_filters( 'disable_captions', '' )inc/media-template.3.9.php:503 -
Media Manager Plus100+ installs
apply_filters( 'disable_captions', '' )uber-media.php:662 -
Used Media Identifier10+ installs
apply_filters( 'disable_captions', '' )admin/class-used-media-identifier-admin.php:873 -
Volusion10+ installs
apply_filters( 'disable_captions', '' )media-process.php:6 -
NetAngels Cloud Storage10+ installs
apply_filters( 'disable_captions', '' )netangelss3.php:505 -
Media Insert from Themes Dir10+ installs
apply_filters( 'disable_captions', '' )media-insert-from-themes-dir.php:252 -
CoyoteFewer than 10 installs
apply_filters( 'disable_captions', '' )php/media-template.php:819
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.