Changeset 64588 for trunk/src/wp-includes/rest-api/class-wp-rest-server.php
- Timestamp:
- 10/20/2026 05:02:48 AM (14 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r64527 r64588 1466 1466 // Add media processing settings for users who can upload files. 1467 1467 if ( wp_is_client_side_media_processing_enabled() && current_user_can( 'upload_files' ) ) { 1468 // Image sizes keyed by name for client-side media processing. 1469 $available['image_sizes'] = array(); 1470 foreach ( wp_get_registered_image_subsizes() as $name => $size ) { 1471 $available['image_sizes'][ $name ] = $size; 1472 } 1473 1474 /** This filter is documented in wp-admin/includes/image.php */ 1475 $available['image_size_threshold'] = (int) apply_filters( 'big_image_size_threshold', 2560, array( 0, 0 ), '', 0 ); 1476 1477 /** This filter is documented in wp-includes/class-wp-image-editor-imagick.php */ 1478 $available['image_strip_meta'] = (bool) apply_filters( 'image_strip_meta', true ); 1479 1480 /* 1481 * On the server, this filter receives the decoded image's actual bit depth. 1482 * The client path never decodes the image on the server, so the filter is 1483 * applied with 16 (the maximum depth the client encoder can produce) as 1484 * both the value and the current depth. The client caps its output bit 1485 * depth at the filtered value, so a plugin lowering it (e.g. to 8) takes 1486 * effect on client-generated images too. 1487 */ 1488 /** This filter is documented in wp-includes/class-wp-image-editor-imagick.php */ 1489 $available['image_max_bit_depth'] = (int) apply_filters( 'image_max_bit_depth', 16, 16 ); 1490 1491 /** 1492 * Filters whether client-side media processing preserves animation in image sub-sizes. 1493 * 1494 * By default, sub-sizes of animated GIF and WebP images retain animation, 1495 * including cropped sizes. Return false to generate static sub-sizes using 1496 * only the first frame, reducing processing time in the browser. 1497 * 1498 * This setting applies only to client-side media processing. Server-side 1499 * processing continues to generate static sub-sizes. 1500 * 1501 * @since 7.2.0 1502 * 1503 * @param bool $generate_animated_image_subsizes Whether to preserve animation in image sub-sizes. 1504 * Default true. 1505 */ 1506 $available['generate_animated_image_subsizes'] = (bool) apply_filters( 'wp_generate_animated_image_subsizes', true ); 1468 $available = array_merge( $available, _wp_get_client_side_media_image_settings() ); 1507 1469 } 1508 1470
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)