Make WordPress Core

Changeset 11367


Ignore:
Timestamp:
05/16/2009 07:30:08 PM (15 years ago)
Author:
ryan
Message:

Always show action links for plugin rows. Move offsite links off of plugin name to new 'View Site' action.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugins.php

    r11363 r11367  
    242242
    243243    //Translate, Apply Markup, Sanitize HTML
    244     $plugin_data = _get_plugin_data_markup_translate($plugin_file, $plugin_data, true, true);
     244    $plugin_data = _get_plugin_data_markup_translate($plugin_file, $plugin_data, false, true);
    245245    $all_plugins[ $plugin_file ] = $plugin_data;
    246246
     
    361361            $actions[] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . __('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>';
    362362
     363        if ( ! empty($plugin_data['PluginURI']) ) {
     364            $actions[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . __( 'Visit plugin homepage' ) . '">' . __('View Site') . '</a>';
     365        }
     366
    363367        $actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
    364368        $actions = apply_filters( "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context );
     
    368372    <tr class='$class'>
    369373        <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($plugin_file) . "' /></th>
    370         <td class='plugin-title'><strong>{$plugin_data['Title']}</strong>";
     374        <td class='plugin-title'><strong>{$plugin_data['Name']}</strong>";
    371375        $i = 0;
    372         echo '<div class="row-actions">';
     376        echo '<div class="row-actions-visible">';
    373377        foreach ( $actions as $action => $link ) {
    374378            ++$i;
     
    379383        echo "</td>
    380384        <td class='vers'>{$plugin_data['Version']}</td>
    381         <td class='desc'><p>{$plugin_data['Description']}</p>";
     385        <td class='desc'><p>{$plugin_data['Description']}";
     386        if ( !empty($plugin_data['Author']) ) {
     387            $author = $plugin_data['Author'];
     388            if ( !empty($plugin_data['AuthorURI']) )
     389                $author = '<a href="' . $plugin_data['AuthorURI'] . '" title="' . __( 'Visit author homepage' ) . '">' . $plugin_data['Author'] . '</a>';
     390            echo ' <cite>' . sprintf( __('By: %s'), $author ) . '</cite>';
     391        }
     392        echo "</p>";
    382393        echo '</td>
    383394    </tr>';
  • trunk/wp-admin/wp-admin.css

    r11359 r11367  
    791791div.comment-item:hover .row-actions {
    792792    visibility: visible;
     793}
     794
     795.row-actions-visible {
     796    padding: 2px 0 0;
    793797}
    794798
Note: See TracChangeset for help on using the changeset viewer.