Advertisement
Guest User

Untitled

a guest
Feb 27th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. $options = array(
  2. array(
  3. 'id' => 'checkbox1',
  4. 'type' => 'checkbox',
  5. 'page' => 'page1',
  6. ),
  7. array(
  8. 'id' => 'checkbox2',
  9. 'type' => 'checkbox',
  10. 'page' => 'page1',
  11. ),
  12. );
  13.  
  14. function setting_validate($input) {
  15. foreach($options as $setting) {
  16. if($setting['type'] == "checkbox") {
  17. $valid_input[$setting] = ( isset( $input[$setting] ) && true == $input[$setting] ? true : false );
  18. }
  19. }
  20.  
  21. $options = get_option('XX_theme_settings');
  22. $merged = array_merge($options, $input);
  23. return $merged;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement