PHPackages                             royboy789/gutenberg-array-save - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. royboy789/gutenberg-array-save

ActiveWordpress-plugin[Database &amp; ORM](/categories/database)

royboy789/gutenberg-array-save
==============================

Saving Gutenberg as a clean array of data to the database

2.0.0(7y ago)242716[8 PRs](https://github.com/royboy789/gutenberg-object-plugin/pulls)GPL-3.0PHPPHP ^7.0

Since Jul 12Pushed 3y ago12 watchersCompare

[ Source](https://github.com/royboy789/gutenberg-object-plugin)[ Packagist](https://packagist.org/packages/royboy789/gutenberg-array-save)[ RSS](/packages/royboy789-gutenberg-array-save/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (7)Dependencies (1)Versions (18)Used By (0)

Gutenberg Object Plugin
=======================

[](#gutenberg-object-plugin)

The purpose of this plugin is to save Gutenberg (New WordPress Editor) data as an array in the database which is accessible via the REST API.

Installation
------------

[](#installation)

- Clone
- Run `composer install`
- Run `npm install`
- `npm run dev` / `npm run build`
- Activate plugin.

WIKI
----

[](#wiki)

I am adding docs to the [WIKI](https://github.com/royboy789/gutenberg-object-plugin/wiki)

WHY
---

[](#why)

While the new UI for the WordPress Editor is amazing, the data as it is stored lends a lot ot be desired with HTML comments as a basis for data

WHERE
-----

[](#where)

Data will be saved in a new database table `[prefix]_gutes_arrays`

REST API
--------

[](#rest-api)

I have included a filter to adda `editor_block` to the normal post content response.

API ENDPOINTS
-------------

[](#api-endpoints)

Includes 1 new route:

- `wp-json/gutes-db/v1/[post-id]` - Supports **GET** &amp; **POST**
- `wp-json/gutes-db/v1/[post-id]/revisions` - Supports **GET** only

### GET

[](#get)

`GET: wp-json/gutes-db/v1/[post-id]`**Returns**

- **is\_gutes**: Is the post created with Gutenberg
- **post\_id**: Post ID
- **data**: Gutenberg Data
- \_**embedded\['post'\]**: *optional with \_embed* - response from WP REST API for post

### SAVE

[](#save)

`POST: wp-json/gutes-db/v1/[post-id]`

- **id** - *required* - post ID
- **gutes\_data** - *required* - Data array

Hooks
-----

[](#hooks)

To send the data to the API to save we must first transform data. Using `wp.hooks` You can tie into this process by adding a filter

- namespace - 'gutes\_array'
- filter name - `clean_data_[hyphenated-block-name]`
- data - data sent and returned is an array of the attributes

**EXAMPLE**
`wp.hooks.addFilter( 'clean_data_core-paragraph', 'gutes-array', callback );`

Adding editor\_blocks to other CPT Responses
--------------------------------------------

[](#adding-editor_blocks-to-other-cpt-responses)

**V 1.1.0+**
Do you have another CPT (post type) that you are using Gutenberg with? Great! all you have to do is define `GUTENBERG_OBJECT_PLUGIN_CPTS` before `rest_api_init` with a comma separated list of CPTs.

```
add_action( 'init', 'my_custom_cpts', 10 );
function my_custom_cpts() {
    if ( ! defined( 'GUTENBERG_OBJECT_PLUGIN_CPTS' ) ) {
        define( 'GUTENBERG_OBJECT_PLUGIN_CPTS', 'product,page,other_cpt' );
    }
}

```

Once `GUTENBERG_OBJECT_PLUGIN_CPTS` is defined as a comma separated list the `editor_block` data will apaper in that CPT's API response

Helper Functions
----------------

[](#helper-functions)

- `` - returns array of block data

Releases / Built Packages
-------------------------

[](#releases--built-packages)

I will try to create packaged releases if you are not comforatble with using `composer`, `webpack`, or `npm` and just want to try this plugin on your site.

Head over to the [Releases](https://github.com/royboy789/gutenberg-object-plugin/releases) to download a packaged zip that is ready to use.

Third Party Block Support
-------------------------

[](#third-party-block-support)

If you have a plugin that adds blocks, just create an issue with a link to the plugin and I'll try to add in support!

- [WebDevStudios (WDS) Blocks](https://github.com/WebDevStudios/WDS-Blocks)

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 89.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~52 days

Total

7

Last Release

2648d ago

Major Versions

1.6.0 → 2.0.02019-02-15

PHP version history (2 changes)1.2.0PHP ^7.1

1.5.0PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8cde91baff1531183b6db4b68786f1b05d084aa3b1d530e5fab4d220cb77d95?d=identicon)[jeroensmink98](/maintainers/jeroensmink98)

---

Top Contributors

[![royboy789](https://avatars.githubusercontent.com/u/4039786?v=4)](https://github.com/royboy789 "royboy789 (98 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![0aveRyan](https://avatars.githubusercontent.com/u/9565066?v=4)](https://github.com/0aveRyan "0aveRyan (1 commits)")[![acafourek](https://avatars.githubusercontent.com/u/5088983?v=4)](https://github.com/acafourek "acafourek (1 commits)")[![Epenance](https://avatars.githubusercontent.com/u/6709028?v=4)](https://github.com/Epenance "Epenance (1 commits)")[![zaklampert](https://avatars.githubusercontent.com/u/7213046?v=4)](https://github.com/zaklampert "zaklampert (1 commits)")

### Embed Badge

![Health badge](/badges/royboy789-gutenberg-array-save/health.svg)

```
[![Health](https://phpackages.com/badges/royboy789-gutenberg-array-save/health.svg)](https://phpackages.com/packages/royboy789-gutenberg-array-save)
```

###  Alternatives

[aaemnnosttv/wp-sqlite-db

SQLite drop-in database driver for WordPress

58563.4k5](/packages/aaemnnosttv-wp-sqlite-db)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
