ACF\Site_Health
Site_Health::__construct
Constructs the ACF_Site_Health class.
Method of the class: Site_Health{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Site_Health = new Site_Health(); $Site_Health->__construct();
Changelog
| Since 6.3 | Introduced. |
Site_Health::__construct() Site Health:: construct code ACF 6.8.8
public function __construct() {
$this->ai_usage = new AI_Usage( $this );
add_action( 'debug_information', array( $this, 'render_tab_content' ) );
add_action( 'acf_update_site_health_data', array( $this, 'update_site_health_data' ) );
$hook = 'acf_update_site_health_data';
$timestamp = wp_next_scheduled( $hook );
if ( ! $timestamp ) {
wp_schedule_event( time(), 'daily', $hook );
} elseif ( 'daily' !== wp_get_schedule( $hook ) ) {
wp_unschedule_event( $timestamp, $hook );
wp_schedule_event( time(), 'daily', $hook );
}
// ACF events.
add_action( 'acf/first_activated', array( $this, 'add_activation_event' ) );
add_action( 'acf/activated_pro', array( $this, 'add_activation_event' ) );
add_filter( 'acf/pre_update_field_group', array( $this, 'pre_update_acf_internal_cpt' ) );
add_filter( 'acf/pre_update_post_type', array( $this, 'pre_update_acf_internal_cpt' ) );
add_filter( 'acf/pre_update_taxonomy', array( $this, 'pre_update_acf_internal_cpt' ) );
add_filter( 'acf/pre_update_ui_options_page', array( $this, 'pre_update_acf_internal_cpt' ) );
}