Changeset 61453
- Timestamp:
- 01/09/2026 02:24:18 AM (2 months ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
-
wp-admin/includes/class-custom-image-header.php (modified) (2 diffs)
-
wp-admin/includes/class-wp-media-list-table.php (modified) (1 diff)
-
wp-admin/includes/image-edit.php (modified) (3 diffs)
-
wp-admin/includes/media.php (modified) (5 diffs)
-
wp-admin/upload.php (modified) (2 diffs)
-
wp-includes/embed.php (modified) (1 diff)
-
wp-includes/media.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-custom-image-header.php
r61440 r61453 1352 1352 */ 1353 1353 final public function insert_attachment( $attachment, $cropped ) { 1354 $parent_id = isset( $attachment['post_parent'] ) ? $attachment['post_parent'] :null;1354 $parent_id = $attachment['post_parent'] ?? null; 1355 1355 unset( $attachment['post_parent'] ); 1356 1356 … … 1585 1585 foreach ( $header_images as &$header_image ) { 1586 1586 $header_meta = get_post_meta( $header_image['attachment_id'] ); 1587 $header_image['timestamp'] = isset( $header_meta[ $timestamp_key ] ) ? $header_meta[ $timestamp_key ] :'';1588 $header_image['alt_text'] = isset( $header_meta[ $alt_text_key ] ) ? $header_meta[ $alt_text_key ] :'';1587 $header_image['timestamp'] = $header_meta[ $timestamp_key ] ?? ''; 1588 $header_image['alt_text'] = $header_meta[ $alt_text_key ] ?? ''; 1589 1589 } 1590 1590 -
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r61268 r61453 48 48 array( 49 49 'plural' => 'media', 50 'screen' => isset( $args['screen'] ) ? $args['screen'] :null,50 'screen' => $args['screen'] ?? null, 51 51 ) 52 52 ); -
trunk/src/wp-admin/includes/image-edit.php
r60703 r61453 110 110 <input type="hidden" id="imgedit-undone-<?php echo $post_id; ?>" value="0" /> 111 111 <input type="hidden" id="imgedit-selection-<?php echo $post_id; ?>" value="" /> 112 <input type="hidden" id="imgedit-x-<?php echo $post_id; ?>" value="<?php echo isset( $meta['width'] ) ? $meta['width'] :0; ?>" />113 <input type="hidden" id="imgedit-y-<?php echo $post_id; ?>" value="<?php echo isset( $meta['height'] ) ? $meta['height'] :0; ?>" />112 <input type="hidden" id="imgedit-x-<?php echo $post_id; ?>" value="<?php echo $meta['width'] ?? 0; ?>" /> 113 <input type="hidden" id="imgedit-y-<?php echo $post_id; ?>" value="<?php echo $meta['height'] ?? 0; ?>" /> 114 114 115 115 <div id="imgedit-crop-<?php echo $post_id; ?>" class="imgedit-crop-wrap"> … … 155 155 ?> 156 156 </label> 157 <input type="number" step="1" min="0" max="<?php echo isset( $meta['width'] ) ? $meta['width'] : ''; ?>" aria-describedby="imgedit-scale-warn-<?php echo $post_id; ?>" id="imgedit-scale-width-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1, this)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1, this)" value="<?php echo isset( $meta['width'] ) ? $meta['width'] :0; ?>" />157 <input type="number" step="1" min="0" max="<?php echo $meta['width'] ?? ''; ?>" aria-describedby="imgedit-scale-warn-<?php echo $post_id; ?>" id="imgedit-scale-width-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1, this)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1, this)" value="<?php echo $meta['width'] ?? 0; ?>" /> 158 158 <span class="imgedit-separator" aria-hidden="true">×</span> 159 159 <label for="imgedit-scale-height-<?php echo $post_id; ?>" class="screen-reader-text"><?php _e( 'scale height' ); ?></label> 160 <input type="number" step="1" min="0" max="<?php echo isset( $meta['height'] ) ? $meta['height'] : ''; ?>" aria-describedby="imgedit-scale-warn-<?php echo $post_id; ?>" id="imgedit-scale-height-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" value="<?php echo isset( $meta['height'] ) ? $meta['height'] :0; ?>" />160 <input type="number" step="1" min="0" max="<?php echo $meta['height'] ?? ''; ?>" aria-describedby="imgedit-scale-warn-<?php echo $post_id; ?>" id="imgedit-scale-height-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" value="<?php echo $meta['height'] ?? 0; ?>" /> 161 161 <button id="imgedit-scale-button" type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'scale')" class="button button-primary"><?php esc_html_e( 'Scale' ); ?></button> 162 162 </div> … … 745 745 $h = $size['height']; 746 746 747 $scale = isset( $sel->r ) ? $sel->r :1 / _image_get_preview_ratio( $w, $h ); // Discard preview scaling.747 $scale = $sel->r ?? 1 / _image_get_preview_ratio( $w, $h ); // Discard preview scaling. 748 748 $image->crop( (int) ( $sel->x * $scale ), (int) ( $sel->y * $scale ), (int) ( $sel->w * $scale ), (int) ( $sel->h * $scale ) ); 749 749 } else { 750 $scale = isset( $sel->r ) ? $sel->r :1 / _image_get_preview_ratio( imagesx( $image ), imagesy( $image ) ); // Discard preview scaling.750 $scale = $sel->r ?? 1 / _image_get_preview_ratio( imagesx( $image ), imagesy( $image ) ); // Discard preview scaling. 751 751 $image = _crop_image_resource( $image, $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale ); 752 752 } -
trunk/src/wp-admin/includes/media.php
r61440 r61453 833 833 if ( isset( $send_id ) ) { 834 834 $attachment = wp_unslash( $_POST['attachments'][ $send_id ] ); 835 $html = isset( $attachment['post_title'] ) ? $attachment['post_title'] :'';835 $html = $attachment['post_title'] ?? ''; 836 836 837 837 if ( ! empty( $attachment['url'] ) ) { … … 1559 1559 } 1560 1560 1561 $item = get_media_item( $id, array( 'errors' => isset( $errors[ $id ] ) ? $errors[ $id ] :null ) );1561 $item = get_media_item( $id, array( 'errors' => $errors[ $id ] ?? null ) ); 1562 1562 1563 1563 if ( $item ) { … … 2104 2104 $upload_action_url = admin_url( 'async-upload.php' ); 2105 2105 $post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0; 2106 $_type = isset( $type ) ? $type :'';2107 $_tab = isset( $tab ) ? $tab :'';2106 $_type = $type ?? ''; 2107 $_tab = $tab ?? ''; 2108 2108 2109 2109 $max_upload_size = wp_max_upload_size(); … … 3657 3657 wp_add_id3_tag_data( $metadata, $data ); 3658 3658 3659 $file_format = isset( $metadata['fileformat'] ) ? $metadata['fileformat'] :null;3659 $file_format = $metadata['fileformat'] ?? null; 3660 3660 3661 3661 /** … … 3740 3740 wp_add_id3_tag_data( $metadata, $data ); 3741 3741 3742 $file_format = isset( $metadata['fileformat'] ) ? $metadata['fileformat'] :null;3742 $file_format = $metadata['fileformat'] ?? null; 3743 3743 3744 3744 /** -
trunk/src/wp-admin/upload.php
r61279 r61453 88 88 $message .= sprintf( 89 89 ' <a href="%1$s">%2$s</a>', 90 esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] :'' ), 'bulk-media' ) ),90 esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( $_GET['ids'] ?? '' ), 'bulk-media' ) ), 91 91 __( 'Undo' ) 92 92 ); … … 118 118 $messages[4] = __( 'Media file moved to the Trash.' ) . sprintf( 119 119 ' <a href="%1$s">%2$s</a>', 120 esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] :'' ), 'bulk-media' ) ),120 esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( $_GET['ids'] ?? '' ), 'bulk-media' ) ), 121 121 __( 'Undo' ) 122 122 ); -
trunk/src/wp-includes/embed.php
r61119 r61453 694 694 } 695 695 696 $width = isset( $args['width'] ) ? $args['width'] :0;696 $width = $args['width'] ?? 0; 697 697 698 698 $data = get_oembed_response_data( $post_id, $width ); -
trunk/src/wp-includes/media.php
r61411 r61453 1230 1230 function wp_get_attachment_image_url( $attachment_id, $size = 'thumbnail', $icon = false ) { 1231 1231 $image = wp_get_attachment_image_src( $attachment_id, $size, $icon ); 1232 return isset( $image[0] ) ? $image[0] :false;1232 return $image[0] ?? false; 1233 1233 } 1234 1234 … … 1411 1411 */ 1412 1412 $parsed = parse_url( $image_baseurl ); 1413 $domain = isset( $parsed['host'] ) ? $parsed['host'] :'';1413 $domain = $parsed['host'] ?? ''; 1414 1414 1415 1415 if ( isset( $parsed['port'] ) ) { … … 2172 2172 $filtered_decoding_attr = apply_filters( 2173 2173 'wp_img_tag_add_decoding_attr', 2174 isset( $optimization_attrs['decoding'] ) ? $optimization_attrs['decoding'] :false,2174 $optimization_attrs['decoding'] ?? false, 2175 2175 $image, 2176 2176 $context … … 2214 2214 $filtered_loading_attr = apply_filters( 2215 2215 'wp_img_tag_add_loading_attr', 2216 isset( $optimization_attrs['loading'] ) ? $optimization_attrs['loading'] :false,2216 $optimization_attrs['loading'] ?? false, 2217 2217 $image, 2218 2218 $context … … 2233 2233 */ 2234 2234 if ( isset( $optimization_attrs['fetchpriority'] ) && 'high' === $optimization_attrs['fetchpriority'] && 2235 ( isset( $optimization_attrs['loading'] ) ? $optimization_attrs['loading'] :false ) !== $filtered_loading_attr &&2235 ( $optimization_attrs['loading'] ?? false ) !== $filtered_loading_attr && 2236 2236 'lazy' === $filtered_loading_attr 2237 2237 ) { … … 2381 2381 } 2382 2382 2383 $value = isset( $optimization_attrs['loading'] ) ? $optimization_attrs['loading'] :false;2383 $value = $optimization_attrs['loading'] ?? false; 2384 2384 2385 2385 /**
Note: See TracChangeset
for help on using the changeset viewer.