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