Skip to content

Commit

Permalink
Merge pull request #149 from xs-khosomi/fix/updatechecker-change-order
Browse files Browse the repository at this point in the history
アップデートチェッカーとプラグインとの競合を解消
  • Loading branch information
yhira committed Oct 19, 2023
2 parents 120e6d3 + f894a1b commit 72ec121
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions functions.php
Expand Up @@ -44,13 +44,16 @@ function fetch_updater_url( $new_sv_weight ) {
}

//アップデートチェックの初期化
require_once abspath(__FILE__).'lib/plugin-update-checker/plugin-update-checker.php';
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
$myUpdateChecker = PucFactory::buildUpdateChecker(
fetch_updater_url(100), //JSONファイルのURL
__FILE__,
'cocoon-master'
);
add_action( 'init', function() {
require_once abspath(__FILE__).'lib/plugin-update-checker/plugin-update-checker.php';
$myUpdateChecker = PucFactory::buildUpdateChecker(
fetch_updater_url(100), //JSONファイルのURL
__FILE__,
'cocoon-master'
);
});


//本文部分の冒頭を綺麗に抜粋する
if ( !function_exists( 'get_content_excerpt' ) ):
Expand Down

0 comments on commit 72ec121

Please sign in to comment.