- Timestamp:
- 10/05/2017 12:21:27 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-media-video.php
r41640 r41759 122 122 } 123 123 124 add_filter( 'wp_video_shortcode', array( $this, 'inject_video_max_width_style' ) ); 125 126 echo wp_video_shortcode( 127 array_merge( 128 $instance, 129 compact( 'src' ) 130 ), 131 $instance['content'] 132 ); 133 134 remove_filter( 'wp_video_shortcode', array( $this, 'inject_video_max_width_style' ) ); 124 if ( $attachment ) { 125 add_filter( 'wp_video_shortcode', array( $this, 'inject_video_max_width_style' ) ); 126 127 echo wp_video_shortcode( 128 array_merge( 129 $instance, 130 compact( 'src' ) 131 ), 132 $instance['content'] 133 ); 134 135 remove_filter( 'wp_video_shortcode', array( $this, 'inject_video_max_width_style' ) ); 136 } else { 137 echo $this->inject_video_max_width_style( wp_oembed_get( $src ) ); 138 } 135 139 } 136 140 … … 228 232 <p><?php _e( 'Unable to preview media due to an unknown error.' ); ?></p> 229 233 </div> 230 <# } else if ( data.is_ hosted_embed && data.model.poster ) { #>234 <# } else if ( data.is_oembed && data.model.poster ) { #> 231 235 <a href="{{ data.model.src }}" target="_blank" class="media-widget-video-link"> 232 236 <img src="{{ data.model.poster }}" /> 233 237 </a> 234 <# } else if ( data.is_ hosted_embed ) { #>238 <# } else if ( data.is_oembed ) { #> 235 239 <a href="{{ data.model.src }}" target="_blank" class="media-widget-video-link no-poster"> 236 240 <span class="dashicons dashicons-format-video"></span>
Note: See TracChangeset
for help on using the changeset viewer.