disable_captions

disable_captions

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('disable_captions') is found 8 times:

  • /wp-admin/includes/media.php line 216

    *
    * @param bool $bool Whether to disable appending captions. Returning true from the filter
    * will disable captions. Default empty string.
    */
    if ( empty( $caption ) || apply_filters( ‘disable_captions’, ” ) ) {
    return $html;
    }

    $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; if ( ! preg_match( '/width=["\']([0-9]+)/', $html, $matches ) ) { [/php]

  • /wp-admin/includes/media.php line 2443
    			alt = f.alt.value.replace(/'/g, '&#039;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
    
    		<?php
    		/** This filter is documented in wp-admin/includes/media.php */
    		if ( ! apply_filters( 'disable_captions', '' ) ) {
    			?>
    			if ( f.caption.value ) {
    				caption = f.caption.value.replace(/\r\n|\r/g, '\n');
    				caption = caption.replace(/<&#91;a-zA-Z0-9&#93;+( &#91;^<>]+)?>/g, function(a){
    					return a.replace(/[\r\n\t]+/, ' ');
    				});
    
  • /wp-admin/includes/media.php line 2927
     * @return string HTML content of the form.
     */
    function wp_media_insert_url_form( $default_view = 'image' ) {
    	/** This filter is documented in wp-admin/includes/media.php */
    	if ( ! apply_filters( 'disable_captions', '' ) ) {
    		$caption = '
    		<tr class="image-only">
    			<th scope="row" class="label">
    				<label for="caption"><span class="alignleft">' . __( 'Image Caption' ) . '</span></label>
    			</th>
    			<td class="field"><textarea id="caption" name="caption"></textarea></td>
    
  • /wp-includes/class-wp-editor.php line 567
    					$settings['external_plugins'] = wp_json_encode( $mce_external_plugins );
    				}
    
    				/** This filter is documented in wp-admin/includes/media.php */
    				if ( apply_filters( 'disable_captions', '' ) ) {
    					$settings['wpeditimage_disable_captions'] = true;
    				}
    
    				$mce_css = $settings['content_css'];
    
    				/*
    
  • /wp-includes/media-template.php line 1081
    		<p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
    
    		<?php
    		/** This filter is documented in wp-admin/includes/media.php */
    		if ( ! apply_filters( 'disable_captions', '' ) ) :
    			?>
    			<span class="setting caption">
    				<label for="embed-image-settings-caption" class="name"><?php _e( 'Caption' ); ?></label>
    				<textarea id="embed-image-settings-caption" data-setting="caption"></textarea>
    			</span>
    		<?php endif; ?>
    
  • /wp-includes/media-template.php line 1144
    					<p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
    
    					<?php
    					/** This filter is documented in wp-admin/includes/media.php */
    					if ( ! apply_filters( 'disable_captions', '' ) ) :
    						?>
    						<span class="setting caption">
    							<label for="image-details-caption" class="name"><?php _e( 'Caption' ); ?></label>
    							<textarea id="image-details-caption" data-setting="caption">{{ data.model.caption }}</textarea>
    						</span>
    					<?php endif; ?>
    
  • /wp-includes/media.php line 4823
    		'tabs'              => $tabs,
    		'tabUrl'            => add_query_arg( array( 'chromeless' => true ), admin_url( 'media-upload.php' ) ),
    		'mimeTypes'         => wp_list_pluck( get_post_mime_types(), 0 ),
    		/** This filter is documented in wp-admin/includes/media.php */
    		'captions'          => ! apply_filters( 'disable_captions', '' ),
    		'nonce'             => array(
    			'sendToEditor'           => wp_create_nonce( 'media-send-to-editor' ),
    			'setAttachmentThumbnail' => wp_create_nonce( 'set-attachment-thumbnail' ),
    		),
    		'post'              => array(
    			'id' => 0,
    
  • /wp-includes/script-loader.php line 550
     
    	$disable_captions = false;
    	// Runs after `tiny_mce_plugins` but before `mce_buttons`.
    	/** This filter is documented in wp-admin/includes/media.php */
    	if ( apply_filters( 'disable_captions', '' ) ) {
    		$disable_captions = true;
    	}
    
    	$toolbar1 = array(
    		'formatselect',
    		'bold',