Esempio n. 1
0
/**
 * Print import notice
 */
function ts_import_notice()
{
    $oArgs = ThemeArguments::getInstance('importer');
    $ts_import_notice = $oArgs->get('ts_import_notice');
    $ts_import_notice = $oArgs->get('ts_import_notice_type');
    if (isset($_GET['imported_sample_data']) && $_GET['imported_sample_data'] == 1) {
        ?>
		<div class="updated">
			<p><?php 
        _e('Import completed', 'framework');
        ?>
</p>
		</div>
	<?php 
    } elseif (!empty($ts_import_notice)) {
        ?>
		<div class="<?php 
        echo sanitize_html_classes($ts_import_notice_type);
        ?>
">
			<p><?php 
        echo esc_html($ts_import_notice);
        ?>
</p>
		</div>
	<?php 
    }
}
Esempio n. 2
0
function ts_container_func($atts)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'content_box' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore libero autem tempora cumque officiis sapiente maxime sit facere assumenda quisquam amet consequatur ad delectus accusantium quia saepe quas repellendus optio distinctio nobis consequuntur culpa eligendi quibusdam nesciunt maiores alias ex.', 'style' => '1', 'icon' => '', 'icon_color' => ''), $atts));
    $class_wrapper = null;
    switch ($style) {
        case '1':
            $classes = 'content-block bottom-padding frame';
            break;
        case '2':
            $classes = 'content-block bottom-padding frame border-radius';
            break;
        case '3':
            $classes = 'content-block bottom-padding frame-shadow-lifted';
            break;
        case '4':
            $classes = 'content-block bottom-padding frame frame-shadow-lifted';
            break;
        case '5':
            $classes = 'content-block bottom-padding frame-shadow-lifted bg';
            break;
        case '6':
            $classes = 'content-block bottom-padding frame-shadow-raised text-center';
            break;
        case '7':
            $classes = 'content-block bottom-padding frame frame-shadow-curved';
            break;
        case '8':
            $classes = 'content-block bottom-padding frame frame-shadow-lifted';
            break;
        case '9':
            $classes = 'content-block bottom-padding frame frame-shadow-curved border-radius';
            break;
        case '10':
            $classes = 'bottom-padding frame-shadow-lifted bg';
            break;
        case '11':
            $class_wrapper = 'rotated-box';
            $classes = 'content-block bottom-padding frame frame-shadow-lifted';
            break;
        case '12':
            $class_wrapper = 'rotated-right-box';
            $classes = 'content-block bottom-padding frame frame-shadow-curved border-radius';
            break;
        case '13':
            $classes = 'content-block text-center frame-shadow bottom-padding';
            break;
        default:
            $classes = 'bottom-padding frame-shadow-lifted bg';
            break;
    }
    $icon_html = '';
    if (!empty($icon)) {
        $icon_html = '<span class="icon bg circle icon-60 pull-left"><i class="' . sanitize_html_class($icon) . '" ' . (!empty($icon_color) ? 'style="color: ' . esc_attr($icon_color) . '"' : '') . '></i></span>';
    }
    $output = "\n\t\t<div class='" . sanitize_html_classes($classes) . " " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($animation_delay, $animation_iteration) . ">\n\t\t\t{$icon_html}\n\t\t\t<span class='lead'>{$content_box}</span>\n\t\t</div>";
    if (!empty($class_wrapper)) {
        return "<div class='" . sanitize_html_classes($class_wrapper) . "'>{$output}</div>";
    }
    return $output;
}
function ts_button_outlined_func($atts, $content = null)
{
    $oArgs = ThemeArguments::getInstance('ts_button_outlined_func');
    $button_id = (int) $oArgs->get('button_id') + 1;
    $oArgs->set('button_id', $button_id);
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', "icon" => '', "color" => '', "hover_color" => '', "background_color" => '', "background_hover_color" => '', "size" => '', "url" => '', 'target' => '_self', 'align' => ''), $atts));
    $button_class = 'button btn btn-border ' . $size;
    if (empty($url)) {
        $url = '#';
    }
    $button_styles = '';
    $button_data = '';
    if (!empty($color)) {
        $button_styles .= "color:{$color}; border-color: {$color};";
        $button_data .= 'data-color="' . esc_attr($color) . '"';
    }
    if (!empty($hover_color)) {
        $button_data .= 'data-hover-color="' . esc_attr($hover_color) . '"';
    }
    if (!empty($background_color)) {
        $button_styles .= "background-color:{$background_color};";
        $button_data .= 'data-background-color="' . esc_attr($background_color) . '"';
    }
    if (!empty($background_hover_color)) {
        $button_data .= 'data-background-hover-color="' . esc_attr($background_hover_color) . '"';
    }
    $icon_html = '';
    if ($icon && $icon != 'no') {
        $icon_html = '<i class="icons ' . esc_attr($icon) . '"></i>';
    }
    return '<div class="xbtn ' . sanitize_html_classes($align) . '"><a id="button-' . esc_attr($button_id) . '" ' . esc_attr($button_data) . ' class="' . esc_attr($button_class) . ' ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . ' href="' . esc_url($url) . '" target="' . esc_attr($target) . '" style="' . $button_styles . '">' . $icon_html . $content . '</a></div>';
}
function ts_banner_carousel_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'carousel_style' => '', 'full_width_lines' => '', 'category' => '', 'limit' => 10), $atts));
    // Reset and setup variables
    $output = '';
    $temp_title = '';
    $temp_link = '';
    $carousel_classes = '';
    if ($carousel_style == 'mini') {
        $width = 127;
        $height = 79;
        $carousel_classes = 'banner-set-mini banner-set-no-pagination';
    } else {
        $width = 253;
        $height = 158;
    }
    if ($full_width_lines == 'enabled') {
        $carousel_classes .= ' banner-border-shop';
    }
    $output .= "<div class='banner-set load " . sanitize_html_classes($carousel_classes) . "'>\n            <div class='container'>\n              <div class='banners'>";
    $args = array('post_type' => 'banner', 'posts_per_page' => $limit);
    if (!empty($category)) {
        $args['tax_query'] = array(array('taxonomy' => 'banner-cat', 'field' => 'id', 'terms' => $category));
    }
    $current_animation_delay = $animation_delay;
    query_posts($args);
    // the loop
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $temp_title = get_the_title($post->ID);
            $url = xv_get_field('url');
            $temp_link = '#';
            if ($url) {
                $temp_link = $url;
            }
            $excerpt = get_xv_excerpt(250);
            // output all findings - CUSTOMIZE TO YOUR LIKING
            $output .= "<a  class='banner " . ts_get_animation_class($animation) . "' href='" . esc_url($temp_link) . "' " . ts_get_animation_data_class($current_animation_delay, $animation_iteration) . ">";
            $thumb = get_xv_thumbnail($width, $height);
            $output .= '<img src="' . esc_url($thumb) . '" alt="' . the_title_attribute('echo=0') . '" />';
            $output .= "<h2 class='title'>{$temp_title}</h2>";
            if ($carousel_style != 'mini') {
                $output .= "<div class='description'>{$excerpt}</div>";
            }
            $output .= "</a>";
            $current_animation_delay += $animation_delay_item;
        }
    }
    wp_reset_query();
    $output .= "</div>\n                  <div class='clearfix'></div>\n                 </div>\n                  <div class='nav-box " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($current_animation_delay, $animation_iteration) . ">\n                  <div class='container'>\n                    <a class='prev' href='#'><span class='icon-left'></span></a>\n                    <div class='pagination switches'></div>\n                    <a class='next' href='#'><span class='icon-right'></span></a>  \n                  </div>\n                  </div>\n                </div>\n                <div class='clearfix'></div>";
    return $output;
}
Esempio n. 5
0
/**
 * Visual Composer Eelement: Steps
 * 
 */
