{"action":"created","issue":{"url":"https://api.github.com/repos/futtta/autoptimize/issues/80","repository_url":"https://api.github.com/repos/futtta/autoptimize","labels_url":"https://api.github.com/repos/futtta/autoptimize/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/futtta/autoptimize/issues/80/comments","events_url":"https://api.github.com/repos/futtta/autoptimize/issues/80/events","html_url":"https://github.com/futtta/autoptimize/pull/80","id":205350578,"number":80,"title":"Added support for multiple background images and CDN","user":{"login":"dtbaker","id":543073,"avatar_url":"https://avatars.githubusercontent.com/u/543073?v=3","gravatar_id":"","url":"https://api.github.com/users/dtbaker","html_url":"https://github.com/dtbaker","followers_url":"https://api.github.com/users/dtbaker/followers","following_url":"https://api.github.com/users/dtbaker/following{/other_user}","gists_url":"https://api.github.com/users/dtbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/dtbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtbaker/subscriptions","organizations_url":"https://api.github.com/users/dtbaker/orgs","repos_url":"https://api.github.com/users/dtbaker/repos","events_url":"https://api.github.com/users/dtbaker/events{/privacy}","received_events_url":"https://api.github.com/users/dtbaker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-02-04T14:25:16Z","updated_at":"2017-02-04T22:04:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/futtta/autoptimize/pulls/80","html_url":"https://github.com/futtta/autoptimize/pull/80","diff_url":"https://github.com/futtta/autoptimize/pull/80.diff","patch_url":"https://github.com/futtta/autoptimize/pull/80.patch"},"body":"Related to this post:\r\n\r\nhttps://wordpress.org/support/topic/cdn-with-multiple-background-images/#post-8737831\r\n\r\nExample of this fix is here: https://verge-blog-demo.themes.dtbaker.net/ \r\n\r\nBefore this fix the `#page` CSS was this. It only had a single `theme-cdn.dtbaker.net` URL replacement. The other images were not referenced to the CDN:\r\n\r\n```\r\n.vergeblog_header_overpng #page {\r\n    background-image: \r\n         url(https://theme-cdn.dtbaker.net/wp-content/themes/verge-blog/images/under-left-leaf.png),\r\n         url(//verge-blog-demo.themes.dtbaker.net/wp-content/themes/verge-blog/images/over-blue-bird.png),\r\n         url(//verge-blog-demo.themes.dtbaker.net/wp-content/themes/verge-blog/images/under-top.png),\r\n         url(//verge-blog-demo.themes.dtbaker.net/wp-content/themes/verge-blog/images/bg-top-grunge.png);\r\n}\r\n```\r\n\r\nAfter this fix it correctly replaces all images with the CDN url, like this:\r\n\r\n```\r\n.vergeblog_header_overpng #page {\r\n    background-image: \r\n         url(https://theme-cdn.dtbaker.net/wp-content/themes/verge-blog/images/under-left-leaf.png),\r\n         url(https://theme-cdn.dtbaker.net/wp-content/themes/verge-blog/images/over-blue-bird.png),\r\n         url(https://theme-cdn.dtbaker.net/wp-content/themes/verge-blog/images/under-top.png),\r\n         url(https://theme-cdn.dtbaker.net/wp-content/themes/verge-blog/images/bg-top-grunge.png);\r\n```"},"comment":{"url":"https://api.github.com/repos/futtta/autoptimize/issues/comments/277481422","html_url":"https://github.com/futtta/autoptimize/pull/80#issuecomment-277481422","issue_url":"https://api.github.com/repos/futtta/autoptimize/issues/80","id":277481422,"user":{"login":"zytzagoo","id":46947,"avatar_url":"https://avatars.githubusercontent.com/u/46947?v=3","gravatar_id":"","url":"https://api.github.com/users/zytzagoo","html_url":"https://github.com/zytzagoo","followers_url":"https://api.github.com/users/zytzagoo/followers","following_url":"https://api.github.com/users/zytzagoo/following{/other_user}","gists_url":"https://api.github.com/users/zytzagoo/gists{/gist_id}","starred_url":"https://api.github.com/users/zytzagoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zytzagoo/subscriptions","organizations_url":"https://api.github.com/users/zytzagoo/orgs","repos_url":"https://api.github.com/users/zytzagoo/repos","events_url":"https://api.github.com/users/zytzagoo/events{/privacy}","received_events_url":"https://api.github.com/users/zytzagoo/received_events","type":"User","site_admin":false},"created_at":"2017-02-04T22:04:17Z","updated_at":"2017-02-04T22:04:17Z","body":"@futtta yeah, #81 looks way better... tho the regex used might not cover all the edge cases (for example, the spec allows for any number of spaces between `url` and the opening `(` bracket etc.) -- that's just from light reading, too tired to really dig in.\r\n\r\nI'm using a similar (but maybe more \"complete\") regex in my branch here: https://github.com/zytzagoo/autoptimize/blob/tests/classes/autoptimizeStyles.php#L9 "}}
{"actor":{"display_login":"zytzagoo"}}