Skip to content

Commit e0450a4

Browse files
committed
Merge branch 'development' of https://github.com/Codeinwp/optimole-wp into fix/e2e
2 parents 82f7c44 + 287d7f3 commit e0450a4

File tree

13 files changed

+183
-459
lines changed

13 files changed

+183
-459
lines changed

.github/workflows/test-e2e.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ jobs:
3838
SSH_PATH: ${{ secrets.SSH_PATH }}
3939
run: ./bin/run-e2e-tests.sh
4040
- name: Run E2E tests
41-
run: npm run e2e:run
42-
# Add test report artifacts
43-
- name: Upload test results
44-
if: always()
45-
uses: actions/upload-artifact@v3
46-
with:
47-
name: playwright-report
48-
path: playwright-report/
49-
retention-days: 30
41+
id: run_tests
42+
run: |
43+
npm run e2e:run
44+
continue-on-error: false
45+
- name: Check test results
46+
if: steps.run_tests.outcome != 'success'
47+
run: exit 1

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
#### [Version 3.14.0](https://github.com/Codeinwp/optimole-wp/compare/v3.13.9...v3.14.0) (2025-02-20)
2+
3+
#### New Features
4+
5+
- You can now create **sub-API keys** in the Optimole dashboard to connect sites while restricting access to specific folders. Ideal for agencies and multi-site users, this feature allows **folder-level access control**.
6+
- **Bulk delete assets in the Cloud Library**, including entire folders with their contents.
7+
8+
#### Enhancements
9+
10+
- Added **basic previews for video and audio files** in the Optimole dashboard, now with an **asset player** in the file details modal.
11+
- **Increased the maximum file upload size** in the Cloud Library to **100MB** for better support of larger media files.
12+
- The **Cloud Library now remembers your last used display mode**, keeping your preferred **folder view or image gallery view** for a smoother experience.
13+
- **Improved folder listing**, allowing more than **50 folders** to load dynamically for better navigation.
14+
- **Optimized upload process** by uploading files faster to our cloud.
15+
16+
#### Bug Fixes
17+
18+
- **Fixed folder movement behavior**, preventing folders from being moved into their own subfolders.
19+
- **Fixed folder creation modal layout**, ensuring button text is displayed correctly.
20+
121
##### [Version 3.13.9](https://github.com/Codeinwp/optimole-wp/compare/v3.13.8...v3.13.9) (2024-11-26)
222

323
- Fixes dashboard banner appearing in wrong conditions

README.md

Lines changed: 64 additions & 433 deletions
Large diffs are not rendered by default.

assets/src/dashboard/parts/components/Modal.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function Modal({ icon, labels = {}, onRequestClose = () => {}, on
1212
'bg-stale-yellow': 'warning' === variant,
1313
'bg-light-blue': 'default' === variant
1414
},
15-
'p-3 rounded-full'
15+
'p-2 rounded-full flex items-center justify-center'
1616
);
1717

1818
const actionButtonClasses = classnames(
@@ -37,11 +37,12 @@ export default function Modal({ icon, labels = {}, onRequestClose = () => {}, on
3737
/>
3838

3939
<div className="flex flex-col items-center">
40-
<Icon
41-
icon={ icon }
42-
size={ 24 }
43-
className={iconClasses}
44-
/>
40+
<span className={iconClasses}>
41+
<Icon
42+
icon={ icon }
43+
size={ 24 }
44+
/>
45+
</span>
4546

4647
<h2
4748
className="mb-0"

assets/src/dashboard/parts/connected/settings/OffloadMedia.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useDispatch, useSelect } from '@wordpress/data';
66
import { Icon } from '@wordpress/icons';
77

88
import { warning, rollback as rollbackIcon, offload, warningAlt, sync } from '../../../utils/icons';
9-
import { callSync, checkOffloadConflicts, saveSettings } from '../../../utils/api';
9+
import { callSync, clearOffloadErrors, checkOffloadConflicts, saveSettings } from '../../../utils/api';
1010
import Notice from '../../components/Notice';
1111
import RadioBoxes from '../../components/RadioBoxes';
1212
import ProgressTile from '../../components/ProgressTile';
@@ -113,7 +113,9 @@ const OffloadMedia = ({ settings, canSave, setSettings, setCanSave }) => {
113113
}, []);
114114

115115

116-
const onOffloadMedia = ( imageIds = []) => {
116+
const onOffloadMedia = async( imageIds = []) => {
117+
await clearOffloadErrors();
118+
117119
const nextSettings = { ...settings };
118120
nextSettings['show_offload_finish_notice'] = '';
119121
nextSettings['offloading_status'] = 'enabled';

assets/src/dashboard/utils/api.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,17 @@ export const callSync = ( data ) => {
592592
});
593593
};
594594

595+
export const clearOffloadErrors = async() => {
596+
try {
597+
return await apiFetch({
598+
path: optimoleDashboardApp.routes['clear_offload_errors'],
599+
method: 'GET'
600+
});
601+
} catch ( error ) {
602+
console.log( error );
603+
}
604+
};
605+
595606
export const addNotice = ( text ) => {
596607
createNotice(
597608
'info',

inc/media_offload.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2754,4 +2754,18 @@ private function get_offloaded_attachment_url( $attachment_id, $url ) {
27542754

27552755
return $url;
27562756
}
2757+
2758+
/**
2759+
* Cleanup the offload errors meta.
2760+
*/
2761+
public static function clear_offload_errors_meta() {
2762+
global $wpdb;
2763+
2764+
return $wpdb->query(
2765+
$wpdb->prepare(
2766+
"DELETE FROM {$wpdb->postmeta} WHERE meta_key = %s",
2767+
self::META_KEYS['offload_error']
2768+
)
2769+
);
2770+
}
27572771
}

inc/rest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class Optml_Rest {
7878
],
7979
'media_cloud_routes' => [
8080
'number_of_images_and_pages' => 'POST',
81+
'clear_offload_errors' => 'GET',
8182
'get_offload_conflicts' => 'GET',
8283
],
8384
'watermark_routes' => [
@@ -867,6 +868,19 @@ public function number_of_images_and_pages( WP_REST_Request $request ) {
867868
return $this->response( Optml_Media_Offload::get_image_count( $action, $refresh, $images ) );
868869
}
869870

871+
/**
872+
* Clear the offload errors from previous offload attempts.
873+
*
874+
* @param WP_REST_Request $request Rest request object.
875+
*
876+
* @return WP_REST_Response
877+
*/
878+
public function clear_offload_errors( WP_REST_Request $request ) {
879+
$delete_count = Optml_Media_Offload::clear_offload_errors_meta();
880+
881+
return $this->response( [ 'success' => $delete_count ] );
882+
}
883+
870884
/**
871885
* Get conflicts list.
872886
*

optimole-wp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: Image optimization service by Optimole
44
* Description: Complete handling of your website images.
5-
* Version: 3.13.9
5+
* Version: 3.14.0
66
* Author: Optimole
77
* Author URI: https://optimole.com
88
* License: GPL-2.0+
@@ -89,7 +89,7 @@ function optml() {
8989
}
9090
define( 'OPTML_URL', plugin_dir_url( __FILE__ ) );
9191
define( 'OPTML_PATH', plugin_dir_path( __FILE__ ) );
92-
define( 'OPTML_VERSION', '3.13.9' );
92+
define( 'OPTML_VERSION', '3.14.0' );
9393
define( 'OPTML_NAMESPACE', 'optml' );
9494
define( 'OPTML_BASEFILE', __FILE__ );
9595
// Fallback for old PHP versions when this constant is not defined.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)