Skip to content

Commit

Permalink
v6.2.0.1 beta test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Zheng committed Apr 25, 2024
1 parent b18d2eb commit 4460e32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/media.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -999,19 +999,18 @@ public function replace_urls_in_json($content)
if (json_last_error() === JSON_ERROR_NONE) {
$did_webp_replace = false;

array_walk_recursive($jsonData, function (&$item, $key) use(&$did_webp_replace, $parent_class) {
array_walk_recursive($jsonData, function (&$item, $key) use (&$did_webp_replace, $parent_class) {
if ($key == 'url') {
$item_image = $parent_class->replace_webp($item);
if( $item_image ){
if ($item_image) {
$item = $item_image;

$did_webp_replace = true;
}
}
});


if( $did_webp_replace ){
if ($did_webp_replace) {
// Re-encode the modified array back to a JSON string
$newJsonString = json_encode($jsonData);

Expand Down
2 changes: 1 addition & 1 deletion tpl/toolbox/beta_test.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// Existing public version list
$v_list = array(
'6.2',
'6.2.0.1',
'6.1',
'5.7.0.1',
'4.6',
Expand Down

0 comments on commit 4460e32

Please sign in to comment.