本文整理汇总了PHP中Options_Framework类的典型用法代码示例。如果您正苦于以下问题:PHP Options_Framework类的具体用法?PHP Options_Framework怎么用?PHP Options_Framework使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Options_Framework类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: optionsframework_init
function optionsframework_init()
{
$path = get_template_directory() . '/options-framework/';
// If user can't edit theme options, exit
if (!current_user_can('edit_theme_options')) {
return;
}
// Load translation files
//load_plugin_textdomain( 'options-framework', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
// Loads the required Options Framework classes.
require $path . 'includes/class-options-framework.php';
require $path . 'includes/class-options-framework-admin.php';
require $path . 'includes/class-options-interface.php';
require $path . 'includes/class-options-media-uploader.php';
require $path . 'includes/class-options-sanitization.php';
// Instantiate the main plugin class.
$options_framework = new Options_Framework();
$options_framework->init();
// Instantiate the options page.
$options_framework_admin = new Options_Framework_Admin();
$options_framework_admin->init();
// Instantiate the media uploader class
$options_framework_media_uploader = new Options_Framework_Media_Uploader();
$options_framework_media_uploader->init();
}
示例2: optionsframework_uploader
/**
* Media Uploader Using the WordPress Media Library.
*
* Parameters:
*
* string $_id - A token to identify this field (the name).
* string $_value - The value of the field, if present.
* string $_desc - An optional description of the field.
*
*/
static function optionsframework_uploader($_id, $_value, $_desc = '', $_name = '')
{
// Gets the unique option id
$options_framework = new Options_Framework();
$option_name = $options_framework->get_option_name();
$output = '';
$id = '';
$class = '';
$int = '';
$value = '';
$name = '';
$id = strip_tags(strtolower($_id));
// If a value is passed and we don't have a stored value, use the value that's passed through.
if ($_value != '' && $value == '') {
$value = $_value;
}
if ($_name != '') {
$name = $_name;
} else {
$name = $option_name . '[' . $id . ']';
}
if ($value) {
$class = ' has-file';
}
$output .= '<input id="' . $id . '" class="upload' . $class . '" type="text" name="' . $name . '" value="' . $value . '" placeholder="' . __('No file chosen', 'accesspress-store') . '" />' . "\n";
if (function_exists('wp_enqueue_media')) {
if ($value == '') {
$output .= '<input id="upload-' . $id . '" class="upload-button-wdgt button" type="button" value="' . __('Upload', 'accesspress-store') . '" />' . "\n";
} else {
$output .= '<input id="remove-' . $id . '" class="remove-file button" type="button" value="' . __('Remove', 'accesspress-store') . '" />' . "\n";
}
} else {
$output .= '<p><i>' . __('Upgrade your version of WordPress for full media support.', 'accesspress-store') . '</i></p>';
}
if ($_desc != '') {
$output .= '<span class="of-metabox-desc">' . $_desc . '</span>' . "\n";
}
$output .= '<div class="screenshot" id="' . $id . '-image">' . "\n";
if ($value != '') {
$remove = '<a class="remove-image">Remove</a>';
$image = preg_match('/(^.*\\.jpg|jpeg|png|gif|ico*)/i', $value);
if ($image) {
$output .= '<img src="' . $value . '" alt="" />' . $remove;
} else {
$parts = explode("/", $value);
for ($i = 0; $i < sizeof($parts); ++$i) {
$title = $parts[$i];
}
// No output preview if it's not an image.
$output .= '';
// Standard generic output if it's not an image.
$title = __('View File', 'accesspress-store');
$output .= '<div class="no-image"><span class="file_link"><a href="' . $value . '" target="_blank" rel="external">' . $title . '</a></span></div>';
}
}
$output .= '</div>' . "\n";
return $output;
}
示例3: optionsframework_init
function optionsframework_init()
{
// If user can't edit theme options, exit
if (!current_user_can('edit_theme_options')) {
return;
}
// Loads the required Options Framework classes.
require plugin_dir_path(__FILE__) . 'includes/class-options-framework.php';
require plugin_dir_path(__FILE__) . 'includes/class-options-framework-admin.php';
require plugin_dir_path(__FILE__) . 'includes/class-options-interface.php';
require plugin_dir_path(__FILE__) . 'includes/class-options-media-uploader.php';
require plugin_dir_path(__FILE__) . 'includes/class-options-sanitization.php';
// Instantiate the main plugin class.
$options_framework = new Options_Framework();
$options_framework->init();
// Instantiate the options page.
$options_framework_admin = new Options_Framework_Admin();
$options_framework_admin->init();
// Instantiate the media uploader class
$options_framework_media_uploader = new Options_Framework_Media_Uploader();
$options_framework_media_uploader->init();
}
示例4: get_default_values
/**
* Get the default values for all the theme options
*
* Get an array of all default values as set in
* options.php. The 'id','std' and 'type' keys need
* to be defined in the configuration array. In the
* event that these keys are not present the option
* will not be included in this function's output.
*
* @return array Re-keyed options configuration array.
*
*/
function get_default_values()
{
$output = array();
$config =& Options_Framework::_optionsframework_options();
foreach ((array) $config as $option) {
if (!isset($option['id'])) {
continue;
}
if (!isset($option['std'])) {
continue;
}
if (!isset($option['type'])) {
continue;
}
if (has_filter('of_sanitize_' . $option['type'])) {
$output[$option['id']] = apply_filters('of_sanitize_' . $option['type'], $option['std'], $option);
}
}
return $output;
}
示例5: optionsframework_fields
/**
* Generates the options fields that are used in the form.
*/
static function optionsframework_fields()
{
global $allowedtags;
$optionsframework_settings = get_option(ONETONE_OPTIONS_PREFIXED . 'optionsframework');
// Gets the unique option id
if (isset($optionsframework_settings['id'])) {
$option_name = $optionsframework_settings['id'];
} else {
$option_name = ONETONE_OPTIONS_PREFIXED . 'optionsframework';
}
$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") {
// 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 .= '<div id="' . esc_attr($id) . '" class="' . esc_attr($class) . '">' . "\n";
if (isset($value['name'])) {
$output .= '<h4 class="heading">' . esc_html($value['name']) . '</h4>' . "\n";
}
if ($value['type'] != 'editor') {
$output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
} else {
$output .= '<div class="option">' . "\n" . '<div>' . "\n";
}
}
// Set default value to $val
if (isset($value['std'])) {
$val = $value['std'];
}
// If the option is already saved, override $val
if ($value['type'] != 'heading' && $value['type'] != 'info') {
if (isset($settings[$value['id']])) {
$val = $settings[$value['id']];
// Striping slashes of non-array options
if (!is_array($val)) {
$val = stripslashes($val);
}
}
}
// If there is a description save it for labels
$explain_value = '';
if (isset($value['desc'])) {
$explain_value = $value['desc'];
}
if (has_filter('optionsframework_' . $value['type'])) {
$output .= apply_filters('optionsframework_' . $value['type'], $option_name, $value, $val);
}
switch ($value['type']) {
// Basic text input
case 'text':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Password input
// Password input
case 'password':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="password" value="' . esc_attr($val) . '" />';
break;
// Textarea
// Textarea
case 'textarea':
$rows = '8';
if (isset($value['settings']['rows'])) {
$custom_rows = $value['settings']['rows'];
if (is_numeric($custom_rows)) {
$rows = $custom_rows;
}
}
$val = stripslashes($val);
$output .= '<textarea id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" rows="' . $rows . '">' . esc_textarea($val) . '</textarea>';
break;
// Select Box
// Select Box
case 'select':
$output .= '<select class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '">';
foreach ($value['options'] as $key => $option) {
$output .= '<option' . selected($val, $key, false) . ' value="' . esc_attr($key) . '">' . esc_html($option) . '</option>';
}
$output .= '</select>';
break;
// Radio Box
// Radio Box
case "radio":
//.........这里部分代码省略.........
示例6: reset_options
function reset_options()
{
global $themename;
$options =& Options_Framework::_optionsframework_options();
foreach ($options as $option) {
if (isset($option['id'])) {
$option_std = $option['std'];
$option_res[$option['id']] = $option['std'];
}
}
update_option(vpanel_options, $option_res);
die(1);
}
示例7: optionsframework_fields
/**
* Generates the options fields that are used in the form.
*/
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'] != "title" && $value['type'] != 'groupstart' && $value['type'] != 'groupend') {
// 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 .= '<div id="' . esc_attr($id) . '" class="' . esc_attr($class) . '">' . "\n";
if (isset($value['name'])) {
$output .= '<h4 class="heading">' . esc_html($value['name']) . '</h4>' . "\n";
}
if ($value['type'] != 'editor') {
$output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
} else {
$output .= '<div class="option">' . "\n" . '<div>' . "\n";
}
}
// Set default value to $val
if (isset($value['std'])) {
$val = $value['std'];
}
// If the option is already saved, override $val
if ($value['type'] != 'heading' && $value['type'] != 'info' && $value['type'] != "title" && $value['type'] != 'groupstart' && $value['type'] != 'groupend') {
if (isset($settings[$value['id']])) {
$val = $settings[$value['id']];
// Striping slashes of non-array options
if (!is_array($val)) {
$val = stripslashes($val);
}
}
}
// If there is a description save it for labels
$explain_value = '';
if (isset($value['desc'])) {
$explain_value = $value['desc'];
}
// Set the placeholder if one exists
$placeholder = '';
if (isset($value['placeholder'])) {
$placeholder = ' placeholder="' . esc_attr($value['placeholder']) . '"';
}
if (has_filter('optionsframework_' . $value['type'])) {
$output .= apply_filters('optionsframework_' . $value['type'], $option_name, $value, $val);
}
switch ($value['type']) {
// Basic text input
case 'text':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="text" value="' . esc_attr($val) . '"' . $placeholder . ' />';
break;
// Basic number input
// Basic number input
case 'number':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="number" min="1" max="1000" value="' . esc_attr($val) . '"' . $placeholder . ' step="1" />';
break;
// Password input
// Password input
case 'password':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="password" value="' . esc_attr($val) . '" />';
break;
// Textarea
// Textarea
case 'textarea':
$rows = '8';
//if ( isset( $value['settings']['rows'] ) ) {
// $custom_rows = $value['settings']['rows'];
// if ( is_numeric( $custom_rows ) ) {
// $rows = $custom_rows;
// }
// }
if (isset($value['rows'])) {
$custom_rows = $value['rows'];
if (is_numeric($custom_rows)) {
$rows = $custom_rows;
}
}
$val = stripslashes($val);
$output .= '<textarea id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" rows="' . $rows . '"' . $placeholder . '>' . esc_textarea($val) . '</textarea>';
break;
//Ap-Mag Textarea
//.........这里部分代码省略.........
示例8: optionsframework_fields
/**
* Generates the options fields that are used in the form.
*/
static function optionsframework_fields()
{
global $allowedtags;
$optionsframework_settings = get_option('optionsframework');
// Gets the unique option id
if (isset($optionsframework_settings['id'])) {
$option_name = $optionsframework_settings['id'];
} else {
$option_name = 'optionsframework';
}
$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") {
// Keep all ids lowercase with no spaces
$value['id'] = preg_replace('/[^a-zA-Z0-9._\\-]/', '', strtolower($value['id']));
$id = 'section-' . $value['id'];
if ($value['type'] != "widget-area") {
$class = 'section';
} else {
$class = 'section2';
}
if (isset($value['type'])) {
$class .= ' section-' . $value['type'];
}
if (isset($value['class'])) {
$class .= ' ' . $value['class'];
}
$output .= '<div id="' . esc_attr($id) . '" class="' . esc_attr($class) . '">' . "\n";
if (isset($value['name'])) {
$output .= '<h4 class="heading">' . esc_html($value['name']) . '</h4>' . "\n";
}
if ($value['type'] != 'editor') {
$output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
} else {
$output .= '<div class="option">' . "\n" . '<div>' . "\n";
}
}
// Set default value to $val
if (isset($value['std'])) {
$val = $value['std'];
}
// If the option is already saved, override $val
if ($value['type'] != 'heading' && $value['type'] != 'info') {
if (isset($settings[$value['id']])) {
$val = $settings[$value['id']];
// Striping slashes of non-array options
if (!is_array($val)) {
$val = stripslashes($val);
}
}
}
// If there is a description save it for labels
$explain_value = '';
if (isset($value['desc'])) {
$explain_value = $value['desc'];
}
if (has_filter('optionsframework_' . $value['type'])) {
$output .= apply_filters('optionsframework_' . $value['type'], $option_name, $value, $val);
}
switch ($value['type']) {
// Basic text input
case 'text':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Password input
// Password input
case 'password':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="password" value="' . esc_attr($val) . '" />';
break;
// Textarea
// Textarea
case 'textarea':
$rows = '8';
if (isset($value['settings']['rows'])) {
$custom_rows = $value['settings']['rows'];
if (is_numeric($custom_rows)) {
$rows = $custom_rows;
}
}
$val = stripslashes($val);
$output .= '<textarea id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" rows="' . $rows . '">' . esc_textarea($val) . '</textarea>';
break;
// Select Box
// Select Box
case 'select':
$output .= '<select class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '">';
foreach ($value['options'] as $key => $option) {
$output .= '<option' . selected($val, $key, false) . ' value="' . esc_attr($key) . '">' . esc_html($option) . '</option>';
}
$output .= '</select>';
//.........这里部分代码省略.........
示例9: optionsframework_fields
/**
* Generates the options fields that are used in the form.
*/
static function optionsframework_fields()
{
global $allowedtags, $themename;
$optionsframework_settings = get_option(vpanel_options);
// Gets the unique option id
if (isset($optionsframework_settings['id'])) {
$option_name = $optionsframework_settings['id'];
} else {
$option_name = vpanel_options;
}
$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'] != "content" && $value['type'] != 'hidden') {
// 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 .= '<div id="' . esc_attr($id) . '" class="' . esc_attr($class) . '">' . "\n";
if (isset($value['name'])) {
$output .= '<h4 class="heading">' . esc_html($value['name']) . '</h4>' . "\n";
}
if ($value['type'] != 'editor' && $value['type'] != 'upload' && $value['type'] != 'background' && $value['type'] != 'sidebar' && $value['type'] != 'roles') {
$output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
} else {
if ($value['type'] == 'upload' || $value['type'] == 'background') {
$output .= '<div class="option">' . "\n" . '<div class="controls controls-upload">' . "\n";
} else {
if ($value['type'] == 'sidebar') {
$output .= '<div class="option">' . "\n" . '<div class="controls controls-sidebar">' . "\n";
} else {
if ($value['type'] == 'roles') {
$output .= '<div class="option">' . "\n" . '<div class="controls controls-role">' . "\n";
} else {
$output .= '<div class="option">' . "\n" . '<div>' . "\n";
}
}
}
}
}
// Set default value to $val
if (isset($value['std'])) {
$val = $value['std'];
}
// If the option is already saved, override $val
if ($value['type'] != 'heading' && $value['type'] != 'info' && $value['type'] != 'content') {
if (isset($settings[$value['id']])) {
$val = $settings[$value['id']];
// Striping slashes of non-array options
if (!is_array($val)) {
$val = stripslashes($val);
}
}
}
// If there is a description save it for labels
$explain_value = '';
if (isset($value['desc'])) {
$explain_value = $value['desc'];
}
if (has_filter('vpanel_' . $value['type'])) {
$output .= apply_filters('vpanel_' . $value['type'], $option_name, $value, $val);
}
switch ($value['type']) {
// Basic text input
case 'text':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="text" value="' . esc_attr($val) . '">';
break;
// input hidden
// input hidden
case 'hidden':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="hidden" value="' . esc_attr($val) . '">';
break;
// Password input
// Password input
case 'password':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="password" value="' . esc_attr($val) . '">';
break;
// Textarea
// Textarea
case 'textarea':
$rows = '8';
if (isset($value['settings']['rows'])) {
$custom_rows = $value['settings']['rows'];
if (is_numeric($custom_rows)) {
$rows = $custom_rows;
//.........这里部分代码省略.........
示例10: optionsframework_fields
/**
* Generates the options fields that are used in the form.
*/
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") {
// 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 .= '<div id="' . esc_attr($id) . '" class="' . esc_attr($class) . '">' . "\n";
if (isset($value['name'])) {
$output .= '<h4 class="heading">' . esc_html($value['name']) . '</h4>' . "\n";
}
if ($value['type'] != 'editor') {
$output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
} else {
$output .= '<div class="option">' . "\n" . '<div>' . "\n";
}
}
// Set default value to $val
if (isset($value['std'])) {
$val = $value['std'];
}
// If the option is already saved, override $val
if ($value['type'] != 'heading' && $value['type'] != 'info') {
if (isset($settings[$value['id']])) {
$val = $settings[$value['id']];
// Striping slashes of non-array options
if (!is_array($val)) {
$val = stripslashes($val);
}
}
}
// If there is a description save it for labels
$explain_value = '';
if (isset($value['desc'])) {
$explain_value = $value['desc'];
}
// Set the placeholder if one exists
$placeholder = '';
if (isset($value['placeholder'])) {
$placeholder = ' placeholder="' . esc_attr($value['placeholder']) . '"';
}
if (has_filter('optionsframework_' . $value['type'])) {
$output .= apply_filters('optionsframework_' . $value['type'], $option_name, $value, $val);
}
switch ($value['type']) {
// Basic text input
case 'text':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="text" value="' . esc_attr($val) . '"' . $placeholder . ' />';
break;
// Basic hidded input
// Basic hidded input
case 'hidden':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="hidden" value="' . esc_attr($val) . '"' . $placeholder . ' />';
break;
// Basic text input
// Basic text input
case 'url':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="text" value="' . esc_url($val) . '"' . $placeholder . ' />';
break;
// Password input
// Password input
case 'password':
$output .= '<input id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" type="password" value="' . esc_attr($val) . '" />';
break;
// Textarea
// Textarea
case 'textarea':
$rows = '14';
if (isset($value['settings']['rows'])) {
$custom_rows = $value['settings']['rows'];
if (is_numeric($custom_rows)) {
$rows = $custom_rows;
}
}
$val = stripslashes($val);
$output .= '<textarea id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" rows="' . $rows . '"' . $placeholder . '>' . esc_textarea($val) . '</textarea>';
break;
// Select Box
// Select Box
//.........这里部分代码省略.........