WordPress.org

Make WordPress Core

Changeset 23946


Ignore:
Timestamp:
04/09/13 22:43:28 (12 months ago)
Author:
ryan
Message:

Allow turning off the post formats UI via a show_post_format_ui filter.

Props johnbillion
see #23929

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r23929 r23946  
    129129// post format 
    130130$format_class = ''; 
    131 if ( post_type_supports( $post_type, 'post-formats' ) ) { 
     131if ( post_type_supports( $post_type, 'post-formats' ) && apply_filters( 'show_post_format_ui', true, $post ) ) { 
    132132    wp_enqueue_script( 'post-formats' ); 
    133133    wp_enqueue_script( 'wp-mediaelement' ); 
     
    451451 
    452452// post format fields 
    453 if ( post_type_supports( $post_type, 'post-formats' ) ) 
     453if ( post_type_supports( $post_type, 'post-formats' ) && apply_filters( 'show_post_format_ui', true, $post ) ) 
    454454    require_once( './includes/post-formats.php' ); 
    455455 
Note: See TracChangeset for help on using the changeset viewer.