• Design Extreme

    (@designextreme)


    Trying your new plugin and I like how you’ve done it. ??

    This is a feature request:

    Please can you enqueue your style sheet rather than place it in the <body>? You could generate a set of random classes upon activation to make it more random.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Design Extreme

    (@designextreme)

    @ludwigyou Checking in with this update request.

    I do want to use this plugin on other websites, but it does need a little smoothing of its rough edges before I proceed.

    If you need any assistance with the code, please message me through my website.

    Plugin Author Ludwig You

    (@ludwigyou)

    Hello, I’m not sure I understand your request.

    Can you specify which line you are talking about in the code?

    Thread Starter Design Extreme

    (@designextreme)

    @ludwigyou It’s in the method: get_universal_honey_pot_inputs_html:

        $honey_pot = '<style type="text/css">.'. $hash_without_numbers .' { position: absolute !important; left: -9999vw !important; }</style>';
    

    This should be enqueued so the invalid HTML is not within the <body>.

    The error in W3C Validator is: Error: Element style not allowed as child of element form in this context.

    If you need to write to a file, let me know as I have code for this (i.e. to generate CSS that responds to a predefined list of IDs), but you can refer to the element using a class (so non-unique).

    See: wp_enqueue_style() documentation and calling within a class.

    If this isn’t possible for you, consider using a scope, but I am not sure if this is well-supported.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Enqueue Style Sheet’ is closed to new replies.