Download the PHP package davidwebca/acf-block-style-location without Composer

On this page you can find all versions of the php package davidwebca/acf-block-style-location. 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 acf-block-style-location

ACF Block Style Location

:bangbang: WARNING! This plugin is probably unstable since it fiddles
its way around to find React instances in the page.

Now that you've been warned: Hey, welcome! For those of you who use block styles and ACF Blocks, you probably wonder why it's not possible to register a group field for a specific block style.

The simple reason is probably because it's unreliable right now in the current Gutenberg APIs (2021-12-20), but it might change soon. In the meantime, I've hacked around this solution that 1) caches the block styles as a transient; 2) finds the ACF form React instance in the dom; 3) forces the refresh of the ACF form when we click a block style.

This is far from perfect, but if it can be of any use to someone, good!

Requirements

Installation

Install via Composer:

Or simply download zip of this repo and place in your plugins directory!

Setup

You'll need to first visit a Gutenberg-enabled page to prune the block styles cache. This is simply because WordPress doesn't allow fetching Block Styles on non-gutenberg pages (yet) since they can still be registered from the JavaScript API only. ACF adheres to that and only activates its block functionalities on Gutenberg-enabled pages.

Once you've done that, you can go back to the admin and fill in your Field Groups with the block location and then the block style location. Only the block style location should work though since all the block styles are namespaced.

The value to pass, for those who use PHP or ACF Builder to register their fields, is as follows:

Example:

Also possible to negate:

Bug Reports and contributions

All issues can be reported right here on github and I'll take a look at it. I don't intend on maintaining this a lot this the APIs will vastly change in the next few releases of Gutenberg, but please don't hesitate to ask around and create issues on Github. Make sure to give as many details as possible since I'm working full-time and will only look at them once in a while. Feel free to add the code yourself with a pull request.

License

This code is provided under the MIT License.


All versions of acf-block-style-location with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
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 davidwebca/acf-block-style-location contains the following files

Loading the files please wait ...