Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: disable_captions

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
1010
1011           <span class="setting alt-text has-description">
1012                <label for="embed-image-settings-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label>
1013                <input type="text" id="embed-image-settings-alt-text" data-setting="alt" aria-describedby="alt-text-description" />
1014           </span>
1015           <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
1016
1017           <?php
1018           /** This filter is documented in wp-admin/includes/media.php */
1019           if ( ! apply_filters( 'disable_captions', '' ) ) :
1020                ?>
1021                <span class="setting caption">
1022                     <label for="embed-image-settings-caption" class="name"><?php _e( 'Caption' ); ?></label>
1023                     <textarea id="embed-image-settings-caption" data-setting="caption"></textarea>
1024                </span>
1025           <?php endif; ?>
1026
1027           <fieldset class="setting-group">
1028                <legend class="name"><?php _e( 'Align' ); ?></legend>
 
Line Code
1073                     <div class="column-settings">
1074                          <span class="setting alt-text has-description">
1075                               <label for="image-details-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label>
1076                               <input type="text" id="image-details-alt-text" data-setting="alt" value="{{ data.model.alt }}" aria-describedby="alt-text-description" />
1077                          </span>
1078                          <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
1079
1080                          <?php
1081                          /** This filter is documented in wp-admin/includes/media.php */
1082                          if ( ! apply_filters( 'disable_captions', '' ) ) :
1083                               ?>
1084                               <span class="setting caption">
1085                                    <label for="image-details-caption" class="name"><?php _e( 'Caption' ); ?></label>
1086                                    <textarea id="image-details-caption" data-setting="caption">{{ data.model.caption }}</textarea>
1087                               </span>
1088                          <?php endif; ?>
1089
1090                          <h2><?php _e( 'Display Settings' ); ?></h2>
1091                          <fieldset class="setting-group">