Make WordPress Core


Ignore:
Timestamp:
05/10/2006 08:35:10 PM (19 years ago)
Author:
matt
Message:

Lots of style and admin tweaks

File:
1 edited

Legend:

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

    r3759 r3770  
    737737        <td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
    738738        <td><a href='$url' title='website: $url'>$short_url</a></td>";
    739     $r .= "\n\t\t<td align='right'>$numposts</td>";
     739    $r .= "\n\t\t<td align='center'>$numposts</td>";
    740740    $r .= "\n\t\t<td>";
    741741    if (current_user_can('edit_users'))
     
    15601560        return $wp_file_descriptions[basename($file)];
    15611561    }
    1562     elseif (file_exists(ABSPATH.$file)) {
    1563         $template_data = implode('', file(ABSPATH.$file));
     1562    elseif ( file_exists( ABSPATH . $file ) && is_file( ABSPATH . $file ) ) {
     1563        $template_data = implode('', file( ABSPATH . $file ));
    15641564        if (preg_match("|Template Name:(.*)|i", $template_data, $name))
    15651565            return $name[1];
     
    19121912function wp_import_upload_form($action) {
    19131913?>
    1914 <script type="text/javascript">
    1915 function cancelUpload() {
    1916 o = document.getElementById('uploadForm');
    1917 o.method = 'GET';
    1918 o.action.value = 'view';
    1919 o.submit();
    1920 }
    1921 </script>
    1922 <form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo $action ?>">
    1923 <label for="upload"><?php _e('File:'); ?></label><input type="file" id="upload" name="import" />
     1914<form enctype="multipart/form-data" id="import-upload-form" method="POST" action="<?php echo $action ?>">
     1915<p>
     1916<label for="upload"><?php _e('Choose a file from your computer:'); ?></label> <input type="file" id="upload" name="import" size="25" />
    19241917<input type="hidden" name="action" value="save" />
    1925 <div id="buttons">
    1926 <input type="submit" value="<?php _e('Import'); ?>" />
    1927 <input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" />
    1928 </div>
     1918</p>
     1919<p class="submit">
     1920<input type="submit" value="<?php _e('Upload file and import'); ?> &raquo;" />
     1921</p>
    19291922</form>
    19301923<?php
     
    19391932
    19401933    $url = $file['url'];
    1941     $file = $file['file'];
     1934    $file = addslashes( $file['file'] );
    19421935    $filename = basename($file);
    19431936
Note: See TracChangeset for help on using the changeset viewer.