Skip to content

Commit 4ff03a4

Browse files
committed
add post in preview_post_link filter
1 parent 484d1df commit 4ff03a4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

classes/admin/admin-restrictions.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ public static function post_row_actions( array $actions, WP_Post $post ) {
8484

8585
if ( null !== $_origin_key && empty( $_has_syncs ) ) {
8686
if ( 'pending' === $post->post_status ) {
87-
$actions['view'] = '<a href="' . esc_url( apply_filters( 'preview_post_link', set_url_scheme( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $post->post_title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';
88-
87+
$actions['view'] = '<a href="' . esc_url( apply_filters( 'preview_post_link', set_url_scheme( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ), $post ) ) . '" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $post->post_title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';
8988
if ( current_user_can( 'publish_post', $post->ID ) ) {
9089
$actions['publish'] = sprintf(
9190
'<a href="%s">%s</a>',

0 commit comments

Comments
 (0)