Compare commits

..

2 Commits

Author SHA1 Message Date
Cooper Dalrymple
52a49a53e8 Allow theme-included ACF Pro as requirement 2025-08-01 10:53:24 -05:00
Cooper Dalrymple
9a758ba545 Fix makefile /lang issue 2025-08-01 10:51:45 -05:00
3 changed files with 6 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ copy:
cp -RT ./acf-json ./$(PACKAGE)/acf-json
cp -RT ./data ./$(PACKAGE)/data
cp -RT ./includes ./$(PACKAGE)/includes
cp -RT ./lang ./$(PACKAGE)/lang
cp -RT ./lang ./$(PACKAGE)/lang || true
cp -RT ./lib ./$(PACKAGE)/lib
cp -RT ./vendor ./$(PACKAGE)/vendor
cp -f ./* ./$(PACKAGE) || true

View File

@@ -38,7 +38,7 @@ abstract class PluginBase {
add_action('init', [$this, 'setup_textdomain']);
// Requirements Check
add_action('plugins_loaded', [$this, 'check_requirements'], 1, 0);
add_action('after_setup_theme', [$this, 'check_requirements'], 1, 0);
$this->enable();
}
@@ -46,11 +46,11 @@ abstract class PluginBase {
// Plugin Initialization
protected function enable() {
add_action('plugins_loaded', [$this, 'load'], 10, 0);
add_action('after_setup_theme', [$this, 'load'], 10, 0);
add_filter('acf/settings/load_json', [$this, 'register_acf_json'], 10, 1);
}
protected function disable() {
remove_action('plugins_loaded', [$this, 'load'], 10, 0);
remove_action('after_setup_theme', [$this, 'load'], 10, 0);
remove_filter('acf/settings/load_json', [$this, 'register_acf_json'], 10, 1);
}

View File

@@ -36,8 +36,8 @@ class Plugin extends PluginBase {
$this->add_requirement('advanced-custom-fields', [
'name' => 'Advanced Custom Fields PRO',
'url' => 'https://www.advancedcustomfields.com/',
'type' => self::REQUIREMENT_PLUGIN,
'plugin' => 'advanced-custom-fields-pro/acf.php',
'type' => self::REQUIREMENT_CLASS,
'class' => '\ACF',
]);
$this->add_files([