• Resolved SomniumLucidus

    (@somniumlucidus)


    The plugin claims it’s possible to exclude certain css classes from being hyphenated, by simply writing them down in an admin field named “Do not process elements of class”. However, this does not seem to be working for me.

    Has anyone got this to work, or am I doing something wrong?

    https://wordpress.org/plugins/wp-typography/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author pepe

    (@pputzer)

    I’ll look into this.

    Plugin Author pepe

    (@pputzer)

    Can you post an example of what you are trying to do? I’ve just added some unit tests on Github and while there was an error in the XPath expression for ignoring IDs, CSS classes seem to work fine.

    Thread Starter SomniumLucidus

    (@somniumlucidus)

    Hi, thanks for the fast reply.

    For example: on this page you’ll see a text column at left, which has been laid out in white text on a dark red background. That one should not be hyphenated. It has a class named leftcolumn.

    However, there’s a caveat: I’m using Site Origin’s Page Builder in order to achieve text columns. I’ve just run a test with a class named leftcolumn on a page where Page Builder has not been used, and it seems to be non-hyphenated, as it should be.

    If there’s no workaround to this, I guess I’ll have to choose between fine hyphenation control and Page Builder, lol. But at least those using Page Builder will be warned.

    Plugin Author pepe

    (@pputzer)

    Unfortunately, the linked example seems to be password protected.

    Thread Starter SomniumLucidus

    (@somniumlucidus)

    Sorry, I forgot I was working under a password. Now the site is accessible.

    Plugin Author pepe

    (@pputzer)

    How does this Page Builder plugin work? I’ve installed it locally, but I’m a bit stumped by the interface.

    Thread Starter SomniumLucidus

    (@somniumlucidus)

    On admin view, instead of writing a page’s text right away in the text editor, you press the “Page Builder” tab (right beside the two standard “Visual” and “Text” tabs), then you create a row, and then place a widget inside that row (in my case, a text editor widget). You can then add a class to that widget in one of the “Widget styles” field (see column at right). That’s where I’ve placed my leftcolumn class.

    Thread Starter SomniumLucidus

    (@somniumlucidus)

    The exact field in which to write the widget css class is Widget styles > Attributes > Widget class.

    Black Studio TinyMCE Widget is recommended as a text editor widget for Page Builder, so I’m using that one. Haven’t tried others.

    Plugin Author pepe

    (@pputzer)

    I’ve now had an extensive look at this: The problem is that Page Builder embeds widgets in the normal page content, resulting in the wp-Typography filters being called twice. Once on widget_text where the wrapping CSS class does not exist yet and a second time with the_content where the <div> is properly skipped.

    This has all sorts of bad side effects, so the proper way to fix this would IMHO be removing the call to the widget_text filter in Page Builder. Alternatively, you could unhook wp-Typography’s filter on widget_text from your theme’s function.php.

    Thread Starter SomniumLucidus

    (@somniumlucidus)

    Thank you very much for looking into this!

    Well, it’s not a very good situation, but at least now I know what is happening. I guess I’ll go with the unhooking method.
    Thanks again!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Blacklisting class elements does not seem to work’ is closed to new replies.