Download the PHP package mmirus/register-acf-gutenberg-block without Composer

On this page you can find all versions of the php package mmirus/register-acf-gutenberg-block. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package register-acf-gutenberg-block

Register ACF Gutenberg Block

This is a helper WordPress plugin to allow you to easily register new Gutenberg blocks via ACF.

Thanks to @mwdelaney and @mikespainhower for everything I learned and copied from their approaches to this problem!

Usage

  1. Install with: composer require mmirus/register-acf-gutenberg-block
  2. Add your block definitions to the $blocks array via the mmirus/register-acf-gutenberg-block filter

Your block definitions can be added in a plugin (recommended) or a theme.

:information_source: Example block definitions can be found at https://github.com/mmirus/register-acf-gutenberg-block-examples.

Following the examples will be the quickest way to get started. One you have the concept down, refer to these resources to go in-depth on what block options are available:

Block Rendering Options

ACF provides two methods to render blocks:

This plugin adds a third option: Blade templates. For now, this only works if you're using Sage.

To use a Blade template, just pass the absolute path to the template file, including the .blade.php extension, in the render_template option.

_NB: If you pass both render_callback and render_template, ACF uses the callback._

Defining Your Block's Fields

To promote keeping your block's field definitions in code with the rest of the block config, you can pass a fields option with the block settings when registering your block. The value of this option must be an ACF PHP field definition array. Primarily this is intended to allow you to use acf-builder to define your fields, as this is the format acf-builder's build() method returns.

Other than the fields setting, you can define the ACF fields used by your block however you normally prefer to add fields:

All you have to do is set the location rule to match your block. Note that blocks are registered with the prefix acf/, as in acf/your-block-name.

Installation

There are three options for installing this plugin:

  1. With composer from Packagist: composer require mmirus/register-acf-gutenberg-block
  2. With GitHub Updater
  3. By downloading the latest release ZIP from this repository and installing it like any normal WordPress plugin

Contributing

To work on this project (for yourself or to contribute a PR):

  1. Clone this repo
  2. Run composer install

And you should be good to go.

Pre-commit linting and code style checks are enforced (PSR-2 for PHP).


All versions of register-acf-gutenberg-block with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
composer/installers Version ^1.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mmirus/register-acf-gutenberg-block contains the following files

Loading the files please wait ....