Download the PHP package wordplate/acf without Composer
On this page you can find all versions of the php package wordplate/acf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wordplate/acf
More information about wordplate/acf
Files in wordplate/acf
Informations about the package acf

Extended ACF
Register advanced custom fields with object-oriented PHP.
Extended ACF provides an object-oriented API to register groups and fields with ACF. If you register fields in your theme, you can safely rely on version control when working with other developers. Oh, you don't have to worry about unique field keys.
- Installation
- Usage
- Settings
- Fields
- Basic
- Content
- Choice
- Relational
- Advanced
- Layout
- Location
- Conditional Logic
- Bidirectional Relationships
- Non-standards
helperTextcolumnddanddumpkeywithSettings
- Macros
- Custom Fields
- Upgrade Guide
Installation
Require this package, with Composer, in the root directory of your project.
To install the Advanced Custom Fields Pro plugin, download and place it in either the plugins or mu-plugins directory. After that, activate the plugin in the WordPress dashboard.
Learn more about installing ACF PRO using Composer.
Usage
To register a new field group, use the register_extended_field_group() function. This extends the default register_field_group() function from the ACF plugin. The key value is appended to field groups and fields. Here's an example of a field group.
Settings
For detailed information on field group settings, please consult the official ACF documentation. You can also find more examples in the examples directory.
- Register custom post type
- Register custom post type with Extended CPT
- Register Gutenberg block
- Register options page
Fields
All fields, except the clone field, have a corresponding class. Each field needs a label. If no name is specified, the label will be used as the name in snake_case. The name can only contain alphanumeric characters and underscores.
Most fields have the methods default, required, and wrapper. The non-standards section.
Basic
Email - The email field creates a simple email input.
Number - The number field creates a simple number input.
Password - The password field creates a simple password input.
Range - The range field provides an interactive experience for selecting a numerical value.
Text - The text field creates a simple text input.
Textarea - The textarea field creates a simple textarea.
URL - The URL field creates a simple uRL input.
Content
File - The file field allows a file to be uploaded and selected.
Gallery - The gallery field provides a simple and intuitive interface for managing a collection of images.
Image - The image field allows an image to be uploaded and selected.
Oembed - The oEmbed field allows an easy way to embed videos, images, tweets, audio, and other content.
WYSIWYG - The WYSIWYG field creates a full WordPress tinyMCE content editor.
Choice
Button Group - The button group field creates a list of radio buttons.
Checkbox - The checkbox field creates a list of tick-able inputs.
Radio Button - The radio button field creates a list of select-able inputs.
Select - The select field creates a drop down select or multiple select input.
True False - The true / false field allows you to select a value that is either 1 or 0.
Relational
Link - The link field provides a simple way to select or define a link (url, title, target).
Page Link - The page link field allows the selection of 1 or more posts, pages or custom post types.
Post Object - The post object field creates a select field where the choices are your pages + posts + custom post types.
Relationship - The relationship field creates a very attractive version of the post object field.
Taxonomy - The taxonomy field allows the selection of 1 or more taxonomy terms.
User - The user field creates a select field for all your users.
Advanced
Color Picker - The color picker field allows a color to be selected via a JavaScript popup.
Date Picker - The date picker field creates a jQuery date selection popup.
Icon Picker - The icon picker field allows you to easily select a Dashicon, a Media Library image, or a URL for an image or SVG.
Time Picker - The time picker field creates a jQuery time selection popup.
Date Time Picker - The date time picker field creates a jQuery date & time selection popup.
Google Map - The Google Map field creates an interactive map with the ability to place a marker.
Layout
Accordion - The accordion field is used to organize fields into collapsible panels.
Clone - The clone field enables you to choose and showcase pre-existing fields or groups. This field does not possess a custom field class. Instead, you can create a new file for your field and import it using the require statement whenever necessary.
Flexible Content - The flexible content field acts as a blank canvas to which you can add an unlimited number of layouts with full control over the order.
Group - The group allows you to create a group of sub fields.
Message - The message fields allows you to display a text message.
Repeater - The repeater field allows you to create a set of sub fields which can be repeated again and again whilst editing content!
Tab - The tab field groups fields into tabbed sections. Fields or groups added after a tab become its children. Enabling endpoint on a tab creates a new group of tabs.
Location
The Location class allows you to write custom location rules without specifying the name, operator, and value keys. If no operator is provided, it will use the operator as the value. For additional details on custom location rules, please visit this link.
[!NOTE]
Theifmethod was renamed towherein version 12, see the upgrade guide.
Conditional Logic
The conditional class helps you write conditional logic without knowing the field keys.
Bidirectional Relationships
The bidirectional method establishes a bidirectional relationship between two or more fields. Each field involved in this relationship must use the key method to set a custom key. Then, the keys of these related fields should be passed to the bidirectional method.
To learn more about ACF bidirectional relationships and their caveats, please consult the official ACF documentation.
[!IMPORTANT] We usually recommend avoiding the use of custom field keys. This is an exception to that rule. When using bidirectional relationships, you must set custom field keys.
Non-standards
helperText
The helperText method supports Markdown for the elements listed below.
column
The column property is not a standard in ACF. It is used as a shorthand for setting the width of the field wrapper. You can provide a number between 0 and 100 as its value.
[!NOTE] If you plan to use your custom fields in block patterns, we recommend setting all fields to 100% width. The fields appear in the right-hand sidebar, which has limited space.
dd and dump
The dd and dump methods are non-standard and not available in ACF. These methods are used for debugging.
To use the dd and dump methods, you need to install symfony/var-dumper.
key
The key method enables you to define a custom field key. The key should consist of alphanumeric characters and underscores, and must be prefixed with either field_ or layout_.
You can use the key argument to provide a custom field key in conditional logic.
[!IMPORTANT] Avoid using custom field keys unless you thoroughly understand them. The field keys are automatically generated when you use the
register_extended_field_groupfunction.
withSettings
The withSettings method overwrites any existing settings on the field when you want to add custom settings.
Another option for adding custom settings is to extend the field classes provided in the package. Please refer to the custom fields section.
Macros
Macros allow you to add custom methods to field classes at runtime. This is useful for adding reusable functionality without creating custom field classes. Register macros on the Field class to make them available to all field types. Use the acf/init hook to ensure they're available before field groups are registered.
If you need a macro that only applies to a specific field type, you can check the field instance:
Custom Fields
To create custom field classes, you can extend the available setting traits to add common methods like required and helperText.
When you're ready, you can import and use your field just like any other field in this library.
Upgrade Guide
This guide covers breaking changes for each major version. If you're upgrading from version 12 or lower, the package has been renamed — update your composer.json accordingly: