• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP optionsframework_medialibrary_uploader函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中optionsframework_medialibrary_uploader函数的典型用法代码示例。如果您正苦于以下问题:PHP optionsframework_medialibrary_uploader函数的具体用法?PHP optionsframework_medialibrary_uploader怎么用?PHP optionsframework_medialibrary_uploader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了optionsframework_medialibrary_uploader函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: optionsframework_fields


//.........这里部分代码省略.........
                    $output .= '<div class="of-radio-img-label">' . esc_html($key) . '</div>';
                    $output .= '<img src="' . esc_url($option) . '" alt="' . $option . '" class="of-radio-img-img' . $selected . '" onclick="document.getElementById(\'' . esc_attr($value['id'] . '_' . $key) . '\').checked=true;" />';
                }
                break;
                // Checkbox
            // Checkbox
            case "checkbox":
                $output .= '<input id="' . esc_attr($value['id']) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" ' . checked($val, 1, false) . ' />';
                break;
                // Multicheck
            // Multicheck
            case "multicheck":
                foreach ($value['options'] as $key => $option) {
                    $checked = '';
                    $label = $option;
                    $option = preg_replace('/\\W/', '', 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><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
开发者ID:AnkushVarshneya,项目名称:wordpress-theme,代码行数:67,代码来源:options-interface.php


示例2: optionsframework_fields


//.........这里部分代码省略.........
                    $output .= '<img src="' . esc_url($option) . '" alt="' . $option . '" class="of-radio-img-img-pro" />';
                }
                break;
                // Checkbox
            // Checkbox
            case "checkbox":
                $output .= '<input id="' . esc_attr($value['id']) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" ' . checked($val, 1, false) . ' />';
                $output .= '<label class="explain" for="' . esc_attr($value['id']) . '">' . wp_kses($explain_value, $allowedtags) . '</label>';
                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':
                $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
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:67,代码来源:options-interface.php


示例3: optionsframework_machine


//.........这里部分代码省略.........
                $output .= '<input type="checkbox" class="checkbox" value="on" id="' . $value['id'] . '" name="' . $value['id'] . '" ' . $checked . ' />';
                $output .= '</div>';
                $output .= '<div class="explain"><label for="' . $value['id'] . '">' . $explain_value . '</label></div>';
                break;
                // M U L T I   C H E C K B O X
                //---------------------------------
            // M U L T I   C H E C K B O X
            //---------------------------------
            case "multicheck":
                $std = $value['std'];
                $output .= '<h3>' . $value['name'] . '</h3>' . "\n";
                $output .= '<div class="controls" >' . "\n";
                foreach ($value['options'] as $key => $option) {
                    $checked = "";
                    if (get_option($value['id'])) {
                        if (@in_array($key, get_option($value['id']))) {
                            $checked = "checked=\"checked\"";
                        }
                    } else {
                        //Empty Value if Unchecked
                    }
                    $output .= '<input type="checkbox" class="checkbox" name="' . $value['id'] . '[]" id="' . $key . '" value="' . $key . '" ' . $checked . ' /> <label for="' . $key . '">' . $option . '</label><br>';
                }
                $output .= '</div>';
                $output .= '<div class="explain">' . $explain_value . '</div>';
                break;
                // U P L O A D
                //---------------------------------
            // U P L O A D
            //---------------------------------
            case "upload":
                $output .= '<h3>' . $value['name'] . '</h3>' . "\n";
                $output .= '<div class="controls" >' . "\n";
                $output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
                $output .= '</div>';
                $output .= '<div class="explain">' . $explain_value . '</div>';
                break;
                // C O L O R
                //---------------------------------
            // C O L O R
            //---------------------------------
            case "color":
                $val = $value['std'];
                $stored = get_option($value['id']);
                if ($stored != "") {
                    $val = $stored;
                }
                $output .= '<h3>' . $value['name'] . '</h3>' . "\n";
                $output .= '<div class="controls" >' . "\n";
                $output .= '<input class="color" name="' . $value['id'] . '" id="' . $value['id'] . '" type="text" value="' . $val . '" />';
                $output .= '<div class="wpcolorSelector"><div  id="' . $value['id'] . '_picker" ></div></div>';
                $output .= '</div>';
                $output .= '<div class="explain">' . $explain_value . '</div>';
                break;
                // T Y P O G R A P H Y
                //---------------------------------
            // T Y P O G R A P H Y
            //---------------------------------
            case "typography":
                $default = $value['std'];
                $typography_stored = get_option($value['id']);
                $output .= '<h3 class="heading">' . $value['name'] . '</h3>' . "\n";
                $output .= '<div class="controls" >' . "\n";
                // C O L O R
                if (isset($default['color'])) {
                    $val = $default['color'];
开发者ID:pryspry,项目名称:MusicPlay,代码行数:67,代码来源:admin-interface.php


示例4: optionsframework_machine


//.........这里部分代码省略.........
                     }
                 }
                 $output .= '</div>';
                 break;
             case 'tiles':
                 $i = 0;
                 $select_value = '';
                 $select_value = $data[$value['id']];
                 foreach ($value['options'] as $key => $option) {
                     $i++;
                     $checked = '';
                     $selected = '';
                     if (NULL != checked($select_value, $option, false)) {
                         $checked = checked($select_value, $option, false);
                         $selected = 'of-radio-tile-selected';
                     }
                     $output .= '<span>';
                     $output .= '<input type="radio" id="of-radio-tile-' . $value['id'] . $i . '" class="checkbox of-radio-tile-radio" value="' . $option . '" name="' . $value['id'] . '" ' . $checked . ' />';
                     $output .= '<div class="of-radio-tile-img ' . $selected . '" style="background: url(' . $option . ')" onClick="document.getElementById(\'of-radio-tile-' . $value['id'] . $i . '\').checked = true;"></div>';
                     $output .= '</span>';
                 }
                 break;
                 // Background
             // Background
             case 'background':
                 $background = $data[$value['id']];
                 // 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;
             case 'backup':
                 $instructions = $value['options'];
                 $backup = get_option(BACKUPS);
                 if (!isset($backup['backup_log'])) {
开发者ID:najashark,项目名称:Touchfolio,代码行数:67,代码来源:admin-interface.php


示例5: fields


//.........这里部分代码省略.........
                     $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 = ClassyOptionsSanitize::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 = 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';
开发者ID:ezeheinke,项目名称:web-pegsoluciones,代码行数:67,代码来源:classy-options.php


示例6: optionsframework_fields


//.........这里部分代码省略.........
                    $output .= '<img src="' . esc_url($option) . '" alt="' . $option . '" class="of-radio-img-img' . $selected . '" onclick="document.getElementById(\'' . esc_attr($value['id'] . '_' . $key) . '\').checked=true;" />';
                }
                break;
                // Casilla de verificación
            // Casilla de verificación
            case "checkbox":
                $output .= '<input id="' . esc_attr($value['id']) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" ' . checked($val, 1, false) . ' />';
                $output .= '<label class="explain" for="' . esc_attr($value['id']) . '">' . wp_kses($explain_value, $allowedtags) . '</label>';
                break;
                // Lista de selección múltiple
            // Lista de selección múltiple
            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;
                // 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;
