homegrade_theme_production/includes/wysiwyg.php
Nonimart 1886840c70
Some checks failed
continuous-integration/drone/push Build is failing
FINAL MERGE V2 (from antoine-merge branch)
2025-08-05 14:53:21 +02:00

24 lines
633 B
PHP

<?php
function enqueue_light_toolbar($toolbars)
{
$toolbars['Very Simple'] = array();
$toolbars['Very Simple'][1] = array('bold', 'link');
// 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;
}
add_filter('acf/fields/wysiwyg/toolbars', 'enqueue_light_toolbar');