acf/include_fields хук-событиеACF 5.0.0

Fires during initialization. Used to add local fields.

Использование

add_action( 'acf/include_fields', 'wp_kama_acf_include_fields_action' );

/**
 * Function for `acf/include_fields` action-hook.
 * 
 * @param int $ACF_FIELD_API_VERSION ACF_FIELD_API_VERSION The field API version.
 *
 * @return void
 */
function wp_kama_acf_include_fields_action( $ACF_FIELD_API_VERSION ){

	// action...
}
$ACF_FIELD_API_VERSION(int)
ACF_FIELD_API_VERSION The field API version.

Список изменений

С версии 5.0.0 Введена.

Где вызывается хук

ACF::init()
acf/include_fields
acf/acf.php 340
do_action( 'acf/include_fields', ACF_FIELD_API_VERSION );

Где используется хук в Advanced Custom Fields PRO

acf/includes/local-fields.php 590
add_action( 'acf/include_fields', '_acf_do_prepare_local_fields', 0, 1 );
acf/includes/local-json.php 41
add_action( 'acf/include_fields', array( $this, 'include_fields' ) );