PHP 8.2.30
Preview: settings_inc.cache_mobile.tpl.php Size: 2.37 KB
/usr/src/litespeed-wp-plugin/6.5.2/litespeed-cache/tpl/cache/settings_inc.cache_mobile.tpl.php

<?php
namespace LiteSpeed;
defined( 'WPINC' ) || exit;

?>

	<!-- build_setting_mobile_view start -->
	<tr>
		<th>
			<?php $id = Base::O_CACHE_MOBILE; ?>
			<?php $this->title( $id ); ?>
		</th>
		<td>
			<?php
				$this->build_switch( $id );
			?>
			<div class="litespeed-desc">
				<?php echo __( 'Serve a separate cache copy for mobile visitors.', 'litespeed-cache' ); ?>
				<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#cache-mobile', __( 'Learn more about when this is needed', 'litespeed-cache' ) ); ?>
				<br /><?php Doc::notice_htaccess(); ?>
				<br /><?php Doc::crawler_affected(); ?>
			</div>
		</td>
	</tr>

	<tr>
		<th class="litespeed-padding-left">
			<?php $id = Base::O_CACHE_MOBILE_RULES; ?>
			<?php $this->title( $id ); ?>
		</th>
		<td>
		<?php
			// if set, use value as input value
			if ( $this->conf( Base::O_CACHE_MOBILE ) ) {

				// if enabled, check the setting in file
				if ( defined( 'LITESPEED_ON' ) ) {

					try {
						$mobile_agents = Htaccess::cls()->current_mobile_agents();
						if ( $mobile_agents !== Utility::arr2regex( $this->conf( $id ), true ) ) {
							echo '<div class="litespeed-callout notice notice-error inline"><p>'
									. __( 'Htaccess did not match configuration option.', 'litespeed-cache' )
									. ' ' . sprintf( __( 'Htaccess rule is: %s', 'litespeed-cache' ), '<code>' . $mobile_agents . '</code>' )
								. '</p></div>';
						}
					} catch( \Exception $e ) {
						echo '<div class="litespeed-callout notice notice-error inline"><p>' . $e->getMessage() . '</p></div>';
					}

				}
			} ?>

			<div class="litespeed-textarea-recommended">
				<div>
					<?php $this->build_textarea( $id, 40 ); ?>
				</div>
				<div>
					<?php $this->recommended( $id ); ?>
				</div>
			</div>

			<div class="litespeed-desc">
				<?php Doc::one_per_line(); ?>

				<?php $this->_validate_syntax( $id ); ?>

				<?php if ( $this->conf( Base::O_CACHE_MOBILE ) && ! $this->conf( $id ) ) : ?>
				<font class="litespeed-warning">
					❌
					<?php echo sprintf( __( 'If %1$s is %2$s, then %3$s must be populated!', 'litespeed-cache' ), '<code>' . __('Cache Mobile', 'litespeed-cache') . '</code>', '<code>' . __('ON', 'litespeed-cache') . '</code>', '<code>' . __('List of Mobile User Agents', 'litespeed-cache') . '</code>' ); ?>
				</font>
				<?php endif; ?>
			</div>
		</td>
	</tr>
	<!-- build_setting_mobile_view end -->

Directory Contents

Dirs: 0 × Files: 26

Name Size Perms Modified Actions
2.12 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
1.31 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
435 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
417 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
118 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
1.13 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
519 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
117 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
415 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
2.27 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
118 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
5.09 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
5.59 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
4.34 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
117 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
5.85 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
3.07 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
1.90 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
762 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
2.37 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
572 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
537 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
543 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download
3.02 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
6.53 KB lrw-r--r-- 2024-10-17 21:42:34
Edit Download
461 B lrw-r--r-- 2024-10-17 21:42:34
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).