Skip to content

Remove YouTube alignment CSS in feeds#3438

Merged
zinigor merged 2 commits intomasterfrom
fix/remove-youtube-span
Mar 2, 2016
Merged

Remove YouTube alignment CSS in feeds#3438
zinigor merged 2 commits intomasterfrom
fix/remove-youtube-span

Conversation

@philipjohn
Copy link
Copy Markdown
Contributor

Changes proposed in this Pull Request:

  • Remove the span wrapped around YouTube videos when outputting feeds

Philip John added 2 commits February 23, 2016 12:39
We wrap YouTube videos in a span for some CSS alignment stuff. We don't need that in feeds, and it could muck up other plugins so let's remove it.
@jeherve jeherve added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Shortcodes / Embeds [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Feb 24, 2016
@jeherve jeherve added this to the 3.9.3 milestone Feb 24, 2016
$html = "<iframe class='youtube-player' type='text/html' width='$w' height='$h' src='" . esc_url( set_url_scheme( "http://www.youtube.com/embed/videoseries?list=$id&hl=en_US" ) ) . "' frameborder='0' allowfullscreen='true'></iframe>";
} else {
$html = "<span class='embed-youtube' style='$alignmentcss display: block;'><iframe class='youtube-player' type='text/html' width='$w' height='$h' src='" . esc_url( set_url_scheme( "http://www.youtube.com/embed/$id?version=3&rel=$rel&fs=1$fmt$autohide&showsearch=$search&showinfo=$info&iv_load_policy=$iv$start$end$hd&wmode=$wmode$theme$autoplay{$cc}{$cc_lang}" ) ) . "' frameborder='0' allowfullscreen='true'></iframe></span>";
$html = "<iframe class='youtube-player' type='text/html' width='$w' height='$h' src='" . esc_url( set_url_scheme( "http://www.youtube.com/embed/$id?version=3&rel=$rel&fs=1$fmt$autohide&showsearch=$search&showinfo=$info&iv_load_policy=$iv$start$end$hd&wmode=$wmode$theme$autoplay{$cc}{$cc_lang}" ) ) . "' frameborder='0' allowfullscreen='true'></iframe>";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In lines 296 and 298 the frameborder attribute is obsolete in HTML 5 and it will throw an error on validation. It should be removed. If necessary, it can be replaced with a CSS style or maybe introducing the seamless attribute.

@philipjohn
Copy link
Copy Markdown
Contributor Author

@eliorivero I feel like we should punt that to a separate issue, what do you think?

@dereksmart dereksmart added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Feb 29, 2016
@zinigor zinigor merged this pull request into master Mar 2, 2016
@zinigor zinigor removed the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 2, 2016
@eliorivero eliorivero deleted the fix/remove-youtube-span branch March 2, 2016 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Shortcodes / Embeds Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants