Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_ajax_dismiss_wp_pointer ›

Desde3.1.0
Obsoleton/a
wp_ajax_dismiss_wp_pointer ( Sem parâmetros )
Definido em:
Codex:

Ajax handler for dismissing a WordPress pointer.



Fonte

function wp_ajax_dismiss_wp_pointer() {
	$pointer = $_POST['pointer'];
	if ( $pointer != sanitize_key( $pointer ) )
		wp_die( 0 );

//	check_ajax_referer( 'dismiss-pointer_' . $pointer );

	$dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ) );

	if ( in_array( $pointer, $dismissed ) )
		wp_die( 0 );

	$dismissed[] = $pointer;
	$dismissed = implode( ',', $dismissed );

	update_user_meta( get_current_user_id(), 'dismissed_wp_pointers', $dismissed );
	wp_die( 1 );
}