Changeset 23874 for trunk/wp-admin/includes/post-formats.php
- Timestamp:
- 03/29/2013 08:56:18 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post-formats.php
r23853 r23874 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"> … … 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 e cho 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 esc_attr_e( $format_meta['image'] ); ?>" placeholder="<?php esc_attr_e( 'Attachment ID' ); ?>" class="widefat" /> 41 43 </div> 42 44
Note: See TracChangeset
for help on using the changeset viewer.