acf_upgrade_all()
Runs upgrade routines if this site has an upgrade available.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
acf_upgrade_all();
Список изменений
С версии 5.7.4 | Введена. |
Код acf_upgrade_all() acf upgrade all ACF 6.0.4
function acf_upgrade_all() { // Increase time limit if possible. if ( function_exists( 'set_time_limit' ) ) { set_time_limit( 600 ); } // start timer timer_start(); // log acf_dev_log( 'ACF Upgrade Begin.' ); // vars $db_version = acf_get_db_version(); // 5.0.0 if ( acf_version_compare( $db_version, '<', '5.0.0' ) ) { acf_upgrade_500(); } // 5.5.0 if ( acf_version_compare( $db_version, '<', '5.5.0' ) ) { acf_upgrade_550(); } /** * When adding new upgrade routines here, increment the ACF_UPGRADE_VERSION * constant in `acf.php` to the new highest upgrade version. */ // upgrade DB version once all updates are complete acf_update_db_version( ACF_VERSION ); if ( is_multisite() ) { // Clears the network upgrade notification banner after site upgrades. delete_site_transient( 'acf_network_upgrade_needed_' . ACF_UPGRADE_VERSION ); } // log global $wpdb; acf_dev_log( 'ACF Upgrade Complete.', $wpdb->num_queries, timer_stop( 0 ) ); }