How to allow html5 tag in WordPress

Just FYI… WordPress 3.2 includes an updated TinyMCE which allows HTML5 tags. It’s still under development but is fairly stable if you want to take the risk of running it now. The alternative is to write any posts requiring the tag with the visual editor turned off. As long as you don’t turn the editor … Read more

Is there a built in function to see if a URLis oEmbed Compatible?

wp-includes/class-oembed.php has a public variable $providers. So you can build a small function to get all of them: function list_oembed_providers( $print = TRUE ) { require_once( ABSPATH . WPINC . ‘/class-oembed.php’ ); $oembed = _wp_oembed_get_object(); $print and print ‘<pre>’ . htmlspecialchars( var_export( $oembed->providers, TRUE ) ) . ‘</pre>’; return $oembed->providers; } If you call this … Read more

How to use the new wp_read_video_metadata function

Can this function be used to read the metadata on my videos hosted on Amazon S3, basically can this function be used for external video and audio? I don’t think so. The WordPress code uses the PHP function file_exists() which doesn’t say it cannot check external files. The ID3 code, however, tries to determine the … Read more

Video shortcode – autoplay all videos

I ran into this problem while trying to make HTML videos behave like GIFs. WordPress’s built-in video player uses HTML video elements but does not allow videos to play simultaneously. Instead of using the default WordPress video player (which is best used for more standard video content), I chose to manually use the <video> element … Read more

disable video URL auto-embedding for a part of the post

Well… To embed a video or another object into a post or page, place its URL into the content area. Make sure the URL is on its own line and not hyperlinked (clickable when viewing the post). https://codex.wordpress.org/Embeds#What_About_oEmbed_Discovery.3F So, to “disable” embedding the simplest thing is to make sure the URL isn’t on a line … Read more

How to check If Oembed is empty or not

The wp_oembed_get() only works for supported oEmbed providers. The return value is also is a URL of false, as mentioned per codex: If $url is a valid url to a supported provider, the function returns the embed code provided to it from the oEmbed protocol. Otherwise, it will return false. Therefore, is the input is … Read more

Getting a thumbnail for an external video as the thumbnail for a custom post type?

You can use the Blip TV API: http://wiki.blip.tv/index.php/Blip.tv_API Look for “How do I find the thumbnail for an item?” Examples of the API can be found in the wiki e.g. the PHP Example: include_once(“blipPHP.php”); $blipPHP = new blipPHP(“username”, “password”); $respond = $blipPHP->info(4794325); returns a LONG array. Inside this you find: [3] => SimpleXMLElement Object ( … Read more

Escaping Quotes

WordPress emulates magic_quotes_gpc and won’t be deprecating this for some time due to concerns over plugin security and backward compatibility. To work around this, you need to use stripslashes() or, if you need to strip slashes when data arrives via $_POST, $_GET, $_COOKIE, and $_REQUEST arrays, you can use the WordPress stripslashes_deep() function: http://codex.wordpress.org/Function_Reference/stripslashes_deep

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)