开发者ID:ncoelho,项目名称:wordpress-bootstrap-spanish,代码行数:67,代码来源:options-interface.php


示例7: optionsframework_machine


//.........这里部分代码省略.........
                $output .= '<input type="checkbox" class="checkbox" value="on" id="' . $value['id'] . '" name="' . $value['id'] . '" ' . $checked . ' />';
                $output .= '</div>';
                $output .= '<div class="explain"><label for="' . $value['id'] . '">' . $explain_value . '</label></div>';
                break;
                // M U L T I   C H E C K B O X
                //---------------------------------
            // M U L T I   C H E C K B O X
            //---------------------------------
            case "multicheck":
                $std = $value['std'];
                $output .= '<h3>' . $value['name'] . '</h3>' . "\n";
                $output .= '<div class="controls" >' . "\n";
                foreach ($value['options'] as $key => $option) {
                    $checked = "";
                    if (get_option($value['id'])) {
                        if (@in_array($key, get_option($value['id']))) {
                            $checked = "checked=\"checked\"";
                        }
                    } else {
                        //Empty Value if Unchecked
                    }
                    $output .= '<input type="checkbox" class="checkbox" name="' . $value['id'] . '[]" id="' . $key . '" value="' . $key . '" ' . $checked . ' /> <label for="' . $key . '">' . $option . '</label><br>';
                }
                $output .= '</div>';
                $output .= '<div class="explain">' . $explain_value . '</div>';
                break;
                // U P L O A D
                //---------------------------------
            // U P L O A D
            //---------------------------------
            case "upload":
                $output .= '<h3>' . $value['name'] . '</h3>' . "\n";
                $output .= '<div class="controls" >' . "\n";
                $output .= optionsframework_medialibrary_uploader($value['id'], $val, null);
                $output .= '</div>';
                $output .= '<div class="explain">' . $explain_value . '</div>';
                break;
                // C O L O R
                //---------------------------------
            // C O L O R
            //---------------------------------
            case "color":
                $val = $value['std'];
                $stored = get_option($value['id']);
                if ($stored != "") {
                    $val = $stored;
                }
                $output .= '<h3>' . $value['name'] . '</h3>' . "\n";
                $output .= '<div class="controls" >' . "\n";
                $output .= '<input class="color" name="' . $value['id'] . '" id="' . $value['id'] . '" type="text" value="' . $val . '" />';
                $output .= '<div class="wpcolorSelector"><div  id="' . $value['id'] . '_picker" ></div></div>';
                $output .= '</div>';
                $output .= '<div class="explain">' . $explain_value . '</div>';
                break;
                // T Y P O G R A P H Y
                //---------------------------------
            // T Y P O G R A P H Y
            //---------------------------------
            case "typography":
                $default = $value['std'];
                $typography_stored = get_option($value['id']);
                $output .= '<h3 class="heading">' . $value['name'] . '</h3>' . "\n";
                $output .= '<div class="controls" >' . "\n";
                // C O L O R
                if (isset($default['color'])) {
                    $val = $default['color'];
开发者ID:abdullaniyas,项目名称:cleansweep2,代码行数:67,代码来源:admin-interface.php


示例8: optionsframework_fields


//.........这里部分代码省略.........
			function statusUpdate(text){
				$('#console').prepend('<p>'+text+'</p>');
			}
		// End jQuery goodness
		});
	</script>
	<?php 
                $output .= '<div id="itoggle" class="project"><input type="checkbox" class="checkbox of-input" id="' . esc_attr($value['id']) . '" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" ' . checked($val, 1, false) . '  /></div>';
                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);
                // 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>';
