[wp-trac] [WordPress Trac] #41057: Update PHP codebase per WordPress PHP Coding Standards

WordPress Trac noreply at wordpress.org
Wed Nov 8 17:51:27 UTC 2017


#41057: Update PHP codebase per WordPress PHP Coding Standards
----------------------------+-----------------------
 Reporter:  netweb          |       Owner:  pento
     Type:  task (blessed)  |      Status:  accepted
 Priority:  normal          |   Milestone:  5.0
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  early           |     Focuses:
----------------------------+-----------------------

Comment (by Otto42):

 Another error in line 509. Noticed because it's breaking the plugin
 directory screens on WordPress.org.

 ```
 foreach ( $attributes as $attribute ) {
    if ( ! empty( $node->meta[ $attribute ] ) ) {
       echo " $attribute='" . esc_attr( $node->meta[ $attribute ] ) . '"';
    }
 }
 ```

 Note the mismatched quoting on the HTML attribute. It starts with a single
 quote, but closes with a double quote.

 Change the echo to this to fix:

 ```
       echo " $attribute='" . esc_attr( $node->meta[ $attribute ] ) . "'";
 ```

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41057#comment:78>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list