Ticket #48117: 48117.diff
File 48117.diff, 1.1 KB (added by , 5 years ago) |
---|
-
src/wp-includes/class-wp-admin-bar.php
540 540 if ( $has_link ) { 541 541 $attributes = array( 'onclick', 'target', 'title', 'rel', 'lang', 'dir' ); 542 542 echo "<a class='ab-item'$aria_attributes href='" . esc_url( $node->href ) . "'"; 543 if ( ! empty( $node->meta['onclick'] ) ) {544 echo ' onclick="' . esc_js( $node->meta['onclick'] ) . '"';545 }546 543 } else { 547 544 $attributes = array( 'onclick', 'target', 'title', 'rel', 'lang', 'dir' ); 548 545 echo '<div class="ab-item ab-empty-item"' . $aria_attributes; 549 546 } 550 547 551 548 foreach ( $attributes as $attribute ) { 552 if ( ! empty( $node->meta[ $attribute ] ) ) { 549 if ( empty( $node->meta[ $attribute ] ) ) { 550 continue; 551 } 552 553 if ( 'onclick' === $attribute ) { 554 echo " $attribute='" . esc_js( $node->meta[ $attribute ] ) . "'"; 555 } else { 553 556 echo " $attribute='" . esc_attr( $node->meta[ $attribute ] ) . "'"; 554 557 } 555 558 }