Fix incorrect script handle and a notice. props ocean90. fixes #23896.
git-svn-id: https://develop.svn.wordpress.org/trunk@23868 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1a96cb8355
commit
3739c3a14e
|
@ -138,9 +138,8 @@ if ( post_type_supports( $post_type, 'post-formats' ) ) {
|
||||||
$post_format = 'standard';
|
$post_format = 'standard';
|
||||||
|
|
||||||
$format_class = " class='wp-format-{$post_format}'";
|
$format_class = " class='wp-format-{$post_format}'";
|
||||||
}
|
|
||||||
|
|
||||||
if ( post_type_supports( $post_type, 'post-formats' ) ) {
|
|
||||||
$all_post_formats = array(
|
$all_post_formats = array(
|
||||||
'standard' => array (
|
'standard' => array (
|
||||||
'description' => __( 'Add a title and use the editor to compose your post.' )
|
'description' => __( 'Add a title and use the editor to compose your post.' )
|
||||||
|
@ -186,10 +185,10 @@ if ( post_type_supports( $post_type, 'post-formats' ) ) {
|
||||||
|
|
||||||
$post_format_options .= '<a ' . $class . ' href="?format=' . $slug . '" data-description="' . $attr['description'] . '" data-wp-format="' . $slug . '" title="' . ucfirst( sprintf( __( '%s Post' ), $slug ) ) . '"><div class="' . $slug . '"></div></a>';
|
$post_format_options .= '<a ' . $class . ' href="?format=' . $slug . '" data-description="' . $attr['description'] . '" data-wp-format="' . $slug . '" title="' . ucfirst( sprintf( __( '%s Post' ), $slug ) ) . '"><div class="' . $slug . '"></div></a>';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$current_post_format = array( 'currentPostFormat' => esc_html( $active_post_type_slug ) );
|
$current_post_format = array( 'currentPostFormat' => esc_html( $active_post_type_slug ) );
|
||||||
wp_localize_script( 'post', 'postFormats', $current_post_format );
|
wp_localize_script( 'post-formats', 'postFormats', $current_post_format );
|
||||||
|
}
|
||||||
|
|
||||||
if ( post_type_supports($post_type, 'page-attributes') )
|
if ( post_type_supports($post_type, 'page-attributes') )
|
||||||
add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core');
|
add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core');
|
||||||
|
|
Loading…
Reference in New Issue