herb miller

WordPress plugin specialist

  • Home
  • About
    • Online CV
    • Contact
    • Find me
  • Shop
    • Seriously Bonkers – softback book
    • Seriously Bonkers – signed book
    • Seriously Bonkers – PDF
  • Dev env
    • Local development
    • WordPress plugins
    • Server environments
    • Development hardware
    • WAMP configuration
    • Tools and languages
    • What’s not in my development environment?
    • Anything else in your development toolkit?
  • Sites
H2GD Part 38: YouTube oembed returning unexpected ‘)’

H2GD Part 38: YouTube oembed returning unexpected ‘)’

Today I noticed that YouTube videos embedded directly into WordPress were displaying an unexpected ) after the video. I mentioned it on the WordPress IRC; apparently it’s a YouTube bug… thanks Clorith.

Here’s a simple fix, which I wrote as a plugin called youtube_oembed_fix, but you could implement in your theme’s functions.php file.

add_filter( 'oembed_result', "ytoef_ytoef", 11, 3 );

function ytoef_ytoef( $html, $url, $args ) {
  $html = rtrim( $html, ")");
  return( $html );
}

The above is not implemented on this site. So I would have expected the unwanted ) to have appeared until YouTube implement the fix.

However, I have Jetpack installed, with the Shortcode Embeds module Activated. And Jetpack’s code is hiding the problem.

Hurrah or boo, depending on your point of view.

Categories: H2GD, programming, WordPressTags: jetpack, oembed, video, YouTube

Published: March 13, 2014 | Last updated: August 18, 2014

Products

  • Seriously Bonkers - signed book £8.99 £5.99
  • Seriously Bonkers - PDF £1.00
  • Seriously Bonkers - softback book £8.99 £4.99

Recent Posts

  • Slog-bloat – server performance testing
  • WebP for my iPad
  • Image size reduction by quality
  • Localization of Full Site Editing themes
  • Fizzie – an experimental Full Site Editing theme

Recent Comments

  • Aprende gutenberg #49 - Aprende gutenberg on SB Children block – my first Single Block plugin
  • Richard Cagle on Installing Imagick for PHP 7 on Windows 10
  • WordCamp Birmingham on bucket list – WordCamp Birmingham UK 2015 (#wcbrum)
  • mick on WordPress capabilities: How to restrict Add New while allowing Edit
  • mick on WooCommerce 2.2.4 – Dynamic API Reference

Archives

Categories

WordPress 5.6.1. PHP: 7.3.27

WordPress version: 5.6.1

Gutenberg version: 9.9.3

Tide times from tidetimes.co.uk

Tide Times & Heights for Northney onTuesday, 23 February 2021
Low Tide:02:12 ( 1.90m )
High Tide:08:49 ( 3.60m )
Low Tide:14:36 ( 1.60m )
High Tide:21:28 ( 3.70m )

Tide times from tidetimes.org.uk

Tide Times & Heights for Northney on 24th February 2021
02:47 - Low Tide ( 1.60m )
09:40 - High Tide ( 3.95m )
15:06 - Low Tide ( 1.19m )
22:13 - High Tide ( 4.08m )

Follow me

  • Home
  • About
  • Blog
  • Contact
  • Find me
  • Privacy notice
  • Sitemap

Site:  herbmiller.me
© Copyright herb miller 2012-2021. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress