Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    Doesn’t look like that for me. Maybe you have a plugin adding custom styling?

    Here’s what I see: https://cloudup.com/c9lIXosNwF6

    Thread Starter Scott Fennell

    (@scofennellgmailcom)

    Thank you SO much for responding to my humble ticket! I have admired your contributions for a long time and I have the feeling that if I could just get a little help to start, then I will be able to haul my dev shop into the modern Gutenberg world.

    You are correct, I have some plugin code that is distorting the button block. Here is the primary problem, where I am trying to deregister the “advanced” panel for all blocks:

    function lxbDeRemoveCustomClassName( settings, name ) {
        return lodash.assign( {}, settings, {
            supports: lodash.assign( {}, settings.supports, {
                customClassName: false
            } ),
        } );
    }
    
    wp.hooks.addFilter(
        'blocks.registerBlockType',
        'lxbDashboardEnhancements/RemoveCustomClassName',
        lxbDeRemoveCustomClassName
    );

    When this code gets added, I get this error:

    View post on imgur.com

    Which causes most of the CSS problems I originally reported. What is the correct syntax for removing the “Advanced” tab?

    • This reply was modified 7 years, 7 months ago by Scott Fennell.
    Moderator Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    Yeah, to be real honest with you, that kind of javascript code is outside my current knowledge set. Sorry, find somebody who understands JS better than me. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Why does the button block look weird?’ is closed to new replies.