Skip to content

Instantly share code, notes, and snippets.

@kellenmace
Created June 29, 2017 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellenmace/ab93e7edab148bdbcd9bf3ada9525883 to your computer and use it in GitHub Desktop.
Save kellenmace/ab93e7edab148bdbcd9bf3ada9525883 to your computer and use it in GitHub Desktop.
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