bootstrap-blocks-wordpress-plugin
bootstrap-blocks-wordpress-plugin copied to clipboard
Button Style Options filter
Adding the function "function myButtonStyleOptions( styleOptions )" I receive this error messagge: Parse error: syntax error, unexpected token ")", expecting variable
Hi @adwlabs. Could you maybe post the whole function you're adding? With just this snippet it's hard to see where the issue could be.
I’m trying to test the function showed in the how to:
function myButtonStyleOptions( styleOptions ) { styleOptions.push( { label: 'My Option', value: 'my-option', bgColor: '#ff0000', textColor: '#ffffff', } ); return styleOptions; } wp.hooks.addFilter( 'wpBootstrapBlocks.button.styleOptions', 'myplugin/wp-bootstrap-blocks/button/styleOptions', myButtonStyleOptions );
thank you for your support