Changeset 14673 for trunk/wp-admin/includes/template.php
- Timestamp:
- 05/15/2010 08:36:49 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r14647 r14673 1362 1362 if ( in_array($post->post_status, array('pending', 'draft')) ) { 1363 1363 if ( current_user_can($post_type_object->cap->edit_post, $post->ID) ) 1364 $actions['view'] = '<a href="' . add_query_arg( 'preview', 'true', get_permalink($post->ID) ) . '" title="' . esc_attr(sprintf(__('Preview “%s”'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';1364 $actions['view'] = '<a href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink($post->ID) ) ) . '" title="' . esc_attr(sprintf(__('Preview “%s”'), $title)) . '" rel="permalink">' . __('Preview') . '</a>'; 1365 1365 } elseif ( 'trash' != $post->post_status ) { 1366 1366 $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>'; … … 1584 1584 if ( in_array($post->post_status, array('pending', 'draft')) ) { 1585 1585 if ( current_user_can($post_type_object->cap->edit_post, $page->ID) ) 1586 $actions['view'] = '<a href="' . add_query_arg( 'preview', 'true', get_permalink($page->ID) ) . '" title="' . esc_attr(sprintf(__('Preview “%s”'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';1586 $actions['view'] = '<a href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink($page->ID) ) ) . '" title="' . esc_attr(sprintf(__('Preview “%s”'), $title)) . '" rel="permalink">' . __('Preview') . '</a>'; 1587 1587 } elseif ( $post->post_status != 'trash' ) { 1588 1588 $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
Note: See TracChangeset
for help on using the changeset viewer.