WordPress.org

Make WordPress Core

Ticket #24116: 24116.2.diff

File 24116.2.diff, 690 bytes (added by wonderboymusic, 5 years ago)
  • wp-admin/edit-form-advanced.php

    diff --git wp-admin/edit-form-advanced.php wp-admin/edit-form-advanced.php
    index ad44a52..7689090 100644
    if ( post_type_supports( $post_type, 'post-formats' ) && apply_filters( 'show_po 
    138138        $post_format_set_class = 'post-format-set';
    139139
    140140        if ( ! $post_format ) {
    141                 $post_format = 'standard';
     141                if ( ! empty( $_GET['format'] ) && in_array( $_GET['format'], get_post_format_slugs() ) )
     142                        $post_format = $_GET['format'];
     143                else
     144                        unset( $_GET['format'] );
     145
     146                if ( ! $post_format )
     147                        $post_format = 'standard';
    142148                if ( 'auto-draft' == $post->post_status )
    143149                        $post_format_set_class = '';
    144150        }