acf_pro_updates::init
Initializes the ACF PRO updates functionality.
Метод класса: acf_pro_updates{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$acf_pro_updates = new acf_pro_updates(); $acf_pro_updates->init();
Список изменений
| С версии 5.5.10 | Введена. |
Код acf_pro_updates::init() acf pro updates::init ACF 6.4.2
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 );
}
}