Make WordPress Core

Changeset 26335


Ignore:
Timestamp:
11/23/2013 12:14:19 PM (12 years ago)
Author:
ocean90
Message:

Appearance Themes: Don't show theme actions if the current theme doesn't support menus or widgets.

props MikeHansenMe.
fixes #25949.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin

    • Property svn:ignore set to
      themes.php.orig
  • trunk/src/wp-admin/themes.php

    r26316 r26335  
    294294        <div class="active-theme">
    295295            <a href="{{{ wp.themes.data.settings.customizeURI }}}" class="button button-primary hide-if-no-customize"><?php _e( 'Customize' ); ?></a>
     296            <?php if( current_theme_supports( 'menus' ) ) { ?>
    296297            <a class="button button-secondary" href="<?php echo admin_url( 'nav-menus.php' ); ?>"><?php _e( 'Menus' ); ?></a>
     298            <?php } ?>
     299            <?php if( current_theme_supports( 'widgets' ) ) { ?>
    297300            <a class="button button-secondary" href="<?php echo admin_url( 'widgets.php' ); ?>"><?php _e( 'Widgets' ); ?></a>
     301            <?php } ?>
    298302        </div>
    299303        <div class="inactive-theme">
Note: See TracChangeset for help on using the changeset viewer.