PressThis: make sure buttons.css is loaded before press-this.css. Use (int) $post_ID instead of $post->ID.

See #31373.
Built from https://develop.svn.wordpress.org/trunk@31597


git-svn-id: http://core.svn.wordpress.org/trunk@31578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-03-02 00:58:25 +00:00
parent 3a124ac2f4
commit c22307fd9a
3 changed files with 5 additions and 5 deletions

View File

@ -723,10 +723,10 @@ class WP_Press_This {
$post = get_default_post_to_edit( 'post', true );
$post_ID = (int) $post->ID;
wp_enqueue_media( array( 'post' => $post_ID ) );
wp_enqueue_style( 'press-this' );
wp_enqueue_script( 'press-this' );
wp_enqueue_script( 'json2' );
wp_enqueue_media( array( 'post' => $post->ID ) );
wp_enqueue_script( 'editor' );
$supports_formats = false;
@ -735,7 +735,7 @@ class WP_Press_This {
if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) {
$supports_formats = true;
if ( ! ( $post_format = get_post_format( $post->ID ) ) ) {
if ( ! ( $post_format = get_post_format( $post_ID ) ) ) {
$post_format = 0;
}
}
@ -794,7 +794,7 @@ $admin_body_classes = apply_filters( 'admin_body_class', '' );
</div>
<form id="pressthis-form" name="pressthis-form" method="POST" autocomplete="off">
<input type="hidden" name="post_ID" id="post_ID" value="<?php echo esc_attr( $post_ID ); ?>" />
<input type="hidden" name="post_ID" id="post_ID" value="<?php echo $post_ID; ?>" />
<input type="hidden" name="action" value="press-this-save-post" />
<input type="hidden" name="post_status" id="post_status" value="draft" />
<?php

View File

@ -653,7 +653,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'wp-color-picker', "/wp-admin/css/color-picker$suffix.css" );
$styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) );
$styles->add( 'customize-widgets', "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );
$styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array( 'open-sans' ) );
$styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array( 'open-sans', 'buttons' ) );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css" );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31596';
$wp_version = '4.2-alpha-31597';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.