Пример #1
0
function dttheme_color_picker()
{
    $patterns_url = IAMD_FW_URL . "theme_options/images/pattern/";
    $skins_url = IAMD_BASE_URL . "images/style-picker/";
    $patterns = "";
    $patterns_array = dttheme_listImage(get_template_directory() . "/images/style-picker/patterns/");
    foreach ($patterns_array as $k => $v) {
        $img = IAMD_BASE_URL . "images/style-picker/patterns/" . $k;
        $patterns .= '<li>';
        $patterns .= "<a data-image='{$k}' href='' title=''>";
        $patterns .= "<img src='{$img}' alt='{$v}' title='{$v}' width='30' height='30' />";
        $patterns .= '</a>';
        $patterns .= '</li>';
    }
    $colors = "";
    foreach (getFolders(get_template_directory() . "/skins") as $skin) {
        $img = $skins_url . $skin . ".jpg";
        $colors .= '<li>';
        $colors .= '<a id="' . $skin . '" href="" title="">';
        $colors .= '<img src="' . $img . '" alt="color-' . $skin . '" title="' . $skin . '" width="92" height="30"/>';
        $colors .= '</a>';
        $colors .= '</li>';
    }
    $str = '<!-- **DesignThemes Style Picker Wrapper** -->';
    $str .= '<div class="dt-style-picker-wrapper">';
    $str .= '	<a href="" title="" class="style-picker-ico"> <img class="rotating" src="' . IAMD_BASE_URL . 'images/style-picker/picker-icon2.png" alt="" title="" width=23" height="23" /> </a>';
    $str .= '	<div id="dt-style-picker">';
    $str .= '   	<h2>' . __('Select Your Style', 'dt_themes') . '</h2>';
    $str .= '       <h3>' . __('Choose your layout', 'dt_themes') . '</h3>';
    $str .= '		<ul class="layout-picker">';
    $str .= '       	<li> <a id="fullwidth" href="" title="" class="selected"> <img src="' . IAMD_BASE_URL . 'images/style-picker/fullwidth.jpg" alt="" title="" width="71" height="49"	 /> </a> </li>';
    $str .= '       	<li> <a id="boxed" href="" title=""> <img src="' . IAMD_BASE_URL . 'images/style-picker/boxed.jpg" alt="" title="" width="71" height="49"/> </a> </li>';
    $str .= '		</ul>';
    $str .= '		<div class="hr"> </div>';
    $str .= '		<div id="pattern-holder" style="display:none;">';
    $str .= '			<h3>' . __('Patterns for Boxed Layout', 'dt_themes') . '</h3>';
    $str .= '			<ul class="pattern-picker">';
    $str .= $patterns;
    $str .= '			</ul>';
    $str .= '			<div class="hr"> </div>';
    $str .= '		</div>';
    $str .= '		<h3>' . __('Color scheme', 'dt_themes') . '</h3>';
    $str .= '		<ul class="color-picker">';
    $str .= $colors;
    $str .= '		</ul>';
    $str .= '	</div>';
    $str .= '</div><!-- **DesignThemes Style Picker Wrapper - End** -->';
    echo $str;
}
Пример #2
0
                	<!-- In-built BG Patterns starts-->
                    <div class="bg-pattern" <?php 
echo $bg_pattern;
?>
>
                    	<div class="hr_invisible"> </div>
                    	<h6> <?php 
_e('Choose Patterns', 'dt_themes');
?>
 </h6>
                    	<!-- Pattern Sets Start -->
                    	<div class="bpanel-option-set">
                        	
                            <ul class="bpanel-post-layout bpanel-layout-set">
                            <?php 
$pattrens = dttheme_listImage(IAMD_FW . "theme_options/images/patterns/");
foreach ($pattrens as $key => $value) {
    $class = $key == dttheme_option('appearance', 'boxed-layout-pattern') ? " class='selected' " : "";
    echo "<li>";
    echo "<a href='#' rel='{$key}' {$class}><img width='80px' height='80px' src='" . IAMD_FW_URL . "theme_options/images/patterns/{$key}' alt='' /></a>";
    echo "</li>";
}
?>
</ul>
                            <input id="mytheme[appearance][boxed-layout-pattern]" name="mytheme[appearance][boxed-layout-pattern]" type="hidden" 
                         			value="<?php 
echo dttheme_option('appearance', 'boxed-layout-pattern');
?>
"/>
                           <p class="note">	<?php 
_e('Choose background pattern, you can add patterns by placing the png files in the folder ', 'dt_themes');
Пример #3
0
/**
 * dttheme_sociables_selection()
 * Objective:
 * Returns selection box.
 */
function dttheme_sociables_selection($name = '', $selected = "")
{
    $dir = IAMD_DIR . "/images/sociable/";
    $sociables = dttheme_listImage($dir);
    $name = !empty($name) ? "name='mytheme[social][{$name}][icon]'" : '';
    $out = "<select class='social-select' {$name}>";
    // ame attribute will be added to this by jQuery menuAdd()
    foreach ($sociables as $key => $value) {
        $s = selected($key, $selected, false);
        $v = ucwords($value);
        $out .= "<option value='{$key}' {$s} >{$v}</option>";
    }
    $out .= "</select>";
    return $out;
}