Making WordPress.org


Ignore:
Timestamp:
10/14/2019 01:24:16 AM (7 years ago)
Author:
dd32
Message:

WordPress.TV: Switch to using $wptv->the_video_image() for thumbnails, deprecating the thumbnail code in $wptv->the_video() which was no longer working.

Fixes #4761.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/functions.php

    r9032 r9175  
    574574     * @global WP_Post $post
    575575     * @global string  $originalcontent
    576      *
    577      * @param bool $thumb
    578      * @param bool $no_html
    579      */
    580     function the_video( $thumb = false, $no_html = false ) {
    581         $image = $video = '';
     576     */
     577    function the_video() {
     578        $video = '';
    582579        global $post, $originalcontent;
    583580        $originalcontent = $post->post_content;
     
    590587            if ( 'wpvideo' == $shortcode[2] ) {
    591588                $attributes = shortcode_parse_atts( $shortcode[0] );
    592                 $image      = video_image_url_by_guid( rtrim( $attributes[1], ']' ), 'fmt_dvd' ); // dvd image has width = 640
    593589                $hd_param   = '';
    594590
     
    603599        }
    604600
    605         // Output results
    606         if ( $thumb ) {
    607             if ( ! $no_html ) {
    608                 $image = '<img width="650" src="' . esc_url( $image ) . '" alt="' . esc_attr( $post->post_title ) . '" />';
    609             }
    610             echo $image;
    611         } else {
    612             echo $video;
    613         }
     601        echo $video;
    614602
    615603        add_filter( 'the_content', array( $this, 'remove_shortcodes' ) );
Note: See TracChangeset for help on using the changeset viewer.