Title: br3nt's Replies | WordPress.org

---

# br3nt

  [  ](https://wordpress.org/support/users/br3nt/)

 *   [Profile](https://wordpress.org/support/users/br3nt/)
 *   [Topics Started](https://wordpress.org/support/users/br3nt/topics/)
 *   [Replies Created](https://wordpress.org/support/users/br3nt/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/br3nt/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/br3nt/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/br3nt/engagements/)
 *   [Favorites](https://wordpress.org/support/users/br3nt/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PayPal Framework] PayPal Donate Button](https://wordpress.org/support/topic/paypal-donate-button-3/)
 *  Thread Starter [br3nt](https://wordpress.org/support/users/br3nt/)
 * (@br3nt)
 * [12 years ago](https://wordpress.org/support/topic/paypal-donate-button-3/#post-5129588)
 * Update: The code I posted above doesn’t work. It displays the input on the PayPal
   settings page, but the the value doesn’t get saved. I haven’t discovered the 
   reason why yet.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PayPal Framework] PayPal Donate Button](https://wordpress.org/support/topic/paypal-donate-button-3/)
 *  Thread Starter [br3nt](https://wordpress.org/support/users/br3nt/)
 * (@br3nt)
 * [12 years ago](https://wordpress.org/support/topic/paypal-donate-button-3/#post-5129559)
 * Hey Aaron,
 * I worked out how to do it by following [this tutorial](http://ottopress.com/2009/wordpress-settings-api-tutorial/).
 * Here is the code I ended up with:
 *     ```
       add_action('admin_init', function() {
         register_setting($wpPayPalFramework->_optionsGroup, 'sfr_paypal_id', function($val) {
           return trim(wp_strip_all_tags($val, true));
         });
         add_settings_section('sfr_paypal_id_section', 'PayPal ID', function() { return 'PayPal ID for use in donation button'; }, 'PayPalFramework');
         add_settings_field('sfr_paypal_id', 'PayPal ID or email', 'sfr_paypal_id_input', 'PayPalFramework', 'sfr_paypal_id_section');
       });
   
       function sfr_paypal_id_input() {
         $paypal_id = get_option('sfr_paypal_id');
         echo "<input id='sfr_paypal_id_text' name='sfr_paypal_id' size='40' type='text' value='{$paypal_id}' />";
       }
       ```
   
 * Thanks for your plugin. It has made things many times simpler.

Viewing 2 replies - 1 through 2 (of 2 total)