php - Adding a Custom Checkbox to the Post “Publish” Box of wordpress
one text
Solution:
You're missing the quotes in your add_action
functions for the callback. That's why it thinks it is an undefined constant.
add_action('post_submitbox_misc_actions', 'createCheckBoxField');
Ref: https://developer.wordpress.org/reference/functions/add_action/
Source