Make WordPress Core


Ignore:
Timestamp:
08/15/2018 06:22:00 AM (8 years ago)
Author:
pento
Message:

Coding Standards: Prepare for upgrading WPCS to 1.0.0.

In order to get the best result when running phpcbf across the codebase, there are some manual tweaks we need to make.

These fall into three categories:

  • Fixing incorrectly indented code which has flow-on effects when auto-fixing.
  • Tweaking the layout of inline PHP inside HTML tags.
  • Moving more complex inline PHP inside HTML tags, to execute earlier.

See #44600.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r43174 r43569  
    758758<p class="meta-options">
    759759        <label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked( $post->comment_status, 'open' ); ?> /> <?php _e( 'Allow comments' ); ?></label><br />
    760         <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> /> 
    761                                                                                                                                                                                                                                                                                                                 <?php
    762                                                                                                                                                                                                                                                                                                                 printf(
    763                                                                                                                                                                                                                                                                                                                         /* translators: %s: Codex URL */
    764                                                                                                                                                                                                                                                                                                                         __( 'Allow <a href="%s">trackbacks and pingbacks</a> on this page' ),
    765                                                                                                                                                                                                                                                                                                                         __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' )
    766                                                                                                                                                                                                                                                                                                                 );
     760        <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> />
     761                <?php
     762                printf(
     763                        /* translators: %s: Codex URL */
     764                        __( 'Allow <a href="%s">trackbacks and pingbacks</a> on this page' ),
     765                        __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' )
     766                );
    767767                ?>
    768                 </label>
     768        </label>
    769769        <?php
    770770        /**
     
    13511351
    13521352        foreach ( wp_get_attachment_id3_keys( $post, 'edit' ) as $key => $label ) :
     1353                $value = '';
     1354                if ( ! empty( $meta[ $key ] ) ) {
     1355                        $value = $meta[ $key ];
     1356                }
    13531357        ?>
    13541358        <p>
    13551359                <label for="title"><?php echo $label; ?></label><br />
    1356                 <input type="text" name="id3_<?php echo esc_attr( $key ); ?>" id="id3_<?php echo esc_attr( $key ); ?>" class="large-text" value="
    1357                                                                                                 <?php
    1358                                                                                                 if ( ! empty( $meta[ $key ] ) ) {
    1359                                                                                                         echo esc_attr( $meta[ $key ] );
    1360                                                                                                 }
    1361                 ?>
    1362                 " />
     1360                <input type="text" name="id3_<?php echo esc_attr( $key ); ?>" id="id3_<?php echo esc_attr( $key ); ?>" class="large-text" value="<?php echo esc_attr( $value ); ?>" />
    13631361        </p>
    13641362        <?php
Note: See TracChangeset for help on using the changeset viewer.