add_cssclass()
Adds a CSS class to a string.
Хуков нет.
Возвращает
Строку
. The string with the CSS class added.
Использование
add_cssclass( $class_to_add, $classes );
- $class_to_add(строка) (обязательный)
- The CSS class to add.
- $classes(строка) (обязательный)
- The string to add the CSS class to.
Список изменений
С версии 2.7.0 | Введена. |
Код add_cssclass() add cssclass WP 6.4.3
function add_cssclass( $class_to_add, $classes ) { if ( empty( $classes ) ) { return $class_to_add; } return $classes . ' ' . $class_to_add; }