Changeset 9171
- Timestamp:
- 10/14/2008 05:29:38 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-form-advanced.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r9168 r9171 212 212 213 213 /** 214 * Display add post media and current post media form fields and images.215 *216 * @todo Complete.217 * @since 2.7.0218 *219 * @param object $post220 */221 function post_media_meta_box($post) {222 echo "<p><small><em>This feature isn't fully functional in this prototype.</em></small></p>";223 224 if ( empty( $post->ID ) )225 return;226 227 $atts = get_children( array(228 'post_parent' => $post->ID,229 'post_type' => 'attachment'230 ) );231 232 if ( !$atts ) {233 _e( 'No media.' );234 return;235 }236 237 foreach ( $atts as $att ) {238 if ( $thumb = wp_get_attachment_image( $att->ID, array(60, 45), true ) ) {239 ?>240 <a href="media.php?action=edit&attachment_id=<?php echo $att->ID ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att->post_title)); ?>">241 <?php echo $thumb; ?>242 </a>243 244 <?php245 }246 echo "<h4>$att->post_title</h4>";247 248 echo "<a href='#' class='no-crazy'>Remove</a> | ";249 echo "<a href='media.php?action=edit&attachment_id=$att->ID'>Edit</a>";250 251 echo "<br class='clear' />";252 }253 254 }255 add_meta_box( 'mediadiv', __('Media' ), 'post_media_meta_box', 'post', 'side', 'core' );256 257 /**258 214 * Display post categories form fields. 259 215 *
Note: See TracChangeset
for help on using the changeset viewer.