=== Embedder === Contributors: Mike Walker Donate link: http://moztools.com/wordpress/embedder-plugin/ Tags: embed, html, embedder, embed html, imbed, include, shortcode, shortcodes, macros, macro, substitution, moztools, comments, widgets Requires at least: 2.5 Tested up to: 3.0.1 Stable tag: 1.2 Embed HTML into your blog's posts, pages, titles, comments, and widgets with this powerful, easy-to-use plugin. == Description == Create **local HTML embeds** for blog post simply by adding one or more **custom fields**. Any custom field name enclosed in square brackets **[]** will be recognized as an embed when used in the post. For example, you can quickly create your own tag language for posts (and comments) by adding custom fields like **[b]**, **[i]**, **[quote]**, **[link]**, etc. And embed YouTube videos, Google Maps, Facebook and Twitter buttons, and much more in a matter of a few seconds. Embed attributes makes it easy to add much more flexibility to your embeds. For example, to highlight any text in your posts (and comments), just add the following custom field: Name: [color] Value: %content% Then, in your posts, you can use the embed like this: The quick [color col="brown"]brown[color] fox jumps over the [color col="yellow"]lazy dog[/color]. The **%col%** attribute is replaced by the value you set, and the special **%content%** attribute is replaced by the text between the open and close embed tags. If you want to use your embeds in all your posts, or use them in your sidebar widgets, you can create **global HTML embeds** using the *Manage Embeds* settings page, and take advantage of the following advanced features: * Use embed attributes to increase the flexibility of your embedded HTML. * Nested embeds (including a workaround to WordPress's nested shortcode problems) * Set default values for your attributes. * Use embeds in titles and comments too. * Auto-embed HTML at the top and bottom of blog posts and pages. * Include or exclude auto-embeds from posts/pages based on tags, categories, or parent pages. * Wrap your embeds in a *div* or *span* to modify an embed's position or appearance. * Call out to a user-specified PHP function to generate the embed's HTML for you. * Use global embeds in sidebar widgets too, including widget titles. * Embed groups -- group your global embeds to keep them organized * Import and export embeds. Share your embeds with others, or make backups for safekeeping. * **NEW!** Support for embedding all unicode characters (e.g. Chinese, Arabic, Hebrew, etc). * **NEW!** Wrap embeds with individual CSS styles. For more information, go to the [Embedder Plugin's Home Page](http://moztools.com/wordpress/embedder-plugin/) where you will find extensive documentation for the plugin, and the [Embedder Plugin Support Forum](http://moztools.com/wordpress/embedder-plugin/support-forum/). If you decide the Embedder a whirl, please let me know how you get on by leaving feedback in the [Embedder Plugin Support Forum](http://moztools.com/wordpress/embedder-plugin/support-forum/). There is no need to register, just go there and post your comments. == Installation == Installation Instructions: 1. Navigate to the **Plugins** >> **Add New** page in your blog's administration section. 1. Search for **Embedder**. 1. Locate the plugin in the list then click **Install** and follow the on-screen instructions. Getting Started: [Click here](http://moztools.com/wordpress/embedder-plugin/quick-start-local-embeds/) for a quick start guide to creating your first embed. == Frequently Asked Questions == = Why does the "Active Versions" pie chart show people using versions newer than this one? = Beats me! Every time I look at that pie chart on the Stats page, it's wildly different. Hopefully, it will settle down in time, but for now, just ignore it, and know that the newest version is always the one listed on the right-hand side of Embedder's Home Page in the Plugin Repository. = If I put two embeds right next to each other in a post (e.g. [myvid][mylink]) the second embed doesn't work. Why not? = The plugin uses the WordPress shortcode feature to do the embedding, and there is a long-standing bug in the shortcode parser where it skips past the first character after the end of a embed tag, so it misses the second embed completely. To prevent this problem from occuring, leave at least one space (or any character) between each embed tag: e.g. *[myvid] [mylink]* If the extra character messes up your formatting, you can use an empty HTML tag instead e.g. *[myvid]<em></em>[mylink]* though you have to be careful that the editor you are using does not strip out the empty tags when you save the post. The *<em></em>* tags seems to be a safe choice with WordPress's built-in TinyMCE editor, though you will have to switch to HTML mode to insert them.) Also you must add both the start tag and end tag to prevent any unexpected side-effects. = Using an embed nested inside the another instance of the same embed didn't work as I expected. What happened? = The plugin relies on WordPress's shortcode parser to find the start and end tags of embeds, but the parser fails when you put one copy of an embed inside another with the same name. This is a well known WordPress limitation. There are plans to update the shortcode parser in a future version of WordPress, but if you really need that nesting capability now, the Embedder plugin has a workaround that allows you to do it. For example, if you are trying to use something like this: *[bigger]Hello[bigger] There [/bigger]World[/bigger]* All you need to do is add a single digit to the nested shortcode, so you name the middle *bigger* embed *bigger2* instead: *[bigger]Hello[bigger2] There [/bigger2]World[/bigger]* But you do not need to define a separate *bigger2* embed. When the plugin does not find *bigger2*, it removes the digit from the end of the tag name and finds the *bigger* embed, and uses it instead. You can append any digit to an embed name, which allows you to nest the same embed up to eleven levels deep. = What are the minimum versions of software the plugin has been tested with? = * WordPress 2.5 is the known minimum required (will definitely not work with older versions of WordPress) * WordPress 3.0.1 is the minimum version the plugin has been tested on * PHP5 5.2.6 (will probably work with earlier versions of PHP4 and PHP5) * MYSQL 5.0.5 (will probably work with earlier versions of MYSQL 4.0 and 5.0) == Screenshots == [Click here](http://moztools.com/wordpress/embedder-plugin/quick-start-local-embeds/) and [here](http://moztools.com/wordpress/embedder-plugin/quick-start-global-embeds/) for screenshots of the creation and use of local and global embeds. == Known issues == None so far. == Changelog == = Version 1.2 = * Add support for embedding unicode (UTF8) characters in embeds. * Add support for wrapping embeds with individual CSS styles. = Version 1.1.1 = Minor but important bug fixes to import and enable/disable embeds. = Version 1.1 = * Fixed the Contextual Help * Renamed the export tag to prevent clash with WordPress's built-in [embed] shortcode (oops) * A couple of other cosmetic changes. = Version 1.0 = * Overhauled the Embed Manager admin pages to add groups and an import/export capability. = Version 0.5 = * Added support for embeds in widget text and titles. = Version 0.4 = * Added support for embeds in titles and (optionally) in comments. = Version 0.3 = * Added support for attribute defaults. = Version 0.2 = * Added support for nested embeds. = Version 0.1 = * This was the first version. == Upgrade Notice == This version is compatible with all previous versions. **Note:** Version 1.2 makes changes the database table used by the plugin. The changes will be made automatically when you WordPress to install the upgrade, but if you manually copied the new version into the plugin directory, you will have to disable then re-enable the plugin for the upgrade to work.