595 'movedUp' => __( 'Menu item moved up' ), |
595 'movedUp' => __( 'Menu item moved up' ), |
596 'movedDown' => __( 'Menu item moved down' ), |
596 'movedDown' => __( 'Menu item moved down' ), |
597 'movedTop' => __( 'Menu item moved to the top' ), |
597 'movedTop' => __( 'Menu item moved to the top' ), |
598 'movedLeft' => __( 'Menu item moved out of submenu' ), |
598 'movedLeft' => __( 'Menu item moved out of submenu' ), |
599 'movedRight' => __( 'Menu item is now a sub-item' ), |
599 'movedRight' => __( 'Menu item is now a sub-item' ), |
|
600 'parentUpdated' => __( 'Menu parent updated' ), |
|
601 'orderUpdated' => __( 'Menu order updated' ), |
600 ); |
602 ); |
601 wp_localize_script( 'nav-menu', 'menus', $nav_menus_l10n ); |
603 wp_localize_script( 'nav-menu', 'menus', $nav_menus_l10n ); |
602 |
604 |
603 /* |
605 /* |
604 * Redirect to add screen if there are no menus and this users has either zero, |
606 * Redirect to add screen if there are no menus and this users has either zero, |
873 <?php endforeach; ?> |
877 <?php endforeach; ?> |
874 </select> |
878 </select> |
875 <div class="locations-row-links"> |
879 <div class="locations-row-links"> |
876 <?php if ( isset( $menu_locations[ $_location ] ) && 0 !== $menu_locations[ $_location ] ) : ?> |
880 <?php if ( isset( $menu_locations[ $_location ] ) && 0 !== $menu_locations[ $_location ] ) : ?> |
877 <span class="locations-edit-menu-link"> |
881 <span class="locations-edit-menu-link"> |
878 <a href=" |
|
879 <?php |
882 <?php |
880 echo esc_url( |
883 printf( |
881 add_query_arg( |
884 '<a href="%1$s"> |
882 array( |
885 <span aria-hidden="true">%2$s</span> |
883 'action' => 'edit', |
886 <span class="screen-reader-text">%3$s</span> |
884 'menu' => $menu_locations[ $_location ], |
887 </a>', |
885 ), |
888 esc_url( |
886 admin_url( 'nav-menus.php' ) |
889 add_query_arg( |
887 ) |
890 array( |
|
891 'action' => 'edit', |
|
892 'menu' => $menu_locations[ $_location ], |
|
893 ), |
|
894 admin_url( 'nav-menus.php' ) |
|
895 ) |
|
896 ), |
|
897 _x( 'Edit', 'menu' ), |
|
898 /* translators: Hidden accessibility text. */ |
|
899 __( 'Edit selected menu' ) |
888 ); |
900 ); |
889 ?> |
901 ?> |
890 "> |
|
891 <span aria-hidden="true"><?php _ex( 'Edit', 'menu' ); ?></span><span class="screen-reader-text"> |
|
892 <?php |
|
893 /* translators: Hidden accessibility text. */ |
|
894 _e( 'Edit selected menu' ); |
|
895 ?> |
|
896 </span> |
|
897 </a> |
|
898 </span> |
902 </span> |
899 <?php endif; ?> |
903 <?php endif; ?> |
900 <span class="locations-add-menu-link"> |
904 <span class="locations-add-menu-link"> |
901 <a href=" |
|
902 <?php |
905 <?php |
903 echo esc_url( |
906 printf( |
904 add_query_arg( |
907 '<a href="%1$s">%2$s</a>', |
905 array( |
908 esc_url( |
906 'action' => 'edit', |
909 add_query_arg( |
907 'menu' => 0, |
910 array( |
908 'use-location' => $_location, |
911 'action' => 'edit', |
909 ), |
912 'menu' => 0, |
910 admin_url( 'nav-menus.php' ) |
913 'use-location' => $_location, |
911 ) |
914 ), |
|
915 admin_url( 'nav-menus.php' ) |
|
916 ) |
|
917 ), |
|
918 _x( 'Use new menu', 'menu' ) |
912 ); |
919 ); |
913 ?> |
920 ?> |
914 "> |
|
915 <?php _ex( 'Use new menu', 'menu' ); ?> |
|
916 </a> |
|
917 </span> |
921 </span> |
918 </div><!-- .locations-row-links --> |
922 </div><!-- .locations-row-links --> |
919 </td><!-- .menu-location-menus --> |
923 </td><!-- .menu-location-menus --> |
920 </tr><!-- .menu-locations-row --> |
924 </tr><!-- .menu-locations-row --> |
921 <?php } // End foreach. ?> |
925 <?php } // End foreach. ?> |
1197 <?php |
1201 <?php |
1198 foreach ( $locations as $location => $description ) : |
1202 foreach ( $locations as $location => $description ) : |
1199 $checked = false; |
1203 $checked = false; |
1200 |
1204 |
1201 if ( isset( $menu_locations[ $location ] ) |
1205 if ( isset( $menu_locations[ $location ] ) |
1202 && 0 !== $nav_menu_selected_id |
1206 && 0 !== $nav_menu_selected_id |
1203 && $menu_locations[ $location ] === $nav_menu_selected_id |
1207 && $menu_locations[ $location ] === $nav_menu_selected_id |
1204 ) { |
1208 ) { |
1205 $checked = true; |
1209 $checked = true; |
1206 } |
1210 } |
1207 ?> |
1211 ?> |
1208 <div class="menu-settings-input checkbox-input"> |
1212 <div class="menu-settings-input checkbox-input"> |
1235 </div><!-- END .publishing-action --> |
1239 </div><!-- END .publishing-action --> |
1236 <?php if ( $menu_count > 0 ) : ?> |
1240 <?php if ( $menu_count > 0 ) : ?> |
1237 |
1241 |
1238 <?php if ( $add_new_screen ) : ?> |
1242 <?php if ( $add_new_screen ) : ?> |
1239 <span class="cancel-action"> |
1243 <span class="cancel-action"> |
1240 <a class="submitcancel cancellation menu-cancel" href="<?php echo esc_url( admin_url( 'nav-menus.php' ) ); ?>"><?php _e( 'Cancel' ); ?></a> |
1244 <?php |
|
1245 printf( |
|
1246 '<a class="submitcancel cancellation menu-cancel" href="%1$s">%2$s</a>', |
|
1247 esc_url( admin_url( 'nav-menus.php' ) ), |
|
1248 __( 'Cancel' ) |
|
1249 ); |
|
1250 ?> |
1241 </span><!-- END .cancel-action --> |
1251 </span><!-- END .cancel-action --> |
1242 <?php else : ?> |
1252 <?php else : ?> |
1243 <span class="delete-action"> |
1253 <span class="delete-action"> |
1244 <a class="submitdelete deletion menu-delete" href=" |
|
1245 <?php |
1254 <?php |
1246 echo esc_url( |
1255 printf( |
1247 wp_nonce_url( |
1256 '<a class="submitdelete deletion menu-delete" href="%1$s">%2$s</a>', |
1248 add_query_arg( |
1257 esc_url( |
1249 array( |
1258 wp_nonce_url( |
1250 'action' => 'delete', |
1259 add_query_arg( |
1251 'menu' => $nav_menu_selected_id, |
1260 array( |
|
1261 'action' => 'delete', |
|
1262 'menu' => $nav_menu_selected_id, |
|
1263 ), |
|
1264 admin_url( 'nav-menus.php' ) |
1252 ), |
1265 ), |
1253 admin_url( 'nav-menus.php' ) |
1266 'delete-nav_menu-' . $nav_menu_selected_id |
1254 ), |
1267 ) |
1255 'delete-nav_menu-' . $nav_menu_selected_id |
1268 ), |
1256 ) |
1269 __( 'Delete Menu' ) |
1257 ); |
1270 ); |
1258 ?> |
1271 ?> |
1259 "><?php _e( 'Delete Menu' ); ?></a> |
|
1260 </span><!-- END .delete-action --> |
1272 </span><!-- END .delete-action --> |
1261 <?php endif; ?> |
1273 <?php endif; ?> |
1262 |
1274 |
1263 <?php endif; ?> |
1275 <?php endif; ?> |
1264 </div><!-- END .major-publishing-actions --> |
1276 </div><!-- END .major-publishing-actions --> |