Created
April 8, 2019 00:29
-
-
Save mikemcalister/94607f7f633828234fc1242f177aff2b 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
wp.hooks.addFilter( | |
"blocks.getBlockDefaultClassName", | |
"atomicblocks/ab-column-block-class-name", | |
abCustomClassName | |
); | |
function abCustomClassName( className, name ) { | |
if ( 'atomic-blocks/ab-columns' === name ) { | |
return classnames( | |
className, | |
'ab-has-bg-' + attributes.bgType | |
); | |
} | |
return className; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment