acf_revisions::__construct
Constructs the acf_revisions class.
Метод класса: acf_revisions{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$acf_revisions = new acf_revisions(); $acf_revisions->__construct();
Код acf_revisions::__construct() acf revisions:: construct ACF 6.4.2
public function __construct() { add_action( 'wp_restore_post_revision', array( $this, 'wp_restore_post_revision' ), 10, 2 ); add_filter( '_wp_post_revision_fields', array( $this, 'wp_preview_post_fields' ), 10, 2 ); add_filter( '_wp_post_revision_fields', array( $this, 'wp_post_revision_fields' ), 10, 2 ); add_filter( 'acf/validate_post_id', array( $this, 'acf_validate_post_id' ), 10, 2 ); // WP 6.4+ handles things differently. if ( version_compare( get_bloginfo( 'version' ), '6.4', '>=' ) ) { add_action( '_wp_put_post_revision', array( $this, 'maybe_save_revision' ), 10, 2 ); add_filter( 'wp_save_post_revision_post_has_changed', array( $this, 'check_acf_fields_have_changed' ), 9, 3 ); add_filter( 'wp_post_revision_meta_keys', array( $this, 'wp_post_revision_meta_keys' ) ); $this->register_meta(); } else { add_filter( 'wp_save_post_revision_check_for_changes', array( $this, 'wp_save_post_revision_check_for_changes' ), 10, 3 ); } }