PluginProbe
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress / 2.0.0
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress v2.0.0
4.1.0 4.0.1 4.0.0 3.3.1 3.3.0 trunk 1.0.0 2.0.0 2.1.0 3.0.0 3.1.0 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8
quickwebp / quickwebp.php

quickwebp.php in QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress 2.0.0, at quickwebp.php

107 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 *
5 * @link https://webdeclic.com/
6 * @since 1.0.0
7 * @package Quickwebp
8 *
9 * @wordpress-plugin
10 * Plugin Name: QuickWebP - Compress / Optimize Images & Convert WebP | SEO Friendly
11 * Plugin URI: https://webdeclic.com/projets/creation-de-lextension-wordpress-quickwebp/
12 * Description: Description
13 * Version: 2.0.0
14 * Author: Webdeclic
15 * Author URI: https://webdeclic.com/
16 * License: GPL-2.0+
17 * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
18 * Text Domain: quickwebp
19 * Domain Path: /languages
20 */
21
22 // If this file is called directly, abort.
23 if ( ! defined( 'WPINC' ) ) {
24 die;
25 }
26
27 /**
28 * Check if your are in local or production environment
29 */
30 $is_local = $_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1';
31
32 /**
33 * If you are in local environment, you can use the version number as a timestamp for better cache management in your browser
34 */
35 $version = $is_local ? time() : '2.0.0';
36
37 /**
38 * Currently plugin version.
39 * Start at version 1.0.0 and use SemVer - https://semver.org
40 * Rename this for your plugin and update it as you release new versions.
41 */
42 define( 'QUICKWEBP_VERSION', $version );
43
44 /**
45 * You can use this const for check if you are in local environment
46 */
47 define( 'QUICKWEBP_DEV_MOD', $is_local );
48
49 /**
50 * Plugin Name text domain for internationalization.
51 */
52 define( 'QUICKWEBP_TEXT_DOMAIN', 'quickwebp' );
53
54 /**
55 * Plugin Name Path for plugin includes.
56 */
57 define( 'QUICKWEBP_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
58
59 /**
60 * Plugin Name URL for plugin sources (css, js, images etc...).
61 */
62 define( 'QUICKWEBP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
63
64 /**
65 * The code that runs during plugin activation.
66 * This action is documented in includes/class-quickwebp-activator.php
67 */
68 function activate_quickwebp() {
69 require_once plugin_dir_path( __FILE__ ) . 'includes/class-quickwebp-activator.php';
70 Quickwebp_Activator::activate();
71 }
72
73 /**
74 * The code that runs during plugin deactivation.
75 * This action is documented in includes/class-quickwebp-deactivator.php
76 */
77 function deactivate_quickwebp() {
78 require_once plugin_dir_path( __FILE__ ) . 'includes/class-quickwebp-deactivator.php';
79 Quickwebp_Deactivator::deactivate();
80 }
81
82 register_activation_hook( __FILE__, 'activate_quickwebp' );
83 register_deactivation_hook( __FILE__, 'deactivate_quickwebp' );
84
85 /**
86 * The core plugin class that is used to define internationalization,
87 * admin-specific hooks, and public-facing site hooks.
88 */
89 require plugin_dir_path( __FILE__ ) . 'includes/class-quickwebp.php';
90
91 /**
92 * Begins execution of the plugin.
93 *
94 * Since everything within the plugin is registered via hooks,
95 * then kicking off the plugin from this point in the file does
96 * not affect the page life cycle.
97 *
98 * @since 1.0.0
99 */
100 function run_quickwebp() {
101
102 $plugin = new Quickwebp();
103 $plugin->run();
104
105 }
106 run_quickwebp();
107