PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 1.6.11
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v1.6.11
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / imagify.php

imagify.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 1.6.11, at imagify.php

114 lines 5.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Imagify
4 * Plugin URI: https://wordpress.org/plugins/imagify/
5 * Description: Dramaticaly reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwidth using Imagify, the new most advanced image optimization tool.
6 * Version: 1.6.11
7 * Author: WP Media
8 * Author URI: https://wp-media.me/
9 * Licence: GPLv2
10 *
11 * Text Domain: imagify
12 * Domain Path: languages
13 *
14 * Copyright 2017 WP Media
15 */
16
17 defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
18
19 // Imagify defines.
20 define( 'IMAGIFY_VERSION' , '1.6.11' );
21 define( 'IMAGIFY_SLUG' , 'imagify' );
22 define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
23 define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
24 define( 'IMAGIFY_APP_MAIN' , 'https://app.imagify.io' );
25 define( 'IMAGIFY_PAYMENT_URL' , IMAGIFY_APP_MAIN . '/#/plugin/' );
26 define( 'IMAGIFY_FILE' , __FILE__ );
27 define( 'IMAGIFY_PATH' , realpath( plugin_dir_path( IMAGIFY_FILE ) ) . '/' );
28 define( 'IMAGIFY_INC_PATH' , realpath( IMAGIFY_PATH . 'inc/' ) . '/' );
29 define( 'IMAGIFY_ADMIN_PATH' , realpath( IMAGIFY_INC_PATH . 'admin' ) . '/' );
30 define( 'IMAGIFY_ADMIN_UI_PATH' , realpath( IMAGIFY_ADMIN_PATH . 'ui' ) . '/' );
31 define( 'IMAGIFY_COMMON_PATH' , realpath( IMAGIFY_INC_PATH . 'common' ) . '/' );
32 define( 'IMAGIFY_FUNCTIONS_PATH' , realpath( IMAGIFY_INC_PATH . 'functions' ) . '/' );
33 define( 'IMAGIFY_CLASSES_PATH' , realpath( IMAGIFY_INC_PATH . 'classes' ) . '/' );
34 define( 'IMAGIFY_CLASSES_ABSTRACTS_PATH' , realpath( IMAGIFY_CLASSES_PATH . 'abstracts' ) . '/' );
35 define( 'IMAGIFY_3RD_PARTY_PATH' , realpath( IMAGIFY_INC_PATH . '3rd-party' ) . '/' );
36 define( 'IMAGIFY_URL' , plugin_dir_url( IMAGIFY_FILE ) );
37 define( 'IMAGIFY_INC_URL' , IMAGIFY_URL . 'inc/' );
38 define( 'IMAGIFY_ADMIN_URL' , IMAGIFY_INC_URL . 'admin/' );
39 define( 'IMAGIFY_ASSETS_URL' , IMAGIFY_URL . 'assets/' );
40 define( 'IMAGIFY_ASSETS_JS_URL' , IMAGIFY_ASSETS_URL . 'js/' );
41 define( 'IMAGIFY_ASSETS_CSS_URL' , IMAGIFY_ASSETS_URL . 'css/' );
42 define( 'IMAGIFY_ASSETS_IMG_URL' , IMAGIFY_ASSETS_URL . 'images/' );
43 define( 'IMAGIFY_MAX_BYTES' , 5242880 );
44 define( 'IMAGIFY_INT_MAX' , PHP_INT_MAX - 30 );
45
46 add_action( 'plugins_loaded', '_imagify_init' );
47 /**
48 * Tell WP what to do when plugin is loaded.
49 *
50 * @since 1.0
51 */
52 function _imagify_init() {
53 // Load translations.
54 load_plugin_textdomain( 'imagify', false, dirname( plugin_basename( IMAGIFY_FILE ) ) . '/languages/' );
55
56 // Nothing to do if autosave.
57 if ( defined( 'DOING_AUTOSAVE' ) ) {
58 return;
59 }
60
61 require( IMAGIFY_FUNCTIONS_PATH . 'compat.php' );
62 require( IMAGIFY_FUNCTIONS_PATH . 'deprecated.php' );
63 require( IMAGIFY_FUNCTIONS_PATH . 'common.php' );
64 require( IMAGIFY_FUNCTIONS_PATH . 'options.php' );
65 require( IMAGIFY_FUNCTIONS_PATH . 'formatting.php' );
66 require( IMAGIFY_FUNCTIONS_PATH . 'files.php' );
67 require( IMAGIFY_FUNCTIONS_PATH . 'admin.php' );
68 require( IMAGIFY_FUNCTIONS_PATH . 'api.php' );
69 require( IMAGIFY_FUNCTIONS_PATH . 'attachments.php' );
70 require( IMAGIFY_FUNCTIONS_PATH . 'process.php' );
71 require( IMAGIFY_FUNCTIONS_PATH . 'admin-ui.php' );
72 require( IMAGIFY_FUNCTIONS_PATH . 'admin-stats.php' );
73 require( IMAGIFY_FUNCTIONS_PATH . 'i18n.php' );
74 require( IMAGIFY_CLASSES_ABSTRACTS_PATH . 'class-imagify-abstract-db.php' );
75 require( IMAGIFY_CLASSES_ABSTRACTS_PATH . 'class-imagify-abstract-attachment.php' );
76 require( IMAGIFY_CLASSES_PATH . 'class-imagify.php' );
77 require( IMAGIFY_CLASSES_PATH . 'class-imagify-user.php' );
78 require( IMAGIFY_CLASSES_PATH . 'class-imagify-attachment.php' );
79 require( IMAGIFY_CLASSES_PATH . 'class-imagify-notices.php' );
80 require( IMAGIFY_CLASSES_PATH . 'class-imagify-assets.php' );
81 require( IMAGIFY_COMMON_PATH . 'attachments.php' );
82 require( IMAGIFY_COMMON_PATH . 'admin-bar.php' );
83 require( IMAGIFY_COMMON_PATH . 'cron.php' );
84 require( IMAGIFY_3RD_PARTY_PATH . '3rd-party.php' );
85
86 if ( is_admin() ) {
87 require( IMAGIFY_ADMIN_PATH . 'upgrader.php' );
88 require( IMAGIFY_ADMIN_PATH . 'heartbeat.php' );
89 require( IMAGIFY_ADMIN_PATH . 'options.php' );
90 require( IMAGIFY_ADMIN_PATH . 'menu.php' );
91 require( IMAGIFY_ADMIN_PATH . 'plugins.php' );
92 require( IMAGIFY_ADMIN_PATH . 'upload.php' );
93 require( IMAGIFY_ADMIN_PATH . 'media.php' );
94 require( IMAGIFY_ADMIN_PATH . 'meta-boxes.php' );
95 require( IMAGIFY_ADMIN_UI_PATH . 'options.php' );
96 require( IMAGIFY_ADMIN_UI_PATH . 'bulk.php' );
97 require( IMAGIFY_CLASSES_PATH . 'class-imagify-admin-ajax-post.php' );
98
99 Imagify_Notices::get_instance()->init();
100 Imagify_Admin_Ajax_Post::get_instance()->init();
101 }
102
103 if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
104 Imagify_Assets::get_instance()->init();
105 }
106
107 /**
108 * Fires when Imagify is correctly loaded.
109 *
110 * @since 1.0
111 */
112 do_action( 'imagify_loaded' );
113 }
114