| 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 |
|