https://github.com/log-oscon/acf-plus
Common utility classes for the Advanced Custom Fields (Pro) plugin on WordPress.
https://github.com/log-oscon/acf-plus
Last synced: over 1 year ago
JSON representation
Common utility classes for the Advanced Custom Fields (Pro) plugin on WordPress.
- Host: GitHub
- URL: https://github.com/log-oscon/acf-plus
- Owner: log-oscon
- License: gpl-2.0
- Created: 2015-09-02T10:32:22.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-12-27T11:40:11.000Z (over 9 years ago)
- Last Synced: 2025-03-24T18:21:13.926Z (over 1 year ago)
- Language: PHP
- Size: 35.2 KB
- Stars: 10
- Watchers: 12
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ACF Plus #
Common utility classes for the Advanced Custom Fields (Pro) plugin on WordPress.
## Usage ##
### Field Groups ###
Extend the `\logoscon\ACF\Group` class, defining the `_register()` method:
```php
class My_Group extends \logoscon\ACF\Group {
protected function _register() {
// My field group definition.
}
}
```
This method should contain (at the very least) the code exported by Advanced Custom Fields, although you're encouraged to improve its maintainability. To help make code clearer, the following helper methods are provided:
* `_field_tab`
* `_location_is`
* `_location_in` (see `\logoscon\ACF\Rule\Operator\In`)
* `_location_are`
### Support for the `IN` operator in location rules ###
```php
\logoscon\ACF\Rule\Operator\In::register();
```
## Changelog ##
### 1.1.0 ###
* Multiple location rule builder for equality checks.
### 1.0.0 ###
* Initial release.