Last active
August 4, 2021 12:41
-
-
Save abaicus/b8c5c60b276344e195cc6fc00b11cf18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Migrate hfg_builders on demosites. | |
*/ | |
function demosites_run_builders_migrator() { | |
$option = 'neve_demosites_header_migrated'; | |
$has_migrated = get_option( $option ); | |
if ( $has_migrated === true ) { | |
return; | |
} | |
$neve_builder_migrator_file = trailingslashit( get_template_directory() ) . 'inc/core/builder_migrator.php'; | |
if ( ! file_exists( $neve_builder_migrator_file ) ) { | |
return; | |
} | |
require_once $neve_builder_migrator_file; | |
$migrator = new \Neve\Core\Builder_Migrator(); | |
$migrator->run(); | |
update_option( $option, true ); | |
} | |
demosites_run_builders_migrator(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment