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



add_cssclass › WordPress Function

Od2.7.0
Przestarzałyn/a
add_cssclass ( $class_to_add, $classes )
Parametry: (2)
  • (string) $class_to_add The CSS class to add.
    Wymagane: Tak
  • (string) $classes The string to add the CSS class to.
    Wymagane: Tak
Powrót:
  • (string) The string with the CSS class added.
Zdefiniowane na:
Codex:

Adds a CSS class to a string.



Źródło

function add_cssclass( $class_to_add, $classes ) {
	if ( empty( $classes ) ) {
		return $class_to_add;
	}

	return $classes . ' ' . $class_to_add;
}