Download the PHP package wp-grogu/acf-manager without Composer

On this page you can find all versions of the php package wp-grogu/acf-manager. 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-manager

Grogu ACF Manager

Latest Version on Packagist Total Downloads

Introduction

This package brings an object-oriented approach to Wordpress Advanced Custom Fields (ACF) plugin. ACF manager will help you to create field groups, gutemberg blocks, options pages and flexible content directly in individual PHP classes, so you keep a clean and structured app folder. Using this package will make forget about the ACF back-office interface, allowing you to version control your ACF groups and make it a breeze to push your changes to multiple environments.

In addition to thoses (awesome) features, you will also receive back FieldSet objects instead of arrays when retreiving your fields from the database, which enables fields casting into Models, classes, or any other transformed data based on the field name (eg. a field named "image" may become an App\Models\Attachment object, with all the corresponding attributes and methods).

Behing the scene, acf-manager uses a custom fork of wordplate/extended-acf package, coming with an explicit documentation, so make sure to checkout the official repositiory to discover how to define fields.

To make use of Eloquent Models (and corresponding builts-in transformers) in your app, if not already included in your framework, we highly recommand having a look at the ObjectPress library which brings some of the best Laravel features in any Wordpress installation.

This package comes as a standalone but is fully compatible with Bedrock/Sage 10 stack, with a native Wordpress theme (with an autoload logic setted up), and probably with many other frameworks out here.

Basic usage

At it's most basic usage, the plugin may be used this way to create a field group :

This package has a config file to manage your blocks registration without the need to use wordpress hooks :

It's also a breeze to create Flexible content sections :

Finally, when receiving back your fields, you may parse them into Field sets to benefit from casting and fluent interface allowing multiple accessors on the class :

The FieldSet class is completely fluent and all of those methods are valid to get values :

Ready to get started ?

Requirements

ACF manager has some requirements :

Installation

  1. Use composer to install the package in your theme directory :

  2. Create an Acf namespace inside your autoloaded app/ folder, which may look like this :

  3. Bootload the module in your functions.php file :

  4. Create the config/acf.php file which will hold your configuration using WP-CLI :

Or copy/paste it directly from the source file.

Usage

Every field group or gutemberg block has it's own individual class/file. Each of them has, obviously, some fields, and some may also have one or more locations. All of them are defined using the great wordplate/extended-acf package, which provides a fluent API around ACF.

Create a field group

To create a group, run the following WP-CLI command :

A new file is created :

You may manage some additionnal configurations for the group using class properties :

Once your fields and locations are defined, you may register your new group in the config/acf.php config file, using the groups key :

You may also combine fields from another group using the PHP splat operator :

Create a Gutemberg block

// WIP

Working with flexible content

Because your fields are defined in individual classes, it becomes really easy to copy your fields from one group to another, or transform them into layouts. For this example, we will assume you are defining each of your flexible layouts as separate field groups, inside a app/Acf/Groups directory. You would define your Flexible and it's layouts this way :

Make sure that the App\Acf\Templates\FreeSection group is registred inside your acf config file, et voilà !

Behind the scene, the layout's FieldGroup $title and $slug properties are used to define the layout. However, if you need more control on the field registration, you can manually define your layout :

Retreiving your fields (FieldSet class)

// WIP

Field casting

// WIP

Contribute

Feel free to contribute ! You may send merge request.


All versions of acf-manager with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
laravel/helpers Version ^1.0
tgeorgel/wordplate-acf Version ^2.0.0
wp-grogu/laravel-fluent-plus Version dev-master
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 wp-grogu/acf-manager contains the following files

Loading the files please wait ....