wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_ajax_sample_permalink › WordPress Function
Since3.1.0
Deprecatedn/a
› wp_ajax_sample_permalink ( No parameters )
Defined at: |
|
Codex: |
Handles retrieving a sample permalink via AJAX.
Related Functions: wp_ajax_get_permalink, get_sample_permalink, wp_ajax_delete_link, get_sample_permalink_html, wp_ajax_update_plugin
Source
function wp_ajax_sample_permalink() { check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' ); $post_id = isset( $_POST['post_id'] ) ? (int) $_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 ) ); }