I have been writing a function using the Shortcode Exec PHP plugin and the function works great when I run it inside the editor.
When I move it to a plugin I begin to see errors in the log such as this:
PHP Fatal error: Call to undefined function wp_create_category()
I realize that this is because of lack of includes, etc.
What is the correct way to include the built-in wordpress functions for a plugin?
My plugin uses the following wordpress functions
wp_create_category
username_exists
wp_generate_password
wp_create_user
wp_insert_post
update_post_meta
add_post_meta