Пример #1
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>';
}
Пример #2
0
function ts_team_func($atts)
{
    extract(shortcode_atts(array('name' => 'Mett Rayan', 'designation' => '', 'about' => '', 'member_img' => '', 'email' => '', 'phone' => '', 'facebook' => '', 'twitter' => '', 'gplus' => '', 'linkedin' => ''), $atts));
    ob_start();
    ?>
  
    <div class="rotation employee">
      <div class="default">
        <div class="image">
          <?php 
    if (!empty($member_img)) {
        $attachment_id = $member_img;
        $image_attributes = wp_get_attachment_image_src($attachment_id, "full");
        // returns an array
        $thumb = '';
        if (isset($image_attributes[0])) {
            $thumb = $image_attributes[0];
        }
    } else {
        $thumb = get_xv_resizer('', 270, 270);
    }
    echo "<img src='" . esc_url($thumb) . "' alt='" . esc_attr($name) . "'>";
    ?>
        </div>
        <div class="description">
          <div class="vertical">
            <h3 class="name"><?php 
    echo esc_html($name);
    ?>
</h3>
            <div class="role"><?php 
    echo esc_html($designation);
    ?>
</div>  
          </div>
        </div>
      </div>

      <div class="employee-hover">
        <h3 class="name"><?php 
    echo esc_html($name);
    ?>
</h3>
        <div class="role"><?php 
    echo esc_html($designation);
    ?>
</div>
        <div class="image">
          <?php 
    echo "<img src='" . esc_url($thumb) . "' alt='" . esc_attr($name) . "'>";
    ?>
        </div>
        <div>
          <p><?php 
    echo wp_kses_post($about);
    ?>
</p>
            <div class="contact"><b><?php 
    _e('Email', 'progressive');
    ?>
: </b><?php 
    echo esc_html($email);
    ?>
</div>
            <div class="contact"><b><?php 
    _e('Phone', 'progressive');
    ?>
: </b><?php 
    echo esc_html($phone);
    ?>
</div>
        </div>

          <div class="social">
            <?php 
    if (!empty($facebook)) {
        echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-facebook' href='" . esc_url($facebook) . "'></a></div>";
    }
    if (!empty($twitter)) {
        echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-twitter' href='" . esc_url($twitter) . "'></a></div>";
    }
    if (!empty($gplus)) {
        echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-gplus' href='" . esc_url($gplus) . "'></a></div>";
    }
    if (!empty($linkedin)) {
        echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-linkedin' href='" . esc_url($linkedin) . "'></a></div>";
    }
    ?>
          </div>
      </div><!-- .employee-hover -->
    </div>
 
<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Пример #3
0
function ts_team_text_func($atts, $content)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'name' => '', 'designation' => '', 'about' => '', 'member_img' => '', 'email' => '', 'phone' => '', 'facebook' => '', 'twitter' => '', 'gplus' => '', 'linkedin' => ''), $atts));
    ob_start();
    ?>
  
	<div class="bottom-padding <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class="row employee-single-rotation">
			<div class="col-sm-3 col-md-3 employee rotation pull-right">
				<div class="default">
					<div class="image">
						<?php 
    if (!empty($member_img)) {
        $attachment_id = $member_img;
        $image_attributes = wp_get_attachment_image_src($attachment_id, "full");
        // returns an array
        $thumb = $image_attributes[0];
    } else {
        $thumb = get_xv_resizer('', 270, 270);
    }
    echo '<img src="' . esc_url($thumb) . '" alt="' . esc_attr($name) . '">';
    ?>
					</div>
					<div class="description">
						<div class="vertical">
							<h3 class="name"><?php 
    echo esc_html($name);
    ?>
</h3>
							<div class="role"><?php 
    echo esc_html($designation);
    ?>
</div>  
						</div>
					</div>
				</div>

				<div class="employee-hover">
					<h3 class="name"><?php 
    echo esc_html($name);
    ?>
</h3>
					<div class="role"><?php 
    echo esc_html($designation);
    ?>
</div>
					<div class="image">
						<?php 
    echo '<img src="' . esc_url($thumb) . '" alt="' . esc_attr($name) . '">';
    ?>
					</div>
					<div>
						<p><?php 
    echo wp_kses_post($about);
    ?>
</p>
						<div class="contact"><b><?php 
    _e('Email', 'progressive');
    ?>
: </b><?php 
    echo esc_html($email);
    ?>
</div>
						<div class="contact"><b><?php 
    _e('Phone', 'progressive');
    ?>
: </b><?php 
    echo esc_html($phone);
    ?>
</div>
					</div>
					<div class="social">
						<?php 
    if (!empty($facebook)) {
        echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-facebook' href='" . esc_url($facebook) . "'></a></div>";
    }
    if (!empty($twitter)) {
        echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-twitter' href='" . esc_url($twitter) . "'></a></div>";
    }
    if (!empty($gplus)) {
        echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-gplus' href='" . esc_url($gplus) . "'></a></div>";
    }
    if (!empty($linkedin)) {
        echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-linkedin' href='" . esc_url($linkedin) . "'></a></div>";
    }
    ?>
					</div>
				</div><!-- .employee-hover -->
			</div>

			<div class="content-box">
				<?php 
    echo wp_kses_post($content);
    ?>
			</div>
		</div>
	</div>
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}