wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_ajax_update_welcome_panel › WordPress Function

Depuis3.1.0
Dépréciéen/a
wp_ajax_update_welcome_panel ( Pas de paramètres )
Défini(e) dans:
Codex:

Handles updating whether to display the welcome panel via AJAX.



Source

function wp_ajax_update_welcome_panel() {
	check_ajax_referer( 'welcome-panel-nonce', 'welcomepanelnonce' );

	if ( ! current_user_can( 'edit_theme_options' ) ) {
		wp_die( -1 );
	}

	update_user_meta( get_current_user_id(), 'show_welcome_panel', empty( $_POST['visible'] ) ? 0 : 1 );

	wp_die( 1 );
}