diff --git a/acf-json-field.php b/acf-json-field.php index 8cc58ec..3bd1c4c 100644 --- a/acf-json-field.php +++ b/acf-json-field.php @@ -25,6 +25,7 @@ ################################################################################ require_once(__DIR__ . '/includes/init.php'); +require_once(__DIR__ . '/includes/plugin-update-checker/plugin-update-checker.php'); ################################################################################ # @title Assets @@ -60,6 +61,17 @@ wp_enqueue_style('acf-json-field-css', $url_dir . 'assets/css/ajf.css', [], ACF_JSON_FIELD_VERSION); }); +################################################################################ +# @title Update checker +################################################################################ + +$update_checker = \YahnisElsts\PluginUpdateChecker\v5\PucFactory::buildUpdateChecker( + 'https://github.com/misaki-web/acf-json-field', + __FILE__, + 'acf-json-field' +); +$update_checker->getVcsApi()->enableReleaseAssets(); + ################################################################################ # @title Shortcode ################################################################################ diff --git a/includes/init.php b/includes/init.php index f0b6eac..07048b6 100644 --- a/includes/init.php +++ b/includes/init.php @@ -19,16 +19,3 @@ acf_register_field_type(__NAMESPACE__ . '\\acf_field_json'); }); - -/** - * Include the plugin update checker. - */ - -require_once __DIR__ . '/plugin-update-checker/plugin-update-checker.php'; - -$update_checker = \YahnisElsts\PluginUpdateChecker\v5\PucFactory::buildUpdateChecker( - 'https://github.com/misaki-web/acf-json-field', - __FILE__, - 'acf-json-field' -); -$update_checker->getVcsApi()->enableReleaseAssets();