Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $options = array(
- array(
- 'id' => 'checkbox1',
- 'type' => 'checkbox',
- 'page' => 'page1',
- ),
- array(
- 'id' => 'checkbox2',
- 'type' => 'checkbox',
- 'page' => 'page1',
- ),
- );
- function setting_validate($input) {
- foreach($options as $setting) {
- if($setting['type'] == "checkbox") {
- $valid_input[$setting] = ( isset( $input[$setting] ) && true == $input[$setting] ? true : false );
- }
- }
- $options = get_option('XX_theme_settings');
- $merged = array_merge($options, $input);
- return $merged;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement