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

Props johnbillion
see #23929


git-svn-id: https://develop.svn.wordpress.org/trunk@23946 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2013-04-09 22:43:28 +00:00
parent be00e2b9cd
commit f69b7492e4
1 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ foreach ( get_object_taxonomies( $post ) as $tax_name ) {
// post format
$format_class = '';
if ( post_type_supports( $post_type, 'post-formats' ) ) {
if ( post_type_supports( $post_type, 'post-formats' ) && apply_filters( 'show_post_format_ui', true, $post ) ) {
wp_enqueue_script( 'post-formats' );
wp_enqueue_script( 'wp-mediaelement' );
wp_enqueue_style( 'wp-mediaelement' );
@ -450,7 +450,7 @@ if ( has_action( 'edit_form_after_title' ) ) {
}
// post format fields
if ( post_type_supports( $post_type, 'post-formats' ) )
if ( post_type_supports( $post_type, 'post-formats' ) && apply_filters( 'show_post_format_ui', true, $post ) )
require_once( './includes/post-formats.php' );
if ( post_type_supports($post_type, 'editor') ) {