Changeset 4388
- Timestamp:
- 10/13/2006 07:44:35 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/admin-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r4383 r4388 1938 1938 1939 1939 function wp_import_upload_form($action) { 1940 $size = strtolower( ini_get('upload_max_filesize') ); 1941 $bytes = 0; 1942 if ( strstr( $size, 'k' ) ) 1943 $bytes = $size * 1024; 1944 if ( strstr( $size, 'm' ) ) 1945 $bytes = $size * 1024 * 1024; 1946 if ( strstr( $size, 'g' ) ) 1947 $bytes = $size * 1024 * 1024 * 1024; 1940 1948 ?> 1941 1949 <form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo $action ?>"> 1942 1950 <p> 1943 <label for="upload"><?php _e('Choose a file from your computer:'); ?></label> <input type="file" id="upload" name="import" size="25" /> 1951 <label for="upload"><?php _e('Choose a file from your computer:'); ?></label> (<?php printf( 'Maximum size: %s', $size ); ?>) 1952 <input type="file" id="upload" name="import" size="25" /> 1944 1953 <input type="hidden" name="action" value="save" /> 1954 <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" /> 1945 1955 </p> 1946 1956 <p class="submit">
Note: See TracChangeset
for help on using the changeset viewer.