WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/12/2012 09:10:40 PM (10 years ago)
Author:
koopersmith
Message:

Theme list table style improvements. Make 'delete' link red and separate from other actions. New action separators. see #20403.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-themes-list-table.php

    r20414 r20455  
    142142                . '<a href="#" class="load-customize hide-if-no-js" ' . $customize_attributes . '>' . __( 'Customize' ) . '</a>';
    143143            if ( ! is_multisite() && current_user_can( 'delete_themes' ) )
    144                 $actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&amp;template=$stylesheet", 'delete-theme_' . $stylesheet )
     144                $actions['delete'] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&amp;template=$stylesheet", 'delete-theme_' . $stylesheet )
    145145                    . '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n  'Cancel' to stop, 'OK' to delete." ), $title ) )
    146146                    . "' );" . '">' . __( 'Delete' ) . '</a>';
    147147
    148             $actions = apply_filters( 'theme_action_links', $actions, $theme );
    149 
    150             $actions = implode ( ' | ', $actions );
     148            $actions       = apply_filters( 'theme_action_links', $actions, $theme );
     149            $delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : '';
     150            unset( $actions['delete'] );
     151
    151152            ?>
    152153            <a href="<?php echo $preview_link; ?>" class="load-customize screenshot" <?php echo $customize_attributes; ?>>
     
    158159            <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
    159160            <div class="action-links">
    160                 <?php echo $actions; ?>
    161                 <span class="separator hide-if-no-js">| </span><a href="#" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a>
     161                <ul>
     162                    <?php foreach ( $actions as $action ): ?>
     163                        <li><?php echo $action; ?></li>
     164                    <?php endforeach; ?>
     165                    <li class="hide-if-no-js"><a href="#" class="theme-detail" tabindex='4'><?php _e('Details') ?></a></li>
     166                </ul>
     167                <?php echo $delete_action; ?>
     168
     169                <?php theme_update_available( $theme ); ?>
    162170            </div>
    163171
     
    176184            </div>
    177185
    178             <?php theme_update_available( $theme ); ?>
    179 
    180186            </div>
    181187        <?php
Note: See TracChangeset for help on using the changeset viewer.