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 $major_version The major version of ACF.
 *
 * @return void
 */
function wp_kama_acf_include_fields_action( $major_version ){

	// action...
}
$major_version(int)
The major version of ACF.

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

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

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

ACF::init()
acf/include_fields
acf/acf.php 318
do_action( 'acf/include_fields', ACF_MAJOR_VERSION );

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

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' ) );