Skip to content

Commit

Permalink
Load ACFExportManager on acf/init
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Sep 4, 2023
1 parent a4494dc commit e9dffe1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions modularity-timeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@
require_once MODULARITY_TIMELINE_PATH . 'Public.php';

// Acf auto import and export
$acfExportManager = new \AcfExportManager\AcfExportManager();
$acfExportManager->setTextdomain('modularity-timeline');
$acfExportManager->setExportFolder(MODULARITY_TIMELINE_PATH . 'source/php/AcfFields/');
$acfExportManager->autoExport(array(
'timeline' => 'group_59ede2f88a7b5'
));
$acfExportManager->import();
add_action('acf/init', function () {
$acfExportManager = new \AcfExportManager\AcfExportManager();
$acfExportManager->setTextdomain('modularity-timeline');
$acfExportManager->setExportFolder(MODULARITY_TIMELINE_PATH . 'source/php/AcfFields/');
$acfExportManager->autoExport(array(
'timeline' => 'group_59ede2f88a7b5'
));
$acfExportManager->import();
});

// Modularity 3.0 ready - ViewPath for Component library
add_filter('/Modularity/externalViewPath', function ($arr) {
Expand Down

0 comments on commit e9dffe1

Please sign in to comment.