function ts_steps_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'step' => '', 'style' => '', 'align' => ''), $atts));
    $align_class = '';
    return '
    	<div class="steps progress-steps ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '>
		  <div class="step ' . sanitize_html_classes($style) . ' ' . sanitize_html_classes($align) . '">
			<div class="step-wrapper">
			  <div class="number">' . $step . '</div>
			  	' . do_shortcode($content) . '
			</div>
		  </div>
		</div>';
}
Esempio n. 6
0
function ts_hr_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'color' => '', 'style' => ''), $atts));
    $html = null;
    $divider_style = array();
    if (!empty($color)) {
        $divider_style[] = 'border-color:' . esc_attr($color);
    }
    $divider_style_html = null;
    if (is_array($divider_style)) {
        $divider_style_html = 'style="' . implode(';', $divider_style) . '"';
    }
    $html .= '<hr class="divider ' . sanitize_html_classes($style) . ' ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . ' ' . $divider_style_html . ' >';
    return $html;
}
Esempio n. 7
0
/**
 * Visual Composer Eelement: Heading
 * 
 */
function ts_heading_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'color' => '', 'type' => 1, 'align' => '', 'style' => '', 'id' => ''), $atts));
    if (intval($type) < 1 || intval($type) > 6) {
        $type = 1;
    }
    if (!empty($color)) {
        $color = 'style="color:' . esc_attr($color) . '"';
    }
    $id_attr = '';
    if (!empty($id)) {
        $id_attr = 'id="' . esc_attr($id) . '"';
    }
    return "<div " . $id_attr . " class='" . sanitize_html_classes($style) . " " . sanitize_html_class($align) . " " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($animation_delay, $animation_iteration) . "><h" . esc_attr($type) . " class='title' " . $color . ">" . do_shortcode($content) . "</h" . esc_attr($type) . "></div>";
}
Esempio n. 8
0
 /**
  * Captures helpmode message
  */
 public function capture()
 {
     $out = '';
     $helpmode_enabled = g1_get_theme_option('general', 'helpmode', 'none');
     if (!current_user_can('administrator') || $helpmode_enabled === 'none') {
         return $out;
     }
     $final_id = $this->get_id();
     $final_class = array('g1-helpmode', 'g1-type-' . $this->get_type());
     // Compose the template
     $out = '<div id=%ID% class="%CLASS%">' . '<div class="g1-helpmode-title">
                     <span></span>%TITLE%
                 </div>' . '<div class="g1-helpmode-content">' . '%CONTENT%' . '</div>' . '</div>';
     // Fill in the template
     $out = str_replace(array('%ID%', '%CLASS%', '%TITLE%', '%CONTENT%'), array(esc_attr($final_id), sanitize_html_classes($final_class), esc_html($this->get_title()), $this->get_content()), $out);
     return $out;
 }
Esempio n. 9
0
 function render()
 {
     $class = !empty($this->field['class']) ? $this->field['class'] : '';
     $base_id = $this->field['id'];
     $base_name = $this->args['opt_name'] . '[' . $this->field['id'] . ']';
     $inputs = array('tl' => __('Left-Top corner', Redux_TEXT_DOMAIN), 'tr' => __('Right-Top corner', Redux_TEXT_DOMAIN), 'br' => __('Right-Bottom corner', Redux_TEXT_DOMAIN), 'bl' => __('Left-Bottom corner', Redux_TEXT_DOMAIN));
     $classes = array($class, 'g1-border-radius');
     echo '<div class="' . sanitize_html_classes($classes) . '">';
     echo '<div class="g1-configurator" data-g1-classes="g1-type-square,g1-type-squircle,g1-type-circle">';
     echo '<div class="g1-border g1-tl" data-g1-corner="tl"></div>';
     echo '<div class="g1-border g1-tr" data-g1-corner="tr"></div>';
     echo '<div class="g1-border g1-bl" data-g1-corner="bl"></div>';
     echo '<div class="g1-border g1-br" data-g1-corner="br"></div>';
     echo '</div>';
     foreach ($inputs as $name => $label) {
         $value = !empty($this->value[$name]) ? $this->value[$name] : '';
         $class = 'g1-border-radius-value-' . $name;
         echo '<input type="hidden" id="' . esc_attr($base_id . '_' . $name) . '" name="' . esc_attr($base_name . '[' . $name . ']') . '" value="' . esc_attr($value) . '" class="' . sanitize_html_class($class) . '" />';
     }
     echo '</div>';
     echo !empty($this->field['desc']) ? ' <span class="description">' . esc_html($this->field['desc']) . '</span>' : '';
 }
