Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Use get_permalink for post_row_actions as well
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Jul 23, 2016
1 parent 5224948 commit d294ae5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions php/class-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,13 @@ public function filter_post_row_actions( $actions, $post ) {
$actions
);

$frontend_view_url = add_query_arg( array_map( 'rawurlencode', $args ), home_url() );
$actions = array_merge(
array(
'front-view' => sprintf( '<a href="%s">%s</a>', esc_url( $frontend_view_url ), esc_html__( 'Preview Snapshot', 'customize-snapshots' ) ),
'front-view' => sprintf(
'<a href="%s">%s</a>',
esc_url( get_permalink( $post->ID ) ),
esc_html__( 'Preview Snapshot', 'customize-snapshots' )
),
),
$actions
);
Expand Down

0 comments on commit d294ae5

Please sign in to comment.