{"id":1955,"date":"2007-08-16T17:28:04","date_gmt":"2007-08-16T17:28:04","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/macro-expander\/"},"modified":"2007-08-16T17:28:48","modified_gmt":"2007-08-16T17:28:48","slug":"macro-expander","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/macro-expander\/","author":196152,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1","stable_tag":"1.1","tested":"2.2","requires":"2.0","requires_php":"","requires_plugins":"","header_name":"Macro Expander","header_author":"Matthijs Hollemans","header_description":"","assets_banners_color":"","last_updated":"2007-08-16 17:28:48","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.hollemansproductions.com\/wordpress-macro-expander-plugin.html","header_plugin_uri":"http:\/\/www.hollemansproductions.com\/wordpress-macro-expander-plugin.html","header_author_uri":"http:\/\/www.hollemansproductions.com","rating":0,"author_block_rating":0,"active_installs":30,"downloads":2147,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[2127,26997,2866],"plugin_category":[],"plugin_contributors":[90055],"plugin_business_model":[],"class_list":["post-1955","plugin","type-plugin","status-closed","hentry","plugin_tags-expand","plugin_tags-macro","plugin_tags-shortcut","plugin_contributors-mahlzeit","plugin_committers-mahlzeit"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/macro-expander.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>You invoke a macro by typing a special command in your blog post:<\/p>\n\n<p>[[keyword]]<\/p>\n\n<p>Upon reading this command, the PHP function named \"macro_keyword\" is called and \nits output is inserted on the page.<\/p>\n\n<p>You can also pass a parameter to the macro:<\/p>\n\n<p>[[keyword][param]]<\/p>\n\n<p>Or multiple parameters:<\/p>\n\n<p>[[keyword][param1][param2]]<\/p>\n\n<p>The parameters are separated by the ][ characters, or rather, you can look at it \nas a list of things in brackets surrounded by another pair of brackets.<\/p>\n\n<p>The PHP file for this plugin has an example function that shows you how to write \nmacros. It is called \"[[test]]\" and is defined in the function \"macro_test\". The \n\"test\" macro takes up to two parameters, both optional.<\/p>\n\n<p>New in 1.1: If you want to include the macros in RSS content, you will have to \ndefine a second function named \"macro_rss_keyword\". If this function is not \npresent, the macro will not be included in the RSS output.<\/p>\n\n<h3>Known Issues<\/h3>\n\n<ul>\n<li><p>This is a quick hack, not extensively tested but it seems to work for me.<\/p><\/li>\n<li><p>WordPress already adds the<\/p><\/li>\n<\/ul>\n\n<p> and <\/p>\n\n<p>tags around the [[keyword]] before\n    the plugin is called -- the plugin doesn't remove those.<\/p>\n\n<ul>\n<li><p>You can't use \" and ' (and possibly a handful of other characters) in \nparameters because WordPress replaces them with curly quotes before the \nplugin has a chance to parse them. You <em>can<\/em> use spaces, though.<\/p><\/li>\n<li><p>Maybe pass an $is_rss parameter instead of using 2 separate functions?<\/p><\/li>\n<li><p>Maybe change syntax to: <!--macro:keyword[param][param]--> ?!<\/p><\/li>\n<\/ul>\n\n<h3>About<\/h3>\n\n<ul>\n<li><p>Version 1.1 (8 June 2007) - The parameter separator is now ][ instead of |.\nAdded macro_rss_* functions for the RSS content.<\/p><\/li>\n<li><p>Version 1.0 (7 June 2007) - First version<\/p><\/li>\n<\/ul>\n\n<p>Written by Matthijs Hollemans<\/p>\n\n<p>http:\/\/www.hollemansproductions.com\/wordpress-macro-expander-plugin.html<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download the plugin and unzip it.<\/li>\n<li>Add your macro code to \"macro_expander.php\"<\/li>\n<li>Put \"macro_expander.php\" in the \"wp-content\/plugins\/\" directory.<\/li>\n<li>Activate the plugin from the WordPress control panel.<\/li>\n<\/ol>","raw_excerpt":"Replaces user-defined keywords in a blog post with the output from the corresponding user-defined PHP function.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/1955","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=1955"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mahlzeit"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=1955"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=1955"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=1955"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=1955"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=1955"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=1955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}