WordPress at Your Fingertips
function is not described

wp_ajax_update_welcome_panel() WP 3.1.0

Ajax handler for updating whether to display the welcome panel.

No Hooks.

Return

null. Nothing.

Usage

wp_ajax_update_welcome_panel();

Changelog

Since 3.1.0 Introduced.

Code of wp_ajax_update_welcome_panel() WP 5.8.2

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