ACF\Pro\Datastore

REST_Save::__construct │ public │ ACF 6.8.1

Constructor.

Defers hook registration to rest_api_init so the acf/settings/enable_datastore filter is available to themes and plugins by the time the gate is evaluated.

Метод класса: REST_Save{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$REST_Save = new REST_Save();
$REST_Save->__construct();

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

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

Код REST_Save::__construct() ACF 6.8.11

public function __construct() {
	add_action( 'rest_api_init', array( $this, 'maybe_register_rest_save_hooks' ) );

	// Skip the legacy ACF_Form_Post::save_post() during the metabox AJAX
	// (meta-box-loader) that follows each Gutenberg REST save -- the REST
	// path has already saved the values, so re-running the legacy save
	// would clobber them.
	add_filter( 'acf/form-post/skip_save', array( $this, 'skip_metabox_loader_save' ), 10, 3 );
}