# quickwebp/1.0.0/quickwebp.php

QuickWebP – WebP &amp; AVIF Image Optimizer, Compression &amp; SEO for WordPress, version 1.0.0. 107 lines.

- Page: https://pluginprobe.com/plugins/quickwebp/1.0.0/code/quickwebp.php
- Raw: https://pluginprobe.com/plugins/quickwebp/1.0.0/raw/quickwebp.php
- Modified: 2023-02-09T08:58:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/quickwebp/1.0.0/code/quickwebp.php#L10-L20`.

```php
<?php

/**
 *
 * @link              https://webdeclic.com/
 * @since             1.0.0
 * @package           Quickwebp
 *
 * @wordpress-plugin
 * Plugin Name:       QuickWebP - Compress / Optimize Images & Convert WebP | SEO Friendly
 * Plugin URI:        https://webdeclic.com/projets/creation-de-lextension-wordpress-quickwebp/
 * Description:       Description
 * Version:           1.0.0
 * Author:            Webdeclic
 * Author URI:        https://webdeclic.com/
 * License:           GPL-2.0+
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       quickwebp
 * Domain Path:       /languages
 */

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

/**
 * Check if your are in local or production environment
 */
$is_local = $_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1';

/**
 * If you are in local environment, you can use the version number as a timestamp for better cache management in your browser
 */
$version  = $is_local ? time() : '1.0.0';

/**
 * Currently plugin version.
 * Start at version 1.0.0 and use SemVer - https://semver.org
 * Rename this for your plugin and update it as you release new versions.
 */
define( 'QUICKWEBP_VERSION', $version );

/**
 * You can use this const for check if you are in local environment
 */
define( 'QUICKWEBP_DEV_MOD', $is_local );

/**
 * Plugin Name text domain for internationalization.
 */
define( 'QUICKWEBP_TEXT_DOMAIN', 'quickwebp' );

/**
 * Plugin Name Path for plugin includes.
 */
define( 'QUICKWEBP_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );

/**
 * Plugin Name URL for plugin sources (css, js, images etc...).
 */
define( 'QUICKWEBP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );

/**
 * The code that runs during plugin activation.
 * This action is documented in includes/class-quickwebp-activator.php
 */
function activate_quickwebp() {
	require_once plugin_dir_path( __FILE__ ) . 'includes/class-quickwebp-activator.php';
	Quickwebp_Activator::activate();
}

/**
 * The code that runs during plugin deactivation.
 * This action is documented in includes/class-quickwebp-deactivator.php
 */
function deactivate_quickwebp() {
	require_once plugin_dir_path( __FILE__ ) . 'includes/class-quickwebp-deactivator.php';
	Quickwebp_Deactivator::deactivate();
}

register_activation_hook( __FILE__, 'activate_quickwebp' );
register_deactivation_hook( __FILE__, 'deactivate_quickwebp' );

/**
 * The core plugin class that is used to define internationalization,
 * admin-specific hooks, and public-facing site hooks.
 */
require plugin_dir_path( __FILE__ ) . 'includes/class-quickwebp.php';

/**
 * Begins execution of the plugin.
 *
 * Since everything within the plugin is registered via hooks,
 * then kicking off the plugin from this point in the file does
 * not affect the page life cycle.
 *
 * @since    1.0.0
 */
function run_quickwebp() {

	$plugin = new Quickwebp();
	$plugin->run();

}
run_quickwebp();

```
