When your website means business.

ACF | Type: PHPACF Option for ‘Very Simple’ WYSIWYG Toolbar

ACF add very simple wysiwyg toolbar option (functions.php).

add_filter( 'acf/fields/wysiwyg/toolbars' , 'my_toolbars'  );
function my_toolbars( $toolbars ) {
// Uncomment to view format of $toolbars
/*
echo '< pre >';
print_r($toolbars);
echo '< /pre >';
die;
*/

// Add a new toolbar called "Very Simple"
// - this toolbar has only 1 row of buttons
$toolbars['Very Simple' ] = array();
$toolbars['Very Simple' ][1] = array('styleselect', 'bold' , 'italic' , 'link', 'unlink' );

// Edit the "Full" toolbar and remove 'code'
// - delete from array code from http://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key
// if( ($key = array_search('code' , $toolbars['Full' ][2])) !== false )
// {
//    unset( $toolbars['Full' ][2][$key] );
// }

// remove the 'Basic' toolbar completely
// unset( $toolbars['Basic' ] );

// return $toolbars - IMPORTANT!
return $toolbars;
}
Menu
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Cookies Notice