'; print $output; } /* * ADMIN MENU */ add_action('admin_menu', 'anywhere_plugin_menu'); function anywhere_plugin_menu() { add_options_page('Add Twitter @Anywhere Options', 'Add Twitter @Anywhere', 'administrator', 'twitteranywhere', 'anywhere_options'); } function anywhere_options() { // variables for the field and option names $opt_name = 'anywhere_api_key'; $hidden_field_name = 'anywhere_submit_hidden'; $anywhere_apikey_field = 'anywhere_api_key'; // Read in existing option value from database $opt_val = get_option( $opt_name ); // See if the user has posted us some information // If they did, this hidden field will be set to 'Y' if( $_POST[ $hidden_field_name ] == 'Y' ) { // Read their posted value $opt_val = $_POST[ $anywhere_apikey_field ]; // Save the posted value in the database update_option( $opt_name, $opt_val ); // Put an options updated message on the screen ?>