wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



make_db_current › WordPress Function

Od1.5.0
Przestarzałyn/a
make_db_current ( $tables = 'all' )
Parametry:
  • (string) $tables Optional. Which set of tables to update. Default is 'all'.
    Wymagane: Nie
    Domyślny: 'all'
Użytkowanie:
  • dbDelta
Zdefiniowane na:
Codex:

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


Źródło

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