ACF\Pro\Datastore
REST_Save::__construct
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.
Method of the class: REST_Save{}
No Hooks.
Returns
null. Nothing (null).
Usage
$REST_Save = new REST_Save(); $REST_Save->__construct();
Changelog
| Since 6.8.1 | Introduced. |
REST_Save::__construct() REST Save:: construct code ACF 6.8.8
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 );
}