Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,9 @@ function gutenberg_enqueue_latex_to_mathml_loader() {
*
* @see packages/vips/src/loader.ts
*/
add_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_vips_loader' );
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
add_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_vips_loader' );
}
function gutenberg_enqueue_vips_loader() {
wp_enqueue_script_module( '@wordpress/vips/loader' );
}
Expand Down
5 changes: 5 additions & 0 deletions lib/media/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
* @package gutenberg
*/

// Client-side media processing is currently plugin-only while the feature matures.
if ( ! defined( 'IS_GUTENBERG_PLUGIN' ) || ! IS_GUTENBERG_PLUGIN ) {
return;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for prepping this PR!

Just checking, I set define( 'IS_GUTENBERG_PLUGIN', false ); and it does stop here. 👍🏻

But I noticed that window.__clientSideMediaProcessing is still true and worker.js loads when I upload an image. Is that expected?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you test this? Is that because the core patch hasn't landed yet?

}

if ( ! gutenberg_is_client_side_media_processing_enabled() ) {
return;
}
Expand Down
Loading