Version Description
Download this release
Release Info
Developer | optimole |
Plugin | Image optimization & Lazy Load by Optimole |
Version | 3.5.3 |
Comparing to | |
See all releases |
Code changes from version 3.5.2 to 3.5.3
- CHANGELOG.md +4 -0
- inc/compatibilities/wpml.php +59 -0
- inc/manager.php +1 -0
- inc/media_offload.php +96 -20
- optimole-wp.php +2 -2
- readme.txt +7 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 3.5.2](https://github.com/Codeinwp/optimole-wp/compare/v3.5.1...v3.5.2) (2022-11-11)
|
2 |
|
3 |
* Fixed media offload nonce update
|
1 |
+
##### [Version 3.5.3](https://github.com/Codeinwp/optimole-wp/compare/v3.5.2...v3.5.3) (2022-12-12)
|
2 |
+
|
3 |
+
* Improve compatibility with WPML plugin
|
4 |
+
|
5 |
##### [Version 3.5.2](https://github.com/Codeinwp/optimole-wp/compare/v3.5.1...v3.5.2) (2022-11-11)
|
6 |
|
7 |
* Fixed media offload nonce update
|
inc/compatibilities/wpml.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Optml_wpml
|
5 |
+
*
|
6 |
+
* @reason Wpml duplicates everything so we need to offload/update every image/page attachment.
|
7 |
+
*/
|
8 |
+
class Optml_wpml extends Optml_compatibility {
|
9 |
+
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Should we load the integration logic.
|
13 |
+
*
|
14 |
+
* @return bool Should we load.
|
15 |
+
*/
|
16 |
+
function should_load() {
|
17 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
18 |
+
return is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) && Optml_Main::instance()->admin->settings->get( 'offload_media' ) === 'enabled';
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Register integration details.
|
23 |
+
*/
|
24 |
+
public function register() {
|
25 |
+
add_filter( 'optml_offload_duplicated_images', [ $this, 'wpml_get_duplicates' ], PHP_INT_MAX, 2 );
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Ads the duplicated pages/images when offloading.
|
30 |
+
*
|
31 |
+
* @param array $duplicated_attachments The duplicated attachments array.
|
32 |
+
* @param string $attachment_id The attachment id that is first offloaded.
|
33 |
+
*
|
34 |
+
* @return array The images array with the specific bakery images.
|
35 |
+
*/
|
36 |
+
public function wpml_get_duplicates( $duplicated_attachments, $attachment_id ) {
|
37 |
+
|
38 |
+
// Get the TRID (Translation ID) from element. REF: https://wpml.org/wpml-hook/wpml_element_trid/
|
39 |
+
$trid = apply_filters( 'wpml_element_trid', null, $attachment_id, 'post_attachment' );
|
40 |
+
|
41 |
+
// Get all translations (elements with the same TRID). REF: https://wpml.org/wpml-hook/wpml_get_element_translations/
|
42 |
+
$translations = apply_filters( 'wpml_get_element_translations', null, $trid, 'post_attachment' );
|
43 |
+
|
44 |
+
foreach ( $translations as $translation ) {
|
45 |
+
if ( isset( $translation->element_id ) ) {
|
46 |
+
$duplicated_attachments[] = $translation->element_id;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
return $duplicated_attachments;
|
50 |
+
}
|
51 |
+
/**
|
52 |
+
* Should we early load the compatibility?
|
53 |
+
*
|
54 |
+
* @return bool Whether to load the compatibility or not.
|
55 |
+
*/
|
56 |
+
public function should_load_early() {
|
57 |
+
return true;
|
58 |
+
}
|
59 |
+
}
|
inc/manager.php
CHANGED
@@ -82,6 +82,7 @@ final class Optml_Manager {
|
|
82 |
'wp_rest_cache',
|
83 |
'wp_bakery',
|
84 |
'elementor_builder_late',
|
|
|
85 |
];
|
86 |
/**
|
87 |
* The current state of the buffer.
|
82 |
'wp_rest_cache',
|
83 |
'wp_bakery',
|
84 |
'elementor_builder_late',
|
85 |
+
'wpml',
|
86 |
];
|
87 |
/**
|
88 |
* The current state of the buffer.
|
inc/media_offload.php
CHANGED
@@ -332,6 +332,34 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
332 |
preg_match( '/\/' . Optml_Media_Offload::KEYS['not_processed_flag'] . '([^\/]*)\//', $url, $attachment_id );
|
333 |
return isset( $attachment_id[1] ) ? $attachment_id[1] : false;
|
334 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
/**
|
336 |
* Filter out the urls that are saved to our servers when saving to the DB.
|
337 |
*
|
@@ -357,7 +385,6 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
357 |
}
|
358 |
foreach ( $images as $url ) {
|
359 |
$is_original_uploaded = self::is_uploaded_image( $url );
|
360 |
-
$size = 'full';
|
361 |
$attachment_id = false;
|
362 |
if ( $is_original_uploaded ) {
|
363 |
$found_size = $this->parse_dimension_from_optimized_url( $url );
|
@@ -366,15 +393,9 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
366 |
}
|
367 |
$attachment_id = self::get_attachment_id_from_url( $url );
|
368 |
} else {
|
369 |
-
$
|
370 |
-
$
|
371 |
-
|
372 |
-
$size = $found_size;
|
373 |
-
$strip_url = str_replace( '-' . $found_size[0] . 'x' . $found_size[1], '', $url );
|
374 |
-
}
|
375 |
-
$strip_url = $this->add_schema( $strip_url );
|
376 |
-
|
377 |
-
$attachment_id = attachment_url_to_postid( $strip_url );
|
378 |
}
|
379 |
|
380 |
if ( OPTML_DEBUG ) {
|
@@ -424,17 +445,11 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
424 |
}
|
425 |
} else {
|
426 |
if ( $job === 'offload_images' ) {
|
427 |
-
$
|
428 |
-
$
|
429 |
-
if ( $found_size[0] !== false && $found_size[1] !== false ) {
|
430 |
-
$strip_url = str_replace( '-' . $found_size[0] . 'x' . $found_size[1], '', $url );
|
431 |
-
}
|
432 |
-
$strip_url = $this->add_schema( $strip_url );
|
433 |
-
|
434 |
-
$attachment_id = attachment_url_to_postid( $strip_url );
|
435 |
}
|
436 |
}
|
437 |
-
if ( false === $attachment_id || ! wp_attachment_is_image( $attachment_id ) ) {
|
438 |
continue;
|
439 |
}
|
440 |
$found_images[] = intval( $attachment_id );
|
@@ -510,6 +525,13 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
510 |
$ids = $this->get_image_id_from_content( get_post_field( 'post_content', $content_id ), $job );
|
511 |
if ( count( $ids ) > 0 ) {
|
512 |
$images_to_update[ $content_id ] = $ids;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
513 |
}
|
514 |
if ( $job === 'offload_images' ) {
|
515 |
update_post_meta( $content_id, self::POST_OFFLOADED_FLAG, 'true' );
|
@@ -593,6 +615,8 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
593 |
}
|
594 |
foreach ( $image_ids as $id ) {
|
595 |
if ( self::is_uploaded_image( wp_get_attachment_metadata( $id )['file'] ) ) {
|
|
|
|
|
596 |
$success_up ++;
|
597 |
continue;
|
598 |
}
|
@@ -741,7 +765,7 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
741 |
update_post_meta( $id, 'optimole_rollback_error', 'true' );
|
742 |
continue;
|
743 |
}
|
744 |
-
wp_create_image_subsizes( $results['file'], $id );
|
745 |
if ( $type === 'image/svg+xml' ) {
|
746 |
if ( ! function_exists( 'wp_get_attachment_metadata' ) || ! function_exists( 'wp_update_attachment_metadata' ) ) {
|
747 |
include_once ABSPATH . '/wp-admin/includes/post.php';
|
@@ -767,6 +791,24 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
767 |
continue;
|
768 |
}
|
769 |
update_attached_file( $id, $results['file'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
$success_back++;
|
771 |
$original_url = self::get_original_url( $id );
|
772 |
if ( $original_url === false ) {
|
@@ -883,6 +925,23 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
883 |
if ( self::is_uploaded_image( $file ) ) {
|
884 |
$optimized_url = ( new Optml_Image( $url, ['width' => 'auto', 'height' => 'auto', 'quality' => $this->settings->get_numeric_quality()], $this->settings->get( 'cache_buster' ) ) )->get_url();
|
885 |
return str_replace( '/' . $url, '/' . self::KEYS['not_processed_flag'] . $attachment_id . $file, $optimized_url );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
886 |
}
|
887 |
return $url;
|
888 |
}
|
@@ -1084,6 +1143,23 @@ class Optml_Media_Offload extends Optml_App_Replacer {
|
|
1084 |
$meta['sizes'][ $key ]['file'] = $file_name;
|
1085 |
}
|
1086 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1087 |
return $meta;
|
1088 |
}
|
1089 |
|
332 |
preg_match( '/\/' . Optml_Media_Offload::KEYS['not_processed_flag'] . '([^\/]*)\//', $url, $attachment_id );
|
333 |
return isset( $attachment_id[1] ) ? $attachment_id[1] : false;
|
334 |
}
|
335 |
+
|
336 |
+
/**
|
337 |
+
* Get attachment id from local url
|
338 |
+
*
|
339 |
+
* @param string $url The url to look for.
|
340 |
+
* @return array The attachment id and the size from the url.
|
341 |
+
*/
|
342 |
+
private function get_local_attachement_id_from_url( $url ) {
|
343 |
+
|
344 |
+
$size = 'full';
|
345 |
+
$found_size = $this->parse_dimensions_from_filename( $url );
|
346 |
+
$strip_url = $url;
|
347 |
+
$scaled_url = $url;
|
348 |
+
if ( $found_size[0] !== false && $found_size[1] !== false ) {
|
349 |
+
$size = $found_size;
|
350 |
+
$strip_url = str_replace( '-' . $found_size[0] . 'x' . $found_size[1], '', $url );
|
351 |
+
$scaled_url = str_replace( '-' . $found_size[0] . 'x' . $found_size[1], '-scaled', $url );
|
352 |
+
}
|
353 |
+
$strip_url = $this->add_schema( $strip_url );
|
354 |
+
|
355 |
+
$attachment_id = attachment_url_to_postid( $strip_url );
|
356 |
+
if ( $attachment_id === 0 ) {
|
357 |
+
$scaled_url = $this->add_schema( $scaled_url );
|
358 |
+
$attachment_id = attachment_url_to_postid( $scaled_url );
|
359 |
+
}
|
360 |
+
|
361 |
+
return [ 'attachment_id' => $attachment_id, 'size' => $size ];
|
362 |
+
}
|
363 |
/**
|
364 |
* Filter out the urls that are saved to our servers when saving to the DB.
|
365 |
*
|
385 |
}
|
386 |
foreach ( $images as $url ) {
|
387 |
$is_original_uploaded = self::is_uploaded_image( $url );
|
|
|
388 |
$attachment_id = false;
|
389 |
if ( $is_original_uploaded ) {
|
390 |
$found_size = $this->parse_dimension_from_optimized_url( $url );
|
393 |
}
|
394 |
$attachment_id = self::get_attachment_id_from_url( $url );
|
395 |
} else {
|
396 |
+
$id_and_size = $this->get_local_attachement_id_from_url( $url );
|
397 |
+
$attachment_id = $id_and_size['attachment_id'];
|
398 |
+
$size = $id_and_size['size'];
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
}
|
400 |
|
401 |
if ( OPTML_DEBUG ) {
|
445 |
}
|
446 |
} else {
|
447 |
if ( $job === 'offload_images' ) {
|
448 |
+
$id_and_size = $this->get_local_attachement_id_from_url( $url );
|
449 |
+
$attachment_id = $id_and_size['attachment_id'];
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
}
|
451 |
}
|
452 |
+
if ( false === $attachment_id || $attachment_id === 0 || ! wp_attachment_is_image( $attachment_id ) ) {
|
453 |
continue;
|
454 |
}
|
455 |
$found_images[] = intval( $attachment_id );
|
525 |
$ids = $this->get_image_id_from_content( get_post_field( 'post_content', $content_id ), $job );
|
526 |
if ( count( $ids ) > 0 ) {
|
527 |
$images_to_update[ $content_id ] = $ids;
|
528 |
+
$duplicated_pages = apply_filters( 'optml_offload_duplicated_images', [], $content_id );
|
529 |
+
if ( is_array( $duplicated_pages ) && ! empty( $duplicated_pages ) ) {
|
530 |
+
foreach ( $duplicated_pages as $duplicated_id ) {
|
531 |
+
$duplicated_ids = $this->get_image_id_from_content( get_post_field( 'post_content', $duplicated_id ), $job );
|
532 |
+
$images_to_update[ $duplicated_id ] = $duplicated_ids;
|
533 |
+
}
|
534 |
+
}
|
535 |
}
|
536 |
if ( $job === 'offload_images' ) {
|
537 |
update_post_meta( $content_id, self::POST_OFFLOADED_FLAG, 'true' );
|
615 |
}
|
616 |
foreach ( $image_ids as $id ) {
|
617 |
if ( self::is_uploaded_image( wp_get_attachment_metadata( $id )['file'] ) ) {
|
618 |
+
// if this meta flag below failed at the initial update but the file meta above is updated it will cause an infinite query loop
|
619 |
+
update_post_meta( $id, 'optimole_offload', 'true' );
|
620 |
$success_up ++;
|
621 |
continue;
|
622 |
}
|
765 |
update_post_meta( $id, 'optimole_rollback_error', 'true' );
|
766 |
continue;
|
767 |
}
|
768 |
+
$original_meta = wp_create_image_subsizes( $results['file'], $id );
|
769 |
if ( $type === 'image/svg+xml' ) {
|
770 |
if ( ! function_exists( 'wp_get_attachment_metadata' ) || ! function_exists( 'wp_update_attachment_metadata' ) ) {
|
771 |
include_once ABSPATH . '/wp-admin/includes/post.php';
|
791 |
continue;
|
792 |
}
|
793 |
update_attached_file( $id, $results['file'] );
|
794 |
+
$duplicated_images = apply_filters( 'optml_offload_duplicated_images', [], $id );
|
795 |
+
if ( is_array( $duplicated_images ) && ! empty( $duplicated_images ) ) {
|
796 |
+
foreach ( $duplicated_images as $duplicated_id ) {
|
797 |
+
$duplicated_meta = wp_get_attachment_metadata( $duplicated_id );
|
798 |
+
if ( isset( $duplicated_meta['file'] ) && self::is_uploaded_image( $duplicated_meta['file'] ) ) {
|
799 |
+
$duplicated_meta['file'] = $results['file'];
|
800 |
+
if ( isset( $duplicated_meta['sizes'] ) ) {
|
801 |
+
foreach ( $meta['sizes'] as $key => $value ) {
|
802 |
+
if ( isset( $original_meta['sizes'][ $key ]['file'] ) ) {
|
803 |
+
$duplicated_meta['sizes'][ $key ]['file'] = $original_meta['sizes'][ $key ]['file'];
|
804 |
+
}
|
805 |
+
}
|
806 |
+
}
|
807 |
+
wp_update_attachment_metadata( $duplicated_id, $duplicated_meta );
|
808 |
+
delete_post_meta( $duplicated_id, 'optimole_offload' );
|
809 |
+
}
|
810 |
+
}
|
811 |
+
}
|
812 |
$success_back++;
|
813 |
$original_url = self::get_original_url( $id );
|
814 |
if ( $original_url === false ) {
|
925 |
if ( self::is_uploaded_image( $file ) ) {
|
926 |
$optimized_url = ( new Optml_Image( $url, ['width' => 'auto', 'height' => 'auto', 'quality' => $this->settings->get_numeric_quality()], $this->settings->get( 'cache_buster' ) ) )->get_url();
|
927 |
return str_replace( '/' . $url, '/' . self::KEYS['not_processed_flag'] . $attachment_id . $file, $optimized_url );
|
928 |
+
} else {
|
929 |
+
// this is for the users that already offloaded the images before the other fixes
|
930 |
+
$local_file = get_attached_file( $attachment_id );
|
931 |
+
if ( ! file_exists( $local_file ) ) {
|
932 |
+
$duplicated_images = apply_filters( 'optml_offload_duplicated_images', [], $attachment_id );
|
933 |
+
if ( is_array( $duplicated_images ) && ! empty( $duplicated_images ) ) {
|
934 |
+
foreach ( $duplicated_images as $id ) {
|
935 |
+
if ( ! empty( $id ) ) {
|
936 |
+
$duplicated_meta = wp_get_attachment_metadata( $id );
|
937 |
+
if ( isset( $duplicated_meta['file'] ) && self::is_uploaded_image( $duplicated_meta['file'] ) ) {
|
938 |
+
$optimized_url = ( new Optml_Image( $url, ['width' => 'auto', 'height' => 'auto', 'quality' => $this->settings->get_numeric_quality()], $this->settings->get( 'cache_buster' ) ) )->get_url();
|
939 |
+
return str_replace( '/' . $url, '/' . self::KEYS['not_processed_flag'] . $id . $duplicated_meta['file'], $optimized_url );
|
940 |
+
}
|
941 |
+
}
|
942 |
+
}
|
943 |
+
}
|
944 |
+
}
|
945 |
}
|
946 |
return $url;
|
947 |
}
|
1143 |
$meta['sizes'][ $key ]['file'] = $file_name;
|
1144 |
}
|
1145 |
}
|
1146 |
+
$duplicated_images = apply_filters( 'optml_offload_duplicated_images', [], $attachment_id );
|
1147 |
+
|
1148 |
+
if ( is_array( $duplicated_images ) && ! empty( $duplicated_images ) ) {
|
1149 |
+
foreach ( $duplicated_images as $duplicated_id ) {
|
1150 |
+
$duplicated_meta = wp_get_attachment_metadata( $duplicated_id );
|
1151 |
+
if ( isset( $duplicated_meta['file'] ) && ! self::is_uploaded_image( $duplicated_meta['file'] ) ) {
|
1152 |
+
$duplicated_meta['file'] = $meta['file'];
|
1153 |
+
if ( isset( $duplicated_meta['sizes'] ) ) {
|
1154 |
+
foreach ( $meta['sizes'] as $key => $value ) {
|
1155 |
+
$duplicated_meta['sizes'][ $key ]['file'] = $file_name;
|
1156 |
+
}
|
1157 |
+
}
|
1158 |
+
wp_update_attachment_metadata( $duplicated_id, $duplicated_meta );
|
1159 |
+
update_post_meta( $duplicated_id, 'optimole_offload', 'true' );
|
1160 |
+
}
|
1161 |
+
}
|
1162 |
+
}
|
1163 |
return $meta;
|
1164 |
}
|
1165 |
|
optimole-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Image optimization service by Optimole
|
4 |
* Description: Complete handling of your website images.
|
5 |
-
* Version: 3.5.
|
6 |
* Author: Optimole
|
7 |
* Author URI: https://optimole.com
|
8 |
* License: GPL-2.0+
|
@@ -74,7 +74,7 @@ function optml() {
|
|
74 |
}
|
75 |
define( 'OPTML_URL', plugin_dir_url( __FILE__ ) );
|
76 |
define( 'OPTML_PATH', plugin_dir_path( __FILE__ ) );
|
77 |
-
define( 'OPTML_VERSION', '3.5.
|
78 |
define( 'OPTML_NAMESPACE', 'optml' );
|
79 |
define( 'OPTML_BASEFILE', __FILE__ );
|
80 |
// Fallback for old PHP versions when this constant is not defined.
|
2 |
/**
|
3 |
* Plugin Name: Image optimization service by Optimole
|
4 |
* Description: Complete handling of your website images.
|
5 |
+
* Version: 3.5.3
|
6 |
* Author: Optimole
|
7 |
* Author URI: https://optimole.com
|
8 |
* License: GPL-2.0+
|
74 |
}
|
75 |
define( 'OPTML_URL', plugin_dir_url( __FILE__ ) );
|
76 |
define( 'OPTML_PATH', plugin_dir_path( __FILE__ ) );
|
77 |
+
define( 'OPTML_VERSION', '3.5.3' );
|
78 |
define( 'OPTML_NAMESPACE', 'optml' );
|
79 |
define( 'OPTML_BASEFILE', __FILE__ );
|
80 |
// Fallback for old PHP versions when this constant is not defined.
|
readme.txt
CHANGED
@@ -95,6 +95,13 @@ Premium users will be able to optimize images starting with more than 25k monthl
|
|
95 |
|
96 |
== Changelog ==
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
##### [Version 3.5.2](https://github.com/Codeinwp/optimole-wp/compare/v3.5.1...v3.5.2) (2022-11-11)
|
99 |
|
100 |
* Fixed media offload nonce update
|
95 |
|
96 |
== Changelog ==
|
97 |
|
98 |
+
##### [Version 3.5.3](https://github.com/Codeinwp/optimole-wp/compare/v3.5.2...v3.5.3) (2022-12-12)
|
99 |
+
|
100 |
+
* Improve compatibility with WPML plugin
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
+
|
105 |
##### [Version 3.5.2](https://github.com/Codeinwp/optimole-wp/compare/v3.5.1...v3.5.2) (2022-11-11)
|
106 |
|
107 |
* Fixed media offload nonce update
|
vendor/autoload.php
CHANGED
@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
22 |
|
23 |
require_once __DIR__ . '/composer/autoload_real.php';
|
24 |
|
25 |
-
return
|
22 |
|
23 |
require_once __DIR__ . '/composer/autoload_real.php';
|
24 |
|
25 |
+
return ComposerAutoloaderInitb565b81f2ac776428cbdf7d61f66e518::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,18 +22,18 @@ class ComposerAutoloaderInit66dcbeaf310d95ffd1b17af832a3a439
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
-
$includeFiles = \Composer\Autoload\
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
-
|
37 |
}
|
38 |
|
39 |
return $loader;
|
@@ -45,7 +45,7 @@ class ComposerAutoloaderInit66dcbeaf310d95ffd1b17af832a3a439
|
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
-
function
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitb565b81f2ac776428cbdf7d61f66e518
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInitb565b81f2ac776428cbdf7d61f66e518', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitb565b81f2ac776428cbdf7d61f66e518', 'loadClassLoader'));
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitb565b81f2ac776428cbdf7d61f66e518::getInitializer($loader));
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
+
$includeFiles = \Composer\Autoload\ComposerStaticInitb565b81f2ac776428cbdf7d61f66e518::$files;
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
+
composerRequireb565b81f2ac776428cbdf7d61f66e518($fileIdentifier, $file);
|
37 |
}
|
38 |
|
39 |
return $loader;
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
+
function composerRequireb565b81f2ac776428cbdf7d61f66e518($fileIdentifier, $file)
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'9fef4034ed73e26a337d9856ea126f7f' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
@@ -17,7 +17,7 @@ class ComposerStaticInit66dcbeaf310d95ffd1b17af832a3a439
|
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
-
$loader->classMap =
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitb565b81f2ac776428cbdf7d61f66e518
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'9fef4034ed73e26a337d9856ea126f7f' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
+
$loader->classMap = ComposerStaticInitb565b81f2ac776428cbdf7d61f66e518::$classMap;
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|