Skip to content

Instantly share code, notes, and snippets.

@mahbubme
Created December 28, 2018 05:12
Show Gist options
  • Save mahbubme/98908f8ffc0e2b1d37116e0a70d39b16 to your computer and use it in GitHub Desktop.
Save mahbubme/98908f8ffc0e2b1d37116e0a70d39b16 to your computer and use it in GitHub Desktop.
Function to return WPUF edit post URL
<?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