- Timestamp:
- 10/14/2019 01:24:16 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/functions.php
r9032 r9175 574 574 * @global WP_Post $post 575 575 * @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 = ''; 582 579 global $post, $originalcontent; 583 580 $originalcontent = $post->post_content; … … 590 587 if ( 'wpvideo' == $shortcode[2] ) { 591 588 $attributes = shortcode_parse_atts( $shortcode[0] ); 592 $image = video_image_url_by_guid( rtrim( $attributes[1], ']' ), 'fmt_dvd' ); // dvd image has width = 640593 589 $hd_param = ''; 594 590 … … 603 599 } 604 600 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; 614 602 615 603 add_filter( 'the_content', array( $this, 'remove_shortcodes' ) );
Note: See TracChangeset
for help on using the changeset viewer.