title: WordPress Plugin: Call function on button click in admin panel
body: <p>I need to create a WordPress plugin that calls a PHP function when a button in an admin panel is clicked.  I've been looking at tutorials for writing basic WordPress plugins and adding admin panels but I still don't understand how exactly to register a button to a specific function in my plug-in.</p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>/*
  Plugin Name: 
  Plugin URI: 
  Description: 
  Author:
  Version: 1.0
  Author URI:
  */
  
  
  add_action('admin_menu', 'wc_plugin_menu');
  
  function wc_plugin_menu(){
   add_management_page('Title', 'MenuTitle', 'manage_options', 'wc-admin-menu', 'wc_plugin_options'); 
  
  }
  
  function wc_plugin_options(){
  if (!current_user_can('manage_options'))  {
      wp_die( __('You do not have sufficient permissions to access this page.')    );
  }
  echo '&lt;div class="wrap"&gt;';
  echo '&lt;button&gt;Call Function!&lt;/button&gt;'; //add some type of hook to call function
  echo '&lt;/div&gt;';
  
  }
  
  function button_function()
  {
  //do some stuff
  } 
  
  
  ?&gt;
  </code></pre>