Created
March 18, 2020 23:50
-
-
Save castroalves/98350f1d1319dc0b496ca9f0b8177a41 to your computer and use it in GitHub Desktop.
Disables tabs and media upload button in post content field. It also sets basic toolbar.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Disables tabs and media upload button in post content field | |
* | |
* @param $field | |
* | |
* @return mixed | |
* | |
* @author Cadu de Castro Alves <[email protected]> | |
*/ | |
function rpa_hub_disable_post_content_settings( $field ) { | |
if ( $field['key'] === '_post_content' ) { | |
$field['toolbar'] = 'basic'; | |
$field['tabs'] = 0; | |
$field['media_upload'] = 0; | |
} | |
return $field; | |
} | |
add_filter('acf/prepare_field', 'rpa_hub_disable_post_content_settings'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment