Skip to content

Generate Mergebot schema files for WordPress plugins, themes, or core

Notifications You must be signed in to change notification settings

deliciousbrains/mergebot-schema-generator

Folders and files

NameName
Last commit message
Last commit date
Mar 2, 2018
Mar 2, 2018
Dec 12, 2016
Jan 25, 2017
Sep 13, 2017
Jan 11, 2017
Sep 13, 2017
Jan 5, 2017
Jan 5, 2017

Repository files navigation

Mergebot Schema Generator

This is an work in progress, rough round the edges plugin used to create custom data schemas to describe plugins used by the Mergebot app.

The plugin should be run on a development WordPress install, please please not a production site. It will install plugins and programmatically interrogate them.

Setup

Symlink the src/mergebot-schema-generator dir to your wp-content/plugins dir

Generate a schema with the WP-CLI command:

First of all the command must be run from the plugin directory: cd wp-content/plugins/mergebot-schema-generator

wp mergebot-schema generate --plugin=woocommerce

To run it for a specific version:

wp mergebot-schema generate --plugin=woocommerce --version=2.0

For WordPress core use:

wp mergebot-schema generate

When generating core schemas the command must be run from a multisite installation to ensure the network related tables are identified.

Scope

The generator will attempt define the following:

  • Primary keys of custom tables
  • Foreign key of custom tables
  • Key / Value relationship data (CLI prompts)
  • Shortcode attributes (CLI prompts)

When the command needs a human decision (eg. shortcodes) it will present helpful information and ask simple questions so the definition can be created.

The generator cannot define:

  • Content that has IDs
  • Queries that need to be ignored
  • Custom shortcode search locations
  • Table prefixes in meta keys

About

Generate Mergebot schema files for WordPress plugins, themes, or core

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages