WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/23/2017 04:08:42 AM (20 months ago)
Author:
pento
Message:

General: Reformat inline if () statements inside HTML tags.

This pattern occurs a handful of times across the codebase:

<div class="foo<?php if ( $bar ) { echo ' baz'; } ?>">

Unfortunately, it doesn't really play nicely with phpcbf, so all instances need to be removed in preperation for auto code formatting.

See #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-advanced.php

    r42201 r42217  
    628628
    629629if ( post_type_supports($post_type, 'editor') ) {
    630 ?>
    631 <div id="postdivrich" class="postarea<?php if ( $_wp_editor_expand ) { echo ' wp-editor-expand'; } ?>">
     630    $_wp_editor_expand_class = '';
     631    if ( $_wp_editor_expand ) {
     632        $_wp_editor_expand_class = ' wp-editor-expand';
     633    }
     634?>
     635<div id="postdivrich" class="postarea<?php echo $_wp_editor_expand_class; ?>">
    632636
    633637<?php wp_editor( $post->post_content, 'content', array(
Note: See TracChangeset for help on using the changeset viewer.