コード例 #1
0
function my_team($attrs, $content = null, $shortcodename = "")
{
    $dir = get_template_directory() . "/images/sociable/team-social/";
    $sociables_icons = mytheme_listImage($dir);
    $sociables = array_values($sociables_icons);
    $attributes = array('name' => '', 'image' => '', 'role' => '');
    foreach ($sociables as $sociable) {
        $attributes[$sociable] = '';
    }
    extract(shortcode_atts($attributes, $attrs));
    $image = empty($image) ? IAMD_BASE_URL . "images/dummy-images/team.jpg" : $image;
    $image = "<div class='image'><img src='{$image}' alt='member-image' /></div>";
    $name = empty($name) ? "" : "<h4>{$name}</h4>";
    $role = empty($role) ? "" : "<h6>{$role}</h6>";
    $s = "";
    $path = IAMD_BASE_URL . "/images/sociable/";
    foreach ($sociables as $sociable) {
        $img = array_search($sociable, $sociables_icons);
        $s .= empty(${$sociable}) ? "" : "<li><a href='{${$sociable}}' target='_blank'> <img src='{$path}hover/{$img}' alt='{$sociable}'/> <img src='{$path}team-social/{$img}' alt='{$sociable}'/></a></li>";
    }
    $s = !empty($s) ? "<ul class='social-icons'>{$s}</ul>" : "";
    $out = '<div class="team">';
    $out .= $image . $name . $role . $s;
    $out .= '</div>';
    return $out;
}
コード例 #2
0
function mytheme_color_picker()
{
    $patterns_url = IAMD_FW_URL . "theme_options/images/pattern/";
    $skins_url = IAMD_BASE_URL . "images/style-picker/";
    $patterns = "";
    $patterns_array = mytheme_listImage(TEMPLATEPATH . "/images/style-picker/patterns/");
    foreach ($patterns_array as $k => $v) {
        $img = IAMD_BASE_URL . "images/style-picker/patterns/" . $k;
        $patterns .= '<li>';
        $patterns .= "<a id='{$v}' 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="color-' . $skin . '"/>';
        $colors .= '</a>';
        $colors .= '</li>';
    }
    $str = '<!-- **Delicate Style Picker Wrapper** -->';
    $str .= '<div class="delicate-style-picker-wrapper">';
    $str .= '	<a href="" title="" class="style-picker-ico"> <img src="' . IAMD_BASE_URL . 'images/style-picker/picker-icon.png" alt="" title="" /> </a>';
    $str .= '	<div id="delicate-style-picker">';
    $str .= '   	<h2>' . __('Select Your Style', 'dt_delicate') . '</h2>';
    $str .= '       <h3>' . __('Choose your layout', 'dt_delicate') . '</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="" /> </a> </li>';
    $str .= '       	<li> <a id="boxed" href="" title=""> <img src="' . IAMD_BASE_URL . 'images/style-picker/boxed.jpg" alt="" title="" /> </a> </li>';
    $str .= '		</ul>';
    $str .= '		<div class="hr"> </div>';
    $str .= '		<div id="pattern-holder" style="display:none;">';
    $str .= '			<h3>' . __('Patterns for Boxed Layout', 'dt_delicate') . '</h3>';
    $str .= '			<ul class="pattern-picker">';
    $str .= $patterns;
    $str .= '			</ul>';
    $str .= '			<div class="hr"> </div>';
    $str .= '		</div>';
    $str .= '		<h3>' . __('Color scheme', 'dt_delicate') . '</h3>';
    $str .= '		<ul class="color-picker">';
    $str .= $colors;
    $str .= '		</ul>';
    $str .= '	</div>';
    $str .= '</div><!-- **Delicate Style Picker Wrapper - End** -->';
    echo $str;
}
コード例 #3
0
/** mytheme_sociables_selection()
  * Objective:
  *		Returns selection box.
**/
function mytheme_sociables_selection($name = '', $selected = "")
{
    $dir = get_template_directory() . "/images/sociable/";
    $sociables = mytheme_listImage($dir);
    $name = !empty($name) ? "name='mytheme[social][{$name}][icon]'" : '';
    $out = "<select class='social-select' {$name}>";
    #name 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;
}
コード例 #4
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_delicate');
?>
 </h6>
                    	<!-- Pattern Sets Start -->
                    	<div class="bpanel-option-set">
                        	
                            <ul class="bpanel-layout-set">
                            <?php 
$pattrens = mytheme_listImage(IAMD_FW . "theme_options/images/patterns/");
foreach ($pattrens as $key => $value) {
    $class = $key == mytheme_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}' /></a>";
    echo "</li>";
}
?>
</ul>
                            <input id="mytheme[appearance][boxed-layout-pattern]" name="mytheme[appearance][boxed-layout-pattern]" type="hidden" 
                         			value="<?php 
echo mytheme_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_delicate');