Changeset 42128
- Timestamp:
- 11/08/2017 08:34:41 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-admin-bar.php
r41162 r42128 435 435 return; 436 436 437 ?><div id="<?php echo esc_attr( 'wp-admin-bar-' . $node->id ); ?>" class="ab-group-container"><?php438 439 440 441 ?></div><?php437 echo '<div id="' . esc_attr( 'wp-admin-bar-' . $node->id ) . '" class="ab-group-container">'; 438 foreach ( $node->children as $group ) { 439 $this->_render_group( $group ); 440 } 441 echo '</div>'; 442 442 } 443 443 … … 458 458 $class = ''; 459 459 460 ?><ul id="<?php echo esc_attr( 'wp-admin-bar-' . $node->id ); ?>"<?php echo $class; ?>><?php461 462 463 464 ?></ul><?php460 echo "<ul id='" . esc_attr( 'wp-admin-bar-' . $node->id ) . "'$class>"; 461 foreach ( $node->children as $item ) { 462 $this->_render_item( $item ); 463 } 464 echo '</ul>'; 465 465 } 466 466 … … 492 492 $menuclass = ' class="' . esc_attr( trim( $menuclass ) ) . '"'; 493 493 494 ?> 495 496 <li id="<?php echo esc_attr( 'wp-admin-bar-' . $node->id ); ?>"<?php echo $menuclass; ?>><?php 497 if ( $has_link ): 498 ?><a class="ab-item"<?php echo $aria_attributes; ?> href="<?php echo esc_url( $node->href ) ?>"<?php 499 if ( ! empty( $node->meta['onclick'] ) ) : 500 ?> onclick="<?php echo esc_js( $node->meta['onclick'] ); ?>"<?php 501 endif; 502 if ( ! empty( $node->meta['target'] ) ) : 503 ?> target="<?php echo esc_attr( $node->meta['target'] ); ?>"<?php 504 endif; 505 if ( ! empty( $node->meta['title'] ) ) : 506 ?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php 507 endif; 508 if ( ! empty( $node->meta['rel'] ) ) : 509 ?> rel="<?php echo esc_attr( $node->meta['rel'] ); ?>"<?php 510 endif; 511 if ( ! empty( $node->meta['lang'] ) ) : 512 ?> lang="<?php echo esc_attr( $node->meta['lang'] ); ?>"<?php 513 endif; 514 if ( ! empty( $node->meta['dir'] ) ) : 515 ?> dir="<?php echo esc_attr( $node->meta['dir'] ); ?>"<?php 516 endif; 517 ?>><?php 518 else: 519 ?><div class="ab-item ab-empty-item"<?php echo $aria_attributes; 520 if ( ! empty( $node->meta['title'] ) ) : 521 ?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php 522 endif; 523 if ( ! empty( $node->meta['lang'] ) ) : 524 ?> lang="<?php echo esc_attr( $node->meta['lang'] ); ?>"<?php 525 endif; 526 if ( ! empty( $node->meta['dir'] ) ) : 527 ?> dir="<?php echo esc_attr( $node->meta['dir'] ); ?>"<?php 528 endif; 529 ?>><?php 530 endif; 531 532 echo $node->title; 533 534 if ( $has_link ) : 535 ?></a><?php 536 else: 537 ?></div><?php 538 endif; 539 540 if ( $is_parent ) : 541 ?><div class="ab-sub-wrapper"><?php 542 foreach ( $node->children as $group ) { 543 $this->_render_group( $group ); 544 } 545 ?></div><?php 546 endif; 547 548 if ( ! empty( $node->meta['html'] ) ) 549 echo $node->meta['html']; 550 551 ?> 552 </li><?php 494 echo "<li id='" . esc_attr( 'wp-admin-bar-' . $node->id ) . "'$menuclass>"; 495 496 if ( $has_link ) { 497 $attributes = array( 'onclick', 'target', 'title', 'rel', 'lang', 'dir' ); 498 echo "<a class='ab-item'$aria_attributes href='" . esc_url( $node->href ) . "'>"; 499 if ( ! empty( $node->meta['onclick'] ) ) { 500 echo ' onclick="' . esc_js( $node->meta['onclick'] ) . '"'; 501 } 502 } else { 503 $attributes = array( 'onclick', 'target', 'title', 'rel', 'lang', 'dir' ); 504 echo '<div class="ab-item ab-empty-item"' . $aria_attributes; 505 } 506 507 foreach ( $attributes as $attribute ) { 508 if ( ! empty( $node->meta[ $attribute ] ) ) { 509 echo " $attribute='" . esc_attr( $node->meta[ $attribute ] ) . '"'; 510 } 511 } 512 513 echo ">{$node->title}"; 514 515 if ( $has_link ) { 516 echo '</a>'; 517 } else { 518 echo '</div>'; 519 } 520 521 if ( $is_parent ) { 522 echo '<div class="ab-sub-wrapper">'; 523 foreach ( $node->children as $group ) { 524 $this->_render_group( $group ); 525 } 526 echo '</div>'; 527 } 528 529 if ( ! empty( $node->meta['html'] ) ) { 530 echo $node->meta['html']; 531 } 532 533 echo '</li>'; 553 534 } 554 535
Note: See TracChangeset
for help on using the changeset viewer.