learndash_gutenberg_enabled

apply_filters( 'learndash_gutenberg_enabled',  boolean $enabled,  string $post_type )

Filters whether the Gutenberg editor is enabled for the plugin or not.


Description #


Parameters #

$enabled

(boolean) Whether the Gutenberg editor is enabled or not.

$post_type

(string) The slug of the post type to be checked.


Source #

File: includes/rest-api/class-ld-rest-api.php


Examples #

 <?php
/**
 * Example usage for learndash_gutenberg_enabled filter.
 */
add_filter(
	'learndash_gutenberg_enabled',
	function( $enabled, $post_type ) {
		// May add any custom logic using $enabled, $post_type.

		// Always return $enabled.
		return $enabled;
	},
	10,
	2
);