Home › Forums › ACF PRO › WYSIWYG Toolbar filter not working › Reply To: WYSIWYG Toolbar filter not working
Thank you for the question.
I believe you have to make use of the array_search() function. It returns the key of the element it finds, which can be used to remove that element from the original array using unset()
The code will look something like this:
if( ($key = array_search('code' , $toolbars['Full' ][2])) !== false )
{
unset( $toolbars['Full' ][2][$key] );
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.