X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/449d082fcc4873c1f7d363a0d9f7409be7f6e77d..672d6bc6da735e745275ef7a86341dc1178da8d2:/wp-admin/edit-attachment-rows.php diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index 42cd3df0..4922eed2 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -6,7 +6,9 @@ * @subpackage Administration */ -if ( ! defined('ABSPATH') ) die(); +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); if ( have_posts() ) { ?>
>"> + | > ID))); ?> $column_display_name ) { if ( current_user_can('edit_post', $post->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') . ''; $action_count = count($actions); $i = 0; echo ' ';
@@ -110,7 +112,7 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
if ( !empty( $tags ) ) {
$out = array();
foreach ( $tags as $c )
- $out[] = " " . wp_specialchars(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "";
+ $out[] = " " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "";
echo join( ', ', $out );
} else {
_e('No Tags');
@@ -131,7 +133,7 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
} else {
$t_time = get_the_time(__('Y/m/d g:i:s A'));
$m_time = $post->post_date;
- $time = get_post_time( 'G', true, $post );
+ $time = get_post_time( 'G', true, $post, false );
if ( ( abs($t_diff = time() - $time) ) < 86400 ) {
if ( $t_diff < 0 )
$h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
@@ -171,7 +173,7 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
$pending_phrase = sprintf( __('%s pending'), number_format( $left ) );
if ( $left )
echo '';
- comments_number("" . __('0') . '', "" . __('1') . '', "" . __('%') . '');
+ comments_number("" . /* translators: comment count link */ _x('0', 'comment count') . '', "" . /* translators: comment count link */ _x('1', 'comment count') . '', "" . /* translators: comment count link: % will be substituted by comment count */ _x('%', 'comment count') . '');
if ( $left )
echo '';
?>
@@ -182,7 +184,7 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
case 'actions':
?>
>
- "> |
+ |
|
$column_display_name ) {
|