{"id":13379,"date":"2011-05-23T23:15:14","date_gmt":"2011-05-23T23:15:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/post-editor-buttons-fork\/"},"modified":"2016-10-01T03:32:19","modified_gmt":"2016-10-01T03:32:19","slug":"post-editor-buttons-fork","status":"publish","type":"plugin","link":"https:\/\/mk.wordpress.org\/plugins\/post-editor-buttons-fork\/","author":2879521,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.4","stable_tag":"2.4","tested":"4.6.30","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"Post Editor Buttons Fork","header_author":"Kailey Lampert","header_description":"","assets_banners_color":"f9f9f9","last_updated":"2016-10-01 03:32:19","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/paypal.me\/trepmal\/5usd","header_plugin_uri":"http:\/\/trepmal.com\/plugins\/post-editor-buttons-fork\/","header_author_uri":"http:\/\/kaileylampert.com","rating":4.9,"author_block_rating":0,"active_installs":800,"downloads":14559,"num_ratings":11,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"2.4":"<p>Can now select core buttons to remove<\/p>","2.3":"<p>Requires WordPress 3.3<\/p>","2.2":"<p>Address compatibility issues if user isn&#039;t an administrator<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":"1","5":"10"},"assets_icons":[],"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"478746","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.0","2.1","2.2.1","2.3","2.4"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"606373","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"606373","resolution":"2","location":"assets"}},"screenshots":{"1":"This is how the plugin's interface looks (in 3.2)","2":"This is the output of the setting above (in 3.2)"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3506,172,18863,1541,50096],"plugin_category":[],"plugin_contributors":[80314],"plugin_business_model":[],"class_list":["post-13379","plugin","type-plugin","status-publish","hentry","plugin_tags-add-buttons","plugin_tags-buttons","plugin_tags-post-editor","plugin_tags-toolbar","plugin_tags-toolbar-buttons","plugin_contributors-trepmal","plugin_committers-trepmal"],"banners":{"banner":"https:\/\/ps.w.org\/post-editor-buttons-fork\/assets\/banner-772x250.png?rev=478746","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/post-editor-buttons-fork_f9f9f9.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/post-editor-buttons-fork\/assets\/screenshot-1.png?rev=606373","caption":"This is how the plugin's interface looks (in 3.2)"},{"src":"https:\/\/ps.w.org\/post-editor-buttons-fork\/assets\/screenshot-2.png?rev=606373","caption":"This is the output of the setting above (in 3.2)"}],"raw_content":"<!--section=description-->\n<p>Add custom buttons to the TEXT mode editor toolbar.<\/p>\n\n<p>This is a fork of <a href=\"http:\/\/wordpress.org\/extend\/plugins\/post-editor-buttons\/\">Oren Yomtov's<\/a> plugin.<\/p>\n\n<p>Unsure of the reason behind the poor rating and \"doesn't work\" vote. Possibly the user didn't realized this only adds tags to the <strong>HTML editor<\/strong>? If you use this plugin and it works for you, I'd appreciate it if you'd give my a good star rating and an \"it works\" vote.<\/p>\n\n<p>Conversely, if you have trouble, please post to the forums, and\/or ask me on <a href=\"http:\/\/twitter.com\/trepmal\">twitter (@trepmal)<\/a>.<\/p>\n\n<p><strong>If you need this to work on WordPress &lt; 3.3<\/strong> download <a href=\"http:\/\/wordpress.org\/extend\/plugins\/post-editor-buttons-fork\/download\/\">2.2.1<\/a>.<\/p>\n\n<ul>\n<li><a href=\"http:\/\/twitter.com\/trepmal\">I'm on twitter<\/a><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>post-editor-buttons<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Visit the plugins page by clicking the <code>Use<\/code> link in the plugins description or from the <code>Settings<\/code> admin panel.<\/li>\n<\/ol>\n\n<p>That's it, now you can start adding your own buttons.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>I don't see the buttons I've created. Where are they?<\/dt>\n<dd><p>This plugin creates buttons for the <strong>TEXT<\/strong> editor only.<\/p><\/dd>\n<dt>Can I put classes\/styles or other attributes inside the tag?<\/dt>\n<dd><p>Yes, but you must use single quotes. For example, this will work:<\/p>\n\n<p>&lt;<\/p>\n\n<p>h2 style='color:#ff0;'&gt;\nBut this will not:<\/p>\n\n<p>&lt;<\/p>\n\n<p>h3 class=\"clear\"&gt;\nAs of version 2.1, <strong>\"<\/strong> will be replaced with <strong>'<\/strong> automatically\nAs of version 2.3, quote marks should be preserved<\/p><\/dd>\n<dt>Why are my inline styles are being removed?<\/dt>\n<dd><p>Some styles are removed by WordPress while others aren't. For example, this will work:\n    \nBut this will not:\n    \nThese styles are being removed when the provided tags are passed through one of WordPress's sanitation filters.<\/p><\/dd>\n<dt>Why isn't this tag\/attribute being saved?<\/dt>\n<dd><p>When you save a custom button, the before\/after pieces are filtered. No point in creating a button that adds something that'll only be removed when you save a post, right?<\/p>\n\n<p>To allow additional tags, you'll need to add some code. (I recommend add it to your functions.php file so it will be preserved if you update the plugin).<\/p>\n\n<p>Here's how to allow the <code>video<\/code> tag<\/p>\n\n<pre><code>add_filter( 'admin_init', 'allowed_tags' );\nfunction allowed_tags() {\n    global $allowedposttags;\n    $allowedposttags['video'] = array();\n}\n<\/code><\/pre>\n\n<p>To add more attributes (in this case, <code>src<\/code>, <code>type<\/code>, <code>poster<\/code>):<\/p>\n\n<pre><code>add_filter( 'admin_init', 'allowed_tags' );\nfunction allowed_tags() {\nglobal $allowedposttags;\n    $allowedposttags['video']['src'] = array();\n    $allowedposttags['video']['type'] = array();\n    $allowedposttags['video']['poster'] = array();\n}\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.4<\/h4>\n\n<ul>\n<li>Core buttons can now be removed<\/li>\n<li>General maintenance<\/li>\n<\/ul>\n\n<h4>2.3<\/h4>\n\n<ul>\n<li>Uses QTags API introduced in WordPress 3.3<\/li>\n<li>Uses new Help Tabs method introduced in WordPress 3.3<\/li>\n<li>Info on allowing additional tags\/attributes added to help tab.<\/li>\n<li>Better handling of quote marks in tags<\/li>\n<\/ul>\n\n<h4>2.2<\/h4>\n\n<ul>\n<li>Fixed issues for non-administrators<\/li>\n<\/ul>\n\n<h4>2.1<\/h4>\n\n<ul>\n<li>Rework of how custom javascript is saved<\/li>\n<li>General cleanup and clarification<\/li>\n<\/ul>\n\n<h4>2.0<\/h4>\n\n<ul>\n<li>Initial fork release<\/li>\n<\/ul>","raw_excerpt":"This plugin allows you add your own buttons to the post editor&#039;s TEXT mode toolbar.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/13379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=13379"}],"author":[{"embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/trepmal"}],"wp:attachment":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=13379"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=13379"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=13379"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=13379"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=13379"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=13379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}