本文整理汇总了PHP中of_recognized_font_faces函数的典型用法代码示例。如果您正苦于以下问题:PHP of_recognized_font_faces函数的具体用法?PHP of_recognized_font_faces怎么用?PHP of_recognized_font_faces使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了of_recognized_font_faces函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: optionsframework_fields
//.........这里部分代码省略.........
$output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
// New AJAX Uploader using Media Library
break;
// Typography
// Typography
case 'typography':
$typography_stored = $val;
// Check if null
if (!isset($typography_stored['size'])) {
$typography_stored['size'] = '';
}
if (!isset($typography_stored['face'])) {
$typography_stored['face'] = '';
}
if (!isset($typography_stored['style'])) {
$typography_stored['style'] = '';
}
if (!isset($typography_stored['color'])) {
$typography_stored['color'] = '';
}
// Font Size
$output .= '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
for ($i = 9; $i < 71; $i++) {
$size = $i . 'px';
// Check if null
if (!isset($typography_stored['size'])) {
$typography_stored['size'] = '';
}
$output .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$output .= '</select>';
// Font Face
$output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = of_recognized_font_faces();
// Check if null
if (!isset($typography_stored['face'])) {
$typography_stored['face'] = '';
}
foreach ($faces as $key => $face) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$output .= '</select>';
// Font Weight
$output .= '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
/* Font Style */
// Check if null
if (!isset($typography_stored['style'])) {
$typography_stored['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;
// BG Gradient -pek
// BG Gradient -pek
case 'bg_gradient':
$bggradient = $val;
if (!isset($bggradient['color'])) {
$bggradient['color'] = '';
}
// Color (main color used for gradient manufacture)
示例2: optionsframework_fields
//.........这里部分代码省略.........
break;
// Multicheck
// Multicheck
case "multicheck":
foreach ($value['options'] as $key => $option) {
$checked = '';
$label = $option;
$option = preg_replace('/[^a-zA-Z0-9._\\-]/', '', strtolower($key));
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Color picker
// Color picker
case "color":
$output .= '<div id="' . esc_attr($value['id'] . '_picker') . '" class="colorSelector"><div style="' . esc_attr('background-color:' . $val) . '"></div></div>';
$output .= '<input class="of-color" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Uploader
// Uploader
case "upload":
$output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
break;
// Typography
// Typography
case 'typography':
unset($font_size, $font_style, $font_face, $font_color);
$typography_defaults = array('size' => '', 'face' => '', 'style' => '', 'color' => '');
$typography_stored = wp_parse_args($val, $typography_defaults);
$typography_options = array('sizes' => of_recognized_font_sizes(), 'faces' => of_recognized_font_faces(), 'styles' => of_recognized_font_styles(), 'color' => true);
if (isset($value['options'])) {
$typography_options = wp_parse_args($value['options'], $typography_options);
}
// Font Size
if ($typography_options['sizes']) {
$font_size = '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
$sizes = $typography_options['sizes'];
foreach ($sizes as $i) {
$size = $i . 'px';
$font_size .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$font_size .= '</select>';
}
// Font Face
if ($typography_options['faces']) {
$font_face = '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = $typography_options['faces'];
foreach ($faces as $key => $face) {
$font_face .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$font_face .= '</select>';
}
// Font Styles
if ($typography_options['styles']) {
$font_style = '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
$styles = $typography_options['styles'];
foreach ($styles as $key => $style) {
$font_style .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$font_style .= '</select>';
}
// Font Color
示例3: optionsframework_fields
//.........这里部分代码省略.........
$option = preg_replace('/[^a-zA-Z0-9._\\-]/', '', strtolower($key));
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Color picker
// Color picker
case "color":
$output .= '<div id="' . esc_attr($value['id'] . '_picker') . '" class="colorSelector"><div style="' . esc_attr('background-color:' . $val) . '"></div></div>';
$output .= '<input class="of-color" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Uploader
// Uploader
case "upload":
$output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
break;
// Typography
// Typography
case 'typography':
$typography_stored = $val;
// Font Size
$output .= '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
for ($i = 9; $i < 71; $i++) {
$size = $i . 'px';
$output .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$output .= '</select>';
// Font Face
$output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = of_recognized_font_faces();
foreach ($faces as $key => $face) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$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';
}
示例4: optionsframework_fields
//.........这里部分代码省略.........
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label><br />';
}
break;
// Color picker
// Color picker
case "color":
$output .= '<div id="' . esc_attr($value['id'] . '_picker') . '" class="colorSelector"><div style="' . esc_attr('background-color:' . $val) . '"></div></div>';
$output .= '<input class="of-color" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Uploader
// Uploader
case "upload":
$output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
// New AJAX Uploader using Media Library
break;
// Typography
// Typography
case 'typography':
$typography_stored = $val;
// Font Size
$output .= '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
for ($i = 9; $i < 71; $i++) {
$size = $i . 'px';
$output .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$output .= '</select>';
// Font Face
$output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = of_recognized_font_faces();
foreach ($faces as $key => $face) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$output .= '</select>';
// Font Weight
$output .= '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
$styles = array('normal' => 'Normal', 'italic' => 'Italic', 'bold' => 'Bold', 'bold italic' => 'Bold Italic');
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;
// Typography Without Font Face
// Typography Without Font Face
case 'typography2':
$typography2_stored = $val;
// Font Size
$output .= '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
for ($i = 9; $i < 71; $i++) {
$size = $i . 'px';
$output .= '<option value="' . esc_attr($size) . '" ' . selected($typography2_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$output .= '</select>';
// Font Weight
$output .= '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
$styles = array('normal' => 'Normal', 'italic' => 'Italic', 'bold' => 'Bold', 'bold italic' => 'Bold Italic');
foreach ($styles as $key => $style) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography2_stored['style'], $key, false) . '>' . $style . '</option>';
}
示例5: optionsframework_fields
//.........这里部分代码省略.........
}
break;
// Color picker
// Color picker
case "color":
$default_color = '';
if (isset($value['std'])) {
if ($val != $value['std']) {
$default_color = ' data-default-color="' . $value['std'] . '" ';
}
}
$output .= '<input name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" class="of-color" type="text" value="' . esc_attr($val) . '"' . $default_color . ' />';
break;
// Uploader
// Uploader
case "upload":
$output .= Options_Framework_Media_Uploader::optionsframework_uploader($value['id'], $val, null);
break;
// Install Demo
// Install Demo
case 'demo':
$output .= '<a href="#">' . __('Install Demo', 'accesspress-mag') . '</a>';
break;
// Typography
// Typography
case 'typography':
unset($font_size, $font_style, $font_face, $font_color);
$typography_defaults = array('size' => $value['size'] . "px", 'face' => $value['face'], 'style' => $value['style'], 'color' => $value['color']);
$typography_stored = wp_parse_args($val, $typography_defaults);
$accesspress_pro_font_list = get_option('accesspress_mag_google_font');
$font_family = $typography_stored['face'];
$font_array = accesspress_search_key($accesspress_pro_font_list, 'family', $font_family);
$variants_array = $font_array['0']['variants'];
$typography_options = array('sizes' => of_recognized_font_sizes(), 'faces' => of_recognized_font_faces(), 'styles' => $variants_array, 'color' => true);
if (isset($value['options'])) {
$typography_options = wp_parse_args($value['options'], $typography_options);
}
// Font Size
if ($typography_options['sizes']) {
$font_size = '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
$sizes = $typography_options['sizes'];
foreach ($sizes as $i) {
$size = $i . 'px';
$font_size .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$font_size .= '</select>';
}
// Font Face
if ($typography_options['faces']) {
$font_face = '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = $typography_options['faces'];
foreach ($faces as $key => $face) {
$font_face .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$font_face .= '</select>';
}
// Font Styles
if ($typography_options['styles']) {
$font_style = '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
$styles = $typography_options['styles'];
foreach ($styles as $key => $style) {
$font_style .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$font_style .= '</select>';
}
// Font Color
示例6: optionsframework_fields
//.........这里部分代码省略.........
$label = $option;
$option = preg_replace('/[^a-zA-Z0-9._\\-]/', '', strtolower($key));
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Color picker
// Color picker
case "color":
$default_color = '';
if (isset($value['std'])) {
if ($val != $value['std']) {
$default_color = ' data-default-color="' . $value['std'] . '" ';
}
}
$output .= '<input name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" class="of-color" type="text" value="' . esc_attr($val) . '"' . $default_color . ' />';
break;
// Uploader
// Uploader
case "upload":
$mode = isset($value['mode']) ? $value['mode'] : 'uri_only';
$output .= optionsframework_uploader($value['id'], $val, $mode, null);
break;
// Typography
// Typography
case 'typography':
unset($font_size, $font_style, $font_face, $font_color);
$typography_defaults = array('size' => '', 'face' => '', 'style' => '', 'color' => '');
$typography_stored = wp_parse_args($val, $typography_defaults);
$typography_options = array('sizes' => of_recognized_font_sizes(), 'faces' => of_recognized_font_faces(), 'styles' => of_recognized_font_styles(), 'color' => true);
if (isset($value['options'])) {
$typography_options = wp_parse_args($value['options'], $typography_options);
}
// Font Size
if ($typography_options['sizes']) {
$font_size = '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
$sizes = $typography_options['sizes'];
foreach ($sizes as $i) {
$size = $i . 'px';
$font_size .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$font_size .= '</select>';
}
// Font Face
if ($typography_options['faces']) {
$font_face = '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = $typography_options['faces'];
foreach ($faces as $key => $face) {
$font_face .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$font_face .= '</select>';
}
// Font Styles
if ($typography_options['styles']) {
$font_style = '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
$styles = $typography_options['styles'];
foreach ($styles as $key => $style) {
$font_style .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$font_style .= '</select>';
}
// Font Color
示例7: optionsframework_fields
//.........这里部分代码省略.........
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Color picker
// Color picker
case "color":
$output .= '<div id="' . esc_attr($value['id'] . '_picker') . '" class="colorSelector"><div style="' . esc_attr('background-color:' . $val) . '"></div></div>';
$output .= '<input class="of-color" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Uploader
// Uploader
case "upload":
$output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
// New AJAX Uploader using Media Library
break;
// Typography
// Typography
case 'typography':
$typography_stored = $val;
// Font Size
$output .= '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
for ($i = 9; $i < 71; $i++) {
$size = $i . 'px';
$output .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$output .= '</select>';
// Font Face
$output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = of_recognized_font_faces();
foreach ($faces as $key => $face) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$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;
// WPBS Typography - removed font size from std typography set of fields
// WPBS Typography - removed font size from std typography set of fields
case 'wpbs_typography':
$wpbs_typography_stored = $val;
// Font Face
$output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = of_recognized_font_faces();
foreach ($faces as $key => $face) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($wpbs_typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$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) {
示例8: optionsframework_fields
//.........这里部分代码省略.........
$checked = '';
$label = $option;
$option = preg_replace('/[^a-zA-Z0-9._\\-]/', '', strtolower($key));
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Color picker
// Color picker
case "color":
$default_color = '';
if (isset($value['std'])) {
if ($val != $value['std']) {
$default_color = ' data-default-color="' . $value['std'] . '" ';
}
}
$output .= '<input name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" class="of-color" type="text" value="' . esc_attr($val) . '"' . $default_color . ' />';
break;
// Uploader
// Uploader
case "upload":
$output .= Options_Framework_Media_Uploader::optionsframework_uploader($value['id'], $val, null);
break;
// Typography
// Typography
case 'typography':
unset($font_size, $font_style, $font_face, $font_color);
$typography_defaults = array('size' => '', 'face' => '', 'style' => '', 'color' => '');
$typography_stored = wp_parse_args($val, $typography_defaults);
$typography_options = array('sizes' => of_recognized_font_sizes(), 'faces' => of_recognized_font_faces(), 'styles' => of_recognized_font_styles(), 'color' => true);
if (isset($value['options'])) {
$typography_options = wp_parse_args($value['options'], $typography_options);
}
// Font Size
if ($typography_options['sizes']) {
$font_size = '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
$sizes = $typography_options['sizes'];
foreach ($sizes as $i) {
$size = $i . 'px';
$font_size .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$font_size .= '</select>';
}
// Font Face
if ($typography_options['faces']) {
$font_face = '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = $typography_options['faces'];
foreach ($faces as $key => $face) {
$font_face .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$font_face .= '</select>';
}
// Font Styles
if ($typography_options['styles']) {
$font_style = '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
$styles = $typography_options['styles'];
foreach ($styles as $key => $style) {
$font_style .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$font_style .= '</select>';
}
// Font Color
示例9: optionsframework_fields
//.........这里部分代码省略.........
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Color picker
// Color picker
case "color":
$output .= '<div id="' . esc_attr($value['id'] . '_picker') . '" class="colorSelector"><div style="' . esc_attr('background-color:' . $val) . '"></div></div>';
$output .= '<input class="of-color" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Uploader
// Uploader
case "upload":
$mode = isset($value['mode']) ? $value['mode'] : 'full';
$output .= optionsframework_medialibrary_uploader($value['id'], $val, $mode);
// New AJAX Uploader using Media Library
break;
// Typography
// Typography
case 'typography':
$typography_stored = $val;
// Font Size
$output .= '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
for ($i = 9; $i < 71; $i++) {
$size = $i . 'px';
$output .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$output .= '</select>';
// Font Face
$output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = of_recognized_font_faces();
foreach ($faces as $key => $face) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$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';
}
示例10: optionsframework_fields
//.........这里部分代码省略.........
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Color picker
// Color picker
case "color":
$output .= '<div id="' . esc_attr($value['id'] . '_picker') . '" class="colorSelector"><div style="' . esc_attr('background-color:' . $val) . '"></div></div>';
$output .= '<input class="of-color" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Uploader
// Uploader
case "upload":
$output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
// New AJAX Uploader using Media Library
break;
// Typography
// Typography
case 'typography':
$typography_stored = $val;
/* // Font Size
$output .= '<select class="of-typography of-typography-size" name="' . esc_attr( $option_name . '[' . $value['id'] . '][size]' ) . '" id="' . esc_attr( $value['id'] . '_size' ) . '">';
for ($i = 9; $i < 71; $i++) {
$size = $i . 'px';
$output .= '<option value="' . esc_attr( $size ) . '" ' . selected( $typography_stored['size'], $size, false ) . '>' . esc_html( $size ) . '</option>';
}
$output .= '</select>';
*/
// Font Face
$output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = of_recognized_font_faces();
foreach ($faces as $key => $face) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$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']) {
示例11: optionsframework_fields
//.........这里部分代码省略.........
$checked = '';
$label = $option;
$option = preg_replace('/[^a-zA-Z0-9._\\-]/', '', strtolower($key));
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input vpanel_multicheck" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . '><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Color picker
// Color picker
case "color":
$default_color = '';
if (isset($value['std'])) {
if ($val != $value['std']) {
$default_color = ' data-default-color="' . $value['std'] . '" ';
}
}
$output .= '<input name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" class="of-color ' . (isset($value['class']) ? esc_attr($value['class']) : '') . '" type="text" value="' . esc_attr($val) . '"' . $default_color . '>';
break;
// Uploader
// Uploader
case "upload":
$output .= Options_Framework_Media_Uploader::optionsframework_uploader($value['id'], $val, null);
break;
// Typography
// Typography
case 'typography':
unset($font_size, $font_style, $font_face, $font_color);
$typography_defaults = array('size' => '', 'face' => '', 'style' => '', 'color' => '');
$typography_stored = wp_parse_args($val, $typography_defaults);
$typography_options = array('sizes' => of_recognized_font_sizes(), 'faces' => of_recognized_font_faces(), 'styles' => of_recognized_font_styles(), 'color' => true);
if (isset($value['options'])) {
$typography_options = wp_parse_args($value['options'], $typography_options);
}
// Font Size
if ($typography_options['sizes']) {
$font_size = '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
$sizes = $typography_options['sizes'];
foreach ($sizes as $i) {
$size = $i . 'px';
$font_size .= '<option value="' . esc_attr($size) . '" ' . (is_string($typography_stored['size']) ? selected($typography_stored['size'], $size, false) : "") . '>' . esc_html($size) . '</option>';
}
$font_size .= '</select>';
}
// Font Face
if ($typography_options['faces']) {
$font_face = '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = $typography_options['faces'];
foreach ($faces as $key => $face) {
$font_face .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$font_face .= '</select>';
}
// Font Styles
if ($typography_options['styles']) {
$font_style = '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
$styles = $typography_options['styles'];
foreach ($styles as $key => $style) {
$font_style .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$font_style .= '</select>';
}
// Font Color
示例12: optionsframework_fields
//.........这里部分代码省略.........
break;
// Color picker
// Color picker
case "color":
$output .= '<div id="' . esc_attr($value['id'] . '_picker') . '" class="colorSelector"><div style="' . esc_attr('background-color:' . $val) . '"></div></div>';
$output .= '<input class="colorSwatch of-color" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Editor
// Editor
case 'editor':
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);
wp_editor($val, $value['id'], $editor_settings);
$output = '';
break;
// Uploader
// Uploader
case "upload":
$output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
// New AJAX Uploader using Media Library
break;
// Typography
// Typography
case 'typography':
unset($font_size, $font_style, $font_face, $font_color);
$typography_defaults = array('size' => '', 'face' => '', 'style' => '', 'color' => '');
$typography_stored = wp_parse_args($val, $typography_defaults);
$typography_options = array('sizes' => of_recognized_font_sizes(), 'faces' => of_recognized_font_faces(), 'styles' => of_recognized_font_styles(), 'color' => true);
if (isset($value['options'])) {
$typography_options = wp_parse_args($value['options'], $typography_options);
}
// Font Size
if ($typography_options['sizes']) {
$font_size = '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '"
onchange="options_font_preview(\'' . esc_attr($value['id'] . '_size') . '\', \'' . esc_attr($value['id']) . '_preview' . '\', \'font-size\');return true;">';
$sizes = $typography_options['sizes'];
foreach ($sizes as $i) {
$size = $i . 'px';
$font_size .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$font_size .= '</select>';
}
// Font Face
if ($typography_options['faces']) {
$font_face = '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '"
onchange="options_font_preview(\'' . esc_attr($value['id'] . '_face') . '\', \'' . esc_attr($value['id']) . '_preview' . '\', \'font-family\');return true;">';
$faces = $typography_options['faces'];
foreach ($faces as $key => $face) {
$font_face .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$font_face .= '</select>';
}
// Font Styles
if ($typography_options['styles']) {
$font_style = '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style"
onchange="options_font_preview(\'' . esc_attr($value['id'] . '_style') . '\', \'' . esc_attr($value['id']) . '_preview' . '\', \'font-style\');return true;">';
$styles = $typography_options['styles'];
foreach ($styles as $key => $style) {
$font_style .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
示例13: optionsframework_fields
//.........这里部分代码省略.........
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Selector de color
// Selector de color
case "color":
$output .= '<div id="' . esc_attr($value['id'] . '_picker') . '" class="colorSelector"><div style="' . esc_attr('background-color:' . $val) . '"></div></div>';
$output .= '<input class="of-color" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" type="text" value="' . esc_attr($val) . '" />';
break;
// Cargador
// Cargador
case "upload":
$output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
// Nuevo cargador en AJAX usando Media Library
break;
// Tipografía
// Tipografía
case 'typography':
$typography_stored = $val;
// Font Size
$output .= '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
for ($i = 9; $i < 71; $i++) {
$size = $i . 'px';
$output .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$output .= '</select>';
// Font Face
$output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = of_recognized_font_faces();
foreach ($faces as $key => $face) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$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;
// Tipografía WPBS - remueve el tamaño de fuente del grupo de campos std de la tipografía
// Tipografía WPBS - remueve el tamaño de fuente del grupo de campos std de la tipografía
case 'wpbs_typography':
$wpbs_typography_stored = $val;
// Font Face
$output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = of_recognized_font_faces();
foreach ($faces as $key => $face) {
$output .= '<option value="' . esc_attr($key) . '" ' . selected($wpbs_typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$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) {
示例14: of_sanitize_font_face
function of_sanitize_font_face($value)
{
$recognized = of_recognized_font_faces();
if (array_key_exists($value, $recognized)) {
return $value;
}
return apply_filters('of_default_font_face', current($recognized));
}
示例15: optionsframework_fields
//.........这里部分代码省略.........
$checked = '';
$label = $option;
$option = preg_replace('/[^a-zA-Z0-9._\\-]/', '', strtolower($key));
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '<input id="' . esc_attr($id) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($name) . '" ' . $checked . ' /><label for="' . esc_attr($id) . '">' . esc_html($label) . '</label>';
}
break;
// Color picker
// Color picker
case "color":
$default_color = '';
if (isset($value['std'])) {
if ($val != $value['std']) {
$default_color = ' data-default-color="' . $value['std'] . '" ';
}
}
$output .= '<input name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" id="' . esc_attr($value['id']) . '" class="of-color" type="text" value="' . esc_attr($val) . '"' . $default_color . ' />';
break;
// Uploader
// Uploader
case "upload":
$output .= Options_Framework_Media_Uploader::optionsframework_uploader($value['id'], $val, null);
break;
// Typography
// Typography
case 'typography':
unset($font_size, $font_style, $font_face, $font_color);
$typography_defaults = array('size' => '', 'face' => '', 'style' => '', 'color' => '');
$typography_stored = wp_parse_args($val, $typography_defaults);
$typography_options = array('sizes' => of_recognized_font_sizes(), 'faces' => of_recognized_font_faces(), 'styles' => of_recognized_font_styles(), 'color' => true);
if (isset($value['options'])) {
$typography_options = wp_parse_args($value['options'], $typography_options);
}
// Font Size
if ($typography_options['sizes']) {
$font_size = '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
$sizes = $typography_options['sizes'];
foreach ($sizes as $i) {
$size = $i . 'px';
$font_size .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
}
$font_size .= '</select>';
}
// Font Face
if ($typography_options['faces']) {
$font_face = '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
$faces = $typography_options['faces'];
foreach ($faces as $key => $face) {
$font_face .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
}
$font_face .= '</select>';
}
// Font Styles
if ($typography_options['styles']) {
$font_style = '<select class="of-typography of-typography-style" name="' . $option_name . '[' . $value['id'] . '][style]" id="' . $value['id'] . '_style">';
$styles = $typography_options['styles'];
foreach ($styles as $key => $style) {
$font_style .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . $style . '</option>';
}
$font_style .= '</select>';
}
// Font Color