| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: PixelCraft with WebP |
| 4 |
* Plugin URI: https://adbear.cloud |
| 5 |
* Description: Converts uploaded JPEG and PNG images to WebP, optimizes sizes, and serves WebP with graceful fallback for older clients. |
| 6 |
* Version: 2.0.7 |
| 7 |
* Requires at least: 6.0 |
| 8 |
* Requires PHP: 7.4 |
| 9 |
* Author: secilkars |
| 10 |
* Author URI: https://profiles.wordpress.org/secilkars/ |
| 11 |
* License: GPLv2 or later |
| 12 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 13 |
* Text Domain: pixelcraft-webp |
| 14 |
* Domain Path: /languages |
| 15 |
*/ |
| 16 |
|
| 17 |
// WordPress-only notice: This plugin is not affiliated with or endorsed by the WordPress Foundation. |
| 18 |
|
| 19 |
if ( ! defined( 'ABSPATH' ) ) { |
| 20 |
exit; |
| 21 |
} |
| 22 |
|
| 23 |
define( 'PCLWEBP_VERSION', '2.0.7' ); |
| 24 |
define( 'PCLWEBP_FILE', __FILE__ ); |
| 25 |
define( 'PCLWEBP_PATH', plugin_dir_path( __FILE__ ) ); |
| 26 |
define( 'PCLWEBP_URL', plugin_dir_url( __FILE__ ) ); |
| 27 |
define( 'PCLWEBP_BASENAME', plugin_basename( __FILE__ ) ); |
| 28 |
/** Writable files under wp_upload_dir()['basedir']/pixelcraft-webp/ only (Plugin Review). */ |
| 29 |
define( 'PCLWEBP_UPLOAD_SUBDIR', 'pixelcraft-webp' ); |
| 30 |
|
| 31 |
require_once PCLWEBP_PATH . 'includes/class-pclwebp-autoload.php'; |
| 32 |
|
| 33 |
Pclwebp_Autoload::register(); |
| 34 |
|
| 35 |
/** |
| 36 |
* Returns the main plugin instance. |
| 37 |
* |
| 38 |
* @return Pclwebp_Plugin |
| 39 |
*/ |
| 40 |
function pclwebp() { |
| 41 |
return Pclwebp_Plugin::instance(); |
| 42 |
} |
| 43 |
|
| 44 |
register_activation_hook( PCLWEBP_FILE, array( 'Pclwebp_Activator', 'activate' ) ); |
| 45 |
register_deactivation_hook( PCLWEBP_FILE, array( 'Pclwebp_Deactivator', 'deactivate' ) ); |
| 46 |
|
| 47 |
pclwebp(); |
| 48 |
|