Last active
July 9, 2024 14:11
-
-
Save yxod/445a6d6d343a61a56a2a1cc82fa58a1f to your computer and use it in GitHub Desktop.
add edit url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//get edit link | |
function get_edit() | |
{ | |
if (current_user_can('editor') || current_user_can('administrator')) { | |
echo '<a target="_blank" href="' . get_edit_post_link(get_the_ID()) . '" class="edit-post-link dashicons dashicons-edit" title="Edit project"></a>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment