{"id":135196,"date":"2021-01-20T19:37:05","date_gmt":"2021-01-20T19:37:05","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/insert-block-pattern-block\/"},"modified":"2021-01-20T22:08:09","modified_gmt":"2021-01-20T22:08:09","slug":"insert-block-pattern-block","status":"publish","type":"plugin","link":"https:\/\/da.wordpress.org\/plugins\/insert-block-pattern-block\/","author":13889792,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0","stable_tag":"trunk","tested":"5.6.17","requires":"5.5","requires_php":"","requires_plugins":"","header_name":"Insert Block Pattern Block","header_author":"Espen Munthe","header_description":"Gutenberg Block for inserting Theme Block Patterns into page\/post or into a insertable block areas (like columns).","assets_banners_color":"","last_updated":"2021-01-20 22:08:09","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/espenmunthe.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":891,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.gif":{"filename":"screenshot-1.gif","revision":2459987,"resolution":"1","location":"assets","locale":""},"screenshot-2.gif":{"filename":"screenshot-2.gif","revision":2459987,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Insert Block Pattern into page ( a paragraph )","2":"Insert Block Pattern into a Columns Block"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1220,148076,195316],"plugin_category":[],"plugin_contributors":[195317],"plugin_business_model":[],"class_list":["post-135196","plugin","type-plugin","status-publish","hentry","plugin_tags-block","plugin_tags-gutenberg","plugin_tags-theme-block-patterns","plugin_contributors-emunthe","plugin_committers-emunthe"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/insert-block-pattern-block.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/insert-block-pattern-block\/assets\/screenshot-1.gif?rev=2459987","caption":"Insert Block Pattern into page ( a paragraph )"},{"src":"https:\/\/ps.w.org\/insert-block-pattern-block\/assets\/screenshot-2.gif?rev=2459987","caption":"Insert Block Pattern into a Columns Block"}],"raw_content":"<!--section=description-->\n<p>This Block inserts any Block Pattern at any insert point (+), also from inside a column block.<\/p>\n\n<p>The block is replaced by the Block Pattern content. (The \"Insert Block Pattern\" Block is removed)<\/p>\n\n<p>Theme Block Patterns are an excellent method for making well designed block content available to editors and authors.<\/p>\n\n<p>This Block is a provisional solution. It will be maintained until the Block Pattern Library is extended.<\/p>\n\n<h4>Languages<\/h4>\n\n<ol>\n<li>English<\/li>\n<li>Norwegian<\/li>\n<\/ol>\n\n<!--section=installation-->\n<h4>Manual Installation<\/h4>\n\n<ol>\n<li><p>Unpack the  <code>insert-block-pattern-block.zip<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/p><\/li>\n<li><p>Activate the plugin through the 'Plugins' menu in WordPress<\/p><\/li>\n<\/ol>\n\n<h4>NPM Installation<\/h4>\n\n<p>A minimal <code>package.json<\/code>, <code>webpack.config.js<\/code> is included.<\/p>\n\n<pre><code>Note: copy this into a .babelrc file at plugins\/insert-block-pattern-block\/.babelrc\n{\n  \"presets\": [\"@babel\/preset-env\", \"@babel\/preset-react\"],\n  \"plugins\": [\n    \"@babel\/plugin-syntax-dynamic-import\",\n    \"@babel\/plugin-proposal-class-properties\"\n  ]\n}\n<\/code><\/pre>\n\n<p>To install and build:<\/p>\n\n<pre><code>plugins\/insert-block-pattern-block\/$ npm i\nplugins\/insert-block-pattern-block\/$ npm run build\n<\/code><\/pre>\n\n<h4>Creating language files<\/h4>\n\n<ol>\n<li><p>Create .mo and .po files from the languages\/ibpb.pot file for your language.<\/p><\/li>\n<li><p>Check that textdomain in front of mo and po. The files need to be of the form: 'ibpb-&lt;LOCALE&#062;.mo'. eg. ibpb-nb_NO.mo, ibpb-nb_NO.po<\/p><\/li>\n<li><p>Use WP-Cli at <code>plugins\/ipbp\/<\/code><\/p>\n\n<p>$ wp i18n make-json languages\/ibpb-&lt;LOCALE&#062;.po --no-purge<\/p><\/li>\n<\/ol>\n\n<p>This produces a 2 json file with a hash strings.<\/p>\n\n<p>It does not currently work directly by adding these 2 files - they must be combined into a new json file:<\/p>\n\n<p>Copy one of the 2 generated files to:<\/p>\n\n<pre><code>ibpb-&lt;LOCALE\\&gt;-ibpb_blocks_registration.json\n<\/code><\/pre>\n\n<p>Combine the messages into one file<\/p>\n\n<pre><code>\"locale_data\": { \"messages\": { &lt;MESSAGES HERE&gt; }}\n<\/code><\/pre>\n\n<p>Rename the source line to:<\/p>\n\n<pre><code>\"source\": \"ibpb_blocks_registration.js\",\n<\/code><\/pre>\n\n<p>This should end up with a file something like this:<\/p>\n\n<pre><code>plugins\/insert-block-pattern-block\/languages\/ibpb-&lt;LOCALE\\&gt;-ibpb_blocks_registration.json\n\n{\n  \"translation-revision-date\": \"2021-01-17 10:27+0100\",\n  \"generator\": \"WP-CLI\/2.2.0\",\n  \"source\": \"ibpb_blocks_registration.js\",\n  \"domain\": \"messages\",\n  \"locale_data\": {\n    \"messages\": {\n        \"\": {\n            \"domain\": \"messages\",\n            \"lang\": \"nb_NO\",\n            \"plural-forms\": \"nplurals=2; plural=(n != 1);\"\n          },\n              \"Block for inserting a Block Pattern\": [\n                    \"Blokk for \\u00e5 sette inn ett blokkm\\u00f8nster\"\n         ],\n          \"Block Pattern\": [\"Blokkm\\u00f8nster\"],\n              \"Insert Block Pattern\": [\"Sett inn Blokkm\\u00f8nster\"],\n              \"Select a Block Pattern Category\": [\"Velg kategori\"],\n              \"Uncategorized\": [\"Ukategorisert\"],\n              \"Select a Block Pattern\": [\"Velg Blokk m\\u00f8nster\"]\n        }\n    }\n}\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt id='can%20the%20the%20insert%20block%20pattern%20block%20insert%20into%20a%20column%20%3F'><h3>Can the the Insert Block Pattern Block insert into a column ?<\/h3><\/dt>\n<dd><p>Yes.<\/p><\/dd>\n<dt id='is%20this%20block%20used%20in%20production%20environment%20%3F'><h3>Is this block used in production environment ?<\/h3><\/dt>\n<dd><p>Yes.<\/p><\/dd>\n<dt id='is%20support%20provided%20%3F'><h3>Is support provided ?<\/h3><\/dt>\n<dd><p>The plugin will be maintained until the Block Pattern Library is extended with similar functionality.<\/p>\n\n<p>The plugin is used in production but will be kept as simple as possible.<\/p><\/dd>\n<dt id='does%20the%20plugin%20have%20language%20support%20%3F'><h3>Does the plugin have language support ?<\/h3><\/dt>\n<dd><p>Yes. There is a pot file included. It is tranlated to Norwegian.<\/p><\/dd>\n<dt id='does%20the%20plugin%20include%20the%20source%20code%20%3F'><h3>Does the plugin include the source code ?<\/h3><\/dt>\n<dd><p>Yes.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Release version 1.0.<\/li>\n<\/ul>","raw_excerpt":"Gutenberg Block for inserting Theme Block Patterns into page\/post or into a insertable block (columns).","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/135196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=135196"}],"author":[{"embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/emunthe"}],"wp:attachment":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=135196"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=135196"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=135196"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=135196"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=135196"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=135196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}