Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (18 sloc) 504 Bytes
<snippet>
<content><![CDATA[
add_filter( 'body_class', '${1:prefix}_body_class' );
/**
* Adds a css class to the body element
*
* @param array \$classes the current body classes
* @return array \$classes modified classes
*/
function ${1:prefix}_body_class( \$classes ) {
\$classes[] = '${2:class-name}';
return \$classes;
}
]]></content>
<tabTrigger>addbodyclass</tabTrigger>
<scope>source.php,source.php.embedded.block.html</scope>
<description>Add custom body class</description>
</snippet>