Tribe__Events__Editor__Template__Overwrite::disable_editor_settings_wpautop( array $settings, string $editor_id )

If function gutenberg_disable_editor_settings_wpautop() does not exist, use this to disable wpautop in classic editor if blocks exist.


Parameters

$settings

(array) (Required) Original editor settings.

$editor_id

(string) (Required) ID for the editor instance.


Top ↑

Return

(array) Filtered settings.


Top ↑

Source

File: src/Tribe/Editor/Template/Overwrite.php

	public function disable_editor_settings_wpautop( $settings, $editor_id ) {
		$post = get_post();
		if ( 'content' === $editor_id && is_object( $post ) && has_blocks( $post ) ) {
			$settings['wpautop'] = false;
		}
		return $settings;
	}

Top ↑

Changelog

Changelog
Version Description
4.7 Introduced.