wp/wp-admin/includes/class-walker-nav-menu-edit.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
    59 	 */
    59 	 */
    60 	public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 ) {
    60 	public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 ) {
    61 		global $_wp_nav_menu_max_depth;
    61 		global $_wp_nav_menu_max_depth;
    62 
    62 
    63 		// Restores the more descriptive, specific name for use within this method.
    63 		// Restores the more descriptive, specific name for use within this method.
    64 		$menu_item              = $data_object;
    64 		$menu_item = $data_object;
       
    65 
    65 		$_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;
    66 		$_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;
    66 
    67 
    67 		ob_start();
    68 		ob_start();
    68 		$item_id      = esc_attr( $menu_item->ID );
    69 		$item_id      = esc_attr( $menu_item->ID );
    69 		$removed_args = array(
    70 		$removed_args = array(
   178 						}
   179 						}
   179 
   180 
   180 						printf(
   181 						printf(
   181 							'<a class="item-edit" id="edit-%s" href="%s" aria-label="%s"><span class="screen-reader-text">%s</span></a>',
   182 							'<a class="item-edit" id="edit-%s" href="%s" aria-label="%s"><span class="screen-reader-text">%s</span></a>',
   182 							$item_id,
   183 							$item_id,
   183 							$edit_url,
   184 							esc_url( $edit_url ),
   184 							esc_attr__( 'Edit menu item' ),
   185 							esc_attr__( 'Edit menu item' ),
       
   186 							/* translators: Hidden accessibility text. */
   185 							__( 'Edit' )
   187 							__( 'Edit' )
   186 						);
   188 						);
   187 						?>
   189 						?>
   188 					</span>
   190 					</span>
   189 				</div>
   191 				</div>
   263 				<div class="menu-item-actions description-wide submitbox">
   265 				<div class="menu-item-actions description-wide submitbox">
   264 					<?php if ( 'custom' !== $menu_item->type && false !== $original_title ) : ?>
   266 					<?php if ( 'custom' !== $menu_item->type && false !== $original_title ) : ?>
   265 						<p class="link-to-original">
   267 						<p class="link-to-original">
   266 							<?php
   268 							<?php
   267 							/* translators: %s: Link to menu item's original object. */
   269 							/* translators: %s: Link to menu item's original object. */
   268 							printf( __( 'Original: %s' ), '<a href="' . esc_attr( $menu_item->url ) . '">' . esc_html( $original_title ) . '</a>' );
   270 							printf( __( 'Original: %s' ), '<a href="' . esc_url( $menu_item->url ) . '">' . esc_html( $original_title ) . '</a>' );
   269 							?>
   271 							?>
   270 						</p>
   272 						</p>
   271 					<?php endif; ?>
   273 					<?php endif; ?>
   272 
   274 
   273 					<?php
   275 					<?php
   316 			</div><!-- .menu-item-settings-->
   318 			</div><!-- .menu-item-settings-->
   317 			<ul class="menu-item-transport"></ul>
   319 			<ul class="menu-item-transport"></ul>
   318 		<?php
   320 		<?php
   319 		$output .= ob_get_clean();
   321 		$output .= ob_get_clean();
   320 	}
   322 	}
   321 
       
   322 }
   323 }