WordPress.org

Make WordPress Core

Ticket #23929: 23929.2.patch

File 23929.2.patch, 890 bytes (added by johnbillion, 5 years ago)
  • wp-admin/edit-form-advanced.php

     
    128128
    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' );
    134134        wp_enqueue_style( 'wp-mediaelement' );
     
    439439}
    440440
    441441// post format fields
    442 if ( post_type_supports( $post_type, 'post-formats' ) )
     442if ( post_type_supports( $post_type, 'post-formats' ) && apply_filters( 'show_post_format_ui', true, $post ) )
    443443        require_once( './includes/post-formats.php' );
    444444
    445445if ( post_type_supports($post_type, 'editor') ) {