开发者ID:Snaehild,项目名称:GH2016,代码行数:67,代码来源:options-interface.php


示例9: optionsframework_fields


//.........这里部分代码省略.........
                    $output .= '<img src="' . esc_url($option) . '" alt="' . $option . '" class="of-radio-img-img' . $selected . '" onclick="document.getElementById(\'' . esc_attr($value['id'] . '_' . $key) . '\').checked=true;" />';
                }
                break;
                // Checkbox
            // Checkbox
            case "checkbox":
                $output .= '<input id="' . esc_attr($value['id']) . '" class="checkbox of-input" type="checkbox" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" ' . checked($val, 1, false) . ' />';
                $output .= '<label class="explain" for="' . esc_attr($value['id']) . '">' . wp_kses($explain_value, $allowedtags) . '</label>';
                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);
                // 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;
开发者ID:harvard-lil,项目名称:blog-theme,代码行数:67,代码来源:options-interface.php


示例10: optionsframework_fields


//.........这里部分代码省略.........
                } else {
                    if (isset($value['options']['java_hide_global']) && $value['options']['java_hide_global']) {
                        $classes[] = 'of-js-hider-global';
                    }
                }
                $classes = implode(' ', $classes);
                $output .= '<input id="' . esc_attr($value['id']) . '" class="' . $classes . '" type="checkbox" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" ' . checked($val, 1, false) . ' />';
                break;
                // Multicheck
            // Multicheck
            case "multicheck":
                foreach ($value['options'] as $key => $option) {
                    $checked = '';
                    $label = $option;
                    $option = preg_replace('/\\W/', '', 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":
                $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) . ' 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP optionsframework_mlu_get_silentpost函数代码示例发布时间:2022-05-15
下一篇:
PHP optionsframework_fields函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap