{"id":45027,"date":"2007-05-04T21:08:30","date_gmt":"2007-05-04T21:08:30","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/fauxml\/"},"modified":"2007-05-04T21:20:36","modified_gmt":"2007-05-04T21:20:36","slug":"fauxml","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/fauxml\/","author":6015,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.6","stable_tag":"trunk","tested":"2.2","requires":"2.0","requires_php":"","requires_plugins":"","header_name":"fauxML","header_author":"Automattic, Inc.","header_description":"","assets_banners_color":"","last_updated":"2007-05-04 21:20:36","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/fauxml\/","header_author_uri":"http:\/\/automattic.com\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2279,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[230,92850,1119,222,1610],"plugin_category":[50,56],"plugin_contributors":[77500,77609,77554,77559],"plugin_business_model":[],"class_list":["post-45027","plugin","type-plugin","status-closed","hentry","plugin_tags-embed","plugin_tags-fauxml","plugin_tags-markup","plugin_tags-video","plugin_tags-youtube","plugin_category-media","plugin_category-social-and-sharing","plugin_contributors-andy","plugin_contributors-donncha","plugin_contributors-matt","plugin_contributors-mdawaffe","plugin_committers-mdawaffe"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/fauxml.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin is useless now.  WordPress 2.5+ comes with this functionality already.<\/p>\n\n<p>Don't bother copying and pasting long embed codes from places like\n<a href=\"http:\/\/youtube.com\/\">YouTube<\/a> or <a href=\"http:\/\/video.google.com\/\">Google Video<\/a>.  With fauxML,\nyou can just enter <code>[youtube {{{youtube URL}}}]<\/code>\nor <code>[googlevideo {{{google video URL}}}]<\/code> in a blog entry, and you're done.<\/p>\n\n<p>So you could, for example, enter <code>[youtube http:\/\/youtube.com\/watch?v=vRi0m329iL4]<\/code> to\nsee <a href=\"http:\/\/youtube.com\/watch?v=vRi0m329iL4\">a video about taunting poor, cute puppies<\/a>\nor <code>[googlevideo http:\/\/video.google.com\/videoplay?docid=1098259204041420273]<\/code> to see\n<a href=\"http:\/\/video.google.com\/videoplay?docid=1098259204041420273\">everyone's favorite lauging baby<\/a>.<\/p>\n\n<p>fauxML also provides an API for plugin developers to write their own fauxML for other services.<\/p>\n\n<h3>Developer FAQ \/ API<\/h3>\n\n<h4>I want to write a plugin that uses fauxML for this cool new site, bobs-wonder-widgets.info.  How do I do that?<\/h4>\n\n<p>Just register your fauxML parser with fauxML's <code>wp_add_faux_ml( $your_faux_ml_name, $your_parsing_function )<\/code> function.<\/p>\n\n<pre><code>wp_add_faux_ml( 'bobs-wonder-widget', 'bobs_wonder_widget_parser' );\n\nfunction bobs_wonder_widget_parser( $widget_data ) {\n    $url = trim($widget_data);\n    \/\/ $widget_markup = do some stuff after looking at $url;\n    return $widget_markup;\n}\n<\/code><\/pre>\n\n<p>Then when you type <code>[bobs-wonder-widget some stuff]<\/code> in a post, the text between\n    [bobs-wonder-widget  and <code>]<\/code> will be sent to your parser function and the whole\nthing will be replaced by the output of that function.<\/p>\n\n<p>There's only one restriction: <code>$your_faux_ml_name<\/code> may be made of letters, numbers\nand hyphens only.<\/p>\n\n<h4>But my fauxML is more complicated than just `[bobs-wonder-widget some stuff]`.  Can't you help?<\/h4>\n\n<p>Yes!  You can also register your fauxML parsing function with a regular expression\ninstead of just a name. In this case, the argument sent to your parser is the array\nof regex matches from the regex you provided.<\/p>\n\n<pre><code>wp_add_faux_ml( '!\\[bobs-(wonder|neato)-widget[ =](.*?)\\]!i', 'bobs_wonder_and_neato_widget_parser' );\n\nfunction bobs_wonder_and_neato_widget_parser( $regex_matches_array ) {\n    \/\/ $widget_markup = do some stuff after looking at the regex matches;\n    return $widget_markup;\n}\n<\/code><\/pre>\n\n<h4>Can FauxML be used elsewhere besides posts?<\/h4>\n\n<p>Yup!  <code>wp_add_faux_ml<\/code> accepts a third argument: the name of the WordPress filter\nhook to which you want to add your FauxML (it defaults to <code>the_content<\/code>).<\/p>\n\n<p>Too allow Bob's wonder widget FauxML parsing in comments, for example, add the\nfollowing line to your plugin.<\/p>\n\n<pre><code>wp_add_faux_ml( 'bobs-wonder-widget', 'bobs_wonder_widget_parser', 'comment_text' );\n<\/code><\/pre>\n\n<h3>Other Plugins<\/h3>\n\n<p>This plugin offers similar markup parsing for YouTube videos.<\/p>\n\n<ul>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/youtube-brackets\/\">Youtube Brackets<\/a><\/li>\n<\/ul>\n\n<p>While these offer expanded presentational functionality.<\/p>\n\n<ul>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/tubepress\/\">TubePress<\/a><\/li>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/wordtube\/\">wordTube<\/a><\/li>\n<\/ul>\n\n<p>And this plugin does something quasi-related.<\/p>\n\n<ul>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-noembedder\/\">Noembedder<\/a><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>faux-ml.php<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Where do I find the URL for a YouTube or Google Video video?<\/dt>\n<dd><p>Just browse to the video and copy the URL from your browser's location bar.  Yup, it's that easy!<\/p><\/dd>\n\n<\/dl>","raw_excerpt":"fauxML easily converts specific fake markup into full blown XHTML.  It also offers\nan API for adding new fauxMLs.\n\nThis plugin is useless now.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/45027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=45027"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mdawaffe"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=45027"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=45027"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=45027"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=45027"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=45027"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=45027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}