Esempio n. 10
0
function ts_image_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'img_url' => '', 'caption' => '', 'img_link' => '', 'style' => '', 'width' => '', 'height' => '', 'align' => '', 'output' => '', 'hover_border' => '', 'hover_opacity' => '', 'frame' => ''), $atts));
    $attachment_id = $img_url;
    $image_attributes = wp_get_attachment_image_src($attachment_id, 'full');
    // returns an array
    if (isset($image_attributes[0])) {
        $img_url = $image_attributes[0];
    }
    //$output .= $img_url;
    $img_url = get_xv_resizer($img_url, $width, $height);
    if (!empty($img_link)) {
        $output .= "<a class='frame-hover " . esc_attr($hover_border) . "' href='" . esc_url($img_link) . "' >";
    }
    $output .= "<div class='" . sanitize_html_classes($frame) . " " . esc_attr($style) . " " . esc_attr($align) . " " . esc_attr($hover_opacity) . "'>\n\t\t\t\t\t<img  alt='" . esc_attr($caption) . "' src='" . esc_url($img_url) . "'>\n\t\t\t\t</div>";
    if (!empty($img_link)) {
        $output .= "</a>";
    }
    if (!empty($caption)) {
        $output .= "<div class='caption'>{$caption}</div>";
    }
    return '<div ' . ts_get_animation_class($animation, true) . ' ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '>' . $output . '</div>';
}
Esempio n. 11
0
 /**
  * Shortcode callback function.
  *
  * @return string
  */
 protected function do_shortcode()
 {
     extract($this->extract());
     $content = preg_replace('#^<\\/p>|<p>$#', '', $content);
     // Compose final HTML id attribute
     $final_id = strlen($id) ? $id : 'g1-quote-' . $this->get_counter();
     // Compose final HTML class attribute
     $final_class = array('g1-quote', 'g1-quote--' . $style, 'g1-quote--' . $size);
     $final_class = array_merge($final_class, explode(' ', $class));
     $width = 40;
     $height = 40;
     if (strlen($author_image)) {
         $author_image = sprintf('<img src="%s" width="%d" height="%d" alt="%s"/>', esc_url($author_image), $width, $height, esc_attr('Author\'s image'));
     } else {
         $author_image = '<span class="g1-quote__image"></span>';
     }
     if (strlen($author_name)) {
         $author_name = '<strong>' . esc_html($author_name) . '</strong>';
     }
     if (strlen($author_description)) {
         $author_description = '<span>' . esc_html($author_description) . '</span>';
     }
     $figcaption = '';
     if ($author_image || $author_name || $author_description) {
         $figcaption = '<figcaption class="g1-meta">' . $author_image . $author_name . $author_description . '</figcaption>';
     }
     // Compose the template
     $out = '<figure %id%%class%>' . '<div class="g1-inner">' . '%content%' . '</div>' . '%figcaption%' . '</figure>';
     // Fill in the template
     $out = str_replace(array('%id%', '%class%', '%content%', '%figcaption%'), array(strlen($final_id) ? 'id="' . esc_attr($final_id) . '" ' : '', count($final_class) ? 'class="' . sanitize_html_classes($final_class) . '" ' : '', do_shortcode($content), $figcaption), $out);
     return $out;
 }
Esempio n. 12
0
 /**
  * Returns a simple slider markup
  *
  * @param string $id The id attribute
  * @param integer $width Slider width
  * @param integer $height Slider height
  * @param array $config Slider configuration
  * @param array $slides
  * @return string
  */
 public function capture($slides, $config, $args)
 {
     static $counter = 0;
     $counter++;
     $out = '';
     if (!count($slides)) {
         return '';
     }
     // clean arguments
     $args['id'] = !empty($args['id']) ? $args['id'] : 'g1-slider-counter-' . $counter;
     $args['class'] = !empty($args['class']) ? $args['class'] : '';
     $args['width'] = absint($args['width']);
     $args['height'] = absint($args['height']);
     // clean options
     $config['layout'] = $this->sanitize_string_var($config['layout']);
     $config['width'] = $this->sanitize_string_var($config['width']);
     $config['height'] = 320;
     if (is_numeric($config['height'])) {
         $config['height'] = absint($config['height']);
     }
     $config['animation'] = $this->sanitize_string_var($config['animation']);
     $config['animation'] = str_replace('-', '_', $config['animation']);
     $config['animationDuration'] = absint($config['animationDuration']);
     $config['slideshowSpeed'] = absint($config['slideshowSpeed']);
     $config['autoplay'] = $this->sanitize_string_var($config['autoplay']);
     $config['fullscreen'] = $this->sanitize_string_var($config['fullscreen']);
     $config['coinNavigation'] = $this->sanitize_string_var($config['coinNavigation']);
     $config['directionNavigation'] = $this->sanitize_string_var($config['directionNavigation']);
     $config['progressBar'] = $this->sanitize_string_var($config['progressBar']);
     $config['width_in_px'] = G1_Simple_Sliders_Module::get_slider_width_in_pixels($config['width']);
     switch ($config['width']) {
         case '':
             break;
     }
     // set defaults if needed
     $config_defaults = $this->get_default_config();
     foreach ($config as $key => $value) {
         if (empty($value)) {
             $config[$key] = $config_defaults[$key];
         }
     }
     $final_class = array('g1-simple-slider', 'g1-slider-not-ready', 'g1-simple-slider-' . $config['layout']);
     $final_class = array_merge($final_class, explode(' ', $args['class']));
     // Remove empty strings
     $final_class = array_filter($final_class);
     $final_class[] = 'g1-width-' . str_replace('g1_simple_slider_', '', $config['width']);
     $final_class[] = 'g1-nav-direction-' . $config['directionNavigation'];
     $final_class[] = 'g1-nav-coin-' . $config['coinNavigation'];
     $final_class[] = 'g1-fullscreen-' . $config['fullscreen'];
     $final_class[] = 'g1-progress-' . $config['progressBar'];
     // Install Simple Slider. Not every page needs to load additional javascrips
     add_action('wp_footer', 'g1_simple_slider_wp_footer');
     $out .= '<div id="' . esc_attr($args['id']) . '" class="' . sanitize_html_classes($final_class) . '" data-config="' . g1_data_capture($config) . '">';
     $out .= '<div class="g1-inner">';
     $out .= '<ol class="g1-slides">' . "\n";
     foreach ($slides as $i => $slide) {
         // Default slide configuration
         $x = array('layout' => 'default', 'width' => $args['width'], 'height' => $args['height']);
         // Cascade configuration
         $x = array_merge($x, $slide);
         // Check for an empty link
         $x['linking'] = strlen($x['link']) ? $x['linking'] : 'none';
         $media = '<img src="' . esc_url($x['src']) . '" ' . 'width="' . absint($x['width']) . '" ' . 'height="' . absint($x['height']) . '" ' . 'alt="' . esc_url($x['src']) . '" ' . '/>';
         switch ($x['linking']) {
             case 'none':
                 break;
             case 'new_window':
             case 'new-window':
                 $media = '<a href="' . esc_url($x['link']) . '" class="g1-new-window">' . do_shortcode('[indicator type="new-window"]') . $media . '</a>';
                 break;
             case 'lightbox':
                 $media = '<a href="' . esc_url($x['link']) . '">' . do_shortcode('[indicator type="zoom"]') . $media . '</a>';
                 break;
             default:
                 $media = '<a href="' . esc_url($x['link']) . '">' . do_shortcode('[indicator type="document"]') . $media . '</a>';
                 break;
         }
         $media = '<div>' . $media . '</div>';
         $desc = '';
         if (strlen($x['title'] || strlen($x['content']))) {
             $desc .= '<figcaption>' . "\n" . '<div class="g1-slide__title">' . '<div class="g1-h1">' . $x['title'] . '</div>' . '<div class="g1-background"></div>' . '</div>' . '<div class="g1-slide__description">' . '<div class="g1-h3">' . do_shortcode($x['content']) . '</div>' . '<div class="g1-background"></div>' . '</div>' . '</figcaption>' . "\n";
         }
         $final_class = array('g1-slide');
         if (0 == $i) {
             $final_class[] = 'g1-selected';
         }
         $out .= '<li class="' . sanitize_html_classes($final_class) . '" data-g1-linking="' . esc_attr($x['linking']) . '">' . "\n" . '<figure>' . "\n" . $media . $desc . '</figure>' . "\n" . '</li>' . "\n";
     }
     $out .= '</ol>' . "\n";
     if ('none' !== $config['coinNavigation']) {
         // thumbnails
         $out .= '<ol class="g1-nav-coin">' . "\n";
         foreach ($slides as $slide) {
             $thumb = wp_get_attachment_image_src($slide['id'], 'g1_one_twelfth');
             if ($thumb) {
                 $src = $thumb[0];
                 $width = $thumb[1];
                 $height = $thumb[2];
                 $out .= '<li>' . "\n";
                 $out .= '<a>' . "\n";
                 $out .= '<img src="' . esc_url($src) . '" width="' . absint($width) . '" height="' . absint($height) . '" />' . "\n";
                 $out .= '</a>' . "\n";
                 $out .= '</li>' . "\n";
             }
         }
         $out .= '</ol>' . "\n";
     }
     $out .= '</div>' . "\n";
     $out .= '</div><!-- END .g1-slider -->';
     return $out;
 }
