Ticket #23900: 23900.2.diff
| File 23900.2.diff, 1.5 KB (added by , 13 years ago) |
|---|
-
wp-admin/includes/post-formats.php
20 20 21 21 <?php 22 22 $image = false; 23 if ( isset( $format_meta['image'] ) ) 24 $image = is_numeric( $format_meta['image'] ) ? wp_get_attachment_url( $format_meta['image'] ) : $format_meta['image']; 23 if ( ! empty( $format_meta['image'] ) && is_numeric( $format_meta['image'] ) ) { 24 $format_meta['image'] = absint( $format_meta['image'] ); 25 $image = wp_get_attachment_url( $format_meta['image'] ); 26 } 25 27 ?> 26 28 <div class="field wp-format-image"> 27 29 <div data-format="image" class="wp-format-media-holder hide-if-no-js<?php if ( ! $image ) echo ' empty'; ?>"> … … 36 38 ?> 37 39 </a> 38 40 </div> 39 <label for="_wp_format_image" class="screen-reader-text"><?php _e( ' Image URL' ); ?>:</label>40 <input id="wp_format_image" type="hidden" name="_wp_format_image" value="<?php echo esc_ url( $format_meta['image'] ); ?>" placeholder="<?php esc_attr_e( 'Image URL' ); ?>" class="widefat" />41 <label for="_wp_format_image" class="screen-reader-text"><?php _e( 'Attachment ID' ); ?>:</label> 42 <input id="wp_format_image" type="hidden" name="_wp_format_image" value="<?php echo esc_attr( $format_meta['image'] ); ?>" placeholder="<?php esc_attr_e( 'Attachment ID' ); ?>" class="widefat" /> 41 43 </div> 42 44 43 45 <div class="field wp-format-link wp-format-quote wp-format-image">