Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- register_setting(
- 'pluginPage', // option group name
- 'Settings Name', // option name (used to store into wp-options
- array('sanitize_callback' => 'sanitize_callback' // sanitize the data function')
- );
- function sanitize_callback($input)
- { $new_input = array();
- // ... some checking here, setting $new_input array values if $input array value exists
- return $new_input;}
- <form action='options.php' method='post'>
- <?php
- settings_fields( 'pluginPage' ); // initializes all of the settings fields
- do_settings_sections( 'pluginPage' ); // does the settings section
- submit_button(); // creats the submit button
- ?>
- </form>
Add Comment
Please, Sign In to add comment