Guest User

Untitled

a guest
Jun 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. register_setting(
  2. 'pluginPage', // option group name
  3. 'Settings Name', // option name (used to store into wp-options
  4. array('sanitize_callback' => 'sanitize_callback' // sanitize the data function')
  5. );
  6.  
  7. function sanitize_callback($input)
  8. { $new_input = array();
  9. // ... some checking here, setting $new_input array values if $input array value exists
  10. return $new_input;}
  11.  
  12. <form action='options.php' method='post'>
  13. <?php
  14. settings_fields( 'pluginPage' ); // initializes all of the settings fields
  15. do_settings_sections( 'pluginPage' ); // does the settings section
  16. submit_button(); // creats the submit button
  17. ?>
  18. </form>
Add Comment
Please, Sign In to add comment