Welcome to the Advanced Custom Fields field type template repository. Here you will find a starter-kit for creating a new ACF field type. This starter-kit will work as a normal WP plugin.
For more information about creating a new field type, please read the following article: http://www.advancedcustomfields.com/resources/tutorials/creating-a-new-field-type/
/assets
: folder for all asset files./assets/css
: folder for .css files./assets/images
: folder for image files/assets/js
: folder for .js files/fields
: folder for all field class files./fields/multisite_post_object-v5.php
: Field class compatible with ACF version 5/fields/multisite_post_object-v4.php
: Field class compatible with ACF version 4/lang
: folder for .pot, .po and .mo filesacf-multisite_post_object.php
: Main plugin file that includes the correct field file based on the ACF versionreadme.txt
: WordPress readme file to be used by the WordPress repository
This template uses PLACEHOLDERS
such as multisite_post_object
throughout the file names and code. Use the following list of placeholders to do a 'find and replace':
multisite_post_object
: Single word, no spaces. Underscores allowed. eg. donate_buttonMultisite Post Object
: Multiple words, can include spaces, visible when selecting a field type. eg. Donate Buttonhttps://github.com/heyjones/acf-multisite-post-object
: Url to the github or WordPress repositoryacf, multisite, post object
: Comma separated list of relevant tagsSelect posts from other blogs in a multisite installation
: Brief description of the field type, no longer than 2 linesEXTENDED_DESCRIPTION
: Extended description of the field typeChris Jones
: Name of field type authorhttp://heyjones.com
: URL to author's website
Edit the multisite_post_object-v5.php
and multisite_post_object-v4.php
files (now renamed using your field name) and include your custom code in the appropriate functions.
Please note that v4 and v5 field classes have slightly different functions. For more information, please read:
Edit this README.md
file with the appropriate information and delete all content above and including the following line.
Select posts from other blogs in a multisite installation
EXTENDED_DESCRIPTION
This ACF field type is compatible with:
- ACF 5
- ACF 4
- Copy the
acf-multisite_post_object
folder into yourwp-content/plugins
folder - Activate the Multisite Post Object plugin via the plugins admin page
- Create a new field via ACF and select the Multisite Post Object type
- Please refer to the description for more info regarding the field type settings
Please see readme.txt
for changelog