disable_captions WordPress Filter Hook

The disable_captions hook is used to disable the automatic caption generation for images in Wordpress. This can be useful for images that don't need captions, or for sites that want to use a custom caption solution.

apply_filters( 'disable_captions', bool $bool ) #

Filters whether to disable captions.


Description

Prevents image captions from being appended to image HTML when inserted into the editor.


Top ↑

Parameters

$bool

(bool)Whether to disable appending captions. Returning true from the filter will disable captions. Default empty string.


Top ↑

Source

File: wp-admin/includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More