• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress core a2z

WordPress core a2z

WordPress core only

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Files / wp-admin/nav-menus.php


Lines:

1001 to 1100 of 1109

								<?php
              endif;

              $no_menus_style = '';

              if ( $one_theme_location_no_menus ) {
                $no_menus_style = 'style="display: none;"';
              }
              ?>
							<div class="menu-settings" <?php echo $no_menus_style; ?>>
								<h3><?php _e( 'Menu Settings' ); ?></h3>
								<?php
                if ( ! isset( $auto_add ) ) {
                  $auto_add = get_option( 'nav_menu_options' );

                  if ( ! isset( $auto_add['auto_add'] ) ) {
                    $auto_add = false;
                  } elseif ( false !== array_search( $nav_menu_selected_id, $auto_add['auto_add'], true ) ) {
                    $auto_add = true;
                  } else {
                    $auto_add = false;
                  }
                }
                ?>

								<fieldset class="menu-settings-group auto-add-pages">
									<legend class="menu-settings-group-name howto"><?php _e( 'Auto add pages' ); ?></legend>
									<div class="menu-settings-input checkbox-input">
										<input type="checkbox"<?php checked( $auto_add ); ?> name="auto-add-pages" id="auto-add-pages" value="1" /> <label for="auto-add-pages"><?php printf( __( 'Automatically add new top-level pages to this menu' ), esc_url( admin_url( 'edit.php?post_type=page' ) ) ); ?></label>
									</div>
								</fieldset>

								<?php if ( current_theme_supports( 'menus' ) ) : ?>

									<fieldset class="menu-settings-group menu-theme-locations">
										<legend class="menu-settings-group-name howto"><?php _e( 'Display location' ); ?></legend>
										<?php
                    foreach ( $locations as $location => $description ) :
                      $checked = isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] === $nav_menu_selected_id;
                      ?>
											<div class="menu-settings-input checkbox-input">
												<input type="checkbox"<?php checked( $checked ); ?> name="menu-locations[<?php echo esc_attr( $location ); ?>]" id="locations-<?php echo esc_attr( $location ); ?>" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
												<label for="locations-<?php echo esc_attr( $location ); ?>"><?php echo $description; ?></label>
												<?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[ $location ] !== $nav_menu_selected_id ) : ?>
													<span class="theme-location-set">
													<?php
                            printf(
                              /* translators: %s: Menu name. */
                              _x( '(Currently set to: %s)', 'menu location' ),
                              wp_get_nav_menu_object( $menu_locations[ $location ] )->name
                            );
                          ?>
													</span>
												<?php endif; ?>
											</div>
										<?php endforeach; ?>
									</fieldset>

								<?php endif; ?>

							</div>
						</div><!-- /#post-body-content -->
					</div><!-- /#post-body -->
					<div id="nav-menu-footer">
						<div class="major-publishing-actions wp-clearfix">
							<?php if ( $menu_count > 0 ) : ?>

								<?php if ( $add_new_screen ) : ?>
								<span class="cancel-action">
									<a class="submitcancel cancellation menu-cancel" href="<?php echo esc_url( admin_url( 'nav-menus.php' ) ); ?>"><?php _e( 'Cancel' ); ?></a>
								</span><!-- END .cancel-action -->
								<?php else : ?>
								<span class="delete-action">
									<a class="submitdelete deletion menu-delete" href="
									<?php
                  echo esc_url(
                    wp_nonce_url(
                      add_query_arg(
                        array(
                          'action' => 'delete',
                          'menu' => $nav_menu_selected_id,
                        ),
                        admin_url( 'nav-menus.php' )
                      ),
                      'delete-nav_menu-' . $nav_menu_selected_id
                    )
                  );
                  ?>
									"><?php _e( 'Delete Menu' ); ?></a>
								</span><!-- END .delete-action -->
								<?php endif; ?>

							<?php endif; ?>
							<div class="publishing-action">
								<?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
							</div><!-- END .publishing-action -->
						</div><!-- END .major-publishing-actions -->
					</div><!-- /#nav-menu-footer -->
				</div><!-- /.menu-edit -->
« Previous [1] … [9] [10] [11] [12] Next »

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      1 to 2 of 2
      • after_menu_locations_table – action
      • wp_nav_locations_listed_per_menu – filter
      File name: wp-admin/nav-menus.php
      Plugin ref: WordPress
      Version: 5.6
      Deprecated?: No
      API Letters: A,M,N,P,W

      Published: 25th November 2019 | Last updated: 9th December 2020

      Primary Sidebar

      Information

      File name: wp-admin/nav-menus.php
      Plugin ref: WordPress
      Version: 5.6
      Deprecated?: No
      API Letters: A,M,N,P,W

      wp-admin

      Footer

      WP-a2z
      WordPress core a2z
      WordPress core only
      WordPress 5.6
      WordPress a2z
      WordPress core a2z
      Genesis Theme Framework a2z
      Jetpack a2z
      WordPress develop tests
      Easy Digital Downloads a2z
      WooCommerce a2z
      Yoast SEO a2z
      WordPress Blocks

      Site:  core.wp-a2z.org
      © Copyright WP-a2z 2014-2021. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins

      • Home
      • Blog
      • Sitemap
      • Sites