Make WordPress Core


Ignore:
Timestamp:
10/04/2006 05:19:10 PM (19 years ago)
Author:
ryan
Message:

Uploader improvements from mdawaffe. fixes #3191

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upload-functions.php

    r4312 r4340  
    102102                echo '<a href="' . get_permalink() . '">' . __('view') . '</a>';
    103103                echo '&nbsp;|&nbsp;';
    104                     echo '<a href="' . wp_specialchars( add_query_arg( 'action', 'view' ), 1 ) . '">' . __('options') . '</a>';
     104                    echo '<a href="' . wp_specialchars( add_query_arg( 'action', 'view' ), 1 ) . '">' . __('links') . '</a>';
    105105                echo '&nbsp;|&nbsp;';
    106106                echo '<a href="' . wp_specialchars( remove_query_arg( array('action','ID') ), 1 ) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>';
     
    298298        break;
    299299    default :
    300         global $tab, $post_id;
     300        global $tab, $post_id, $style;
    301301        add_action( 'pre_get_posts', 'wp_upload_grab_attachments' );
    302302        if ( 'browse' == $tab && $post_id )
     
    310310        echo "<ul id='upload-files'>\n";
    311311        if ( have_posts() ) : while ( have_posts() ) : the_post();
    312             $href = wp_specialchars( add_query_arg( array('action' => 'view', 'ID' => get_the_ID()) ), 1 );
     312            $href = wp_specialchars( add_query_arg( array(
     313                'action' => 'inline' == $style ? 'view' : 'edit',
     314                'ID' => get_the_ID())
     315             ), 1 );
    313316
    314317            echo "\t<li id='file-";
     
    332335
    333336function wp_upload_tab_browse_action() {
    334     wp_enqueue_script('upload');
     337    global $style;
     338    if ( 'inline' == $style )
     339        wp_enqueue_script('upload');
    335340}
    336341
     
    345350    if ( 'inline' == @$_GET['style'] ) {
    346351        echo "<style type='text/css'>\n";
    347         echo "\t#wphead, #user_info, #adminmenu, #submenu, #footer { display: none; }\n";
    348352        echo "\tbody { height: 14em; overflow: hidden; }\n";
    349353        echo "\t#upload-content { overflow-y: auto; }\n";
Note: See TracChangeset for help on using the changeset viewer.