ACF\Pro\Datastore
Revisions::skip_during_rest
Tells acf_revisions to skip the legacy metabox handling on REST requests.
Hooked to the acf/revisions/skip_legacy_metabox_handling filter. During a REST save, REST_Save copies field values to the post and revision, so the legacy metabox-AJAX-driven path in acf_revisions must not run.
Method of the class: Revisions{}
No Hooks.
Returns
true|false.
Usage
$Revisions = new Revisions(); $Revisions->skip_during_rest( $skip );
- $skip(true|false) (required)
- Whether to skip the legacy handling.
Changelog
| Since 6.8.1 | Introduced. |
Revisions::skip_during_rest() Revisions::skip during rest code ACF 6.8.8
public function skip_during_rest( $skip ) {
if ( ! acf_is_using_datastore() ) {
return $skip;
}
return $skip || ( defined( 'REST_REQUEST' ) && REST_REQUEST );
}