Skip to content

Commit

Permalink
use more-precise conditional for current_user_can in largo byline class
Browse files Browse the repository at this point in the history
Fixes #1543
  • Loading branch information
benlk committed Nov 8, 2018
1 parent 9a95d44 commit 519d186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/byline_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function published_date() {
*/
function edit_link() {
// Add the edit link if the current user can edit the post
if ( current_user_can( 'edit_published_posts' ) ) {
if ( current_user_can( 'edit_post', $this->post_id ) ) {
echo ' <span class="edit-link"><a href="' . get_edit_post_link( $this->post_id ) . '">' . __( 'Edit This Post', 'largo' ) . '</a></span>';
}
}
Expand Down

0 comments on commit 519d186

Please sign in to comment.