Make WordPress Core


Ignore:
Timestamp:
11/21/2012 02:27:22 PM (11 years ago)
Author:
koopersmith
Message:

Media: Backwards compatibility for the disable_captions filter. see #22186, #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r22747 r22761  
    13281328        'tabUrl'    => add_query_arg( array( 'chromeless' => true ), admin_url('media-upload.php') ),
    13291329        'mimeTypes' => wp_list_pluck( get_post_mime_types(), 0 ),
     1330        'captions'  => ! apply_filters( 'disable_captions', '' ),
    13301331    );
    13311332
     
    16921693        </div>
    16931694
    1694         <label class="setting caption">
    1695             <span><?php _e('Caption'); ?></span>
    1696             <textarea data-setting="caption" />
    1697         </label>
     1695        <?php if ( ! apply_filters( 'disable_captions', '' ) ) : ?>
     1696            <label class="setting caption">
     1697                <span><?php _e('Caption'); ?></span>
     1698                <textarea data-setting="caption" />
     1699            </label>
     1700        <?php endif; ?>
    16981701
    16991702        <label class="setting alt-text">
Note: See TracChangeset for help on using the changeset viewer.