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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user