Esempio n. 13
0
 protected static function format_row($row, $post_url, $index)
 {
     $out = '';
     $row = strip_tags(trim($row));
     if (self::author_specified($row)) {
         $row_parts = explode(self::$separator, trim($row), 2);
         $author = self::sanitize_author($row_parts[0]);
         $text = self::sanitize_text($row_parts[1]);
         $row_id = 'g1-chat-row-' . ($index + 1);
         $row_class = array('g1-chat-row', 'g1-chat-author-' . self::get_author_id($author));
         $author_class = array('g1-chat-author', strtolower('g1-chat-author-' . $author));
         $index = ++self::$row_counter;
         $out = '<li id ="' . esc_attr($row_id) . '" class="' . sanitize_html_classes($row_class) . '">';
         $out .= '<div class="' . sanitize_html_classes($author_class) . '">';
         $out .= '<a href="' . esc_url($post_url) . '#' . esc_attr($row_id) . '">#</a>';
         $out .= '<strong>' . esc_html($author) . '</strong>';
         $out .= '</div>';
         $out .= '<div class="g1-chat-text">';
         $out .= esc_html($text);
         $out .= '</div>';
         $out .= '</li>';
     } else {
         if (!empty($row)) {
             $text = self::sanitize_text($row);
             $out = '<div class="g1-chat-row">';
             $out .= '<div class="g1-chat-text">' . esc_html($text) . '</div>';
             $out .= '</div>';
         }
     }
     return $out;
 }
Esempio n. 14
0
            $button_style = 'btn-border-w';
        }
        $header_button_target = ts_get_opt('header-button-target') ? ts_get_opt('header-button-target') : '_blank';
        ?>
						<li>
							<a class="header-button" href="<?php 
        echo esc_url(ts_get_opt('header-button-link'));
        ?>
" target="<?php 
        echo esc_attr($header_button_target);
        ?>
"><span class="btn btn-mod btn-circle <?php 
        echo sanitize_html_classes($button_style);
        ?>
"><?php 
        echo ts_get_opt('header-button-icon') ? '<i class="' . sanitize_html_classes(ts_get_opt('header-button-icon')) . '"></i> ' : '';
        echo esc_html(ts_get_opt('header-button-text'));
        ?>
</span></a>
							<?php 
        ?>
						</li>
					<?php 
    }
    ?>
				</ul>
				
			</div>
			<!-- End Main Menu -->
		</div>
	</nav>
Esempio n. 15
0
$g1_data = g1_part_get_data();
$g1_query = $g1_data['query'];
$g1_query = $g1_query ? $g1_query : $wp_query;
$g1_collection = $g1_data['collection'];
$g1_elems = $g1_data['elems'];
$g1_options = !empty($g1_data['options']) ? $g1_data['options'] : array();
$g1_counter = 0;
?>

<?php 
do_action('g1_collection_before', $g1_collection, $g1_query);
?>

<!-- BEGIN: .g1-collection -->
<div class="<?php 
echo sanitize_html_classes($g1_collection->get_classes());
?>
">
    <ul>
    <?php 
while ($g1_query->have_posts()) {
    $g1_query->the_post();
    ?>
        <li class="g1-collection__item">
        <?php 
    // Our tricky way to pass variables to a template part
    g1_part_set_data(array('collection' => $g1_collection, 'elems' => $g1_elems, 'options' => $g1_options));
    get_template_part('template-parts/g1_content_list_item');
    ?>
        </li>
        <?php 
Esempio n. 16
0
/**
 * Outputs promo panel
 */
function progressive_promo_panel()
{
    $xv_data = ts_get_redux_data();
    if (ts_check_if_display('promo_panel')) {
        ?>
			<div class="top-fixed-box">
				<div class="container">
					<div class="contact-box pull-left">
						<div class="phone pull-left">
							<?php 
        if (!empty($xv_data['promo_panel_icon_1'])) {
            ?>
								<i class="<?php 
            echo sanitize_html_classes($xv_data['promo_panel_icon_1']);
            ?>
"></i>
							<?php 
        }
        ?>
							<?php 
        echo wp_kses_data($xv_data['promo_panel_text_1']);
        ?>
						</div>
						<div class="email pull-left">
							<?php 
        if (!empty($xv_data['promo_panel_icon_2'])) {
            ?>
								<i class="<?php 
            echo sanitize_html_classes($xv_data['promo_panel_icon_2']);
            ?>
"></i>
							<?php 
        }
        ?>
							<?php 
        echo wp_kses_data($xv_data['promo_panel_text_2']);
        ?>
						</div>
					</div>

					<div class="pull-right">
						<div class="social">
							<?php 
        if (!empty($xv_data['promo_panel_facebook'])) {
            ?>
								<a class="sbtnf sbtnf-rounded color color-hover icon-facebook" href="<?php 
            echo esc_url($xv_data['promo_panel_facebook']);
            ?>
"></a>
							<?php 
        }
        ?>
							<?php 
        if (!empty($xv_data['promo_panel_twitter'])) {
            ?>
								<a class="sbtnf sbtnf-rounded color color-hover icon-twitter" href="<?php 
            echo esc_url($xv_data['promo_panel_twitter']);
            ?>
"></a>
							<?php 
        }
        ?>
							<?php 
        if (!empty($xv_data['promo_panel_google_plus'])) {
            ?>
								<a class="sbtnf sbtnf-rounded color color-hover icon-gplus" href="<?php 
            echo esc_url($xv_data['promo_panel_google_plus']);
            ?>
"></a>
						<?php 
        }
        ?>
						<?php 
        if (!empty($xv_data['promo_panel_linkedin'])) {
            ?>
								<a class="sbtnf sbtnf-rounded color color-hover icon-linkedin" href="<?php 
            echo esc_url($xv_data['promo_panel_linkedin']);
            ?>
"></a>
						<?php 
        }
        ?>
						</div>
						<?php 
        if (!empty($xv_data['promo_panel_button_label'])) {
            ?>
							<a href="<?php 
            echo esc_url($xv_data['promo_panel_button_url']);
            ?>
" class="btn btn-primary"><?php 
            echo esc_html($xv_data['promo_panel_button_label']);
            ?>
</a>
						<?php 
        }
        ?>
					</div>
					<div class="clearfix"></div>
				</div>
			</div>
		<?php 
    }
}
Esempio n. 17
0
				</div>
			</div>
			<!-- End FAQ Items -->
			<?php 
    ?>

		<?php 
} else {
    //No posts were found
    wp_reset_postdata();
    ?>

			<div>
				<div class="<?php 
    echo sanitize_html_classes($search_class);
    ?>
">
					<div class="section-text align-center">
						<?php 
    get_template_part('templates/content/content', 'none');
    ?>

					</div>
				</div>
			</div>
		<?php 
}
?>

Esempio n. 18
0
 /**
  * Shortcode callback function.
  *
  * @return string
  */
 protected function do_shortcode()
 {
     $this->test_dependencies();
     extract($this->extract());
     $content = preg_replace('#^<\\/p>|<p>$#', '', $content);
     // Compose final HTML id attribute
     $final_id = strlen($id) ? $id : 'g1-mailchimp-counter-' . $this->get_counter();
     // Compose final HTML class attribute
     $final_class = array('g1-mailchimp');
     add_action('wp_footer', array($this, 'enqueue_scripts'));
     $form = '';
     $form .= '<form action="' . esc_url($_SERVER['PHP_SELF']) . '" method="post">';
     if (G1_Mailchimp_Module()->get_debug_mode()) {
         $form .= '<input type="hidden" name="g1_debug_mode" value="on" />';
     }
     $form .= '<input type="hidden" name="g1_mailing_list" value="' . esc_attr($mailing_list) . '" />';
     $form .= '<div class="g1-form-row g1-mailchimp-subscriber-email">';
     $form .= '<label for="g1-subscriber-email">' . __('Your Email', 'g1_theme') . '</label>';
     $form .= '<input id="g1-subscriber-email-' . $this->get_counter() . '" type="text" name="g1_subscriber_email" />';
     $form .= '</div>';
     $form .= '<div class="g1-form-actions">';
     $form .= '<input type="submit" value="' . __('Subscribe', 'g1_theme') . '" />';
     $form .= '</div>';
     $form .= '</form>';
     $out = '<div id="' . esc_attr($final_id) . '" class="' . sanitize_html_classes($final_class) . '">' . "\n";
     $out .= '<div class="g1-mailchimp__intro">';
     $out .= do_shortcode(shortcode_unautop($content));
     $out .= '</div>';
     $out .= '<div class="g1-subscription-status"></div>' . "\n";
     $out .= $form;
     $out .= '</div>' . "\n";
     return $out;
 }
Esempio n. 19
0
    echo sanitize_html_classes($style_class);
    ?>
" <?php 
    echo true === $add_bg ? 'style="background-image: url(' . esc_url($background['url']) . ');"' : '';
    ?>
>
		<div class="relative container align-center">
			<?php 
    rhythm_breadcrumbs('align-center');
    ?>
			<?php 
    $subtitle = rhythm_get_subtitle();
    if (!empty($subtitle)) {
        ?>
				<h1 class="hs-line-11 font-alt mb-0 <?php 
        echo sanitize_html_classes($subtitle_class);
        ?>
">
					<?php 
        echo wp_kses_data($subtitle);
        ?>
				</h1>
			<?php 
    }
    ?>
		</div>
	</section>
	<!-- End Title Wrapper Section -->
<?php 
}
get_template_part('templates/title/parts/search');
Esempio n. 20
0
 /**
  * Start the element output.
  *
  * @see Walker::start_el()
  *
  * @since 3.0.0
  *
  * @param string $output Passed by reference. Used to append additional content.
  * @param object $item   Menu item data object.
  * @param int    $depth  Depth of menu item. Used for padding.
  * @param array  $args   An array of arguments. @see wp_nav_menu()
  * @param int    $id     Current item ID.
  */
 public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
 {
     //set curret item to use in start_lvl
     $this->current_item = $item;
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     $classes[] = 'menu-item-' . $item->ID;
     /**
      * Filter the CSS class(es) applied to a menu item's <li>.
      *
      * @since 3.0.0
      *
      * @see wp_nav_menu()
      *
      * @param array  $classes The CSS classes that are applied to the menu item's <li>.
      * @param object $item    The current menu item.
      * @param array  $args    An array of wp_nav_menu() arguments.
      */
     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item, $args));
     $class_names = $class_names ? ' class="' . sanitize_html_classes($class_names) . '"' : '';
     /**
      * Filter the ID applied to a menu item's <li>.
      *
      * @since 3.0.1
      *
      * @see wp_nav_menu()
      *
      * @param string $menu_id The ID that is applied to the menu item's <li>.
      * @param object $item    The current menu item.
      * @param array  $args    An array of wp_nav_menu() arguments.
      */
     $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args);
     $id = $id ? ' id="' . esc_attr($id) . '"' : '';
     $output .= $indent . '<li' . $id . $class_names . '>';
     if ($item->hide != 'enabled') {
         $atts = array();
         $atts['title'] = !empty($item->attr_title) ? $item->attr_title : '';
         $atts['target'] = !empty($item->target) ? $item->target : '';
         $atts['rel'] = !empty($item->xfn) ? $item->xfn : '';
         $atts['href'] = !empty($item->url) ? $item->url : '';
         $atts['class'] = ' ';
         //item has children
         if ($depth == 0 && $item->hasChildren) {
             $atts['class'] .= 'fm-has-sub ';
         }
         /**
          * Filter the HTML attributes applied to a menu item's <a>.
          *
          * @since 3.6.0
          *
          * @see wp_nav_menu()
          *
          * @param array $atts {
          *     The HTML attributes applied to the menu item's <a>, empty strings are ignored.
          *
          *     @type string $title  Title attribute.
          *     @type string $target Target attribute.
          *     @type string $rel    The rel attribute.
          *     @type string $href   The href attribute.
          * }
          * @param object $item The current menu item.
          * @param array  $args An array of wp_nav_menu() arguments.
          */
         $atts = apply_filters('nav_menu_link_attributes', $atts, $item, $args);
         $attributes = '';
         foreach ($atts as $attr => $value) {
             if (!empty($value)) {
                 $value = 'href' === $attr ? esc_url($value) : esc_attr($value);
                 $attributes .= ' ' . $attr . '="' . $value . '"';
             }
         }
         $item_output = $args->before;
         $item_output .= '<a' . $attributes . '>';
         if (!empty($item->icon)) {
             if (strstr($item->icon, 'fa fa-')) {
                 $icon = $item->icon;
             } else {
                 $icon = 'fa ' . $item->icon;
             }
             $item_output .= '<i class="' . sanitize_html_classes($icon) . ' fa-sm"></i> ';
         }
         /** This filter is documented in wp-includes/post-template.php */
         $navigation_label = '';
         if ($item->hide_navigation_label != 'enabled' || $depth != 0) {
             $navigation_label = apply_filters('the_title', $item->title, $item->ID);
         }
         $item_output .= $args->link_before . $navigation_label . $args->link_after;
         if ($depth == 0 && $item->hasChildren) {
             $item_output .= ' <i class=" fa fa-angle-down"></i>';
         }
         $item_output .= '</a>';
         $item_output .= $args->after;
     } else {
         $item_output = '';
     }
     /**
      * Filter a menu item's starting output.
      *
      * The menu item's starting output only includes $args->before, the opening <a>,
      * the menu item's title, the closing </a>, and $args->after. Currently, there is
      * no filter for modifying the opening and closing <li> for a menu item.
      *
      * @since 3.0.0
      *
      * @see wp_nav_menu()
      *
      * @param string $item_output The menu item's starting HTML output.
      * @param object $item        Menu item data object.
      * @param int    $depth       Depth of menu item. Used for padding.
      * @param array  $args        An array of wp_nav_menu() arguments.
      */
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
 }
