LLMS_Forms_Classic_Editor::disable_classic_editor( array $editors, string $post_type )

Prevent users from being allowed to choose the classic editor for forms post types


Description Description

The classic editor uses this filter to determine which editors are available for the given custom post type when users are allowed to choose which editor to use.


Top ↑

Parameters Parameters

$editors

(array) (Required) Associative array. The array key identifies the editor and the array value is a boolean specifying whether or not the editor is enabled for the given post type.

$post_type

(string) (Required) The post type being checked.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/forms/class-llms-forms-classic-editor.php

	public static function disable_classic_editor( $editors, $post_type ) {
		if ( LLMS_Forms::instance()->get_post_type() === $post_type ) {
			$editors['classic_editor'] = false;
		}
		return $editors;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.