Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove the Basic toolbar so that the Full toolbar appears in ACF wysiwyg fields
<?php
/**
* Remove the Basic toolbar so that the Full toolbar appears in ACF wysiwyg fields.
*
* @since 0.1.0
* @author Kellen Mace
* @param array $toolbars The toolbars.
* @return array $toolbars The toolbars, with the Basic toolbar removed.
*/
public function remove_acf_wysiwyg_basic_toolbar( $toolbars ) {
if ( isset( $toolbars['Basic'] ) && isset( $toolbars['Full'] ) ) {
unset( $toolbars['Basic'] );
}
return $toolbars;
}
add_filter( 'acf/fields/wysiwyg/toolbars', 'km_remove_acf_wysiwyg_basic_toolbar' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment