WordPress action hook

acf/register_fields

Fired by 11 WordPress plugins, running on 150+ sites between them.

How to use acf/register_fields

It's an action: your callback runs at that point. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'acf/register_fields', function() {
	// Your code runs here.
}, 10, 1 );

Argument names come from Dooodl's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

11 plugins that fire acf/register_fields

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Dooodl icon Dooodl50+ installs do_action( 'acf/register_fields' ) includes/libs/advanced-custom-fields/acf.php:427
  2. Fancy Grid Portfolio icon Fancy Grid Portfolio20+ installs do_action( 'acf/register_fields' ) lib/advanced-custom-fields/acf.php:428
  3. Simple Content Adder icon Simple Content Adder20+ installs do_action( 'acf/register_fields' ) lib/advanced-custom-fields/acf.php:443
  4. TSA Commerce icon TSA Commerce20+ installs do_action( 'acf/register_fields' ) vendors/acf/acf.php:451
  5. Google Merchant Product Feed icon Google Merchant Product Feed10+ installs do_action( 'acf/register_fields' ) test.php:417
  6. LogicalDOC WordPress Explorer icon LogicalDOC WordPress Explorer10+ installs do_action( 'acf/register_fields' ) advanced-custom-fields/acf.php:440
  7. Simply Documents icon Simply Documents10+ installs do_action( 'acf/register_fields' ) lib/advanced-custom-fields/acf.php:464
  8. Church Options icon Church Options10+ installs do_action( 'acf/register_fields' ) lib/advanced-custom-fields/acf.php:464
  9. Quick Recommend icon Quick RecommendFewer than 10 installs do_action( 'acf/register_fields' ) lib/advanced-custom-fields/acf.php:464
  10. ASD Feature Maps icon ASD Feature MapsFewer than 10 installs do_action( 'acf/register_fields' ) includes/advanced-custom-fields/acf.php:451
  11. Flaunt Your Clients icon Flaunt Your ClientsFewer than 10 installs do_action( 'acf/register_fields' ) includes/advanced-custom-fields/acf.php:405

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.