Make WordPress Core

Changeset 31597


Ignore:
Timestamp:
03/02/2015 12:57:34 AM (12 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.

Location:
trunk/src
Files:
2 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" />
  • trunk/src/wp-includes/script-loader.php

    r31595 r31597  
    654654        $styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) );
    655655        $styles->add( 'customize-widgets',  "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );
    656         $styles->add( 'press-this',         "/wp-admin/css/press-this$suffix.css", array( 'open-sans' ) );
     656        $styles->add( 'press-this',         "/wp-admin/css/press-this$suffix.css", array( 'open-sans', 'buttons' ) );
    657657
    658658        $styles->add( 'ie',                 "/wp-admin/css/ie$suffix.css" );
Note: See TracChangeset for help on using the changeset viewer.