WordPress.org

Make WordPress Core

Ticket #24009: 24009.9.diff

File 24009.9.diff, 3.2 KB (added by wonderboymusic, 12 months ago)
  • wp-admin/includes/post-formats.php

    diff --git wp-admin/includes/post-formats.php wp-admin/includes/post-formats.php
    index 6304446..ac4c749 100644
    $format_meta = get_post_format_meta( $post_ID ); 
    1010        <input type="hidden" name="post_format" id="post_format" value="<?php echo esc_attr( $post_format ); ?>" /> 
    1111 
    1212        <div class="field wp-format-quote"> 
    13                 <label for="wp_format_quote"><?php _e( 'Quote' ); ?></label> 
    14                 <textarea id="wp_format_quote" name="_format_quote" class="widefat"><?php echo esc_textarea( $format_meta['quote'] ); ?></textarea> 
    15         </div> 
    16  
    17         <div class="field wp-format-quote"> 
    1813                <label for="wp_format_quote_source"><?php _e( 'Quote source' ); ?></label> 
    1914                <input type="text" id="wp_format_quote_source" name="_format_quote_source_name" value="<?php echo esc_attr( $format_meta['quote_source_name'] ); ?>" class="widefat" /> 
    2015        </div> 
  • wp-admin/includes/post.php

    diff --git wp-admin/includes/post.php wp-admin/includes/post.php
    index 40e9fa5..1f66ad2 100644
    function edit_post( $post_data = null ) { 
    202202                        update_post_meta( $post_ID, $keyed, wp_slash( esc_url_raw( wp_unslash( $post_data[ $keyed ] ) ) ) ); 
    203203        } 
    204204 
    205         $format_keys = array( 'quote', 'quote_source_name', 'image', 'gallery', 'audio_embed', 'video_embed' ); 
     205        $format_keys = array( 'quote_source_name', 'image', 'gallery', 'audio_embed', 'video_embed' ); 
    206206 
    207207        foreach ( $format_keys as $key ) { 
    208208                $keyed = '_format_' . $key; 
  • wp-includes/post-formats.php

    diff --git wp-includes/post-formats.php wp-includes/post-formats.php
    index b993183..9bafb73 100644
    function set_post_format( $post, $format ) { 
    8282 */ 
    8383function get_post_format_meta( $post_id = 0 ) { 
    8484        $meta = get_post_meta( $post_id ); 
    85         $keys = array( 'quote', 'quote_source_name', 'quote_source_url', 'link_url', 'gallery', 'audio_embed', 'video_embed', 'url', 'image' ); 
     85        $keys = array( 'quote_source_name', 'quote_source_url', 'link_url', 'gallery', 'audio_embed', 'video_embed', 'url', 'image' ); 
    8686 
    8787        if ( empty( $meta ) ) 
    8888                return array_fill_keys( $keys, '' ); 
    function post_formats_compat( $content, $id = 0 ) { 
    401401                        break; 
    402402 
    403403                case 'quote': 
    404                         if ( ! empty( $meta['quote'] ) && ! stristr( $content, $meta['quote'] ) ) { 
    405                                 $quote = sprintf( '<blockquote>%s</blockquote>', wpautop( $meta['quote'] ) ); 
     404                        $quote = get_content_quote( $content, true ); 
     405                        if ( ! empty( $quote ) ) { 
     406                                $quote = sprintf( '<blockquote>%s</blockquote>', wpautop( $quote ) ); 
    406407                                if ( ! empty( $meta['quote_source_name'] ) ) { 
    407408                                        $source = ( empty( $meta['quote_source_url'] ) ) ? $meta['quote_source_name'] : sprintf( '<a href="%s">%s</a>', esc_url( $meta['quote_source_url'] ), $meta['quote_source_name'] ); 
    408409                                        $quote .= sprintf( '<figcaption class="quote-caption">%s</figcaption>', $source ); 
  • wp-includes/revision.php

    diff --git wp-includes/revision.php wp-includes/revision.php
    index 439f81e..eb2a9c3 100644
    function _wp_post_revision_meta_keys() { 
    7272                '_format_link_url', 
    7373                '_format_quote_source_url', 
    7474                '_format_quote_source_name', 
    75                 '_format_quote', 
    7675                '_format_image', 
    7776                '_format_gallery', 
    7877                '_format_audio_embed',