PluginProbe
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization / 1.0.5
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization v1.0.5
4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 2.5.5 2.5.6 2.5.7 3.0.0 3.0.1 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.11.0 3.11.1 3.11.2 3.11.3 3.12.0 3.12.1 3.12.10 All 133 releases
optimole-wp / optimole-wp.php

optimole-wp.php in Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization 1.0.5, at optimole-wp.php

60 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Image optimization service by Optimole
4 * Description: Complete handling of your website images.
5 * Version: 1.0.5
6 * Author: Optimole
7 * Author URI: https://optimole.com
8 * License: GPL-2.0+
9 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
10 * Text Domain: optimole-wp
11 * Domain Path: /languages
12 * WordPress Available: yes
13 * Requires License: no
14 */
15
16 if ( ! defined( 'WPINC' ) ) {
17 die;
18 }
19 /**
20 * Autoloader function.
21 *
22 * @param string $class Class to load.
23 */
24 function optml_autoload( $class ) {
25 $prefix = 'Optml';
26 if ( strpos( $class, $prefix ) !== 0 ) {
27 return;
28 }
29 $file = str_replace( $prefix . '_', '', $class );
30
31 $file = strtolower( $file );
32 $file = dirname( __FILE__ ) . '/inc/' . $file . '.php';
33 if ( file_exists( $file ) ) {
34 require $file;
35 }
36
37 }
38
39 /**
40 * Initiate the Optimole plugin.
41 *
42 * @return Optml_Main Optimole instance.
43 */
44 function optml() {
45 define( 'OPTML_URL', plugin_dir_url( __FILE__ ) );
46 define( 'OPTML_PATH', plugin_dir_path( __FILE__ ) );
47 define( 'OPTML_VERSION', '1.0.5' );
48 define( 'OPTML_NAMESPACE', 'optml' );
49 define( 'OPTML_BASEFILE', __FILE__ );
50 if ( ! defined( 'OPTML_DEBUG' ) ) {
51 define( 'OPTML_DEBUG', ( defined( 'TEST_GROUND' ) && TEST_GROUND ) ? true : false );
52 }
53
54 return Optml_Main::instance();
55 }
56
57 spl_autoload_register( 'optml_autoload' );
58
59 optml();
60