I know how to add a meta box, and I know how to retrieve meta box values. That's not what I need; I just want to clarify that first. What I need is to get meta box labels by id.
I am adding links to user profiles that allow users to reset which meta boxes are hidden by default. This is saved in the user's meta like so:
meta key = "metaboxhidden_dashboard"
meta_value = "a:6:{i:0;s:21:"dashboard_site_health";i:1;s:19:"dashboard_right_now";i:2;s:18:"dashboard_activity";i:3;s:18:"rg_forms_dashboard";i:4;s:21:"dashboard_quick_press";i:5;s:17:"dashboard_primary";}"
meta key = "metaboxhidden_courses"
meta_value = "a:2:{i:0;s:10:"wpseo_meta";i:1;s:7:"slugdiv";}"
The only part I'm struggling with is retrieving the label of the meta box instead of displaying the meta box id. I cannot find any way to get these labels. Is there a function I'm not aware of to get them by id? Or maybe get all meta boxes and then pull them accordingly?
Thanks in advance.
EDIT: Here is an example of how it is displayed on the user profile currently.