用于检索样本永久链接的Ajax处理程序。

原型

wp_ajax_sample_permalink()

源文件

路径:wp-admin/includes/ajax-actions.php

<?php
...
function wp_ajax_sample_permalink() {
	check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' );
	$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
	$title = isset($_POST['new_title'])? $_POST['new_title'] : '';
	$slug = isset($_POST['new_slug'])? $_POST['new_slug'] : null;
	wp_die( get_sample_permalink_html( $post_id, $title, $slug ) );
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/wp_ajax_sample_permalink/