Created
March 9, 2017 03:28
-
-
Save ngearing/c2a0af938dc662cc6fca6d4530f82de3 to your computer and use it in GitHub Desktop.
ACF Pro update db script works on manageWP
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 | |
include $_SERVER['DOCUMENT_ROOT'].'/wp-content/plugins/advanced-custom-fields-pro/acf.php'; | |
include $_SERVER['DOCUMENT_ROOT'].'/wp-content/plugins/advanced-custom-fields-pro/admin/install.php'; | |
$acf_admin = new acf_admin_install(); | |
$updates = acf_get_db_updates(); | |
$message = ''; | |
// bail early if no updates | |
if (empty($updates)) { | |
echo acf_get_db_version(); | |
return; | |
} | |
// install updates | |
foreach ($updates as $version => $callback) { | |
$message .= $acf_admin->run_update($callback); | |
} | |
// updates complete | |
acf_update_db_version(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment