wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_ajax_get_permalink › WordPress Function

Since3.1.0
Deprecatedn/a
wp_ajax_get_permalink ( No parameters )
Defined at:
Codex:

Handles retrieving a permalink via AJAX.



Source

function wp_ajax_get_permalink() {
	check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
	$post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : 0;
	wp_die( get_preview_post_link( $post_id ) );
}