make_db_current()
Updates the database tables to a new schema.
By default, updates all the tables to use the latest defined schema, but can also be used to update a specific set of tables in wp_get_db_schema().
Хуков нет.
Возвращает
null
. Ничего.
Использование
make_db_current( $tables );
- $tables(строка)
- Which set of tables to update.
По умолчанию: 'all'
Список изменений
С версии 1.5.0 | Введена. |
Код make_db_current() make db current WP 6.1.1
function make_db_current( $tables = 'all' ) { $alterations = dbDelta( $tables ); echo "<ol>\n"; foreach ( $alterations as $alteration ) { echo "<li>$alteration</li>\n"; } echo "</ol>\n"; }