= $optiondetails['min'] ) && intval( $input[$setting] <= $optiondetails['max'] ) ? intval( $input[$setting] ) : $option_defaults[$setting] ); } // Validate repeatable fields else if ( 'repeatable' == $optiondetails['type'] ) { $valid_input[$setting] = quadro_array_map_r( 'wp_filter_kses', $input[$setting] ); } // Validate backup options fields else if ( 'backup_options' == $optiondetails['type'] ) { } // Validate transfer options fields else if ( 'transfer_options' == $optiondetails['type'] ) { } } // If reset, reset defaults elseif ( 'reset' == $submittype ) { // Escape this Reset iteration if no_reset is set to true if ( isset($optiondetails['no_reset']) && $optiondetails['no_reset'] == true ) continue; // Set $setting to the default value $valid_input[$setting] = $option_defaults[$setting]; } } return $valid_input; } /** * Globalize the variable that holds * the Settings Page tab definitions * * @global array Settings Page Tab definitions */ global $quadro_tabs; $quadro_tabs = quadro_get_settings_page_tabs(); /** * Call add_settings_section() for each Settings * * Loop through each Theme Settings page tab, and add * a new section to the Theme Settings page for each * section specified for each tab. * * @link http://codex.wordpress.org/Function_Reference/add_settings_section Codex Reference: add_settings_section() * * @param string $sectionid Unique Settings API identifier; passed to add_settings_field() call * @param string $title Title of the Settings page section * @param callback $callback Name of the callback function in which section text is output * @param string $pageid Name of the Settings page to which to add the section; passed to do_settings_sections() */ foreach ( $quadro_tabs as $tab ) { $tabname = $tab['name']; $tabsections = $tab['sections']; foreach ( $tabsections as $section ) { $sectionname = $section['name']; $sectiontitle = $section['title']; // Add settings section add_settings_section( // $sectionid 'quadro_' . $sectionname . '_section', // $title $sectiontitle, // $callback 'quadro_sections_callback', // $pageid 'quadro_' . $tabname . '_tab' ); } } /** * Callback for add_settings_section() * * Generic callback to output the section text * for each Theme settings section. * * @uses quadro_get_settings_page_tabs() Defined in /functions/options.php * * @param array $section_passed Array passed from add_settings_section() */ function quadro_sections_callback( $section_passed ) { global $quadro_tabs; $quadro_tabs = quadro_get_settings_page_tabs(); foreach ( $quadro_tabs as $tabname => $tab ) { $tabsections = $tab['sections']; foreach ( $tabsections as $sectionname => $section ) { if ( 'quadro_' . $sectionname . '_section' == $section_passed['id'] ) { ?>
/>Once you upload the file, click "Insert into post".
'; foreach ( $valid_options as $valid_option ) { ?> '; } // Output Repeatable Fields form field markup else if ( 'repeatable' == $fieldtype ) { $repeat_fields = array(); $repeat_fields = $option['repeat_fields']; $meta = $quadro_options[$optionname]; echo ''. __('Last Backup : ', 'quadro').''.$log.'