Fork it, or download the latest release, and make it your own!
Need a quick start plugin to kick-start your next WordPress and ACF PRO project? Look no further.
This plugin is intended to provide a starting point for you to incorporate into your everyday WordPress and ACF PRO work.
It is highly recommended you search and replace all strings with your own.
- Search for:
demo_acf
and replace with your ownmy_client
- Search for
DEMO_ACF
and replate with your ownMY_CLIENT
- Be sure to update the plugin header at the top of
demo-acf-plugin.php
to your desired plugin name.
This demo plugin contains a few example ACF Blocks, which you can modify and use if you like. You can read more on each block.
Required You must have ACF PRO installed and activated in order to use the Demo ACF Plugin.
- Upload the Demo ACF Plugin folder to the plugins directory (typically
wp-content/plugins
) in your WordPress installation. - Activate the Demo ACF Plugin.
- That's it.
- Wrap "Site Settings" Options page in
function_exists()
check to fail gracefully if ACF PRO is not installed.
- Fixed Fatal Error for misnamed function call in
includes/acf-restrict-access.php
🤦♂️
- Restrict access to block locking based on email domain with
demo_acf_show_admin()
check. - Improve usage of
get_block_wrapper_attributes()
for Phone block based on Liam's Tweet thread. - Add
background
andtext
color supports to Phone block.
Added example of restricting access to ACF admin screens based on role && email domain, example: yourAgency.com
. So builders can limit admin screens for their clients. See: includes/acf-restrict-access.php
Initial release, which includes:
- ACF feature-type JSON loading and saving locations:
acf-json/field-groups
,acf-json/options-pages
,acf-json/post-types
,acf-json/taxonomies
- Example ACF Blocks: Phone Number
- ACF Block helpers:
- Add
demo_acf_blocks
options table entry for all blocks detected in/blocks
- Use
demo_acf_blocks
options to register blocks - Register custom block category with
block_categories_all
- Example of
acf/blocks/no_fields_assigned_message
if ACF Block has no fields
- Add
- Example Options Page for "Site Settings"