Skip to content

Instantly share code, notes, and snippets.

@abaicus
Last active August 4, 2021 12:41
Show Gist options
  • Save abaicus/b8c5c60b276344e195cc6fc00b11cf18 to your computer and use it in GitHub Desktop.
Save abaicus/b8c5c60b276344e195cc6fc00b11cf18 to your computer and use it in GitHub Desktop.
<?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