Merge lp:~amereservant/autoptimize/trunk into lp:~vcs-imports/autoptimize/trunk-cscvs

Proposed by David on 2011-08-17
Status: Needs review
Proposed branch: lp:~amereservant/autoptimize/trunk
Merge into: lp:~vcs-imports/autoptimize/trunk-cscvs
Diff against target: 12 lines (+1/-1)
1 file modified
classes/autoptimizeStyles.php (+1/-1)
To merge this branch: bzr merge lp:~amereservant/autoptimize/trunk
Reviewer Review Type Date Requested Status
VCS imports 2011-08-17 Pending
Review via email: mp+71814@code.launchpad.net

Commit message

Fixed admin-bar bug.

Description of the change

Fixed the admin bar bug in WordPress 3.0+. The plugin no longer includes media="print" styles from the <head></head> tags, but instead leaves them as is.

To post a comment you must log in.
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/17/2011 7:55 AM, David wrote:
> David has proposed merging lp:~amereservant/autoptimize/trunk into
> lp:autoptimize.
>
> Requested reviews: VCS imports (vcs-imports)
>
> For more details, see:
> https://code.launchpad.net/~amereservant/autoptimize/trunk/+merge/71814
>
> Fixed the admin bar bug in WordPress 3.0+. The plugin no longer
> includes media="print" styles from the <head></head> tags, but
> instead leaves them as is.

This is a VCS-import, did you mean to submit this against the Ubuntu
package instead?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5LhjQACgkQJdeBCYSNAAOHRwCgkE/4vis857ogRl+7yEBMVXGC
B9cAn2+OD6mf1NxVkPl9uGhFjnUFQhmB
=RTQI
-----END PGP SIGNATURE-----

David (amereservant) wrote :

Hey John,
I have no idea. This is my first time using Launchpad and I noticed I wasn't the only one with the problem, so I did my best to figure out how to submit a fix for the issue.
If I did it wrong, it wouldn't surprise me....

Unmerged revisions

82. By David on 2011-08-17

Fixed issue where it was removing and including the print style for the admin bar.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'classes/autoptimizeStyles.php'
2--- classes/autoptimizeStyles.php 2009-10-18 18:29:27 +0000
3+++ classes/autoptimizeStyles.php 2011-08-17 05:55:35 +0000
4@@ -32,7 +32,7 @@
5 '\'%%IEHACK%%\'.base64_encode("$1").\'%%IEHACK%%\'',$this->content);
6
7 //Get <style> and <link>
8- if(preg_match_all('#(<style[^>]*>.*</style>)|(<link[^>]*text/css[^>]*>)#Usmi',$this->content,$matches))
9+ if(preg_match_all('#(<style(?!.*print)[^>]*>.*</style>)|(<link[^>]*text/css[^>]*>)#Usmi',$this->content,$matches))
10 {
11 foreach($matches[0] as $tag)
12 {

Subscribers

People subscribed via source and target branches

to all changes: