function hw_wpcf7_contact_form_css($form)
    {
        wp_enqueue_style('hw-wpcf7-default-skin', HW_SKIN::current()->get_skin_url('style.css'));
        ?>

    <?php 
    }
    ?>
" title="<?php 
    the_title_attribute();
    ?>
">
                                <?php 
    if (function_exists('the_post_thumbnail') && current_theme_supports("post-thumbnails") && in_array("thumb", $arrExlpodeFields) && has_post_thumbnail()) {
        ?>
                                    <?php 
        the_post_thumbnail('thumbnail', array($instance["thumb_w"], $instance["thumb_h"], 'style' => "width:100px;height:70px", 'class' => 'img'));
        ?>
                                <?php 
    } else {
        ?>
                                    <img src="<?php 
        echo HW_SKIN::current()->get_skin_url('images/placeholder.png');
        ?>
" width="50px"/>
                                <?php 
    }
    ?>
                            </a>
                        </div>
                        <div class="picture-shadow"></div>
                        <h2 class="title">
                            <a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title_attribute();
    ?>
    echo $file['index'];
    ?>
                    </div>
                    <div class="centerCol">
                        <p style="margin-top: 11px;">
                                                        <span class="docNo">
                                                            </span>
                            <?php 
    printf('%s %s %s %s', $file['icon'], $file['link_before'], $file['link'], $file['link_after']);
    ?>
                        </p>
                    </div>
                    <div class="rightCol">
                        <div class="downloadButton">
                            <?php 
    printf('<a href="%s" target="_blank" ><input type="image" name="btnDownload" id="" src="%s" style="border-width:0px;width:25px"></a>', $file['url'], HW_SKIN::current()->get_skin_url('images/Sign-Download-icon.png'));
    ?>

                        </div>
                        <div class="downloadNo">
                            (<?php 
    echo $file['count'];
    ?>
)
                        </div>
                    </div>
                </div>
                <?php 
}
?>
 /**
  * display widget content on website
  * @param $args
  * @param $instance
  */
 public function widget($args, $instance)
 {
     extract($args);
     //filter widget title
     $instance['title'] = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
     // Title
     $hash_skin = empty($instance['skin']) ? 'default' : $instance['skin'];
     //valid instance
     if (!isset($instance['phone_icon'])) {
         $instance['phone_icon'] = '';
     }
     if (!isset($instance['mail_icon'])) {
         $instance['mail_icon'] = '';
     }
     //by hoangweb.com
     if ($this->skin) {
         $nums = $this->_number;
         //load skin
         $file = $this->skin->get_skin_file($hash_skin);
         if (file_exists($file)) {
             $skin_setting = $this->skin->get_file_skin_setting($hash_skin, false);
             $skin_options = $this->skin->get_file_skin_options($hash_skin, false);
             if (file_exists($skin_setting)) {
                 //get setting file
                 include $skin_setting;
             }
             //init theme setting
             if (empty($theme)) {
                 $theme = array();
             }
             $theme['styles'] = array();
             $theme['scripts'] = array();
             //parse widget data
             $data = HW_Yahoo_Skype_status::parse_onlinesupport_data($instance);
             if (!is_array($data)) {
                 $data = array();
             }
             include $file;
             $this->skin->render_skin_template(array('current_skin' => HW_SKIN::current(), 'before_widget' => $before_widget, 'before_title' => $before_title, 'after_title' => $after_title, 'after_widget' => $after_widget, 'instance' => $instance, 'data' => $data, 'yk' => $this), true, $hash_skin);
             //$this->skin->enqueue_files_from_skin($theme['styles'], $theme['scripts']); //enqueue stuff from skin
             //enqueue stuff from skin
             HW_SKIN::enqueue_skin_assets(array('instance' => $this->skin, 'hash_skin' => $instance['skin'], 'skin_file' => $file, 'theme_settings' => $theme));
         }
     } else {
         echo 'not found class HW_SKIN.';
     }
 }
                <li class="rss"><a href="#"><img src="<?php 
echo HW_SKIN::current()->get_skin_url('images/rss.png');
?>
" alt="Rss"></a></li>
                <li class="youtube"><a href="<?php 
echo hw_option('youtube_url');
?>
" target="_blank"><img src="<?php 
echo HW_SKIN::current()->get_skin_url('images/youtube.png');
?>
" alt="You Tube"></a></li>
                <li class="google-plus"><a href="<?php 
echo hw_option('gplus_url');
?>
" target="_blank"><img src="<?php 
echo HW_SKIN::current()->get_skin_url('images/gplus.png');
?>
" alt="Googel PLus"></a></li>
            </ul>
        </div>
        <div>
            <p><img src="<?php 
echo get_theme_mod('image_logo');
?>
" alt="home" width="94" height="47">&nbsp; &nbsp;</p>
        </div>


        <?php 
wp_footer();
?>
Esempio n. 6
0
 /**
  * render skin template engine
  * @param string $hash_skin
  * @param array $data
  * @param bool $echo print out or return
  * @param $tpl
  * @return bool
  */
 public function render_skin_template($data = array(), $echo = true, $hash_skin = '', $tpl = '')
 {
     if (!$this->allow_skin_tpl()) {
         return false;
     }
     //not allow skin template
     //init twig template object
     $hw_tpl = $this->create_skin_twig($hash_skin);
     $skin_info = $this->get_skin_info($hash_skin);
     if (!$tpl) {
         $tpl = $skin_info['skin_tpl_path'];
     }
     if (file_exists($tpl) || HW_Twig_Template::twig_asset_exists($tpl, $hw_tpl->get())) {
         //if(!isset($data['_current_skin'])) $data['_current_skin'] = HW_SKIN::current();
         $hw_tpl->get()->addGlobal('_current_skin', HW_SKIN::current());
         $hw_tpl->get()->addGlobal('is_ajax_context', is_ajax());
         $content = $hw_tpl->_render($tpl, $data);
         if ($echo) {
             echo $content;
         } else {
             return $content;
         }
         return true;
     }
     return false;
 }