Uses
| Uses | Description |
|---|---|
| wp-admin/includes/upgrade.php: dbDelta() | Modifies the database based on specified SQL statements. |
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().
(string) (Optional) Which set of tables to update. Default is 'all'.
Default value: 'all'
File: wp-admin/includes/upgrade.php
function make_db_current( $tables = 'all' ) {
$alterations = dbDelta( $tables );
echo "<ol>\n";
foreach ( $alterations as $alteration ) {
echo "<li>$alteration</li>\n";
}
echo "</ol>\n";
} | Version | Description |
|---|---|
| 1.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/make_db_current