用于检索永久链接的Ajax处理程序。
原型
wp_ajax_get_permalink()
源文件
路径:wp-admin/includes/ajax-actions.php
<?php
...
function wp_ajax_get_permalink() {
check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
wp_die( get_preview_post_link( $post_id ) );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/wp_ajax_get_permalink/