本文整理汇总了PHP中of_recognized_background_repeat函数的典型用法代码示例。如果您正苦于以下问题:PHP of_recognized_background_repeat函数的具体用法?PHP of_recognized_background_repeat怎么用?PHP of_recognized_background_repeat使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了of_recognized_background_repeat函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: of_sanitize_background_repeat
function of_sanitize_background_repeat($value)
{
$recognized = of_recognized_background_repeat();
if (array_key_exists($value, $recognized)) {
return $value;
}
return apply_filters('of_default_background_repeat', current($recognized));
}
开发者ID:Hevix,项目名称:hevix,代码行数:8,代码来源:options-sanitize.php
示例2: optionsframework_fields
//.........这里部分代码省略.........
}
$output .= '</select>';
// Font Weight
$output .= '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
// Font Style
$styles = of_recognized_font_styles();
foreach ($styles as $key => $style) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$output .= '</select>';
// Font Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $typography_stored['color']) . '"></div></div>';
$output .= '<input class="of-color of-typography of-typography-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($typography_stored['color']) . '" />';
break;
// Background
// Background
case 'background':
$background = $val;
// Background Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $background['color']) . '"></div></div>';
$output .= '<input class="of-color of-background of-background-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($background['color']) . '" />';
// Background Image - New AJAX Uploader using Media Library
if (!isset($background['image'])) {
$background['image'] = '';
}
$output .= optionsframework_medialibrary_uploader($value['id'], $background['image'], null, '', 0, 'image');
$class = 'of-background-properties';
if ('' == $background['image']) {
$class .= ' hide';
}
$output .= '<div class="' . esc_attr($class) . '">';
// Background Repeat
$output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
$repeats = of_recognized_background_repeat();
foreach ($repeats as $key => $repeat) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['repeat'], $key, false) . '>' . esc_html($repeat) . '</option>';
}
$output .= '</select>';
// Background Position
$output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
$positions = of_recognized_background_position();
foreach ($positions as $key => $position) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['position'], $key, false) . '>' . esc_html($position) . '</option>';
}
$output .= '</select>';
// Background Attachment
$output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
$attachments = of_recognized_background_attachment();
foreach ($attachments as $key => $attachment) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['attachment'], $key, false) . '>' . esc_html($attachment) . '</option>';
}
$output .= '</select>';
$output .= '</div>';
break;
// Editor
// Editor
case 'editor':
$output .= '<div class="explain">' . wp_kses($explain_value, $allowedtags) . '</div>' . "\n";
echo $output;
$textarea_name = esc_attr($option_name . '[' . $value['id'] . ']');
$default_editor_settings = array('textarea_name' => $textarea_name, 'media_buttons' => false, 'tinymce' => array('plugins' => 'wordpress'));
$editor_settings = array();
if (isset($value['settings'])) {
$editor_settings = $value['settings'];
}
$editor_settings = array_merge($editor_settings, $default_editor_settings);
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:67,代码来源:options-interface.php
示例3: optionsframework_fields
//.........这里部分代码省略.........
}
}
$font_color = '<input name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" class="of-color of-typography-color type="text" value="' . esc_attr($typography_stored['color']) . '"' . $default_color . ' />';
}
// Allow modification/injection of typography fields
$typography_fields = compact('font_size', 'font_face', 'font_style', 'font_color');
$typography_fields = apply_filters('of_typography_fields', $typography_fields, $typography_stored, $option_name, $value);
$output .= implode('', $typography_fields);
break;
// Background
// Background
case 'background':
$background = $val;
// Background Color
$default_color = '';
if (isset($value['std']['color'])) {
if ($val != $value['std']['color']) {
$default_color = ' data-default-color="' . $value['std']['color'] . '" ';
}
}
$output .= '<input name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" class="of-color of-background-color" type="text" value="' . esc_attr($background['color']) . '"' . $default_color . ' />';
// Background Image
if (!isset($background['image'])) {
$background['image'] = '';
}
$output .= optionsframework_uploader($value['id'], $background['image'], null, esc_attr($option_name . '[' . $value['id'] . '][image]'));
$class = 'of-background-properties';
if ('' == $background['image']) {
$class .= ' hide';
}
$output .= '<div class="' . esc_attr($class) . '">';
// Background Repeat
$output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
$repeats = of_recognized_background_repeat();
foreach ($repeats as $key => $repeat) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['repeat'], $key, false) . '>' . esc_html($repeat) . '</option>';
}
$output .= '</select>';
// Background Position
$output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
$positions = of_recognized_background_position();
foreach ($positions as $key => $position) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['position'], $key, false) . '>' . esc_html($position) . '</option>';
}
$output .= '</select>';
// Background Attachment
$output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
$attachments = of_recognized_background_attachment();
foreach ($attachments as $key => $attachment) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['attachment'], $key, false) . '>' . esc_html($attachment) . '</option>';
}
$output .= '</select>';
$output .= '</div>';
break;
// Editor
// Editor
case 'editor':
$output .= '<div class="explain">' . wp_kses($explain_value, $allowedtags) . '</div>' . "\n";
echo $output;
$textarea_name = esc_attr($option_name . '[' . $value['id'] . ']');
$default_editor_settings = array('textarea_name' => $textarea_name, 'media_buttons' => false, 'tinymce' => array('plugins' => 'wordpress'));
$editor_settings = array();
if (isset($value['settings'])) {
$editor_settings = $value['settings'];
}
$editor_settings = array_merge($editor_settings, $default_editor_settings);
开发者ID:scottnkerr,项目名称:eeco,代码行数:67,代码来源:options-interface.php
示例4: fields
//.........这里部分代码省略.........
}
$output .= '</select>';
// Font Weight
$output .= '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
/* Font Style */
$styles = ClassyOptionsSanitize::recognized_font_styles();
foreach ($styles as $key => $style) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$output .= '</select>';
// Font Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $typography_stored['color']) . '"></div></div>';
$output .= '<input class="of-color of-typography of-typography-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($typography_stored['color']) . '" />';
break;
// Background
// Background
case 'background':
$background = $val;
// Background Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $background['color']) . '"></div></div>';
$output .= '<input class="of-color of-background of-background-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($background['color']) . '" />';
// Background Image - New AJAX Uploader using Media Library
if (!isset($background['image'])) {
$background['image'] = '';
}
$output .= optionsframework_medialibrary_uploader($value['id'], $background['image'], null, '', 0, 'image');
$class = 'of-background-properties';
if ('' == $background['image']) {
$class .= ' hide';
}
$output .= '<div class="' . esc_attr($class) . '">';
// Background Repeat
$output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
$repeats = of_recognized_background_repeat();
foreach ($repeats as $key => $repeat) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['repeat'], $key, false) . '>' . esc_html($repeat) . '</option>';
}
$output .= '</select>';
// Background Position
$output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
$positions = of_recognized_background_position();
foreach ($positions as $key => $position) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['position'], $key, false) . '>' . esc_html($position) . '</option>';
}
$output .= '</select>';
// Background Attachment
$output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
$attachments = of_recognized_background_attachment();
foreach ($attachments as $key => $attachment) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['attachment'], $key, false) . '>' . esc_html($attachment) . '</option>';
}
$output .= '</select>';
$output .= '</div>';
break;
// Info
// Info
case "info":
$class = 'section';
if (isset($value['type'])) {
$class .= ' section-' . $value['type'];
}
if (isset($value['class'])) {
$class .= ' ' . $value['class'];
}
$output .= '<div class="' . esc_attr($class) . '">' . "\n";
if (isset($value['name'])) {
开发者ID:ezeheinke,项目名称:web-pegsoluciones,代码行数:67,代码来源:classy-options.php
示例5: optionsframework_fields
//.........这里部分代码省略.........
}
}
$font_color = '<input name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" class="of-color of-typography-color type="text" value="' . esc_attr($typography_stored['color']) . '"' . $default_color . ' />';
}
// Allow modification/injection of typography fields
$typography_fields = compact('font_size', 'font_face', 'font_style', 'font_color');
$typography_fields = apply_filters('of_typography_fields', $typography_fields, $typography_stored, $option_name, $value);
$output .= implode('', $typography_fields);
break;
// Background
// Background
case 'background':
$background = $val;
// Background Color
$default_color = '';
if (isset($value['std']['color'])) {
if ($val != $value['std']['color']) {
$default_color = ' data-default-color="' . $value['std']['color'] . '" ';
}
}
$output .= '<input name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" class="of-color of-background-color" type="text" value="' . esc_attr($background['color']) . '"' . $default_color . ' />';
// Background Image
if (!isset($background['image'])) {
$background['image'] = '';
}
$output .= Options_Framework_Media_Uploader::optionsframework_uploader($value['id'], $background['image'], null, esc_attr($option_name . '[' . $value['id'] . '][image]'));
$class = 'of-background-properties';
if ('' == $background['image']) {
$class .= ' hide';
}
$output .= '<div class="' . esc_attr($class) . '">';
// Background Repeat
$output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
$repeats = of_recognized_background_repeat();
foreach ($repeats as $key => $repeat) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['repeat'], $key, false) . '>' . esc_html($repeat) . '</option>';
}
$output .= '</select>';
// Background Position
$output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
$positions = of_recognized_background_position();
foreach ($positions as $key => $position) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['position'], $key, false) . '>' . esc_html($position) . '</option>';
}
$output .= '</select>';
// Background Attachment
$output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
$attachments = of_recognized_background_attachment();
foreach ($attachments as $key => $attachment) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['attachment'], $key, false) . '>' . esc_html($attachment) . '</option>';
}
$output .= '</select>';
// Background Size
$output .= '<select class="of-background of-background-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
$sizes = of_recognized_background_size();
foreach ($sizes as $key => $size) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['size'], $key, false) . '>' . esc_html($size) . '</option>';
}
$output .= '</select>';
$output .= '</div>';
break;
// Editor
// Editor
case 'editor':
$output .= '<div class="explain">' . wp_kses($explain_value, $allowedtags) . '</div>' . "\n";
echo $output;
开发者ID:vedarajraviraj,项目名称:Arcis-Consulting,代码行数:67,代码来源:class-options-interface.php
示例6: optionsframework_fields
//.........这里部分代码省略.........
}
}
$font_color = '<input name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" class="of-color of-typography-color type="text" value="' . esc_attr($typography_stored['color']) . '"' . $default_color . ' />';
}
// Allow modification/injection of typography fields
$typography_fields = compact('font_size', 'font_face', 'font_style', 'font_color');
$typography_fields = apply_filters('of_typography_fields', $typography_fields, $typography_stored, $option_name, $value);
$output .= implode('', $typography_fields);
$output .= '<div class="typographytextbox" id="' . $value['id'] . '">The Quick Brown Fox Jumps Over The Lazy Dog. 1234567890</div>';
break;
// Background
// Background
case 'background':
$background = $val;
// Background Color
//$default_color = '';
// if ( isset( $value['std']['color'] ) ) {
// if ( $val != $value['std']['color'] )
// $default_color = ' data-default-color="' .$value['std']['color'] . '" ';
// }
// $output .= '<input name="' . esc_attr( $option_name . '[' . $value['id'] . '][color]' ) . '" id="' . esc_attr( $value['id'] . '_color' ) . '" class="of-color of-background-color" type="text" value="' . esc_attr( $background['color'] ) . '"' . $default_color .' />';
// Background Image
if (!isset($background['image'])) {
$background['image'] = '';
}
$output .= Options_Framework_Media_Uploader::optionsframework_uploader($value['id'], $background['image'], null, esc_attr($option_name . '[' . $value['id'] . '][image]'));
$class = 'of-background-properties';
if ('' == $background['image']) {
$class .= ' hide';
}
$output .= '<div class="' . esc_attr($class) . '">';
// Background Repeat
$output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
$repeats = of_recognized_background_repeat();
foreach ($repeats as $key => $repeat) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['repeat'], $key, false) . '>' . esc_html($repeat) . '</option>';
}
$output .= '</select>';
// Background Position
$output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
$positions = of_recognized_background_position();
foreach ($positions as $key => $position) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['position'], $key, false) . '>' . esc_html($position) . '</option>';
}
$output .= '</select>';
// Background Attachment
$output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
$attachments = of_recognized_background_attachment();
foreach ($attachments as $key => $attachment) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['attachment'], $key, false) . '>' . esc_html($attachment) . '</option>';
}
$output .= '</select>';
$output .= '</div>';
break;
// Editor
// Editor
case 'editor':
$output .= '<div class="explain">' . wp_kses($explain_value, $allowedtags) . '</div>' . "\n";
echo $output;
$textarea_name = esc_attr($option_name . '[' . $value['id'] . ']');
$default_editor_settings = array('textarea_name' => $textarea_name, 'media_buttons' => false, 'tinymce' => array('plugins' => 'wordpress'));
$editor_settings = array();
if (isset($value['settings'])) {
$editor_settings = $value['settings'];
}
$editor_settings = array_merge($default_editor_settings, $editor_settings);
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:67,代码来源:class-options-interface.php
示例7: optionsframework_fields
//.........这里部分代码省略.........
}
$output .= '</select>';
// Font Weight
$output .= '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
/* Font Style */
$styles = of_recognized_font_styles();
foreach ($styles as $key => $style) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($wpbs_typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$output .= '</select>';
// Font Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $wpbs_typography_stored['color']) . '"></div></div>';
$output .= '<input class="of-color of-typography of-typography-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($wpbs_typography_stored['color']) . '" />';
break;
// Background
// Background
case 'background':
$background = $val;
// Background Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $background['color']) . '"></div></div>';
$output .= '<input class="of-color of-background of-background-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($background['color']) . '" />';
// Background Image - New AJAX Uploader using Media Library
if (!isset($background['image'])) {
$background['image'] = '';
}
$output .= optionsframework_medialibrary_uploader($value['id'], $background['image'], null, '', 0, 'image');
$class = 'of-background-properties';
if ('' == $background['image']) {
$class .= ' hide';
}
$output .= '<div class="' . esc_attr($class) . '">';
// Background Repeat
$output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
$repeats = of_recognized_background_repeat();
foreach ($repeats as $key => $repeat) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['repeat'], $key, false) . '>' . esc_html($repeat) . '</option>';
}
$output .= '</select>';
// Background Position
$output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
$positions = of_recognized_background_position();
foreach ($positions as $key => $position) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['position'], $key, false) . '>' . esc_html($position) . '</option>';
}
$output .= '</select>';
// Background Attachment
$output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
$attachments = of_recognized_background_attachment();
foreach ($attachments as $key => $attachment) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['attachment'], $key, false) . '>' . esc_html($attachment) . '</option>';
}
$output .= '</select>';
$output .= '</div>';
break;
// Info
// Info
case "info":
$class = 'section';
if (isset($value['type'])) {
$class .= ' section-' . $value['type'];
}
if (isset($value['class'])) {
$class .= ' ' . $value['class'];
}
$output .= '<div class="' . esc_attr($class) . '">' . "\n";
if (isset($value['name'])) {
开发者ID:harvard-lil,项目名称:blog-theme,代码行数:67,代码来源:options-interface.php
示例8: optionsframework_fields
//.........这里部分代码省略.........
$font_style .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$font_style .= '</select>';
}
// Font Color
if ($typography_options['color']) {
$font_color = '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $typography_stored['color']) . '"></div></div>';
$font_color .= '<input class="of-color of-typography of-typography-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($typography_stored['color']) . '" />';
}
// Allow modification/injection of typography fields
$typography_fields = compact('font_size', 'font_face', 'font_style', 'font_color');
$typography_fields = apply_filters('of_typography_fields', $typography_fields, $typography_stored, $option_name, $value);
$output .= implode('', $typography_fields);
break;
// Background
// Background
case 'background':
$background = $val;
// Background Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $background['color']) . '"></div></div>';
$output .= '<input class="of-color of-background of-background-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($background['color']) . '" />';
// Background Image - New AJAX Uploader using Media Library
if (!isset($background['image'])) {
$background['image'] = '';
}
$output .= optionsframework_medialibrary_uploader($value['id'], $background['image'], null, '', 0, 'image');
$class = 'of-background-properties';
if ('' == $background['image']) {
$class .= ' hide';
}
$output .= '<div class="' . esc_attr($class) . '">';
// Background Repeat
$output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
$repeats = of_recognized_background_repeat();
foreach ($repeats as $key => $repeat) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['repeat'], $key, false) . '>' . esc_html($repeat) . '</option>';
}
$output .= '</select>';
// Background Position
$output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
$positions = of_recognized_background_position();
foreach ($positions as $key => $position) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['position'], $key, false) . '>' . esc_html($position) . '</option>';
}
$output .= '</select>';
// Background Attachment
$output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
$attachments = of_recognized_background_attachment();
foreach ($attachments as $key => $attachment) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['attachment'], $key, false) . '>' . esc_html($attachment) . '</option>';
}
$output .= '</select>';
$output .= '</div>';
break;
// Editor
// Editor
case 'editor':
$output .= '<div class="explain">' . wp_kses($explain_value, $allowedtags) . '</div>' . "\n";
echo $output;
$textarea_name = esc_attr($option_name . '[' . $value['id'] . ']');
$default_editor_settings = array('textarea_name' => $textarea_name, 'media_buttons' => false, 'tinymce' => array('plugins' => 'wordpress'));
$editor_settings = array();
if (isset($value['settings'])) {
$editor_settings = $value['settings'];
}
$editor_settings = array_merge($editor_settings, $default_editor_settings);
开发者ID:serdimoa,项目名称:wordpress,代码行数:67,代码来源:options-interface.php
示例9: optionsframework_fields
//.........这里部分代码省略.........
}
$output .= '</select>';
// Font Weight
$output .= '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
/* Font Style */
$styles = of_recognized_font_styles();
foreach ($styles as $key => $style) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$output .= '</select>';
// Font Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $typography_stored['color']) . '"></div></div>';
$output .= '<input class="of-color of-typography of-typography-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($typography_stored['color']) . '" />';
break;
// Background
// Background
case 'background':
$background = $val;
// Background Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $background['color']) . '"></div></div>';
$output .= '<input class="of-color of-background of-background-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($background['color']) . '" />';
// Background Image - New AJAX Uploader using Media Library
if (!isset($background['image'])) {
$background['image'] = '';
}
$output .= optionsframework_medialibrary_uploader($value['id'], $background['image'], null, '', 0, 'image');
$class = 'of-background-properties';
if ('' == $background['image']) {
$class .= ' hide';
}
$output .= '<div class="' . esc_attr($class) . '">';
// Background Repeat
$output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
$repeats = of_recognized_background_repeat();
foreach ($repeats as $key => $repeat) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['repeat'], $key, false) . '>' . esc_html($repeat) . '</option>';
}
$output .= '</select>';
// Background Position
$output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
$positions = of_recognized_background_position();
foreach ($positions as $key => $position) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['position'], $key, false) . '>' . esc_html($position) . '</option>';
}
$output .= '</select>';
// Background Attachment
$output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
$attachments = of_recognized_background_attachment();
foreach ($attachments as $key => $attachment) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['attachment'], $key, false) . '>' . esc_html($attachment) . '</option>';
}
$output .= '</select>';
$output .= '</div>';
break;
// Info
// Info
case "info":
$class = 'section';
if (isset($value['type'])) {
$class .= ' section-' . $value['type'];
}
if (isset($value['class'])) {
$class .= ' ' . $value['class'];
}
$output .= '<div class="' . esc_attr($class) . '">' . "\n";
if (isset($value['name'])) {
开发者ID:mnjit,项目名称:aa-global,代码行数:67,代码来源:options-interface.php
示例10: optionsframework_fields
//.........这里部分代码省略.........
/* // Font Weight
$output .= '<select class="of-typography of-typography-style" name="'.$option_name.'['.$value['id'].'][style]" id="'. $value['id'].'_style">';
*/
/* Font Style */
/* $styles = of_recognized_font_styles();
foreach ( $styles as $key => $style ) {
$output .= '<option value="' . esc_attr( $key ) . '" ' . selected( $typography_stored['style'], $key, false ) . '>'. $style .'</option>';
}
$output .= '</select>';
// Font Color
$output .= '<div id="' . esc_attr( $value['id'] ) . '_color_picker" class="colorSelector"><div style="' . esc_attr( 'background-color:' . $typography_stored['color'] ) . '"></div></div>';
$output .= '<input class="of-color of-typography of-typography-color" name="' . esc_attr( $option_name . '[' . $value['id'] . '][color]' ) . '" id="' . esc_attr( $value['id'] . '_color' ) . '" type="text" value="' . esc_attr( $typography_stored['color'] ) . '" />';
*/
break;
// Background
// Background
case 'background':
$background = $val;
// Background Color
$output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $background['color']) . '"></div></div>';
$output .= '<input class="of-color of-background of-background-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($background['color']) . '" />';
// Background Image - New AJAX Uploader using Media Library
if (!isset($background['image'])) {
$background['image'] = '';
}
$output .= optionsframework_medialibrary_uploader($value['id'], $background['image'], null, '', 0, 'image');
$class = 'of-background-properties';
if ('' == $background['image']) {
$class .= ' hide';
}
$output .= '<div class="' . esc_attr($class) . '">';
// Background Repeat
$output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
$repeats = of_recognized_background_repeat();
foreach ($repeats as $key => $repeat) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['repeat'], $key, false) . '>' . esc_html($repeat) . '</option>';
}
$output .= '</select>';
// Background Position
$output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
$positions = of_recognized_background_position();
foreach ($positions as $key => $position) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['position'], $key, false) . '>' . esc_html($position) . '</option>';
}
$output .= '</select>';
// Background Attachment
$output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
$attachments = of_recognized_background_attachment();
foreach ($attachments as $key => $attachment) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($background['attachment'], $key, false) . '>' . esc_html($attachment) . '</option>';
}
$output .= '</select>';
$output .= '</div>';
break;
// Info
// Info
case "info":
$class = 'section';
if (isset($value['type'])) {
$class .= ' section-' . $value['type'];
}
if (isset($value['class'])) {
$class .= ' ' . $value['class'];
}
$output .= '<div class="' . esc_attr($class) . '">' . "\n";
if (isset($value['name'])) {
开发者ID:Snaehild,项目名称:GH2016,代码行数:67,代码来源:options-interface.php
示例11: optionsframework_fields
//.........这里部分代码省略.........
}
}
$font_color = '<input name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" class="of-color of-typography-color type="text" value="' . esc_attr($typography_stored['color']) . '"' . $default_color . '>';
|
请发表评论