GithubHelp home page GithubHelp logo

zachgibb / schemas Goto Github PK

View Code? Open in Web Editor NEW

This project forked from advancedcustomfields/schemas

0.0 0.0 0.0 22 KB

Schemas for Advanced Custom Fields

Home Page: https://www.advancedcustomfields.com

schemas's Introduction

ACF Schemas

This respository contains the schema used in ACF which extend the native WordPress schemas to add ACF's specific options.

It is based on https://github.com/WordPress/gutenberg/tree/trunk/schemas.

JSON schemas are used by code editors to offer tooltips, autocomplete, and validation.

JSON schema usage

Many editors recognize the $schema property in JSON files.

Update your block.json to include:

{
	"$schema": "https://advancedcustomfields.com/schemas/json/main/block.json"
}

Visual Studio Code and PhpStorm are two popular editors that work out of the box. However, some editors require a plugin installed, and not all editors recognize the $schema property. Check your editor's documentation for details. Additionally, SchemaStore.org and JSON Schema have lists of editors known to have support if your current editor is unsupported.

Local Development

You may wish to update one of the schemas to conform to a new change in the structure. In order to do this you'll want to be able to see how your changes impact how your IDE displays schema information.

To allow this you will need to:

  • update your block's block.json to include:
{
	"$schema": "file://{{FULL_FILE_PATH}}/schemas/json/block.json"
}

Be sure to replace {{FULL_FILE_PATH}} with the full local path to your Gutenberg repo.

With this in place you should now be able to edit either schemas/json/block.json in order to see changes reflected in block.json in your IDE.

schemas's People

Contributors

lgladdy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.