-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Option to disable HTML Compression for Logged-In Users #208
Conversation
@@ -345,6 +346,7 @@ public function setup() | |||
'htmlc_compress_css_code' => '1', // `0|1`. | |||
'htmlc_compress_js_code' => '1', // `0|1`. | |||
'htmlc_compress_html_code' => '1', // `0|1`. | |||
'htmlc_when_logged_in' => '0', // `0|1`; enable when logged in? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@renzms I noticed the formatting is slightly off here; notice how your addition here doesn't line up with the options above it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@renzms I noticed the formatting is still off on this line.
@renzms It looks like all that's needed now is to check this option before running the HTML Compressor when users are logged in. Can you find where that would go? |
Thanks, I didn't catch the alignment in Atom.
Where would that go? |
Were you able to look? Any ideas where it might go? |
@@ -840,6 +840,12 @@ public function __construct() | |||
echo ' <p><input type="text" name="'.esc_attr(GLOBAL_NS).'[saveOptions][htmlc_cache_expiration_time]" value="'.esc_attr($this->plugin->options['htmlc_cache_expiration_time']).'" /></p>'."\n"; | |||
echo ' <p class="info" style="display:block;">'.__('<strong>Tip:</strong> the value that you specify here MUST be compatible with PHP\'s <a href="http://php.net/manual/en/function.strtotime.php" target="_blank" style="text-decoration:none;"><code>strtotime()</code></a> function. Examples: <code>2 hours</code>, <code>7 days</code>, <code>6 months</code>, <code>1 year</code>.', SLUG_TD).'</p>'."\n"; | |||
echo ' <p>'.sprintf(__('<strong>Note:</strong> This does NOT impact the overall cache expiration time that you configure with %1$s. It only impacts the sub-routines provided by the HTML Compressor. In fact, this expiration time is mostly irrelevant. The HTML Compressor uses an internal checksum, and it also checks <code>filemtime()</code> before using an existing cache file. The HTML Compressor class also handles the automatic cleanup of your cache directories to keep it from growing too large over time. Therefore, unless you have VERY little disk space there is no reason to set this to a lower value (even if your site changes dynamically quite often). If anything, you might like to increase this value which could help to further reduce server load. You can <a href="https://github.com/websharks/HTML-Compressor" target="_blank">learn more here</a>. We recommend setting this value to at least double that of your overall %1$s expiration time.', SLUG_TD), esc_html(NAME)).'</p>'."\n"; | |||
echo ' <h3>'.__('Do NOT use Html Compression for logged in users?', SLUG_TD).'</h3>'."\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@renzms Please change this to "Do NOT use HTML Compression for logged-in users?" (Note the changes to: 'HTML' and 'logged-in'.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@renzms Actually, please change it to the following (I just realized we're going to be defaulting this option to disabled, so the title should reflect that); change it to the following please:
Enable HTML Compression for logged-in users?
…r Logged-In Users; see wpsharks/comet-cache#650
Right, except I would put a block just like this one right underneath it for |
…n users are logged in; see: wpsharks/comet-cache#650
…n users are logged in; see: wpsharks/comet-cache#650
@raamdev Added changes, ready for review! Thanks. |
@renzms I added another note here: #208 (comment) |
@jaswsinc This is ready for a 2nd reviewer when you get a chance. :-) I've tested this feature branch to confirm it works as expected. |
Updating screenshot; fixed a few things in the description. Edit: See below. |
@raamdev I reviewed your UI enhancements with the improved description of this option. Looks great to me. Nice! |
see: wpsharks/comet-cache#650