Skip to content
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

Added new GTM/GA default exclusion; Fixed typos #395

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/js/js_delay.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/lazyload.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion data/const.default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ optm-ccss_sep_uri = ''
optm-js_defer_exc = 'jquery.js
jquery.min.js
gtm.js
analytics.js'
analytics.js
/gtag/js'

; O_OPTM_GM_JS_EXC
optm-gm_js_exc = ''
Expand Down
4 changes: 2 additions & 2 deletions src/img-optm.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ private function _destroy()
return;
}

Debug2::debug( '[Img_Optm] excuting DESTROY process' ) ;
Debug2::debug( '[Img_Optm] executing DESTROY process' ) ;

/**
* Limit images each time before redirection to fix Out of memory issue. #665465
Expand Down Expand Up @@ -1273,7 +1273,7 @@ private function _rescan() {
$list = $wpdb->get_results( $wpdb->prepare( $q, $offset * $limit, $limit + 1 ) ); // last one is the seed for next batch

if ( ! $list ) {
$msg = __( 'Rescaned successfully.', 'litespeed-cache' );
$msg = __( 'Rescanned successfully.', 'litespeed-cache' );
Admin_Display::succeed( $msg );

Debug2::debug( '[Img_Optm] rescan bypass: no gathered image found' );
Expand Down
2 changes: 1 addition & 1 deletion src/import.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function export( $only_data_return = false ) {
public function import( $file = false ) {
if ( ! $file ) {
if ( empty( $_FILES[ 'ls_file' ][ 'name' ] ) || substr( $_FILES[ 'ls_file' ][ 'name' ], -5 ) != '.data' || empty( $_FILES[ 'ls_file' ][ 'tmp_name' ] ) ) {
Debug2::debug( 'Import: Failed to import, wront ls_file' );
Debug2::debug( 'Import: Failed to import, wrong ls_file' );

$msg = __( 'Import failed due to file error.', 'litespeed-cache' );
Admin_Display::error( $msg );
Expand Down
2 changes: 1 addition & 1 deletion src/media.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ private function _replace_buffer_img_webp( $content ) {
* @since 4.0
*/
public function replace_background_webp( $content ) {
Debug2::debug2( '[Media] Start replacing bakcground WebP.' );
Debug2::debug2( '[Media] Start replacing background WebP.' );

// preg_match_all( '#background-image:(\s*)url\((.*)\)#iU', $content, $matches );
preg_match_all( '#url\(([^)]+)\)#iU', $content, $matches );
Expand Down
2 changes: 1 addition & 1 deletion src/optimize.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ private function _optimize() {
// Shouldn't give any optm (defer/delay) @since 4.4
if ( $this->_var_preserve_js ) {
$this->html_head .= '<script>var ' . implode( ',', $this->_var_preserve_js ) . ';</script>';
Debug2::debug2( '[Optm] Inline JS defer vars', $this->_var_preserve_js );
Debug2::debug2( '[Optm] Inline JS vars', $this->_var_preserve_js );
}

// Append async compatibility lib to head
Expand Down
2 changes: 1 addition & 1 deletion tpl/general/settings_inc.guest.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<td>
<?php $this->build_switch( $id ); ?>
<div class="litespeed-desc">
<?php echo __( 'Guest Mode provides an always cacheable landing page for an automated guest\'s first time visit, and then attempts to update cache varies via AJAX.', 'litespeed-cache' ); ?>
<?php echo __( 'Guest Mode provides an always cacheable initial page for a visitor\'s first time visit, and then attempts to update cache varies via AJAX.', 'litespeed-cache' ); ?>
<?php echo __( 'This option can help to correct the cache vary for certain advanced mobile or tablet visitors.', 'litespeed-cache' ); ?>
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/general/#guest-mode' ); ?>
<br /><?php Doc::notice_htaccess(); ?>
Expand Down
4 changes: 2 additions & 2 deletions tpl/general/settings_tuning.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>

<div class="litespeed-desc">
<?php echo __( 'Listed User Agents will be considered as Guest Mode visitors.', 'litespeed-cache' ); ?>
<?php echo __( 'Listed User Agents will be considered as Guest Mode visitors every visit.', 'litespeed-cache' ); ?>
<?php Doc::one_per_line(); ?>
</div>
</td>
Expand All @@ -47,7 +47,7 @@
</div>

<div class="litespeed-desc">
<?php echo __( 'Listed IPs will be considered as Guest Mode visitors.', 'litespeed-cache' ); ?>
<?php echo __( 'Listed IPs will be considered as Guest Mode visitors every visit.', 'litespeed-cache' ); ?>
<?php Doc::one_per_line(); ?>
</div>
</td>
Expand Down