diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index 0eeeaea..e695054 100644
a
|
b
|
function edit_form_image_editor( $post ) { |
2686 | 2686 | endif; ?> |
2687 | 2687 | </div> |
2688 | 2688 | <div class="wp_attachment_details edit-form-section"> |
| 2689 | <?php if ( post_type_supports('attachment', 'caption') ) { ?> |
2689 | 2690 | <p> |
2690 | 2691 | <label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong></label><br /> |
2691 | 2692 | <textarea class="widefat" name="excerpt" id="attachment_caption"><?php echo $post->post_excerpt; ?></textarea> |
2692 | 2693 | </p> |
2693 | | |
2694 | | |
| 2694 | <?php } ?> |
| 2695 | <!-- above line to close post type check--> |
2695 | 2696 | <?php if ( 'image' === substr( $post->post_mime_type, 0, 5 ) ) : ?> |
2696 | 2697 | <p> |
| 2698 | <?php if ( post_type_supports('attachment', 'alt') ) { ?> |
2697 | 2699 | <label for="attachment_alt"><strong><?php _e( 'Alternative Text' ); ?></strong></label><br /> |
2698 | 2700 | <input type="text" class="widefat" name="_wp_attachment_image_alt" id="attachment_alt" value="<?php echo esc_attr( $alt_text ); ?>" /> |
2699 | 2701 | </p> |
| 2702 | <?php } ?> |
2700 | 2703 | <?php endif; ?> |
2701 | 2704 | |
2702 | 2705 | <?php |
… |
… |
function edit_form_image_editor( $post ) { |
2709 | 2712 | 'quicktags' => $quicktags_settings, |
2710 | 2713 | ); |
2711 | 2714 | ?> |
2712 | | |
| 2715 | <?php if ( post_type_supports('attachment', 'description') ) { ?> |
2713 | 2716 | <label for="content"><strong><?php _e( 'Description' ); ?></strong><?php |
2714 | 2717 | if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) { |
2715 | 2718 | echo ': ' . __( 'Displayed on attachment pages.' ); |
2716 | 2719 | } ?></label> |
2717 | 2720 | <?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?> |
2718 | | |
| 2721 | <?php } ?> |
2719 | 2722 | </div> |
2720 | 2723 | <?php |
2721 | 2724 | $extras = get_compat_media_markup( $post->ID ); |
diff --git a/src/wp-content/themes/twentyfifteen/functions.php b/src/wp-content/themes/twentyfifteen/functions.php
index 776f06a..b0f1b78 100644
a
|
b
|
function twentyfifteen_nav_description( $item_output, $item, $depth, $args ) { |
310 | 310 | } |
311 | 311 | add_filter( 'walker_nav_menu_start_el', 'twentyfifteen_nav_description', 10, 4 ); |
312 | 312 | |
| 313 | |
313 | 314 | /** |
314 | 315 | * Implement the Custom Header feature. |
315 | 316 | * |
diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
index 1c7749a..de8482f 100644
a
|
b
|
function wp_print_media_templates() { |
361 | 361 | <input type="text" value="{{ data.url }}" readonly /> |
362 | 362 | </label> |
363 | 363 | <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #> |
| 364 | <?php if ( post_type_supports('attachment', 'title') ) { ?> |
364 | 365 | <label class="setting" data-setting="title"> |
365 | 366 | <span class="name"><?php _e('Title'); ?></span> |
366 | 367 | <input type="text" value="{{ data.title }}" {{ maybeReadOnly }} /> |
367 | 368 | </label> |
| 369 | <?php } ?> |
368 | 370 | <# if ( 'audio' === data.type ) { #> |
369 | 371 | <?php foreach ( array( |
370 | 372 | 'artist' => __( 'Artist' ), |
… |
… |
function wp_print_media_templates() { |
376 | 378 | </label> |
377 | 379 | <?php endforeach; ?> |
378 | 380 | <# } #> |
| 381 | <?php if ( post_type_supports( 'attachment', 'caption') ) { ?> |
379 | 382 | <label class="setting" data-setting="caption"> |
380 | 383 | <span class="name"><?php _e( 'Caption' ); ?></span> |
381 | 384 | <textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea> |
382 | 385 | </label> |
| 386 | <?php } ?> |
383 | 387 | <# if ( 'image' === data.type ) { #> |
| 388 | <?php if ( post_type_supports('attachment', 'alt') ) { ?> |
384 | 389 | <label class="setting" data-setting="alt"> |
385 | 390 | <span class="name"><?php _e( 'Alt Text' ); ?></span> |
386 | 391 | <input type="text" value="{{ data.alt }}" {{ maybeReadOnly }} /> |
387 | 392 | </label> |
| 393 | <?php } ?> |
388 | 394 | <# } #> |
| 395 | <?php if ( post_type_supports('attachment', 'description') ) { ?> |
389 | 396 | <label class="setting" data-setting="description"> |
390 | 397 | <span class="name"><?php _e('Description'); ?></span> |
391 | 398 | <textarea {{ maybeReadOnly }}>{{ data.description }}</textarea> |
392 | 399 | </label> |
| 400 | <?php } ?> |
393 | 401 | <label class="setting"> |
394 | 402 | <span class="name"><?php _e( 'Uploaded By' ); ?></span> |
395 | 403 | <span class="value">{{ data.authorName }}</span> |
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index e9d9317..70149ac 100644
a
|
b
|
function create_initial_post_types() { |
72 | 72 | 'query_var' => false, |
73 | 73 | 'show_in_nav_menus' => false, |
74 | 74 | 'delete_with_user' => true, |
75 | | 'supports' => array( 'title', 'author', 'comments' ), |
| 75 | 'supports' => array( 'title', 'author', 'comments', 'caption', 'description', 'alt' ), |
76 | 76 | ) ); |
77 | 77 | add_post_type_support( 'attachment:audio', 'thumbnail' ); |
78 | 78 | add_post_type_support( 'attachment:video', 'thumbnail' ); |