PluginProbe
Plus WebP or AVIF / 1.07
Plus WebP or AVIF v1.07
5.21 5.20 5.12 5.11 trunk 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 2.00 2.01 2.02 2.03 2.04 2.05 All 47 releases
plus-webp / lib / class-pluswebpregist.php

class-pluswebpregist.php in Plus WebP or AVIF 1.07, at lib/class-pluswebpregist.php

61 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plus WebP
4 *
5 * @package PlusWebp
6 * @subpackage PlusWebpRegist registered in the database
7 /* Copyright (c) 2019- Katsushi Kawamori (email : dodesyoswift312@gmail.com)
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; version 2 of the License.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22 $pluswebp = new PlusWebpRegist();
23
24 /** ==================================================
25 * Class registered in the database
26 *
27 * @since 1.00
28 */
29 class PlusWebpRegist {
30
31 /** ==================================================
32 * Construct
33 *
34 * @since 1.00
35 */
36 public function __construct() {
37
38 add_action( 'init', array( $this, 'register_settings' ) );
39
40 }
41
42 /** ==================================================
43 * Settings register
44 *
45 * @since 1.00
46 */
47 public function register_settings() {
48
49 if ( ! get_option( 'pluswebp' ) ) {
50 $pswp_tbl = array(
51 'quality' => 80,
52 'replace' => false,
53 );
54 update_option( 'pluswebp', $pswp_tbl );
55 }
56
57 }
58
59 }
60
61