Do not include wp-admin/includes/template.php to get add_meta_box()

Don’t include wp-admin/includes/template.php to get add_meta_box() defined. This is a very wrong way to go about adding meta boxes.

The proper way to call add_meta_box() is to consider it to be admin-only (because it is). What you do is call add_meta_box() on the admin_init hook, or even better, the add_meta_boxes or add_meta_boxes_{$page} hooks. (Where $page is either a post type or ‘link’ or ‘comments’.)

Then there’s no need to include an admin file — the function will always exist when it is called.

During 3.3′s development, we noticed that some plugins were doing this, so we wanted to make the PSA.