WP_HTML_Tag_Processor::remove_class()publicWP 6.2.0

Removes a class name from the currently matched tag.

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

Хуков нет.

Возвращает

true|false. Whether the class was set to be removed.

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

$WP_HTML_Tag_Processor = new WP_HTML_Tag_Processor();
$WP_HTML_Tag_Processor->remove_class( $class_name );
$class_name(строка) (обязательный)
The class name to remove.

Список изменений

С версии 6.2.0 Введена.

Код WP_HTML_Tag_Processor::remove_class() WP 6.3.1

public function remove_class( $class_name ) {
	if ( $this->is_closing_tag ) {
		return false;
	}

	if ( null !== $this->tag_name_starts_at ) {
		$this->classname_updates[ $class_name ] = self::REMOVE_CLASS;
	}

	return true;
}