Make WordPress Core


Ignore:
Timestamp:
03/02/2015 12:57:34 AM (9 years ago)
Author:
azaozz
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-press-this.php

    r31596 r31597  
    724724        $post_ID = (int) $post->ID;
    725725
     726        wp_enqueue_media( array( 'post' => $post_ID ) );
    726727        wp_enqueue_style( 'press-this' );
    727728        wp_enqueue_script( 'press-this' );
    728729        wp_enqueue_script( 'json2' );
    729         wp_enqueue_media( array( 'post' => $post->ID ) );
    730730        wp_enqueue_script( 'editor' );
    731731
     
    736736            $supports_formats = true;
    737737
    738             if ( ! ( $post_format = get_post_format( $post->ID ) ) ) {
     738            if ( ! ( $post_format = get_post_format( $post_ID ) ) ) {
    739739                $post_format = 0;
    740740            }
     
    795795
    796796    <form id="pressthis-form" name="pressthis-form" method="POST" autocomplete="off">
    797         <input type="hidden" name="post_ID" id="post_ID" value="<?php echo esc_attr( $post_ID ); ?>" />
     797        <input type="hidden" name="post_ID" id="post_ID" value="<?php echo $post_ID; ?>" />
    798798        <input type="hidden" name="action" value="press-this-save-post" />
    799799        <input type="hidden" name="post_status" id="post_status" value="draft" />
Note: See TracChangeset for help on using the changeset viewer.