Fatal error: Uncaught Error: Call to undefined function submit_button()
-
I wanted to add a Submit button on a front-end page I am building, and I’ve seen WP provides a
submit_button
function.However, when calling that function from within the code of the page, I get a
Fatal error: Uncaught Error: Call to undefined function submit_button().
By searching around, I have found this ticket https://core.trac.www.ads-software.com/ticket/20490 which seems to imply that the submit_button function was not really intended for use outside of the admin area, and that request was closed as wontfix.
I have read documentation for both
https://developer.www.ads-software.com/reference/functions/submit_button/
and
https://developer.www.ads-software.com/reference/functions/get_submit_button/
but neither of these reference pages mention that these functions are not intended for use outside of the wp-admin area. The only hint that this would be the case by reading those reference pages, is that under the ‘Used By’ section you won’t find the functions used outside of the
wp-admin/
folder, but it does not appear obvious.Assuming all of the above is correct, my thinking is that both pages should have an explicit clarification that the functions are not for front-end usage.
Thanks,
fawp
- The topic ‘Fatal error: Uncaught Error: Call to undefined function submit_button()’ is closed to new replies.