Making WordPress.org

Changeset 9175


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.

Location:
sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2
Files:
5 edited

Legend:

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

    r8876 r9175  
    4040                                        <a href="<?php the_permalink(); ?>" rel="bookmark">
    4141                                                <span class="video-thumbnail">
    42                                                         <img src="<?php $wptv->the_video( true, true ); ?>" />
     42                                                        <?php $wptv->the_video_image( 50, null, false ); ?>
    4343                                                </span>
    4444                                                <span class="video-title"><?php the_title(); ?></span>
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/category.php

    r8451 r9175  
    4343                                        <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php echo esc_attr( sprintf(__('Permanent Link to %s', ''), get_the_title() ) ); ?>" >
    4444                                                <span class="video-thumbnail">
    45                                                         <img src="<?php $wptv->the_video( true, true ); ?>" />
     45                                                        <?php $wptv->the_video_image( 50, null, false ); ?>
    4646                                                </span>
    4747                                                <span class="video-title"><?php the_title(); ?></span>
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/front-page.php

    r8876 r9175  
    5252                                        <a href="<?php the_permalink(); ?>" rel="bookmark">
    5353                                                <span class="video-thumbnail">
    54                                                         <img src="<?php $wptv->the_video( true, true ); ?>" />
     54                                                        <?php $wptv->the_video_image( 50, null, false ); ?>
    5555                                                </span>
    5656                                                <span class="video-title"><?php the_title(); ?></span>
  • 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' ) );
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/taxonomy-event.php

    r6374 r9175  
    4848                                        <a href="<?php the_permalink(); ?>" rel="bookmark">
    4949                                                <span class="video-thumbnail">
    50                                                         <img src="<?php $wptv->the_video( true, true ); ?>" />
     50                                                        <?php $wptv->the_video_image( 50, null, false ); ?>
    5151                                                </span>
    5252                                                <span class="video-title"><?php the_title(); ?></span>
Note: See TracChangeset for help on using the changeset viewer.