WordPress at a glance
function is not described

add_clean_index() WP 1.0.1

Adds an index to a specified table.

  • Global. wpdb. $wpdb

No Hooks.


true. True, when done with execution.


add_clean_index( $table, $index );
$table(string) (required)
Database table name.
$index(string) (required)
Database table index column.

Code of add clean index: wp-admin/includes/upgrade.php VER 5.0.3

function add_clean_index($table, $index) {
	global $wpdb;
	drop_index($table, $index);
	$wpdb->query("ALTER TABLE `$table` ADD INDEX ( `$index` )");
	return true;