Created
December 28, 2018 05:12
-
-
Save mahbubme/98908f8ffc0e2b1d37116e0a70d39b16 to your computer and use it in GitHub Desktop.
Function to return WPUF edit post 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
<?php | |
function wpuf_post_edit_link() { | |
global $post; | |
$edit_page = (int) wpuf_get_option( 'edit_page_id', 'wpuf_frontend_posting' ); | |
$post_id = $post->ID; | |
$url = add_query_arg( array('pid' => $post->ID), get_permalink( $edit_page ) ); | |
return wp_nonce_url( $url, 'wpuf_edit' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment