File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6617,6 +6617,10 @@ function wp_add_crossorigin_attributes( string $html ): string {
66176617 if ( ! isset ( $ cross_origin_tag_attributes [ $ tag ] ) ) {
66186618 continue ;
66196619 }
6620+ $ crossorigin = $ processor ->get_attribute ( 'crossorigin ' );
6621+ if ( null !== $ crossorigin ) {
6622+ continue ;
6623+ }
66206624
66216625 if ( 'AUDIO ' === $ tag || 'VIDEO ' === $ tag ) {
66226626 $ processor ->set_bookmark ( 'audio-video-parent ' );
@@ -6626,8 +6630,6 @@ function wp_add_crossorigin_attributes( string $html ): string {
66266630
66276631 $ sought = false ;
66286632
6629- $ crossorigin = $ processor ->get_attribute ( 'crossorigin ' );
6630-
66316633 $ is_cross_origin = false ;
66326634
66336635 foreach ( $ cross_origin_tag_attributes [ $ tag ] as $ attr ) {
@@ -6641,7 +6643,7 @@ function wp_add_crossorigin_attributes( string $html ): string {
66416643 }
66426644 }
66436645
6644- if ( $ is_cross_origin && ! is_string ( $ crossorigin ) ) {
6646+ if ( $ is_cross_origin ) {
66456647 if ( 'SOURCE ' === $ tag ) {
66466648 $ sought = $ processor ->seek ( 'audio-video-parent ' );
66476649
Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ public function create_item( $request ) {
313313 }
314314
315315 // Handle convert_format parameter.
316- if ( isset ( $ request [ ' convert_format ' ] ) && ! $ request ['convert_format ' ] ) {
316+ if ( false === $ request ['convert_format ' ] ) {
317317 add_filter ( 'image_editor_output_format ' , '__return_empty_array ' , 100 );
318318 }
319319
@@ -2031,7 +2031,7 @@ public function sideload_item( WP_REST_Request $request ) {
20312031 );
20322032 }
20332033
2034- if ( isset ( $ request [ ' convert_format ' ] ) && ! $ request ['convert_format ' ] ) {
2034+ if ( false === $ request ['convert_format ' ] ) {
20352035 // Prevent image conversion as that is done client-side.
20362036 add_filter ( 'image_editor_output_format ' , '__return_empty_array ' , 100 );
20372037 }
You can’t perform that action at this time.
0 commit comments