Esempio n. 21
0
/**
 * Get font array
 * @param bool $bNoIconChoice
 * @param array $add_icons
 * @param bool $return_theme_options
 * @return array
 */
function ts_getFontAwesomeArray($bNoIconChoice = false, $add_icons = null, $return_theme_options = false)
{
    $icons = array();
    $icons[__('None', 'framework')] = '';
    if (is_array($add_icons)) {
        foreach ($add_icons as $key => $icon) {
            $icons[$key] = '<span class="' . sanitize_html_classes($icon) . '"></span>' . $icon;
        }
    }
    if (file_exists(get_template_directory() . '/css/fontello.css')) {
        //$pattern = '/\.(icon-(?:\w+(?:-)?)+)/';
        require_once get_template_directory() . '/framework/icons.php';
        $fontello = ts_get_fontello_array();
        if (is_array($fontello)) {
            foreach ($fontello as $key => $val) {
                $icons[$key] = $val;
            }
        }
    }
    if (count($icons) > 0) {
        $icons_return = array();
        if ($bNoIconChoice === true) {
            $icons_return['no'] = __('no icon', 'framework');
        }
        $icons_return = array_merge($icons_return, $icons);
        if ($return_theme_options) {
            $icons_theme_options = array();
            foreach ($icons_return as $key => $icon) {
                $icons_theme_options[] = array('value' => $key, 'label' => $icon, 'src' => '');
            }
            return $icons_theme_options;
        }
        return $icons_return;
    }
    return array(__('empty', 'framework') => __('empty', 'framework'));
}
Esempio n. 22
0
function ts_pricing_table_func($atts, $content = null)
{
    //$output = $title = $values = $units = $bgcolor = $custombgcolor = $options = $el_class = '';
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'subtitle' => 'Starting at', 'price' => '199$', 'duration' => 'monthly', 'livicon' => 'shopping-cart', 'style' => '', 'more_btn' => '', 'more_url' => '', 'stars' => '80', 'table_btn_text' => 'Read More', 'table_btn_url' => '', 'values' => '', 'checked' => ''), $atts));
    wp_enqueue_script('waypoints');
    $output = '';
    $textAr = explode("\n", $values);
    $textAr = array_filter($textAr, 'trim');
    // remove any extra \r characters left behind
    ob_start();
    if ($style == 'info') {
        $table_style = 'prising-info';
    } else {
        $table_style = 'pricing-' . $style;
    }
    ?>
  

	<div class='pricing <?php 
    echo sanitize_html_classes($table_style);
    ?>
 <?php 
    echo ts_get_animation_class($animation);
    ?>
' <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class='title'><a href='#'><?php 
    echo esc_html($title);
    ?>
</a></div>
		<div class='price-box'>
			<div class='icon pull-right border circle'>
				<span class="livicon" data-n="<?php 
    echo esc_attr($livicon);
    ?>
" data-s="32" data-c="#1e1e1e" data-hc="0"></span>
			</div>
			<div class='starting'><?php 
    echo esc_html($subtitle);
    ?>
</div>
			<div class='price'><?php 
    echo esc_html($price);
    ?>
<span>/<?php 
    echo esc_html($duration);
    ?>
</span></div>
		</div>
		<ul class='options'>
	<?php 
    if (is_array($textAr)) {
        foreach ($textAr as $line) {
            if ($line[0] == '*') {
                $line = substr($line, 1);
                echo "<li class='active'><span><i class='icon-check'></i></span>" . wp_kses_post($line) . "</li>";
            } else {
                echo "<li><span><i class='icon-check'></i></span>" . wp_kses_post($line) . "</li>";
            }
        }
    }
    ?>
	</ul>
	<div class='bottom-box'>
		<?php 
    if (!empty($more_btn)) {
        ?>
				<a href='<?php 
        echo esc_url($more_url);
        ?>
' class='more'><?php 
        echo esc_html($more_btn);
        ?>
<span class='fa fa-angle-right'></span></a>
			<?php 
    }
    ?>
			<div class='rating-box'>
				<div style='width: <?php 
    echo esc_attr($stars);
    ?>
%' class='rating'>
					<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='73px' height='12px' viewBox='0 0 73 12' enable-background='new 0 0 73 12' xml:space='preserve'>
						<polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='6.5,0 8,5 13,5 9,7.7 10,12 6.5,9.2 3,12 4,7.7 0,5 5,5'></polygon>
						<polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='66.5,0 68,5 73,5 69,7.7 70,12 66.5,9.2 63,12 64,7.7 60,5 65,5 '></polygon>
						<polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='21.5,0 23,5 28,5 24,7.7 25,12 21.5,9.2 18,12 19,7.7 15,5 20,5 '></polygon>
						<polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='51.5,0 53,5 58,5 54,7.7 55,12 51.5,9.2 48,12 49,7.7 45,5 50,5 '></polygon>
						<polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='36.5,0 38,5 43,5 39,7.7 40,12 36.5,9.2 33,12 34,7.7 30,5 35,5 '></polygon>
					</svg>
				</div>
			</div>
			<?php 
    if (!empty($table_btn_text)) {
        ?>
				<a href='<?php 
        echo esc_url($table_btn_url);
        ?>
' class='btn btn-default btn-lg btn-<?php 
        echo esc_attr($style);
        ?>
'><?php 
        echo esc_html($table_btn_text);
        ?>
</a>
			<?php 
    }
    ?>
		</div>
	</div><!-- .pricing -->
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Esempio n. 23
0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $woocommerce, $product;
if (!$product->is_purchasable()) {
    return;
}
?>

