我需要有关高级自定义字段(ACF)中所见即所得(WYSIWYG)编辑器的帮助。
工具栏未显示(例如,粗体,斜体,下划线等)
add_filter( 'acf/fields/wysiwyg/toolbars' , 'my_toolbars' );
function my_toolbars( $toolbars )
{
// Add a new toolbar called "Very Simple"
// - this toolbar has only 1 row of buttons
$toolbars['Very Simple' ] = array();
$toolbars['Very Simple' ][1] = array('bold' , 'italic' , 'underline' );
// Edit the "Full" toolbar and remove 'code'
// - delet 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;
}
感谢任何意见
谢谢。