Last active
August 26, 2019 16:01
-
-
Save mahype/362c0b82dd08c12b54166dccaf1a6b43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filters the element wrap classes. | |
* | |
* @param array $wrap_classes Array of wrap classes. | |
* @param Element $element Element object. | |
*/ | |
function add_element_wrapper_class( $wrapper_classes, $element ) { | |
// If wanted, selecting a specific element | |
if( 33 !== $element->id ) { | |
return $wrapper_classes; | |
} | |
$wrapper_classes[] = 'my-css-class'; | |
return $wrapper_classes; | |
} | |
add_filter( 'torro_element_wrap_classes', 'add_element_wrapper_class', 10 , 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment