PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 1.9.8
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v1.9.8
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / classes / Webp / Apache.php

Apache.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 1.9.8, at classes/Webp/Apache.php

39 lines 749 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Imagify\Webp;
3
4 defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
5
6 /**
7 * Add and remove contents to the .htaccess file to display webp images on the site.
8 *
9 * @since 1.9
10 * @author Grégory Viguier
11 */
12 class Apache extends \Imagify\WriteFile\AbstractApacheDirConfFile {
13
14 /**
15 * Name of the tag used as block delemiter.
16 *
17 * @var string
18 * @since 1.9
19 * @author Grégory Viguier
20 */
21 const TAG_NAME = 'Imagify: webp file type';
22
23 /**
24 * Get unfiltered new contents to write into the file.
25 *
26 * @since 1.9
27 * @access protected
28 * @author Grégory Viguier
29 *
30 * @return string
31 */
32 protected function get_raw_new_contents() {
33 return trim( '
34 <IfModule mod_mime.c>
35 AddType image/webp .webp
36 </IfModule>' );
37 }
38 }
39