Changeset 56559 for trunk/tests/phpunit/tests/media.php
- Timestamp:
- 09/12/2023 03:21:02 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r56548 r56559 2358 2358 add_filter( 2359 2359 'wp_content_img_tag', 2360 static function ( $filtered_image ) {2360 static function ( $filtered_image ) { 2361 2361 return "<span>$filtered_image</span>"; 2362 2362 } … … 2382 2382 add_filter( 2383 2383 'wp_content_img_tag', 2384 static function ( $filtered_image ) {2384 static function ( $filtered_image ) { 2385 2385 return "<span>$filtered_image</span>"; 2386 2386 } … … 4021 4021 add_filter( 4022 4022 'wp_get_attachment_image_attributes', 4023 static function ( $attr ) {4023 static function ( $attr ) { 4024 4024 unset( $attr['srcset'], $attr['sizes'], $attr['decoding'] ); 4025 4025 return $attr; … … 4155 4155 add_filter( 4156 4156 'the_content', 4157 static function () use ( &$image_within_content ) {4157 static function () use ( &$image_within_content ) { 4158 4158 // Replace content with an image tag, i.e. the 'wp_get_attachment_image' context is used while running 'the_content' filter. 4159 4159 $image_within_content = wp_get_attachment_image( self::$large_id, 'large', false ); … … 4222 4222 add_filter( 4223 4223 'the_content', 4224 static function ( $content ) use ( &$result, $context ) {4224 static function ( $content ) use ( &$result, $context ) { 4225 4225 $result = wp_get_loading_attr_default( $context ); 4226 4226 return $content; … … 4524 4524 add_filter( 4525 4525 'the_content', 4526 function ( $content ) use ( &$result, $context ) {4526 function ( $content ) use ( &$result, $context ) { 4527 4527 $attr = $this->get_width_height_for_high_priority(); 4528 4528 $result = wp_get_loading_optimization_attributes( 'img', $attr, $context ); … … 4806 4806 add_filter( 4807 4807 'wp_get_attachment_image_context', 4808 static function () {4808 static function () { 4809 4809 return 'my_custom_context'; 4810 4810 } … … 5209 5209 add_filter( 5210 5210 'wp_min_priority_img_pixels', 5211 static function ( $res ) {5211 static function ( $res ) { 5212 5212 return 2500; // 50*50=2500 5213 5213 } … … 5282 5282 add_filter( 5283 5283 'wp_get_attachment_image_context', 5284 static function ( $context ) use ( &$last_context ) {5284 static function ( $context ) use ( &$last_context ) { 5285 5285 $last_context = $context; 5286 5286 return $context; … … 5337 5337 add_filter( 5338 5338 'wp_omit_loading_attr_threshold', 5339 static function () use ( $threshold ) {5339 static function () use ( $threshold ) { 5340 5340 return $threshold; 5341 5341 }
Note: See TracChangeset
for help on using the changeset viewer.