wp_ajax_update_welcome_panel()  Ajax handler for updating whether to display the welcome panel.   Source  File: wp-admin/includes/ajax-actions.php. View all references  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 );
}
   Related  Uses    Uses Description      update_user_meta() wp-includes/user.php   Updates user meta field based on user ID.     current_user_can() wp-includes/capabilities.php   Returns whether the current user has the specified capability.     check_ajax_referer() wp-includes/pluggable.php   Verifies the Ajax request to prevent processing requests external of the blog.     wp_die() wp-includes/functions.php   Kills WordPress execution and displays HTML page with an error message.     get_current_user_id() wp-includes/user.php   Gets the current user’s ID.   
    Changelog    Version Description     3.1.0 Introduced.    

    
{'path': 'public/docs/wordpress/functions/wp_ajax_update_welcome_panel.html', 'source': 'DevDocs.IO'}