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 #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?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
);