acf_upgrade_550_termmeta()
acf_upgrade_550_termmeta
Upgrades all ACF4 termmeta saved in wp_options to the wp_termmeta table.
Хуки из функции
Возвращает
null. Ничего (null).
Использование
acf_upgrade_550_termmeta();
Список изменений
| С версии 5.7.4 | Введена. |
Код acf_upgrade_550_termmeta() acf upgrade 550 termmeta ACF 6.4.2
function acf_upgrade_550_termmeta() {
// log
acf_dev_log( 'ACF Upgrade 5.5.0 Termmeta.' );
// bail early if no wp_termmeta table
if ( get_option( 'db_version' ) < 34370 ) {
return;
}
// get all taxonomies
$taxonomies = get_taxonomies( false, 'objects' );
// loop
if ( $taxonomies ) {
foreach ( $taxonomies as $taxonomy ) {
acf_upgrade_550_taxonomy( $taxonomy->name );
}
}
// action for 3rd party
do_action( 'acf/upgrade_550_termmeta' );
}