wp_ajax_get_permalink

函数


wp_ajax_get_permalink ( No parameters )
定义位置
  • wp-admin/includes/ajax-actions.php
    , line 2002
引入
3.1.0
弃用

Ajax handler to retrieve a permalink.

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