PluginProbe ʕ •ᴥ•ʔ
TinyPNG – JPEG, PNG & WebP image compression / 3.4.4
TinyPNG – JPEG, PNG & WebP image compression v3.4.4
3.7.0 3.6.14 trunk 1.0.0 1.1.0 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.4.0 1.5.0 1.6.0 1.7.0 1.7.1 1.7.2 2.0.0 2.0.1 2.0.2 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.0.0 3.0.1 3.1.0 3.2.0 3.2.1 3.3 3.4 3.4.1 3.4.2 3.4.4 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.10 3.6.11 3.6.12 3.6.13 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9
tiny-compress-images / src / class-tiny-php.php
tiny-compress-images / src Last commit date
compatibility 3 years ago config 3 years ago css 3 years ago data 3 years ago images 3 years ago js 3 years ago vendor 2 years ago views 2 years ago class-tiny-bulk-optimization.php 2 years ago class-tiny-compress-client.php 3 years ago class-tiny-compress-fopen.php 3 years ago class-tiny-compress.php 3 years ago class-tiny-exception.php 3 years ago class-tiny-image-size.php 3 years ago class-tiny-image.php 3 years ago class-tiny-notices.php 3 years ago class-tiny-php.php 3 years ago class-tiny-plugin.php 1 year ago class-tiny-settings.php 1 year ago class-tiny-wp-base.php 3 years ago
class-tiny-php.php
45 lines
1 <?php
2 /*
3 * Tiny Compress Images - WordPress plugin.
4 * Copyright (C) 2015-2018 Tinify B.V.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc., 51
18 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21 class Tiny_PHP {
22 public static function has_fully_supported_php() {
23 return version_compare( PHP_VERSION, '5.3', '>' );
24 }
25
26 public static function curl_available() {
27 return extension_loaded( 'curl' );
28 }
29
30 public static function fopen_available() {
31 return ini_get( 'allow_url_fopen' );
32 }
33
34 public static function curl_exec_disabled() {
35 $disabled_functions = explode( ',', ini_get( 'disable_functions' ) );
36 return in_array( 'curl_exec', $disabled_functions );
37 }
38
39 public static function client_supported() {
40 return Tiny_PHP::has_fully_supported_php() &&
41 Tiny_PHP::curl_available() &&
42 ! Tiny_PHP::curl_exec_disabled();
43 }
44 }
45