Make WordPress Core


Ignore:
Timestamp:
06/05/2014 10:00:24 PM (11 years ago)
Author:
helen
Message:

Grid view for the media library, first pass. This is alpha; expect imperfection. We will be iterating further.

props ericlewis, shaunandrews, wonderboymusic.
see #24716.

File:
1 edited

Legend:

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

    r28524 r28682  
    494494<?php
    495495            foreach ( $modes as $mode => $title ) {
    496                 $class = ( $current_mode == $mode ) ? 'class="current"' : '';
    497                 echo "<a href='" . esc_url( add_query_arg( 'mode', $mode, $_SERVER['REQUEST_URI'] ) ) . "' $class><img id='view-switch-$mode' src='" . esc_url( includes_url( 'images/blank.gif' ) ) . "' width='20' height='20' title='$title' alt='$title' /></a>\n";
     496                $classes = array( 'view-' . $mode );
     497                if ( $current_mode == $mode )
     498                    $classes[] = 'current';
     499                printf(
     500                    "<a href='%s' class='%s'><img id='view-switch-$mode' src='%s' width='20' height='20' title='%s' alt='%s' /></a>\n",
     501                    esc_url( add_query_arg( 'mode', $mode ) ),
     502                    implode( ' ', $classes ),
     503                    esc_url( includes_url( 'images/blank.gif' ) ),
     504                    $title,
     505                    $title
     506                );
    498507            }
    499508        ?>
Note: See TracChangeset for help on using the changeset viewer.