X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be8dc178e77d0b46189bbd8e33a216a9b90942..refs/tags/wordpress-2.8.3-scripts:/wp-admin/upload.php diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 7b57f649..61e1d16e 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -10,7 +10,6 @@ require_once('admin.php'); wp_enqueue_script( 'wp-ajax-response' ); wp_enqueue_script( 'jquery-ui-draggable' ); -wp_enqueue_script( 'jquery-ui-resizable' ); if (!current_user_can('upload_files')) wp_die(__('You do not have permission to upload files.')); @@ -121,9 +120,9 @@ if ( isset($_GET['detached']) ) { } $post_mime_types = array( - 'image' => array(__('Images'), __('Manage Images'), __ngettext_noop('Image (%s)', 'Images (%s)')), - 'audio' => array(__('Audio'), __('Manage Audio'), __ngettext_noop('Audio (%s)', 'Audio (%s)')), - 'video' => array(__('Video'), __('Manage Video'), __ngettext_noop('Video (%s)', 'Video (%s)')), + 'image' => array(__('Images'), __('Manage Images'), _n_noop('Image (%s)', 'Images (%s)')), + 'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio (%s)', 'Audio (%s)')), + 'video' => array(__('Video'), __('Manage Video'), _n_noop('Video (%s)', 'Video (%s)')), ); $post_mime_types = apply_filters('post_mime_types', $post_mime_types); @@ -136,6 +135,7 @@ if ( isset($_GET['detached']) ) { list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); } +wp_enqueue_script('media'); require_once('admin-header.php'); ?> -

' . __('Search results for “%s”') . '', wp_specialchars( get_search_query() ) ); ?> + printf( '' . __('Search results for “%s”') . '', esc_html( get_search_query() ) ); ?>

$reals ) $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real]; $class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : ''; -$type_links[] = "
  • " . sprintf( __ngettext( 'All (%s)', 'All (%s)', $_total_posts ), number_format_i18n( $_total_posts ) ) . ''; +$type_links[] = "
  • " . sprintf( _nx( 'All (%s)', 'All (%s)', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . ''; foreach ( $post_mime_types as $mime_type => $label ) { $class = ''; @@ -197,7 +197,7 @@ foreach ( $post_mime_types as $mime_type => $label ) { if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) ) $class = ' class="current"'; - $type_links[] = "
  • " . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . ''; + $type_links[] = "
  • " . sprintf( _n( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . ''; } $class = isset($_GET['detached']) ? ' class="current"' : ''; $type_links[] = '
  • ' . __('Unattached') . ''; @@ -209,9 +209,9 @@ unset($type_links);
    @@ -247,7 +247,7 @@ if ( $page_links ) : ?> - + yyear$arc_row->mmonth'>"; + echo ""; echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear"; echo "\n"; } @@ -280,12 +280,12 @@ foreach ($arc_result as $arc_row) { - + - + @@ -301,8 +301,9 @@ foreach ($arc_result as $arc_row) { - - + + + @@ -310,8 +311,9 @@ foreach ($arc_result as $arc_row) { - - + + + @@ -320,29 +322,30 @@ foreach ($arc_result as $arc_row) { if ( $orphans ) { foreach ( $orphans as $post ) { $class = 'alternate' == $class ? '' : 'alternate'; - $att_title = wp_specialchars( _draft_or_post_title($post->ID) ); + $att_title = esc_html( _draft_or_post_title($post->ID) ); ?> - + ID, array(80, 60), true ) ) { ?> - "> + - ">
    +
    ID))); ?> -

    +

    ID) ) $actions['edit'] = '' . __('Edit') . ''; if ( current_user_can('delete_post', $post->ID) ) - $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; - $actions['view'] = '' . __('View') . ''; + $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + $actions['view'] = '' . __('View') . ''; if ( current_user_can('edit_post', $post->ID) ) $actions['attach'] = ''.__('Attach').''; + $actions = apply_filters( 'media_row_actions', $actions, $post ); $action_count = count($actions); $i = 0; foreach ( $actions as $action => $link ) { @@ -350,8 +353,8 @@ foreach ($arc_result as $arc_row) { ( $i == $action_count ) ? $sep = '' : $sep = ' | '; echo "$link$sep"; } ?> -

    - +
    + post_author); echo $author->display_name; ?> post_date && 'date' == $column_name ) { $t_time = $h_time = __('Unpublished'); } else { @@ -367,12 +370,12 @@ foreach ($arc_result as $arc_row) { $h_time = mysql2date(__('Y/m/d'), $m_time); } } ?> - + - + @@ -400,7 +403,7 @@ if ( $page_links ) - +
    @@ -410,26 +413,5 @@ if ( $page_links ) - -