Skip to content

Instantly share code, notes, and snippets.

@egill
Created September 6, 2015 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egill/178488030e972b82ae38 to your computer and use it in GitHub Desktop.
Save egill/178488030e972b82ae38 to your computer and use it in GitHub Desktop.
Theme location(s)
wp-admin/includes/deprecated.php: * This was once used to display a metabox for the nav menu theme locations.
wp-admin/js/customize-nav-menus.js: // Setup theme location checkboxes.
wp-admin/js/nav-menu.js: // Copy menu theme locations
wp-admin/nav-menus.php: * If we have one theme location, and zero menus, we take them right
wp-admin/nav-menus.php: * or more than 1 theme locations.
wp-admin/nav-menus.php: $menu_management .= '<p>' . __( 'You can assign theme locations to individual menus by <strong>selecting the desired settings</strong> at the bottom of the menu editor. To assign menus to all theme locations at once, <strong>visit the Manage Locations tab</strong> at the top of the screen.' ) . '</p>';
wp-admin/nav-menus.php: $locations_overview .= '<ul><li>' . __( 'To assign menus to one or more theme locations, <strong>select a menu from each location&#8217;s drop down.</strong> When you&#8217;re finished, <strong>click Save Changes</strong>' ) . '</li>';
wp-admin/nav-menus.php: $locations_overview .= '<li>' . __( 'To edit a menu currently assigned to a theme location, <strong>click the adjacent &#8217;Edit&#8217; link</strong>' ) . '</li>';
wp-admin/nav-menus.php: $locations_overview .= '<li>' . __( 'To add a new menu instead of assigning an existing one, <strong>click the &#8217;Use new menu&#8217; link</strong>. Your new menu will be automatically assigned to that theme location' ) . '</li></ul>';
wp-includes/nav-menu-template.php: * - Fall back, but only if no theme location was specified.
wp-admin/css/customize-nav-menus.css:#customize-controls .theme-location-set,
wp-admin/css/customize-nav-menus.css:.wp-customizer .menu-settings .menu-theme-locations {
wp-admin/css/nav-menus.css:.theme-location-set {
wp-admin/css/nav-menus.css:#nav-menu-theme-locations .howto select {
wp-admin/css/nav-menus.css:#nav-menu-theme-locations .button-controls {
wp-admin/js/customize-nav-menus.js: container.find( '.theme-location-set' ).hide();
wp-admin/js/customize-nav-menus.js: container.find( '.theme-location-set' ).show().find( 'span' ).text( displayNavMenuName( menuSetting().name ) );
wp-admin/js/nav-menu.js: var loc = $('#nav-menu-theme-locations'), params = {};
wp-admin/js/nav-menu.js: $('#nav-menu-theme-locations select').each(function() {
wp-admin/nav-menus.php: <dl class="menu-theme-locations">
wp-admin/nav-menus.php: <span class="theme-location-set"> <?php printf( __( "(Currently set to: %s)" ), wp_get_nav_menu_object( $menu_locations[ $location ] )->name ); ?> </span>
wp-includes/class-wp-customize-control.php: <span class="theme-location-set"><?php printf( _x( '(Current: %s)', 'Current menu location' ), '<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>' ); ?></span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment