• Resolved Bjarne Oldrup

    (@oldrup)


    Hey! Thank you for a nice plugin. Really makes the editor more approachable to us with some degree of cognitive challenges.

    I figured out how to ‘unhide’ individual blocks I use, using the examples present and complete list of core blocks

    add_filter( 'mrw_hidden_blocks', 'mrw_unhide_blocks', 10, 2 );
    function mrw_unhide_blocks( $blocks, $context ) {
    	// Unhide the following blocks (which are hidden by default)
    	$blocks = array_diff( $blocks, array( 'core/audio','core/code','core/details','core/table','core/video') );
    	return $blocks;
    }
    

    But I also use some inline markup in my content, including kbd, code and pre

    Screenshot: default inline markup options

    How do I ‘unhide’ these?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author mrwweb

    (@mrwweb)

    @oldrup, thanks so much for reviewing the documentation first. I appreciate it!

    Those inline formats were only hidden in the most recent update and the filtering of the feature was broken until yesterday and minimally documented until today. Thanks to your question, I updated the docs.

    You’re looking for the mrw_hidden_block_editor_settings filter, and you can find all current values for what it hides in the filter documentation on Github.

    I didn’t test, but this should do it for you:

    add_filter( 'mrw_hidden_block_editor_settings', 'wp17244675_unhide_inline_formats' );
    function wp17244675_unhide_inline_formats( $features ) {
    	return array_diff( $features, array( 'keyboard', 'inline-code' ) );
    }

    Let me know if that works for you!

    @oldrup – I’m glad you found my list of core WordPress blocks helpful 😉

    • AJ Clarke
    Thread Starter Bjarne Oldrup

    (@oldrup)

    @mrwwev – well, then I can happily report that testing the snippet was successful 😁

    Keyboard input and Language back in the dropdown

    I’ll continue testing on my sites. The block editor can really be an overwhelming experience to some. I’m so glad you are sharing this solution to help to clear up the user experience.

    Yeah, and @wpexplorer – nice work – turned out very helpful and to the point! Appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to unhide inline markup?’ is closed to new replies.