Changeset 61947 for trunk/src/wp-includes/media.php
- Timestamp:
- 03/11/2026 11:38:35 PM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/media.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r61934 r61947 6412 6412 */ 6413 6413 function wp_is_client_side_media_processing_enabled(): bool { 6414 // This is due to SharedArrayBuffer requiring a secure context. 6415 $host = strtolower( (string) strtok( $_SERVER['HTTP_HOST'] ?? '', ':' ) ); 6416 $enabled = ( is_ssl() || 'localhost' === $host || str_ends_with( $host, '.localhost' ) ); 6417 6414 6418 /** 6415 6419 * Filters whether client-side media processing is enabled. … … 6417 6421 * @since 7.0.0 6418 6422 * 6419 * @param bool $enabled Whether client-side media processing is enabled. Default true .6420 */ 6421 return (bool) apply_filters( 'wp_client_side_media_processing_enabled', true);6423 * @param bool $enabled Whether client-side media processing is enabled. Default true if the page is served in a secure context. 6424 */ 6425 return (bool) apply_filters( 'wp_client_side_media_processing_enabled', $enabled ); 6422 6426 } 6423 6427 … … 6432 6436 } 6433 6437 6434 wp_add_inline_script( 'wp-block-editor', 'window.__clientSideMediaProcessing = true ', 'before' );6438 wp_add_inline_script( 'wp-block-editor', 'window.__clientSideMediaProcessing = true;', 'before' ); 6435 6439 6436 6440 $chromium_version = wp_get_chromium_major_version(); … … 6478 6482 * on supported browsers (Chromium 137+). 6479 6483 * 6484 * Skips setup when a third-party page builder overrides the block 6485 * editor via a custom `action` query parameter, as DIP would block 6486 * same-origin iframe access that these editors rely on. 6487 * 6480 6488 * @since 7.0.0 6481 6489 */ … … 6492 6500 6493 6501 if ( ! $screen->is_block_editor() && 'site-editor' !== $screen->id && ! ( 'widgets' === $screen->id && wp_use_widgets_block_editor() ) ) { 6502 return; 6503 } 6504 6505 /* 6506 * Skip when a third-party page builder overrides the block editor. 6507 * DIP isolates the document into its own agent cluster, 6508 * which blocks same-origin iframe access that these editors rely on. 6509 */ 6510 if ( isset( $_GET['action'] ) && 'edit' !== $_GET['action'] ) { 6494 6511 return; 6495 6512 }
Note: See TracChangeset
for help on using the changeset viewer.