{"id":15636581,"url":"https://github.com/spacedmonkey/wp-rest-blocks","last_synced_at":"2025-04-12T15:42:37.755Z","repository":{"id":38832450,"uuid":"193737427","full_name":"spacedmonkey/wp-rest-blocks","owner":"spacedmonkey","description":"Add gutenberg blocks data into post / page / widget REST API endpoints.","archived":false,"fork":false,"pushed_at":"2024-10-07T19:53:41.000Z","size":1726,"stargazers_count":121,"open_issues_count":26,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T15:16:39.083Z","etag":null,"topics":["blocks","rest-api","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/rest-api-blocks/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spacedmonkey.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"spacedmonkey"}},"created_at":"2019-06-25T15:43:25.000Z","updated_at":"2024-11-28T22:51:24.000Z","dependencies_parsed_at":"2023-12-18T16:59:29.823Z","dependency_job_id":"aaf969bd-50cb-498f-b517-3b7080906709","html_url":"https://github.com/spacedmonkey/wp-rest-blocks","commit_stats":{"total_commits":163,"total_committers":5,"mean_commits":32.6,"dds":"0.38650306748466257","last_synced_commit":"bafb87a86d723b5ec54440e6fd6feb7fd94d6879"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacedmonkey%2Fwp-rest-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacedmonkey%2Fwp-rest-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacedmonkey%2Fwp-rest-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacedmonkey%2Fwp-rest-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacedmonkey","download_url":"https://codeload.github.com/spacedmonkey/wp-rest-blocks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247033813,"owners_count":20872532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["blocks","rest-api","wordpress","wordpress-plugin"],"created_at":"2024-10-03T11:05:14.673Z","updated_at":"2025-04-03T16:13:22.226Z","avatar_url":"https://github.com/spacedmonkey.png","language":"PHP","funding_links":["https://github.com/sponsors/spacedmonkey"],"categories":[],"sub_categories":[],"readme":"# REST API blocks\nContributors: spacedmonkey\nDonate link: https://github.com/sponsors/spacedmonkey\nTags: blocks, gutenberg, api, wp-json, rest-api\nRequires at least: 5.5\nTested up to: 6.5\nRequires PHP: 7.0.0\nStable tag: 1.0.2\nLicense: GPLv3 or later\nLicense URI: https://www.gnu.org/licenses/gpl-3.0.en.html\n\n![](.wordpress-org/banner-1544x500.png)\n\nAdd gutenberg blocks data into the post / page REST API endpoints.\n\n[![Build Status](https://travis-ci.com/spacedmonkey/wp-rest-blocks.svg?branch=master)](https://travis-ci.com/spacedmonkey/wp-rest-blocks)\n\n## Description\n\nA simple plugin to add block data in json format into the rest api. Once installed, there will be two new fields added to the rest api, `has_blocks` and `blocks`.\nFor example output.\n```\n\"has_blocks\": true,\n\"block_data\": [\n  {\n\t\"blockName\": \"core/image\",\n\t\"attrs\": {\n\t  \"url\": \"https://www.spacedmonkey.com/wp-content/uploads/2018/12/test-image.jpg\",\n\t  \"alt\": \"Terminal de aeropuerto\",\n\t  \"caption\": \"fsfsdfdsfdssfd\",\n\t  \"href\": \"https://www.spacedmonkey.com/test-image\",\n\t  \"rel\": \"noreferrer noopener\",\n\t  \"linkClass\": \"jonny-123\",\n\t  \"linkTarget\": \"_blank\",\n\t  \"id\": 147355,\n\t  \"width\": 582,\n\t  \"height\": 327,\n\t  \"linkDestination\": \"attachment\"\n\t},\n\t\"innerBlocks\": [\n\t],\n\t\"innerHTML\": \"\\n\u003cfigure class=\\\"wp-block-image is-resized\\\"\u003e\u003ca class=\\\"jonny-123\\\" href=\\\"https://www.spacedmonkey.com/test-image\\\" target=\\\"_blank\\\" rel=\\\"noreferrer noopener\\\"\u003e\u003cimg src=\\\"https://www.spacedmonkey.com/wp-content/uploads/2018/12/test-image.jpg\\\" alt=\\\"Terminal de aeropuerto\\\" class=\\\"wp-image-147355\\\" width=\\\"582\\\" height=\\\"327\\\"/\u003e\u003c/a\u003e\u003cfigcaption\u003efsfsdfdsfdssfd\u003c/figcaption\u003e\u003c/figure\u003e\\n\",\n\t\"innerContent\": [\n\t  \"\\n\u003cfigure class=\\\"wp-block-image is-resized\\\"\u003e\u003ca class=\\\"jonny-123\\\" href=\\\"https://www.spacedmonkey.com/test-image\\\" target=\\\"_blank\\\" rel=\\\"noreferrer noopener\\\"\u003e\u003cimg src=\\\"https://www.spacedmonkey.com/wp-content/uploads/2018/12/test-image.jpg\\\" alt=\\\"Terminal de aeropuerto\\\" class=\\\"wp-image-147355\\\" width=\\\"582\\\" height=\\\"327\\\"/\u003e\u003c/a\u003e\u003cfigcaption\u003efsfsdfdsfdssfd\u003c/figcaption\u003e\u003c/figure\u003e\\n\"\n\t],\n\t\"rendered\": \"\\n\u003cfigure class=\\\"wp-block-image is-resized\\\"\u003e\u003ca class=\\\"jonny-123\\\" href=\\\"https://www.spacedmonkey.com/test-image\\\" target=\\\"_blank\\\" rel=\\\"noreferrer noopener\\\"\u003e\u003cimg src=\\\"https://www.spacedmonkey.com/wp-content/uploads/2018/12/test-image.jpg\\\" alt=\\\"Terminal de aeropuerto\\\" class=\\\"wp-image-147355\\\" width=\\\"582\\\" height=\\\"327\\\"/\u003e\u003c/a\u003e\u003cfigcaption\u003efsfsdfdsfdssfd\u003c/figcaption\u003e\u003c/figure\u003e\\n\"\n  }\n],\n```\n\n### Technical Notes\n\n* Requires PHP 5.6+.\n* Requires WordPress 5.5+.\n* Issues and Pull requests welcome on the GitHub repository: https://github.com/spacedmonkey/wp-rest-blocks\n\n## Installation\n\n### Using The WordPress Dashboard\n\n1. Navigate to the 'Add New' in the plugins dashboard\n2. Search for 'wp-rest-blocks'\n3. Click 'Install Now'\n4. Activate the plugin on the Plugin dashboard\n\n### Uploading in WordPress Dashboard\n\n1. Navigate to the 'Add New' in the plugins dashboard\n2. Navigate to the 'Upload' area\n3. Select `wp-rest-blocks.zip` from your computer\n4. Click 'Install Now'\n5. Activate the plugin in the Plugin dashboard\n\n### Using FTP\n1. Download `wp-rest-blocks.zip`\n2. Extract the `wp-rest-blocks` directory to your computer\n3. Upload the `wp-rest-blocks` directory to the `/wp-content/plugins/` directory\n4. Activate the plugin in the Plugin dashboard\n\n## Screenshots\n\n1. Add fields to the rest api.\n\n## Changelog ##\n\n### 1.0.2 ###\n* Fix issue with WordPress 6.5\n* Update coding standards to WP coding standards 3.1.0\n* Mark tested up to WP 6.5\n\n### 1.0.1 ###\n* Update coding standards to WP coding standards 3.0.1\n* Mark tested up to WP 6.4\n\n### 1.0.0 ###\nBreaking change!\nThe field in the REST API is changed from `blocks` to `block_data`.\n\n### 0.5.0 ###\n* Add support for new post types added in WordPress 5.9.\n\n### 0.4.0 ###\n* Added support for block based widget, added in WordPress 5.8. Block data is added to the /wp/v2/widgets endpoint.\n\n### 0.3.2 ###\n* Update translations\n\n### 0.3.1 ###\n* Hot fix.\n\n### 0.3.0 ###\n* Improve support for block that have attributes that use query source type.\n* Improve error handling for those that install this plugin without using composer.\n\n### 0.2.1 ###\n* Update dependency.\n\n### 0.2.0 ###\n* Breaking change. Field names have changed and required WordPress 5.5+\n\n### 0.1.0 ###\n* First version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacedmonkey%2Fwp-rest-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacedmonkey%2Fwp-rest-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacedmonkey%2Fwp-rest-blocks/lists"}