Changeset 45614
- Timestamp:
- 07/09/2019 08:44:03 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-walker-nav-menu-edit.php
r43598 r45614 120 120 <span class="item-type"><?php echo esc_html( $item->type_label ); ?></span> 121 121 <span class="item-order hide-if-js"> 122 <a href="123 122 <?php 124 echo wp_nonce_url( 123 printf( 124 '<a href="%s" class="item-move-up" aria-label="%s">↑</a>', 125 wp_nonce_url( 125 126 add_query_arg( 126 127 array( … … 131 132 ), 132 133 'move-menu_item' 133 ); 134 ), 135 esc_attr__( 'Move up' ) 136 ); 134 137 ?> 135 " class="item-move-up" aria-label="<?php esc_attr_e( 'Move up' ); ?>">↑</a>136 138 | 137 <a href="138 139 <?php 139 echo wp_nonce_url( 140 printf( 141 '<a href="%s" class="item-move-down" aria-label="%s">↓</a>', 142 wp_nonce_url( 140 143 add_query_arg( 141 144 array( … … 146 149 ), 147 150 'move-menu_item' 148 ); 151 ), 152 esc_attr__( 'Move down' ) 153 ); 149 154 ?> 150 " class="item-move-down" aria-label="<?php esc_attr_e( 'Move down' ); ?>">↓</a>151 155 </span> 152 <a class="item-edit" id="edit-<?php echo $item_id; ?>" href=" 153 <?php 154 echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) ); 155 ?> 156 " aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><span class="screen-reader-text"><?php _e( 'Edit' ); ?></span></a> 156 <?php 157 if ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) { 158 $edit_url = admin_url( 'nav-menus.php' ); 159 } else { 160 $edit_url = add_query_arg( 161 array( 162 'edit-menu-item' => $item_id, 163 ), 164 remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) 165 ); 166 } 167 168 printf( 169 '<a class="item-edit" id="edit-%s" href="%s" aria-label="%s"><span class="screen-reader-text">%s</span></a>', 170 $item_id, 171 $edit_url, 172 esc_attr__( 'Edit menu item' ), 173 __( 'Edit' ) 174 ); 175 ?> 157 176 </span> 158 177 </div> … … 224 243 </p> 225 244 <?php endif; ?> 226 <a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href=" 227 <?php 228 echo wp_nonce_url( 229 add_query_arg( 230 array( 231 'action' => 'delete-menu-item', 232 'menu-item' => $item_id, 233 ), 234 admin_url( 'nav-menus.php' ) 235 ), 236 'delete-menu_item_' . $item_id 237 ); 238 ?> 239 "><?php _e( 'Remove' ); ?></a> <span class="meta-sep hide-if-no-js"> | </span> <a class="item-cancel submitcancel hide-if-no-js" id="cancel-<?php echo $item_id; ?>" href=" 245 240 246 <?php 241 echo esc_url( 242 add_query_arg( 243 array( 244 'edit-menu-item' => $item_id, 245 'cancel' => time(), 247 printf( 248 '<a class="item-delete submitdelete deletion" id="delete-%s" href="%s">%s</a>', 249 $item_id, 250 wp_nonce_url( 251 add_query_arg( 252 array( 253 'action' => 'delete-menu-item', 254 'menu-item' => $item_id, 255 ), 256 admin_url( 'nav-menus.php' ) 246 257 ), 247 admin_url( 'nav-menus.php' ) 248 ) 258 'delete-menu_item_' . $item_id 259 ), 260 __( 'Remove' ) 249 261 ); 250 262 ?> 251 #menu-item-settings-<?php echo $item_id; ?>"><?php _e( 'Cancel' ); ?></a> 263 <span class="meta-sep hide-if-no-js"> | </span> 264 <?php 265 printf( 266 '<a class="item-cancel submitcancel hide-if-no-js" id="cancel-%s" href="%s#menu-item-settings-%s">%s</a>', 267 $item_id, 268 esc_url( 269 add_query_arg( 270 array( 271 'edit-menu-item' => $item_id, 272 'cancel' => time(), 273 ), 274 admin_url( 'nav-menus.php' ) 275 ) 276 ), 277 $item_id, 278 __( 'Cancel' ) 279 ); 280 ?> 252 281 </div> 253 282
Note: See TracChangeset
for help on using the changeset viewer.