* @license GPL-2.0+ * @link http://wptheming.com * @copyright 2010-2014 WP Theming */ class Options_Framework_Interface { /** * Generates the tabs that are used in the options menu */ public static function optionsframework_tabs() { $counter = 0; $options = &Options_Framework::_optionsframework_options(); $menu = ''; foreach ($options as $value) { // Heading for Navigation if ($value['type'] == "heading") { $counter++; $class = ''; $class = !empty($value['id']) ? $value['id'] : $value['name']; $class = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($class)) . '-tab'; $menu .= '' . esc_html($value['name']) . ''; } } return $menu; } /** * Generates the options fields that are used in the form. */ public static function optionsframework_fields() { global $allowedtags; $options_framework = new Options_Framework; $option_name = $options_framework->get_option_name(); $settings = get_option($option_name); $options = &Options_Framework::_optionsframework_options(); $counter = 0; $menu = ''; foreach ($options as $value) { $val = ''; $select_value = ''; $output = ''; // Wrap all options if (($value['type'] != "heading") && ($value['type'] != "info") && ($value['type'] != "about")) { // Keep all ids lowercase with no spaces $value['id'] = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($value['id'])); $id = 'section-' . $value['id']; $class = 'section'; if (isset($value['type'])) { $class .= ' section-' . $value['type']; } if (isset($value['class'])) { $class .= ' ' . $value['class']; } $output .= '