WordPress.org

Make WordPress Core

Ticket #24190: 24190.diff

File 24190.diff, 761 bytes (added by lightningspirit, 23 months ago)

Added isset() to $post_format variable

  • wp-admin/edit-form-advanced.php

    diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
    index d92e8c4..5631d49 100644
    a b if ( post_type_supports($post_type, 'editor') ) { 
    474474<?php wp_editor( $post->post_content, 'content', array( 
    475475        'dfw' => true, 
    476476        'tabfocus_elements' => 'insert-media-button,save-post', 
    477         'editor_height' => in_array( $post_format, array( 'status', 'aside' ) ) ? 120 : 360 
     477        'editor_height' => isset( $post_format ) && in_array( $post_format, array( 'status', 'aside' ) ) ? 120 : 360 
    478478) ); ?> 
    479479<table id="post-status-info" cellspacing="0"><tbody><tr> 
    480480        <td id="wp-word-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td>