{"id":37005463,"url":"https://github.com/yardinternet/wp-gutenberg","last_synced_at":"2026-01-14T00:40:25.055Z","repository":{"id":330996109,"uuid":"644305079","full_name":"yardinternet/wp-gutenberg","owner":"yardinternet","description":"A collection of components for the WordPress Gutenberg editor","archived":false,"fork":false,"pushed_at":"2026-01-09T14:36:32.000Z","size":2556,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-11T15:25:23.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yardinternet.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-23T08:44:28.000Z","updated_at":"2025-12-30T13:10:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yardinternet/wp-gutenberg","commit_stats":null,"previous_names":["yardinternet/wp-gutenberg"],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/yardinternet/wp-gutenberg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fwp-gutenberg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fwp-gutenberg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fwp-gutenberg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fwp-gutenberg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yardinternet","download_url":"https://codeload.github.com/yardinternet/wp-gutenberg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fwp-gutenberg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T00:40:24.960Z","updated_at":"2026-01-14T00:40:25.037Z","avatar_url":"https://github.com/yardinternet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WP Gutenberg\n\nA WordPress plugin with a collection of components for the Gutenberg editor\n\n## 👷‍♀️ Development\n\n1. Run `nvm use` to automatically use the correct version of Node.js\n2. Run `npm install` to install dependencies\n3. Run `npm start` for local development\n\n## 🚀 Release\n\nTODO: automate this\n\n1. Update plugin versions and run `npm run build` to build assets. Commit and push to remote.\n2. Add tag `git tag v0.1.0` and push to remote `git push origin v0.1.0`\n\n## PHP Hooks\n\n### `yard::gutenberg/allowed-blocks`\n\nBy default, all blocks are registered. Use this filter to register only the allowed blocks. The example below lists every available block:\n\n```PHP\nadd_filter('yard::gutenberg/allowed-blocks', fn () =\u003e [\n 'collapse',\n 'collapse-item',\n 'counting-number',\n 'facetwp',\n 'icon',\n 'iconlist',\n 'iconlist-item',\n 'slide',\n 'slider',\n 'tabs',\n 'tabs-item',\n]);\n```\n\n### `yard::gutenberg/allowed-core-blocks`\n\nOverwrite the allowed (core) blocks.\n\n```PHP\nadd_filter('yard::gutenberg/allowed-core-blocks', $this-\u003eregisterCoreBlocks(...), 10, 1);\n\npublic function registerCoreBlocks($initialAllowedBlocks): array\n{\n $additionalBlocks = collect([\n  // 'core/search',\n ]);\n\n $excludeBlocks = collect([\n  // 'core/post-featured-image',\n ]);\n\n return collect($initialAllowedBlocks)\n  -\u003emerge($additionalBlocks)\n  -\u003ereject(fn ($block) =\u003e $excludeBlocks-\u003econtains($block))\n  -\u003eall();\n}\n```\n\n### `yard::gutenberg/allowed-blocks-whitelisted-prefixes`\n\nBy default, all blocks are registered. Use this filter to register only the allowed blocks with a specific prefix. The example adds the `tribe` prefix:\n\n```PHP\nadd_filter('yard::gutenberg/allowed-blocks-whitelisted-prefixes', fn ($prefixes) =\u003e [\n ...$prefixes,\n 'tribe',\n] );\n```\n\n## JavaScript Hooks\n\n### `yard.default-unused-styles`\n\nChange the default unregistered styles: `/src/Hooks/resources/js/default-block-styles.js`:\n\n```javascript\nimport { addFilter } from '@wordpress/hooks';\n\naddFilter(\n 'yard.default-unused-styles',\n 'sage/default-unused-styles',\n (styles) =\u003e {\n  return styles.map((item) =\u003e {\n   // Remove 'fill' style from the array, so that it works again\n   if (item.block === 'core/button') {\n    return {\n     ...item,\n     styles: item.styles.filter(style =\u003e style !== 'fill')\n    };\n   }\n   return item;\n  });\n }\n);\n\n```\n\n### `yard.default-registered-variations`\n\nRemove specific variations: `/src/Hooks/resources/js/default-block-variations.js`:\n\n```javascript\nimport { addFilter } from '@wordpress/hooks';\n\n// Remove specific variations from the registered list\naddFilter(\n 'yard.default-registered-variations',\n 'your-project/remove-registered-variations',\n (variations) =\u003e {\n  return variations.filter((item) =\u003e {\n   // Remove the custom spacer variation\n   if (item.block === 'core/spacer' \u0026\u0026 item.name === 'spacer-with-steps') {\n    return false; // Exclude this variation\n   }\n   // Keep all other variations\n   return true;\n  });\n }\n);\n```\n\nOr change an existing variation:\n\n```javascript\naddFilter(\n 'yard.default-registered-variations',\n 'your-project/modify-registered-variations',\n (variations) =\u003e {\n  return variations.map((item) =\u003e {\n   // Change the height attribute for the spacer variation\n   if (item.block === 'core/spacer' \u0026\u0026 item.name === 'spacer-with-steps') {\n    return {\n     ...item,\n     attributes: {\n      ...item.attributes,\n      height: 'var:preset|spacing|9', // New height value\n     },\n    };\n   }\n   return item;\n  });\n }\n);\n```\n\n### `yard.default-unused-variations`\n\nRemove a default unregistered variations so that it works again: `/src/Hooks/resources/js/default-block-variations.js`:\n\n```javascript\nimport { addFilter } from '@wordpress/hooks';\n\naddFilter(\n 'yard.default-unused-variations',\n 'your-project/remove-unused-variations',\n (variations) =\u003e {\n  return variations.filter((item) =\u003e {\n   if (item.block === 'core/group' \u0026\u0026 item.variation === 'group-row') {\n    return false; // Remove this variation so that it works again\n   }\n   // Keep all other variations in the unused list\n   return true;\n  });\n }\n);\n```\n\n## About us\n\n[![banner](https://raw.githubusercontent.com/yardinternet/.github/refs/heads/main/profile/assets/small-banner-github.svg)](https://www.yard.nl/werken-bij/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyardinternet%2Fwp-gutenberg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyardinternet%2Fwp-gutenberg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyardinternet%2Fwp-gutenberg/lists"}