1. Go to this page and download the library: Download devgeniem/acf-codifier library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
devgeniem / acf-codifier example snippets
$field_group = new Group( 'Field Group' );
$field_group->set_key( 'new_key' );
$field_group->set_position( 'side' ) // Set the field group to be shown in the side bar of the edit screen.
->set_style( 'seamless' ) // Set the field group to show as seamless.
->hide_element( 'the_content' ); // Hide the native WP content field.
$text->set_placeholder( 'Placeholder text' ) // Set a placeholder text.
->set_append( 'Appendable' ) // Set an appending text.
->set_maxlength( 30 ); // Set the maxlength.
$clone = new Field\CloneField( 'Clone' );
$clone->set_label_prefix() // Set label prefix setting as true
->add_clone( $some_field ) // Add a field object
->add_clone( $some_group ) // Add a field group object.
->add_clone( 'field-key' ); // Add a field by its key
$field_group->add_field( $clone );
$tab = new Field\Tab( 'My Very First Tab' );
$tab->set_placement( 'left' )
->set_endpoint()
->add_field( $some_field )
->add_field( $another_field );
$field_group->add_field( $tab );
$multisite_taxonomy = new Field\MultisiteTaxonomy( __( 'Select a category or a tag from blog 2', 'multisite_tax', 'multisite_tax' ) );
$multisite_taxonomy->set_taxonomies( [ 'category', 'post_tag' ] );
$multisite_taxonomy->set_blog_id( 2 );