make_db_current()
make_db_current( string $tables = ‘all’ ) 将数据库表更新为新架构。U…
make_db_current( string $tables = ‘all’ )
将数据库表更新为新架构。
Updates the database tables to a new schema.
将数据库表更新为新架构。
Updates the database tables to a new schema.
目录锚点:#说明#参数#返回#源码
说明(Description)
默认情况下,更新所有表以使用最新定义的架构,但也可以用于更新wp_get_db_schema()中的特定表集。
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 | 
|---|---|---|---|
| $tables | (string) | 可选 | 要更新的表集合。默认为“全部”。 | 
返回(Return)
无返回值
源码(Source)
function make_db_current( $tables = 'all' ) {
    $alterations = dbDelta( $tables );
    echo "<ol>n";
    foreach ( $alterations as $alteration ) {
        echo "<li>$alteration</li>n";
    }
    echo "</ol>n";
}
| 更新版本 | 源码位置 | 使用 | 被使用 | 
|---|---|---|---|
| 1.5.0 | wp-admin/includes/upgrade.php:2947 | 0 | 1 function | 
类别:WordPress 函数手册、 
		本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。


还没有任何评论,赶紧来占个楼吧!