WordPress.org

Support

Support » Plugins and Hacks » Autoptimize » [Plugin: Autoptimize] No Admin-Bar in WP 3.1 (RC1) with "Optimize CSS Code"

[Plugin: Autoptimize] No Admin-Bar in WP 3.1 (RC1) with "Optimize CSS Code"

  • In the RC1 of WordPress 3.1 the new admin bar does not appear, if you select “Optimize CSS Code” in the Autoptimize plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think I found the reason for this. Autoptimize seems to combine all CSS code no matter what media they refer to. There is the line:

    <style type="text/css" media="print">#wpadminbar { display:none; }</style>

    In the code and Autoptimize puts this in the combined css for the screen display. The result is, that the admin bar is not displayed anymore.

    Für WordPress Version 3.1 ist das Problem mit der WP-Adminbar noch nicht behoben. Die Adminbar wird einfach nicht abgezeigt.

    Schade.

    It would be easy to fix this, but I’m not good in regular expressions. Maybe someone can help:

    In /classes/minify-html.php the line 109 is responsible for the vanishing admin bar. This regular expression extracts every style-code no matter for which media it is written.

    '/(\\s*)(<script\\b[^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/i'

    this line must be modified not to catch scripts with the parameter media=”print”.

    Is someone here who is able to modify this line?

    Unfortunately it seems, that this good plugin is not maintained by the author anymore 🙁

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Autoptimize] No Admin-Bar in WP 3.1 (RC1) with "Optimize CSS Code"’ is closed to new replies.
Skip to toolbar