Skip to content

Commit

Permalink
Fixes auto-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
misaki-web committed Jul 8, 2024
1 parent b41dbeb commit 3602c91
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
12 changes: 12 additions & 0 deletions acf-json-field.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
################################################################################

require_once(__DIR__ . '/includes/init.php');
require_once(__DIR__ . '/includes/plugin-update-checker/plugin-update-checker.php');

################################################################################
# @title Assets
Expand Down Expand Up @@ -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
################################################################################
Expand Down
13 changes: 0 additions & 13 deletions includes/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

0 comments on commit 3602c91

Please sign in to comment.