Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_ajax_sample_permalink ›

Da3.1.0
Deprecaton/a
wp_ajax_sample_permalink ( Nessun parametro )
Definito a:
Codex:

Ajax handler to retrieve a sample permalink.



Sorgenti

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