Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'wp_ajax_fb_custom', 'fb_customizer_ajax' );
- function fb_customizer_ajax() {
- if ( ! wp_verify_nonce( $_POST[ 'ajaxnonce' ], 'fb_customize_ajax_nonce' ) ) {
- die( -1 );
- }
- $current_url = $_POST[ 'current_url' ];
- $current_id = url_to_postid( $current_url );
- echo $current_id . '<br>' . $current_url;
- die();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement