{"id":9337,"date":"2019-08-19T01:53:52","date_gmt":"2019-08-19T06:53:52","guid":{"rendered":"https:\/\/krisbunda.com\/blog\/?p=9337"},"modified":"2019-08-19T01:58:10","modified_gmt":"2019-08-19T06:58:10","slug":"wordpress-plugin-add-abbreviation-tags-from-gutenberg-blocks","status":"publish","type":"post","link":"https:\/\/krisbunda.com\/blog\/2019\/08\/19\/wordpress-plugin-add-abbreviation-tags-from-gutenberg-blocks\/","title":{"rendered":"WordPress Plugin: Add Abbreviation Tags from Gutenberg Blocks"},"content":{"rendered":"\n<p>I made a WordPress plugin that I can use from the Gutenberg Blocks Toolbar menu because I&#8217;m sick of doing it all manually. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-1-before-HTML-view.png\"><img loading=\"lazy\" decoding=\"async\" width=\"592\" height=\"268\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-1-before-HTML-view.png\" alt=\"HTML view of how gutenberg block looks without abbr tags around selected acronym\" class=\"wp-image-9401\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-1-before-HTML-view.png 592w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-1-before-HTML-view-150x68.png 150w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/a><figcaption>ABBR PLUGIN 1 &#8211; before &#8211; HTML view<\/figcaption><\/figure>\n\n\n\n<p>It adds an HTML5 <code>&lt;abbr&gt;&lt;\/abbr&gt;<\/code> tag around any highlighted text after clicking the &#8220;Abbreviation&#8221; button. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-2-highlight-acronym-select-abbreviation-command-Gutenberg-block-view.png\"><img loading=\"lazy\" decoding=\"async\" width=\"288\" height=\"557\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-2-highlight-acronym-select-abbreviation-command-Gutenberg-block-view.png\" alt=\"Gutenberg block when selecting acronym text and clicking &quot;Abbreviation&quot; button in toolbar.\" class=\"wp-image-9402\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-2-highlight-acronym-select-abbreviation-command-Gutenberg-block-view.png 288w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-2-highlight-acronym-select-abbreviation-command-Gutenberg-block-view-78x150.png 78w\" sizes=\"auto, (max-width: 288px) 100vw, 288px\" \/><\/a><figcaption>ABBR PLUGIN 2 &#8211; highlight acronym select abbreviation command &#8211; Gutenberg block view<\/figcaption><\/figure>\n\n\n\n<p>Unfortunately I didn&#8217;t get as far as adding functionality to enter the title text for the acronym or abbreviation, it must still be done manually in HTML view. I want to add that functionality in soon though.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-3-after-HTML-view.png\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"267\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-3-after-HTML-view.png\" alt=\"HTML view of how gutenberg block looks with abbr tags around selected acronym.\" class=\"wp-image-9403\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-3-after-HTML-view.png 604w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-3-after-HTML-view-150x66.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-3-after-HTML-view-600x265.png 600w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><figcaption>HTML view of how gutenberg block looks WITH abbr tags around selected acronym<\/figcaption><\/figure>\n\n\n\n<p>To download and install your copy of the plugin, <a href=\"https:\/\/github.com\/bunda3d\/abbr-gutenberg-wp\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"find it on GitHub here (opens in a new tab)\">find it on GitHub here<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-4-v1_0-Gutenberg-block-abbr-HTML-plugin-tag-Kris-Bunda.png\"><img loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"412\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-4-v1_0-Gutenberg-block-abbr-HTML-plugin-tag-Kris-Bunda.png\" alt=\"ABBR PLUGIN 4 - v1_0 - Gutenberg block abbr HTML plugin tag - Kris Bunda\" class=\"wp-image-9404\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-4-v1_0-Gutenberg-block-abbr-HTML-plugin-tag-Kris-Bunda.png 675w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-4-v1_0-Gutenberg-block-abbr-HTML-plugin-tag-Kris-Bunda-150x92.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-4-v1_0-Gutenberg-block-abbr-HTML-plugin-tag-Kris-Bunda-600x366.png 600w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-4-v1_0-Gutenberg-block-abbr-HTML-plugin-tag-Kris-Bunda-80x50.png 80w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/a><figcaption>ABBR PLUGIN 4 &#8211; v1_0 &#8211; Gutenberg block abbr HTML plugin tag &#8211; Kris Bunda<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Here&#8217;s what the 2 files look like that make this simple plugin work: <\/h2>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-v1_0-Gutenberg-block-abbr-HTML-plugin-Kris-Bunda-PHP-initializer.png\"><img loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"519\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-v1_0-Gutenberg-block-abbr-HTML-plugin-Kris-Bunda-PHP-initializer.png\" alt=\"PHP code for a WordPress plugin\" class=\"wp-image-9406\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-v1_0-Gutenberg-block-abbr-HTML-plugin-Kris-Bunda-PHP-initializer.png 580w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-v1_0-Gutenberg-block-abbr-HTML-plugin-Kris-Bunda-PHP-initializer-150x134.png 150w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><figcaption>ABBR PLUGIN 4 &#8211; v1_0 &#8211; Gutenberg block abbr HTML plugin tag &#8211; Kris Bunda<\/figcaption><\/figure>\n\n\n\n<p>I don&#8217;t need all the modules in the array to initialize anymore, but left them in as I might want to turn on the functionality that used them again. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-v1_0-Gutenberg-block-abbr-HTML-plugin-Kris-Bunda-JavaScript-toggler.png\"><img loading=\"lazy\" decoding=\"async\" width=\"504\" height=\"849\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-v1_0-Gutenberg-block-abbr-HTML-plugin-Kris-Bunda-JavaScript-toggler.png\" alt=\"Javascript code for a WordPress plugin\" class=\"wp-image-9405\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-v1_0-Gutenberg-block-abbr-HTML-plugin-Kris-Bunda-JavaScript-toggler.png 504w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/ABBR-PLUGIN-v1_0-Gutenberg-block-abbr-HTML-plugin-Kris-Bunda-JavaScript-toggler-89x150.png 89w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/a><figcaption>ABBR PLUGIN 4 &#8211; v1_0 &#8211; Gutenberg block abbr HTML plugin tag &#8211; Kris Bunda<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I made a Wordpress plugin to inject < abbr > HTML tags around selected text with one click from the Gutenberg Blocks Toolbar menu. <\/p>\n","protected":false},"author":1,"featured_media":9408,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","inline_featured_image":false,"kt_blocks_editor_width":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"I made a Wordpress #Plugin to Add Abbreviation < abbr > Tags from #Gutenberg Blocks","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[91,105,240],"class_list":["post-9337","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-designer","tag-programming","tag-web-design","tag-wordpress"],"aioseo_notices":[],"jetpack_publicize_connections":[],"taxonomy_info":{"category":[{"value":4,"label":"Designer"}],"post_tag":[{"value":91,"label":"programming"},{"value":105,"label":"web design"},{"value":240,"label":"WordPress"}]},"featured_image_src_large":["https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/cropped-ABBR-TAG-PLUGIN-for-Gutenberg-blocks.png",821,461,false],"author_info":{"display_name":"Kris Bunda","author_link":"https:\/\/krisbunda.com\/blog\/author\/kris-bunda\/"},"comment_info":0,"category_info":[{"term_id":4,"name":"Designer","slug":"designer","term_group":0,"term_taxonomy_id":4,"taxonomy":"category","description":"Posts focusing on web, graphic, CAD, and other design.","parent":0,"count":91,"filter":"raw","cat_ID":4,"category_count":91,"category_description":"Posts focusing on web, graphic, CAD, and other design.","cat_name":"Designer","category_nicename":"designer","category_parent":0}],"tag_info":[{"term_id":91,"name":"programming","slug":"programming","term_group":0,"term_taxonomy_id":91,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":105,"name":"web design","slug":"web-design","term_group":0,"term_taxonomy_id":105,"taxonomy":"post_tag","description":"","parent":0,"count":19,"filter":"raw"},{"term_id":240,"name":"WordPress","slug":"wordpress","term_group":0,"term_taxonomy_id":240,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw"}],"jetpack_featured_media_url":"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/08\/cropped-ABBR-TAG-PLUGIN-for-Gutenberg-blocks.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1NcZe-2qB","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts\/9337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/comments?post=9337"}],"version-history":[{"count":4,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts\/9337\/revisions"}],"predecessor-version":[{"id":9411,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts\/9337\/revisions\/9411"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/media\/9408"}],"wp:attachment":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/media?parent=9337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/categories?post=9337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/tags?post=9337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}