PluginProbe ʕ •ᴥ•ʔ
Modern Image Formats / 1.0.5
Modern Image Formats v1.0.5
2.7.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 2.0.0 2.0.1 2.0.2 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 2.5.1 2.6.0 2.6.1
webp-uploads / load.php
webp-uploads Last commit date
.wordpress-org 2 years ago .gitattributes 2 years ago can-load.php 2 years ago fallback.js 3 years ago helper.php 2 years ago hooks.php 2 years ago image-edit.php 2 years ago load.php 2 years ago readme.txt 2 years ago rest-api.php 2 years ago settings.php 2 years ago
load.php
49 lines
1 <?php
2 /**
3 * Plugin Name: WebP Uploads
4 * Plugin URI: https://github.com/WordPress/performance/tree/trunk/modules/images/webp-uploads
5 * Description: Creates WebP versions for new JPEG image uploads if supported by the server.
6 * Requires at least: 6.3
7 * Requires PHP: 7.0
8 * Version: 1.0.5
9 * Author: WordPress Performance Team
10 * Author URI: https://make.wordpress.org/performance/
11 * License: GPLv2 or later
12 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
13 * Text Domain: webp-uploads
14 *
15 * @package webp-uploads
16 */
17
18 // Define the constant.
19 if ( defined( 'WEBP_UPLOADS_VERSION' ) ) {
20 return;
21 }
22
23 define( 'WEBP_UPLOADS_VERSION', '1.0.5' );
24
25 // Do not load the code if it is already loaded through another means.
26 if ( function_exists( 'webp_uploads_create_sources_property' ) ) {
27 return;
28 }
29
30 // Do not load the code and show an admin notice instead if conditions are not met.
31 if ( ! require __DIR__ . '/can-load.php' ) {
32 add_action(
33 'admin_notices',
34 static function () {
35 printf(
36 '<div class="notice notice-error"><p>%s</p></div>',
37 esc_html__( 'The WebP Uploads feature cannot be loaded from within the plugin since it is already merged into WordPress core.', 'webp-uploads' )
38 );
39 }
40 );
41 return;
42 }
43
44 require_once __DIR__ . '/helper.php';
45 require_once __DIR__ . '/rest-api.php';
46 require_once __DIR__ . '/image-edit.php';
47 require_once __DIR__ . '/settings.php';
48 require_once __DIR__ . '/hooks.php';
49