WP_CLI

Inflector::reset()public staticWP-CLI 1.0

Clears Inflectors inflected value caches, and resets the inflection rules to the initial values.

Метод класса: Inflector{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = Inflector::reset();

Код Inflector::reset() WP-CLI 2.8.0-alpha

public static function reset() {
	if ( empty( self::$initial_state ) ) {
		self::$initial_state = get_class_vars( 'Inflector' );

		return;
	}

	foreach ( self::$initial_state as $key => $val ) {
		if ( 'initial_state' !== $key ) {
			self::${$key} = $val;
		}
	}
}