title: WordPress and Call to undefined function add_menu_page()
body: <p>I recently got into WordPress plugin development and I would like to add a menu page (the links in the left hand side menu). Previous SO questions and the WordPress codex say that it's as simple as calling:</p>
  
  <pre><code>add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );
  </code></pre>
  
  <p>However when I try this in my plugin setup file it tells me that the function is undefined:</p>
  
  <pre><code>PHP Fatal error:  Call to undefined function add_menu_page()
  </code></pre>
  
  <p>This seems like a very simple thing to do according to the documentation but I am totally baffled. Any help would be really appreciated :)</p>