WordPress at Your Fingertips
function is not described

wp_ajax_get_permalink() WP 3.1.0

Ajax handler to retrieve a permalink.

No Hooks.

Return

null. Nothing.

Usage

wp_ajax_get_permalink();

Changelog

Since 3.1.0 Introduced.

Code of wp_ajax_get_permalink() WP 5.8.2

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 ) );
}