acf_pro_updates::init
Initializes the ACF PRO updates functionality.
Method of the class: acf_pro_updates{}
No Hooks.
Returns
null. Nothing (null).
Usage
$acf_pro_updates = new acf_pro_updates(); $acf_pro_updates->init();
Changelog
| Since 5.5.10 | Introduced. |
acf_pro_updates::init() acf pro updates::init code ACF 6.8.8
public function init() {
// Enable defined license activation regardless of `show_updates` setting.
add_action( 'admin_init', 'acf_pro_check_defined_license', 20 );
add_action( 'admin_init', 'acf_pro_maybe_reactivate_license', 25 );
add_action( 'current_screen', 'acf_pro_display_activation_error', 30 );
// Bail early if the updates page is not visible.
if ( ! acf_pro_is_updates_page_visible() ) {
return;
}
acf_register_plugin_update(
array(
'id' => 'pro',
'key' => acf_pro_get_license_key(),
'slug' => acf_get_setting( 'slug' ),
'basename' => acf_get_setting( 'basename' ),
'version' => acf_get_setting( 'version' ),
)
);
if ( is_admin() ) {
add_action( 'in_plugin_update_message-' . acf_get_setting( 'basename' ), array( $this, 'modify_plugin_update_message' ), 10, 2 );
}
}