WordPress开发者和主题制作者的搜索引擎



make_db_current ›

Since1.5.0
已弃用n/a
make_db_current ( $tables = 'all' )
参数:
  • (string) $tables Optional. Which set of tables to update. Default is 'all'.
    Required: No
    默认: 'all'
用户:
  • dbDelta
定义在:
文档:

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().



源码

function make_db_current( $tables = 'all' ) {
	$alterations = dbDelta( $tables );
	echo "<ol>\n";
	foreach ( $alterations as $alteration ) {
		echo "<li>$alteration</li>\n";
	}
	echo "</ol>\n";
}