Ticket #38636: 38636.patch
File 38636.patch, 1.4 KB (added by , 8 years ago) |
---|
-
wp-includes/class-wp-admin-bar.php
494 494 if ( $menuclass ) 495 495 $menuclass = ' class="' . esc_attr( trim( $menuclass ) ) . '"'; 496 496 497 if ( ! empty( $node->meta['data'] ) && ! is_array( $node->meta['data'] ) ) { 498 $node->meta['data'] = array( 'data' => (string) $node->meta['data'] ); 499 } 497 500 ?> 498 501 499 502 <li id="<?php echo esc_attr( 'wp-admin-bar-' . $node->id ); ?>"<?php echo $menuclass; ?>><?php … … 517 520 if ( ! empty( $node->meta['dir'] ) ) : 518 521 ?> dir="<?php echo esc_attr( $node->meta['dir'] ); ?>"<?php 519 522 endif; 523 if ( ! empty( $node->meta['data'] ) ) : 524 foreach ( $node->meta['data'] as $attr => $data ) : 525 ?> data-<?php echo esc_attr( $attr ); ?>="<?php echo esc_attr( $data ); ?>"<?php 526 endforeach; 527 endif; 520 528 ?>><?php 521 529 else: 522 530 ?><div class="ab-item ab-empty-item"<?php echo $aria_attributes; … … 529 537 if ( ! empty( $node->meta['dir'] ) ) : 530 538 ?> dir="<?php echo esc_attr( $node->meta['dir'] ); ?>"<?php 531 539 endif; 540 if ( ! empty( $node->meta['data'] ) ) : 541 foreach ( $node->meta['data'] as $attr => $data ) : 542 ?> data-<?php echo esc_attr( $attr ); ?>="<?php echo esc_attr( $data ); ?>"<?php 543 endforeach; 544 endif; 532 545 ?>><?php 533 546 endif; 534 547