Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Nick

    I just posted a reply to another YouTube question that you might find useful.

    HTH

    The embed element is deprecated in XHTML 1.0. Only Netscape needed it (R.I.P.).

    This element will invalidate your markup. But then so will a lot of other WP output.

    YouTube video links are troublesome, but once you get it figured it’s easy to knock up a template where you can just paste-in the URL. If your site always shows videos at the same size, write a simple PHP function that accepts the ID of the video as a parameter (in the snippet below, thats ‘uOzrZMhf7Ig’).

    Here’s an example I know works:

    <object width="425" height="344" type="application/x-shockwave-flash" data="http://www.youtube.com/v/uOzrZMhf7Ig&hl=en&fs=1&rel=0&border=1">

    <param name="movie" value="http://www.youtube.com/v/uOzrZMhf7Ig&hl=en&fs=1&rel=0&border=1" />

    <param name="allowFullScreen" value="true" />

    <param name="allowscriptaccess" value="always" />

    </object>

    The data attribute on the object is required. The allowFullScreen parameter is required if you use the &fs=1 (enable full-screen button) query arg.

    Notice also that the query args are escaped.

    A very useful page – YouTube APIs and Tools – YouTube Embedded Parameters.

    HTH

    Man this thing really likes to strip slahes, innit?

    Hi Peterverkooijen,

    You have a typo in that code snippet, missing a backslash: ‘|page/\d+/?$|’. The ‘d’ has to be escaped as in ‘\d’.

    See wp-includes\link-template.php, line 1321.

    ;)

Viewing 4 replies - 1 through 4 (of 4 total)
Skip to toolbar