Ticket #18083: 18083.unsupported-formats.diff
| File 18083.unsupported-formats.diff, 2.1 KB (added by duck_, 19 months ago) |
|---|
-
wp-admin/includes/class-wp-posts-list-table.php
997 997 998 998 <?php if ( post_type_supports( $screen->post_type, 'post-formats' ) && current_theme_supports( 'post-formats' ) ) : 999 999 $post_formats = get_theme_support( 'post-formats' ); 1000 if ( is_array( $post_formats[0] ) ) : ?> 1000 $all_post_formats = get_post_format_strings(); 1001 if ( isset( $post_formats[0] ) && is_array( $post_formats[0] ) ) : ?> 1001 1002 <div class="inline-edit-group"> 1002 1003 <label class="alignleft" for="post_format"> 1003 1004 <span class="title"><?php _e( 'Post Format' ); ?></span> … … 1006 1007 <option value="-1"><?php _e( '— No Change —' ); ?></option> 1007 1008 <?php endif; ?> 1008 1009 <option value="0"><?php _ex( 'Standard', 'Post format' ); ?></option> 1009 <?php foreach ( $post_formats[0] as $format ): ?> 1010 <option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option> 1011 <?php endforeach; ?> 1010 <?php foreach ( $all_post_formats as $slug => $format ): 1011 if ( $slug != 'standard' ) : ?> 1012 <option value="<?php echo esc_attr( $slug ); ?>"<?php if ( ! in_array( $slug, $post_formats[0] ) ) echo ' class="unsupported"'; ?>><?php echo esc_html( $format ); ?></option> 1013 <?php endif; 1014 endforeach; ?> 1012 1015 </select></label> 1013 1016 </div> 1014 1017 <?php endif; ?> -
wp-admin/js/inline-edit-post.dev.js
151 151 $('label.inline-edit-author', editRow).hide(); 152 152 } 153 153 154 var cur_format = $('.post_format', rowData).text(); 155 $('option.unsupported', editRow).each(function() { 156 var $this = $(this); 157 if ( $this.val() != cur_format ) 158 $this.hide(); 159 }); 160 154 161 for ( var f = 0; f < fields.length; f++ ) { 155 162 $(':input[name="' + fields[f] + '"]', editRow).val( $('.'+fields[f], rowData).text() ); 156 163 }
