graphettion
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] 404 Errors on PHP Cached FilesWorks like a charm. Thank you Frank!
Yay! That seemed to work. Thank you @dcooney!
Forum: Plugins
In reply to: [Autoptimize] 2 Render Blocking CSS FilesHrm, perhaps I should keep trying (i.e., copy/paste the same code and hit the “Save changes and empty cache” button?
Forum: Plugins
In reply to: [Autoptimize] Add CSS at the End of AO CSSYup, the backslashes were the culprit. Works like a charm now. Thank you!
Forum: Plugins
In reply to: [Autoptimize] Add CSS at the End of AO CSSIt’s not a big issue. I was just wondering if you could do it.
Forum: Plugins
In reply to: [Autoptimize] Add CSS at the End of AO CSSI did. I even used double quotes instead of single ones. ˉ\_(ツ)_/ˉ
Forum: Plugins
In reply to: [Autoptimize] Add CSS at the End of AO CSSI tried replacing the CSS style, but didn’t work. Am I missing something?:
// Replace CSS Styles function ao_override_css_after_minify($cssIn) { $style1 = '.button.mfp-close:before{font-family:\'Glyphicons Halflings\';content:\'\e014\';font-size:4rem;color:#fff}'; $style2 = '.button.mfp-close:before{font-family:\'Glyphicons Halflings\';content:\'\e014\';font-size:4rem;color:#333}'; $cssOut = str_replace($style1, $style2, $cssIn); return $cssOut; } add_filter('autoptimize_css_after_minify','ao_override_css_after_minify',10,1);
- This reply was modified 7 years, 1 month ago by graphettion.
Forum: Plugins
In reply to: [Autoptimize] Two AO CSS Files AppearErrr. It was the single quote thing. Bleh!
I also just want to thank you Frank and everyone who has helped with the AO plugin. You guys are not only great with making websites on wordpress painlessly easy and faster, but you also open source it. Love it.
Thanks again Frank! ??
Forum: Plugins
In reply to: [Autoptimize] Two AO CSS Files AppearI ran that code and it didn’t work. It went back to media=”screen” and still shows two css files.
This code works for adding both CSS files as media=”all”:
function replace_style_media_type($htmlIn) { $htmlOut = str_replace('media="screen"', 'media="all"', $htmlIn); return $htmlOut; } add_filter('autoptimize_html_after_minify','replace_style_media_type');
But still shows two css files. :/
Forum: Plugins
In reply to: [Autoptimize] Two AO CSS Files AppearI replaced all instances of media=”screen” with media=”all” and it still shows two .css files. Am I missing something?
// Replace media="screen" with media="all" function replace_style_media_type($htmlIn) { $htmlOut = str_replace('media="screen"', 'media="all"', $htmlIn); return $htmlOut; } add_filter('autoptimize_html_after_minify','replace_style_media_type');
Forum: Plugins
In reply to: [Autoptimize] Two AO CSS Files AppearAwesome! Thank you for the speedy response. So you’re saying they should all be either media=”all” or media=”screen”, not both. Correct? If so, which do you think would be better or does it matter?
Ex:
<link href=”path/to/css/file/style-1.css” rel=”stylesheet” type=”text/css” media=”all”>
<link href=”path/to/css/file/style-2.css” rel=”stylesheet” type=”text/css” media=”all”>Or
Ex:
<link href=”path/to/css/file/style-1.css” rel=”stylesheet” type=”text/css” media=”screen”>
<link href=”path/to/css/file/style-2.css” rel=”stylesheet” type=”text/css” media=”screen”>Forum: Plugins
In reply to: [Autoptimize] Two AO CSS Files AppearForum: Plugins
In reply to: [Autoptimize] Minify Inline JSNo problem! Thank you for the quick reply!
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Grid IssuesAwesome, I’ll look into that. I know this was kind of off-topic, but it’s been bugging me for a while and thought I would ask because I’m sure you run into this kind of stuff. Anyway, you’re too awesome. Thanks again @dcooney! ??
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Grid IssuesAh, I appreciate you looking into it. Thanks @dcooney.