WordPress.org

Make WordPress Core

Ticket #23927: 23927.diff

File 23927.diff, 7.6 KB (added by markjaquith, 5 years ago)
  • wp-content/themes/twentyeleven/functions.php

    endif; // twentyeleven_content_nav 
    465465 * @return string
    466466 */
    467467function twentyeleven_get_first_url() {
    468         $has_url = function_exists( 'get_the_url' ) ? get_the_url() : false;
     468        $has_url = function_exists( 'get_the_post_format_url' ) ? get_the_post_format_url() : false;
    469469
    470470        if ( ! $has_url )
    471471                $has_url = twentyeleven_url_grabber();
  • wp-content/themes/twentythirteen/content-audio.php

     
    2121
    2222        <div class="entry-media">
    2323                <div class="audio-content">
    24                         <?php the_audio(); ?>
     24                        <?php the_post_format_audio(); ?>
    2525                </div><!-- .audio-content -->
    2626        </div><!-- .entry-media -->
    2727
  • wp-content/themes/twentythirteen/content-chat.php

     
    2020        </header><!-- .entry-header -->
    2121
    2222        <div class="entry-content">
    23                 <?php the_chat(); ?>
     23                <?php the_post_format_chat(); ?>
    2424                <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    2525        </div><!-- .entry-content -->
    2626
  • wp-content/themes/twentythirteen/content-video.php

     
    1010
    1111<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1212        <div class="entry-media">
    13                 <?php the_video(); ?>
     13                <?php the_post_format_video(); ?>
    1414        </div><!-- .entry-media -->
    1515
    1616        <header class="entry-header">
  • wp-content/themes/twentythirteen/functions.php

    endif; 
    440440 * @return string URL
    441441 */
    442442function twentythirteen_get_link_url() {
    443         $has_url = get_the_url();
     443        $has_url = get_the_post_format_url();
    444444
    445445        return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
    446446}
  • wp-includes/media.php

    wp_embed_register_handler( 'wp_video_embed', '#https?://.+?\.(' . join( '|', wp_ 
    20312031 * @param WP_Post $post Optional. Used instead of global $post when passed.
    20322032 * @return string
    20332033 */
    2034 function get_the_media( $type, &$post = null ) {
     2034function get_the_post_format_media( $type, &$post = null ) {
    20352035        global $wp_embed;
    20362036
    20372037        if ( empty( $post ) )
    function get_the_media( $type, &$post = null ) { 
    21182118 * @since 3.6.0
    21192119 *
    21202120 */
    2121 function the_video() {
    2122         echo get_the_media( 'video' );
     2121function the_post_format_video() {
     2122        echo get_the_post_format_media( 'video' );
    21232123}
    21242124/**
    21252125 * Output the first audio  in the current (@global) post's content
    function the_video() { 
    21272127 * @since 3.6.0
    21282128 *
    21292129 */
    2130 function the_audio() {
    2131         echo get_the_media( 'audio' );
     2130function the_post_format_audio() {
     2131        echo get_the_post_format_media( 'audio' );
    21322132}
    21332133
    21342134/**
    function get_post_gallery_images( $post_id = 0 ) { 
    23602360 * @param string $attached_size If an attached image is found, the size to display it.
    23612361 * @param WP_Post $post Optional. Used instead of global $post when passed.
    23622362 */
    2363 function get_the_image( $attached_size = 'full', &$post = null ) {
     2363function get_the_post_format_image( $attached_size = 'full', &$post = null ) {
    23642364        if ( empty( $post ) )
    23652365                $post = get_post();
    23662366
    function get_the_image( $attached_size = 'full', &$post = null ) { 
    24352435 *
    24362436 * @param string $attached_size If an attached image is found, the size to display it.
    24372437 */
    2438 function the_image( $attached_size = 'full' ) {
    2439         echo get_the_image( $attached_size );
     2438function the_post_format_image( $attached_size = 'full' ) {
     2439        echo get_the_post_format_image( $attached_size );
    24402440}
     2441 No newline at end of file
  • wp-includes/post-formats.php

    function get_content_chat( &$content, $remove = false ) { 
    574574 * @param int $id Optional. Post ID
    575575 * @return array
    576576 */
    577 function get_the_chat( $id = 0 ) {
     577function get_the_post_format_chat( $id = 0 ) {
    578578        $post = empty( $id ) ? clone get_post() : get_post( $id );
    579579        if ( empty( $post ) )
    580580                return array();
    function get_the_chat( $id = 0 ) { 
    592592 *
    593593 * @since 3.6.0
    594594 *
    595  * @uses get_the_chat()
     595 * @uses get_the_post_format_chat()
    596596 *
    597597 * @print HTML
    598598 */
    599 function the_chat() {
     599function the_post_format_chat() {
    600600        $output  = '<dl class="chat">';
    601         $stanzas = get_the_chat();
     601        $stanzas = get_the_post_format_chat();
    602602
    603603        foreach ( $stanzas as $stanza ) {
    604604                foreach ( $stanza as $row ) {
    function get_content_url( &$content, $remove = false ) { 
    673673 * @param int $id Optional. Post ID.
    674674 * @return string A URL, if found.
    675675 */
    676 function get_the_url( $id = 0 ) {
     676function get_the_post_format_url( $id = 0 ) {
    677677        $post = empty( $id ) ? get_post() : get_post( $id );
    678678        if ( empty( $post ) )
    679679                return '';
    function get_the_url( $id = 0 ) { 
    681681        if ( in_array( get_post_format( $post->ID ), array( 'link', 'quote' ) ) ) {
    682682                $meta = get_post_format_meta( $post->ID );
    683683                if ( ! empty( $meta['url'] ) )
    684                         return apply_filters( 'get_the_url', esc_url_raw( $meta['url'] ), $post );
     684                        return apply_filters( 'get_the_post_format_url', esc_url_raw( $meta['url'] ), $post );
    685685        }
    686686
    687687        if ( ! empty( $post->post_content ) )
    688                 return apply_filters( 'get_the_url', get_content_url( $post->post_content ), $post );
     688                return apply_filters( 'get_the_post_format_url', get_content_url( $post->post_content ), $post );
    689689}
    690690
    691691/**
    function get_the_url( $id = 0 ) { 
    694694 * @since 3.6.0
    695695 *.
    696696 */
    697 function the_url() {
    698         echo esc_url( get_the_url() );
     697function the_post_format_url() {
     698        echo esc_url( get_the_post_format_url() );
    699699}
    700700
    701701/**
  • wp-includes/query.php

    function setup_postdata($post) { 
    36973697        if ( $format && in_array( $format, array( 'image', 'audio', 'video' ) ) ) {
    36983698                switch ( $format ) {
    36993699                case 'image':
    3700                         get_the_image( 'full', $post );
     3700                        get_the_post_format_image( 'full', $post );
    37013701                        if ( isset( $post->split_content ) )
    37023702                                $split_content = $post->split_content;
    37033703                        break;
    37043704                case 'audio':
    3705                         get_the_media( 'audio', $post );
     3705                        get_the_post_format_media( 'audio', $post );
    37063706                        if ( isset( $post->split_content ) )
    37073707                                $split_content = $post->split_content;
    37083708                        break;
    37093709                case 'video':
    3710                         get_the_media( 'video', $post );
     3710                        get_the_post_format_media( 'video', $post );
    37113711                        if ( isset( $post->split_content ) )
    37123712                                $split_content = $post->split_content;
    37133713                        break;