PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
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
← All changes | inc/3rd-party/nextgen-gallery/nextgen-gallery.php +19 -22 1.5 → trunk View file →
@@ -1,30 +1,27 @@
1 1 <?php
2 -defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
2 +use Imagify\ThirdParty\NGG;
3 3
4 -if ( ! class_exists( 'C_NextGEN_Bootstrap' ) || ! get_site_option( 'ngg_options' ) ) {
4 +defined( 'ABSPATH' ) || die( "Cheatin' uh?" );
5 +
6 +if ( ! class_exists( 'C_NextGEN_Bootstrap' ) ) {
5 7 return;
6 8 }
7 9
8 -define( 'IMAGIFY_NGG_FILE' , __FILE__ );
9 -define( 'IMAGIFY_NGG_PATH' , realpath( plugin_dir_path( IMAGIFY_NGG_FILE ) ) . '/' );
10 -define( 'IMAGIFY_NGG_INC_PATH' , realpath( IMAGIFY_NGG_PATH . 'inc/' ) . '/' );
11 -define( 'IMAGIFY_NGG_ADMIN_PATH' , realpath( IMAGIFY_NGG_INC_PATH . 'admin' ) . '/' );
12 -define( 'IMAGIFY_NGG_COMMON_PATH' , realpath( IMAGIFY_NGG_INC_PATH . 'common' ) . '/' );
13 -define( 'IMAGIFY_NGG_FUNCTIONS_PATH' , realpath( IMAGIFY_NGG_INC_PATH . 'functions' ) . '/' );
14 -define( 'IMAGIFY_NGG_CLASSES_PATH' , realpath( IMAGIFY_NGG_INC_PATH . 'classes' ) . '/' );
10 +class_alias( '\\Imagify\\ThirdParty\\NGG\\Main', '\\Imagify_NGG' );
11 +class_alias( '\\Imagify\\ThirdParty\\NGG\\DB', '\\Imagify_NGG_DB' );
12 +class_alias( '\\Imagify\\ThirdParty\\NGG\\NGGStorage', '\\Imagify_NGG_Storage' );
15 13
16 -require( IMAGIFY_NGG_CLASSES_PATH . 'class-ngg.php' );
17 -require( IMAGIFY_NGG_CLASSES_PATH . 'class-db.php' );
18 -require( IMAGIFY_NGG_CLASSES_PATH . 'class-attachment.php' );
19 -require( IMAGIFY_NGG_FUNCTIONS_PATH . 'admin-stats.php' );
20 -require( IMAGIFY_NGG_COMMON_PATH . 'attachments.php' );
14 +require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/functions/admin-stats.php';
15 +require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/functions/attachments.php';
16 +require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/functions/common.php';
17 +require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/common/attachments.php';
21 18
19 +NGG\Main::get_instance()->init();
20 +NGG\DB::get_instance()->init();
21 +
22 22 if ( is_admin() ) {
23 - require( IMAGIFY_NGG_ADMIN_PATH . 'enqueue.php' );
24 - require( IMAGIFY_NGG_ADMIN_PATH . 'ajax.php' );
25 - require( IMAGIFY_NGG_ADMIN_PATH . 'db.php' );
26 - require( IMAGIFY_NGG_ADMIN_PATH . 'menu.php' );
27 - require( IMAGIFY_NGG_ADMIN_PATH . 'gallery.php' );
28 - require( IMAGIFY_NGG_ADMIN_PATH . 'bulk.php' );
29 - require( IMAGIFY_NGG_ADMIN_PATH . 'heartbeat.php' );
30 -}
23 + require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/admin/enqueue.php';
24 + require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/admin/menu.php';
25 + require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/admin/gallery.php';
26 + require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/admin/bulk.php';
27 +}