<?php 
// Availability
$availability = $product->get_availability();
if ($availability['availability']) {
    echo apply_filters('woocommerce_stock_html', '<p class="stock ' . sanitize_html_classes($availability['class']) . '">' . esc_html($availability['availability']) . '</p>', $availability['availability']);
}
?>

<?php 
if ($product->is_in_stock()) {
    ?>

	<?php 
    do_action('woocommerce_before_add_to_cart_form');
    ?>

	<form class="cart" method="post" enctype='multipart/form-data'>
		<?php 
    do_action('woocommerce_before_add_to_cart_button');
    ?>
        ?>
">
                    <?php 
        echo $g1_item['html'];
        ?>
                </li>
            <?php 
    }
    ?>
        </ol>
        <ol class="g1-lightbox-data">
            <?php 
    foreach ($g1_mediabox_lightbox as $g1_index => $g1_item) {
        ?>
                <li class="<?php 
        echo sanitize_html_classes($g1_item['class']);
        ?>
">
                    <?php 
        echo $g1_item['html'];
        ?>
                </li>
            <?php 
    }
    ?>
        </ol>

        <?php 
    /* Executes a custom hook.
     * If you want to add some content at the end of a mediabox
     * hook into the 'g1_mediabox_end' action.
Esempio n. 25
0
 /**
  * Shortcode callback function.
  *
  * @return string
  */
 protected function do_shortcode()
 {
     extract($this->extract());
     $counter = $this->contact_form_counter !== null ? $this->contact_form_counter : $this->get_counter();
     // Compose final HTML id attribute
     $final_id = strlen($id) ? $id : 'contact-form-counter-' . $counter;
     // Compose final HTML class attribute
     $final_class = array('contact-form');
     if (strlen($class) > 0) {
         $final_class[] = $class;
     }
     if (!empty($submit_method) && $submit_method === 'ajax') {
         $final_class[] = 'g1-ajax-submit';
     }
     add_action('wp_footer', array($this, 'enqueue_scripts'));
     if (!strlen($email)) {
         $email = get_option('admin_email');
     }
     if (!strlen($name)) {
         $name = get_option('blogname');
     }
     if (!strlen($subject)) {
         $subject = __('Website Contact Form', 'g1_theme');
     }
     if (!strlen($success)) {
         $success = __('We have received your email. Thank you.', 'g1_theme');
     }
     if (!strlen($failure)) {
         $failure = __('Ooops, something has gone wrong.', 'g1_theme');
     }
     $errors = array();
     $email_sent = null;
     // Captcha vars
     $captcha_n1 = rand(1, 15);
     $captcha_n2 = rand(1, 15);
     $captcha_hidden_hash = $this->encode_captcha($captcha_n1 + $captcha_n2);
     $field_ids = array('name' => 'contact_form_name_' . $counter, 'email' => 'contact_form_email_' . $counter, 'message' => 'contact_form_message_' . $counter, 'captcha' => 'contact_form_captcha_' . $counter, 'captcha_hash' => 'contact_form_captcha_hash_' . $counter, 'data' => 'contact_form_data');
     // Initialize data
     $field_name = '';
     $field_email = '';
     $field_message = '';
     $field_captcha = '';
     // Check if form has been submitted
     if (isset($_POST['contact_form_submit_' . $counter])) {
         $form_fields = array();
         // Strip input data (remove slashes added by WP)
         foreach ($field_ids as $id => $name) {
             if (isset($_POST[$name])) {
                 $form_fields[$id] = stripslashes_deep($_POST[$name]);
             }
         }
         // Sanitize input data
         $field_name = trim($form_fields['name']);
         $field_email = trim($form_fields['email']);
         $field_message = trim($form_fields['message']);
         $field_captcha = trim($form_fields['captcha']);
         $field_captcha_hash = trim($form_fields['captcha_hash']);
         // Validate input data
         if (strlen($field_name) < 2) {
             $errors['name'] = true;
         }
         if (is_email($field_email) !== $field_email) {
             $errors['email'] = true;
         }
         if (strlen($field_message) < 2) {
             $errors['message'] = true;
         }
         if ($this->encode_captcha($field_captcha) != $field_captcha_hash) {
             $errors['captcha'] = true;
         }
         if (!count($errors)) {
             // Send email
             $headers = 'From: ' . sanitize_mail_header($field_name) . ' <' . sanitize_mail_header($field_email) . '>' . "\r\n";
             $email_sent = wp_mail($email, $subject, $field_message, $headers);
             // clear form fields
             $field_name = '';
             $field_email = '';
             $field_message = '';
         }
     }
     // Compose output
     $out = '';
     $out .= '<form action="' . get_permalink() . '#' . esc_attr($final_id) . '" method="post" id="' . esc_attr($final_id) . '" class="' . sanitize_html_classes($final_class) . '">';
     // Notification message
     if ($email_sent === true) {
         $out .= do_shortcode(sprintf('[message type="%s"]%s[/message]', 'success', esc_html($success)));
     } elseif ($email_sent === false) {
         $out .= do_shortcode(sprintf('[message type="%s"]%s[/message]', 'error', esc_html($failure)));
     }
     if (count($errors)) {
         $out .= do_shortcode(sprintf('[message type="%s"]%s[/message]', 'warning', esc_html(__('Please correct the errors on this form.', 'g1_theme'))));
     }
     // Name field
     $_class = array('form-row');
     $_msg = '';
     if (isset($errors['name'])) {
         $_class[] = 'form-row-error';
         $_msg = '<div class="form-message">' . esc_html(__('Please enter your name', 'g1_theme')) . '</div>';
     }
     $out .= '<div class="' . sanitize_html_classes($_class) . '">' . '<label for="' . esc_attr($field_ids['name']) . '">' . esc_html(__('Name', 'g1_theme')) . ' ' . '<em class="meta">' . __('(required)', 'g1_theme') . '</em>' . '</label>' . $_msg . '<input type="text" id="' . esc_attr($field_ids['name']) . '" name="' . esc_attr($field_ids['name']) . '" value="' . esc_attr($field_name) . '" />' . '</div>';
     // Email field
     $_class = array('form-row');
     $_msg = '';
     if (isset($errors['email'])) {
         $_class[] = 'form-row-error';
         $_msg = '<div class="form-message">' . esc_html(__('Please enter a valid email address', 'g1_theme')) . '</div>';
     }
     $out .= '<div class="' . sanitize_html_classes($_class) . '">' . '<label for="' . esc_attr($field_ids['email']) . '">' . esc_html(__('Email', 'g1_theme')) . '  ' . '<em class="meta">' . __('(required)', 'g1_theme') . '</em>' . '</label>' . $_msg . '<input type="text" id="' . esc_attr($field_ids['email']) . '" name="' . esc_attr($field_ids['email']) . '" value="' . esc_attr($field_email) . '" />' . '</div>';
     // Message field
     $_class = array('form-row');
     $_msg = '';
     if (isset($errors['message'])) {
         $_class[] = 'form-row-error';
         $_msg = '<div class="form-message">' . esc_html(__('Please leave a message', 'g1_theme')) . '</div>';
     }
     $out .= '<div class="' . sanitize_html_classes($_class) . '">' . '<label for="' . esc_attr($field_ids['message']) . '">' . esc_html(__('Message', 'g1_theme')) . ' ' . '<em class="meta">' . __('(required)', 'g1_theme') . '</em>' . '</label>' . $_msg . '<textarea id="' . esc_attr($field_ids['message']) . '" name="' . esc_attr($field_ids['message']) . '" rows="5" cols="5">' . esc_textarea($field_message) . '</textarea>' . '</div>';
     // Captcha field
     $_class = array('form-row');
     $_msg = '';
     if (isset($errors['captcha'])) {
         $_class[] = 'form-row-error';
         $_msg = '<div class="form-message">' . esc_html(__('Please enter a valid result', 'g1_theme')) . '</div>';
     }
     $out .= '<div class="' . sanitize_html_classes($_class) . '">' . '<label for="' . esc_attr($field_ids['captcha']) . '">' . esc_html($captcha_n1 . ' + ' . $captcha_n2 . ' ? ') . ' ' . '<em class="meta">' . __('(Are you human?)', 'g1_theme') . '</em>' . '</label>' . $_msg . '<input type="text" class="u-2" id="' . esc_attr($field_ids['captcha']) . '" name="' . esc_attr($field_ids['captcha']) . '" value="" />' . '</div>';
     // Hidden captcha hash
     $out .= '<fieldset>' . '<input type="hidden" id="' . esc_attr($field_ids['captcha_hash']) . '" name="' . esc_attr($field_ids['captcha_hash']) . '" value="' . esc_attr($captcha_hidden_hash) . '" />' . '</fieldset>';
     // Hidden config
     $encoded_data = serialize(array('id' => $id, 'class' => $class, 'name' => $name, 'email' => $email, 'subject' => $subject, 'success' => $success, 'failure' => $failure, 'counter' => $counter));
     $encoded_data = base64_encode($encoded_data);
     $out .= '<fieldset>' . '<input type="hidden" id="' . esc_attr($field_ids['data']) . '" name="' . esc_attr($field_ids['data']) . '" value="' . esc_attr($encoded_data) . '" />' . '</fieldset>';
     // Submit button
     $out .= '<div class="form-row">' . '<input type="submit" name="contact_form_submit_' . esc_attr($counter) . '" id="contact_form_submit_' . esc_attr($counter) . '" value="' . __('Submit', 'g1_theme') . '" />' . '</div>';
     $out .= '</form>';
     return $out;
 }
