File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
lifterlms/blocks-shortcodes Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Enable block visibility for the core/heading block.
3
+ *
4
+ * You can add this recipe to your site by creating a custom plugin
5
+ * or using the Code Snippets plugin available for free in the WordPress repository.
6
+ * Read this companion documentation for step-by-step directions on either method.
7
+ * https://lifterlms.com/docs/adding-custom-code/
8
+ */
9
+ wp . hooks . addFilter (
10
+ 'llms_block_supports_visibility' ,
11
+ 'your-namespace/modify-visibility' , // Unique namespace for your function
12
+ function ( ret , settings , name ) {
13
+ // Check if the block name is 'core/heading'
14
+ if ( name === 'core/heading' ) {
15
+ // Return true to modify the visibility support
16
+ return true ;
17
+ }
18
+ // Otherwise, return the original value
19
+ return ret ;
20
+ }
21
+ ) ;
You can’t perform that action at this time.
0 commit comments