{"id":15335,"date":"2011-10-18T17:27:46","date_gmt":"2011-10-18T17:27:46","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/bbpress2-shortcode-whitelist\/"},"modified":"2016-05-21T12:53:22","modified_gmt":"2016-05-21T12:53:22","slug":"bbpress2-shortcode-whitelist","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/bbpress2-shortcode-whitelist\/","author":7742419,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.2.1","stable_tag":"2.2.2","tested":"4.5.33","requires":"2.5","requires_php":"","requires_plugins":"","header_name":"bbPress2 shortcode whitelist","header_author":"Anton Channing","header_description":"","assets_banners_color":"","last_updated":"2016-05-21 12:53:22","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/bbpressbbcode.chantech.org\/donate\/","header_plugin_uri":"http:\/\/wp.antonchanning.com\/bbpress-shortcode-whitelist","header_author_uri":"http:\/\/wp.antonchanning.com","rating":5,"author_block_rating":0,"active_installs":60,"downloads":9836,"num_ratings":4,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"":"<p>If you would like to allow safe shortcodes in BuddyPress profile fields,\ndownload and install my &#039;BuddyPress Custom Profile Filters&#039; plugin.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"4"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","1.0","1.1.2","1.2","1.3","1.4","1.4.0.1","1.4.0.2","1.5","2.0","2.1","2.2","2.2.1","2.2.2"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2770,11205,11204,80,6147],"plugin_category":[43,44],"plugin_contributors":[83389],"plugin_business_model":[],"class_list":["post-15335","plugin","type-plugin","status-closed","hentry","plugin_tags-bbpress","plugin_tags-bbpress-plugin","plugin_tags-bbpress2","plugin_tags-shortcode","plugin_tags-whitelist","plugin_category-customization","plugin_category-discussion-and-community","plugin_contributors-antonchanning","plugin_committers-antonchanning"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/bbpress2-shortcode-whitelist.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin is designed to safely allow bbcode shortcodes and other\nsafe shortcodes to be embedded in bbpress topics and replies and also\nblog comments. You don't wan't users entering shortcodes such as\n[bbp-login] in the middle of their reply.<\/p>\n\n<p>It doesn't actually implement the shortcodes though,\nfor that you need a separate plugin.  I recommend my own bbPress2\nBBCode plugin, as this is fully whitelist aware, in that it also\nparses the contents of the shortcodes, so [b][bbp-login][\/b] also\ngets parsed for safety.  Something that doesn't happen with non \nwhitelist aware shortcode plugins.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>bbpress-shortcode-whitelist<\/code> folder and its contents 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>How do I add new shortcodes to the whitelist?<\/dt>\n<dd><p>In admin settings.  In addition to supported plugins, verified plugins\nand any self-declared plugins, you can also enable a custom list of\nshortcodes you want your forum users to be able to use.<\/p><\/dd>\n<dt>I'm a shortcode plugin developer.  How do I make my shortcodes safe?<\/dt>\n<dd><p>If your shortcodes contain no calls to do_shortcode($content), then they\nare probably already safe as far as I'm aware.  If they do contain calls\nto do_shortcode($content), then you can make them safe by creating a \nfunction or class method in your plugin similar to:<\/p>\n\n<pre><code>    function yourplugin_do_shortcode($content) {\n        if(function_exists('bbp_whitelist_do_shortcode')) {\n            return bbp_whitelist_do_shortcode($content);\n        } else {\n            return do_shortcode($content);\n        }\n    }\n<\/code><\/pre>\n\n<p>And then replace calls to do_shortcode($content) inside your shortcode\nhandlers with calls to this new function. What this means is that if\nthe whitelist plugin is not active, your plugin will still work, but\nif it is active, it will parse the contents of your shortcodes to make\nsure they are also safe.<\/p><\/dd>\n<dt>I'm a shortcode plugin developer.  How do I self-declare my plugin?<\/dt>\n<dd><p>To self-declare your plugin to the shortcode whitelist \nplugin, include the following code somewhere in your plugin, changing \nthe names, unique identifier and the array of safe to use in the forums \nshortcodes that your plugin provides:<\/p>\n\n<pre><code>function yourplugin_get_shortcode_whitelist() {\n    $plugin_name = 'Your Plugin Name';\n    $plugin_author = 'Plugin Author Name';\n    $shortcodes = array('test','test2'); \/\/array of safe shortcodes the plugin provides.\n\n    return array('name'=&gt;$plugin_name,'tag'=&gt;'your-plugin-unique-identifier','author'=&gt;$plugin_author,'shortcodes'=&gt;$shortcodes);\n}\n\nif(!isset($bbpscwl_selfdeclared_plugins)) $bbpscwl_selfdeclared_plugins = array();\n$bbpscwl_selfdeclared_plugins[] = yourplugin_get_shortcode_whitelist();\n<\/code><\/pre><\/dd>\n<dt>I'm a shortcode plugin developer.  How do I get my plugin verfified?<\/dt>\n<dd><p>Ask me to verify it.  I'll take a look at the code when I get a chance, \nwill make sure it works and let you know if I find anything that needs\nfixing or if I can add it to the verified plugins list.<\/p><\/dd>\n<dt>Do you have a current road map for further development of this plugin?<\/dt>\n<dd><p>No, but any one can suggest plugins that have safe\nshortcodes that I should auto-detect and verify, I'll take a look when \nI get a chance.  Also, I'll fix any bugs anyone finds.  I may make the\nadmin screen a bit more user friendly when I get a chance.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.2.2<\/h4>\n\n<ul>\n<li>Tested and still works with wordpress 4.5.2<\/li>\n<li>No new features<\/li>\n<\/ul>\n\n<h4>2.2.1<\/h4>\n\n<ul>\n<li>Oops! The export function didn't work.  Here is the fix.<\/li>\n<\/ul>\n\n<h4>2.2<\/h4>\n\n<ul>\n<li>Added support for 'excerpts'<\/li>\n<\/ul>\n\n<h4>2.1<\/h4>\n\n<ul>\n<li>Added support for BuddyPress activity replies *<\/li>\n<\/ul>\n\n<h4>2.0<\/h4>\n\n<ul>\n<li>Dropped support for Viper's Video Quicktags due to conflicts causing crashes.<\/li>\n<li>Added support for autodetecting the 8tracks-shortcode plugin<\/li>\n<li>Added support for autodetecting the video-audio-bbcode plugin<\/li>\n<li>Now allows safe shortcodes to be used in BuddyPress private messages<\/li>\n<\/ul>\n\n<h4>1.5<\/h4>\n\n<ul>\n<li>Fixed bug that stopped approved shortcodes working in the BuddypPress\nactivity stream.<\/li>\n<\/ul>\n\n<h4>1.4.0.2<\/h4>\n\n<ul>\n<li>Minor code tweak.<\/li>\n<\/ul>\n\n<h4>1.4.0.1<\/h4>\n\n<ul>\n<li>Minor code tweak.<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Fixed the tag array bug.<\/li>\n<li>Added support for [freesound], [user] and [guest] tags for the bbPress BBCode plugin.<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Added support for BuddyPress activity updates<\/li>\n<li>Added support for BuddyPress group forums<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Fixed bug that stopped manually added tags to whitelist from working.<\/li>\n<li>Added support for [video] tag to bbPress BBCode plugin.<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Added actions on the 'comment_text' and 'bbp_get_reply_content' filters to make videos work properly when VVQ is installed.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Admin screen added.<\/li>\n<li>Auto-detects bbPress2 BBCode<\/li>\n<li>Auto-detects Viper's Video Quicktags<\/li>\n<li>Auto-detects self declared plugins<\/li>\n<li>Allows admins to manually add a list shortcodes<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial version.  Allows bbcode shortcodes only.<\/li>\n<\/ul>","raw_excerpt":"This plugin adds creates a whitelist of shortcode tags that can be applied to comments, bbPress and BuddyPress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/15335","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=15335"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/antonchanning"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=15335"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=15335"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=15335"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=15335"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=15335"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=15335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}