Esempio n. 26
0
            }
        }
        if (empty($current_url)) {
            $current_url = $url;
        }
        ?>

						
						<a href="<?php 
        echo esc_url($current_url);
        ?>
" target="<?php 
        echo esc_attr($target);
        ?>
" class="<?php 
        echo sanitize_html_classes($current_class);
        ?>
">
							<div class="work-img">
								<?php 
        if (has_post_thumbnail()) {
            the_post_thumbnail($current_image_size);
        }
        ?>

							</div>
							<div class="work-intro">
								<h3 class="work-title"><?php 
        the_title();
        ?>
</h3>
Esempio n. 27
0
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package Rhythm
 */
get_header();
ts_get_title_wrapper_template_part();
?>

<!-- Page Section -->
<section class="main-section page-section <?php 
echo sanitize_html_classes(ts_get_post_opt('page-margin-local'));
?>
">
	<div class="container relative">
		<?php 
get_template_part('templates/global/page-before-content');
?>
		<?php 
while (have_posts()) {
    the_post();
    ?>
			<?php 
    get_template_part('templates/content/content', 'page');
    ?>
			<?php 
    // If comments are open or we have at least one comment, load up the comment template
Esempio n. 28
0
    }
    //	$subtitle_class = '';
    //	if (in_array($style_class,array('bg-gray-lighter', 'bg-gray'))) {
    //		$subtitle_class = 'dark-subtitle';
    //	}
    //
    $background = ts_get_opt('title-wrapper-background');
    $background_data = '';
    $add_bg = false;
    if (is_array($background) && $background['url'] != '') {
        $add_bg = true;
    }
    ?>
	<!-- Title Wrapper Section -->
	<section class="small-section pb-30 <?php 
    echo sanitize_html_classes($style_class);
    ?>
" <?php 
    echo true === $add_bg ? 'style="background-image: url(' . esc_url($background['url']) . ');"' : '';
    ?>
>

		<div class="container align-center">
			<?php 
    $image_url = ts_get_opt_media('title-wrapper-image');
    if (!empty($image_url)) {
        ?>
				<div class="mb-10">
					<img src="<?php 
        echo esc_url($image_url);
        ?>
Esempio n. 29
0
function ts_workflow_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'title' => '', 'animation' => '', 'limit' => 5), $atts));
    ob_start();
    $current_animation_delay = $animation_delay;
    ?>

	<div class="bottom-padding <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
	<?php 
    if (!empty($title)) {
        ?>
			<div class="title-box text-center">
				<h1 class="title"><?php 
        echo esc_html($title);
        ?>
</h1>
			</div>
	<?php 
    }
    ?>
	<div class="steps">


		<?php 
    query_posts(array('post_type' => 'workflow', 'posts_per_page' => $limit));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $icon = get_post_meta(get_the_ID(), 'xv_workflow_icon', TRUE);
            $style = get_post_meta(get_the_ID(), 'xv_workflow_style', TRUE);
            ?>
				<div class="step text-center white <?php 
            echo sanitize_html_classes($style);
            ?>
">
					<div class="step-wrapper">
						<span class="livicon" data-n="<?php 
            echo esc_attr($icon);
            ?>
" data-s="48" data-c="#fff" data-hc="#f6f5f5"></span>
						<div class="title-box text-center title-white">
							<h4 class="title"><?php 
            the_title();
            ?>
</h4>
						</div>
						<p><?php 
            the_content();
            ?>
</p>
					</div>
				</div>
			<?php 
        }
    }
    wp_reset_query();
    ?>
		</div>
		<div class="clearfix"></div>
	</div>

	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Esempio n. 30
0
get_template_part('templates/global/page-before-content');
?>

		<?php 
if ($the_query->have_posts()) {
    ?>

			<div class="row masonry">
				<?php 
    /* Start the Loop */
    while ($the_query->have_posts()) {
        $the_query->the_post();
        ?>

					<div class="<?php 
        echo sanitize_html_classes($columns);
        ?>
">
						<?php 
        get_template_part('templates/blog-masonry/content', get_post_format());
        ?>

					</div>
				<?php 
    }
    ?>

			</div>
			<?php 
    wp_enqueue_script('masonry-pkgd');
    wp_enqueue_script('imagesloaded-pkgd');