Opal-Estate-Pro/templates/single-property/sharebox.php

82 lines
4.9 KiB
PHP
Raw Permalink Normal View History

2019-09-10 06:27:33 +02:00
<?php
/**
* $Desc
*
* @version $Id$
* @package wpbase
* @author WPOpal Team <opalwordpress@gmail.com>
* @copyright Copyright (C) 2015 wpopal.com. All Rights Reserved.
* @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
*
* @website http://www.wpopal.com
* @support http://www.wpopal.com/questions/
*/
/**
* Enable/distable share box
*/
global $post;
$args = array( 'position' => 'top', 'animation' => 'true' );
?>
<div class="<?php echo apply_filters('opalestate_row_container_class', 'row opal-row');?>">
<div class="col-lg-12 col-md-12">
2020-08-20 12:31:10 +02:00
<h6 class="pull-left"><?php esc_html_e("Share this:", "opalestate-pro"); ?></h6>
2019-09-10 06:27:33 +02:00
<div class="pbr-social-share">
<div class="bo-social-icons bo-sicolor social-radius-rounded">
<?php if((bool)opalestate_options('facebook_share_blog',true)): ?>
<a class="bo-social-facebook" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Facebook" href="http://www.facebook.com/sharer.php?s=100&p&#91;url&#93;=<?php the_permalink(); ?>&p&#91;title&#93;=<?php the_title(); ?>" target="_blank" title="<?php esc_html_e('Share on facebook', 'opalestate-pro'); ?>">
2019-09-28 09:21:28 +02:00
<i class="fab fa-facebook"></i>
2019-09-10 06:27:33 +02:00
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('twitter_share_blog',true)): ?>
<a class="bo-social-twitter" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Twitter" href="http://twitter.com/home?status=<?php the_title(); ?> <?php the_permalink(); ?>" target="_blank" title="<?php esc_html_e('Share on Twitter', 'opalestate-pro'); ?>">
2019-09-28 09:21:28 +02:00
<i class="fab fa-twitter"></i>
2019-09-10 06:27:33 +02:00
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('linkedin_share_blog',true)): ?>
<a class="bo-social-linkedin" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="LinkedIn" href="http://linkedin.com/shareArticle?mini=true&amp;url=<?php the_permalink(); ?>&amp;title=<?php the_title(); ?>" target="_blank" title="<?php esc_html_e('Share on LinkedIn', 'opalestate-pro'); ?>">
2019-09-28 09:21:28 +02:00
<i class="fab fa-linkedin"></i>
2019-09-10 06:27:33 +02:00
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('tumblr_share_blog',true)): ?>
<a class="bo-social-tumblr" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Tumblr" href="http://www.tumblr.com/share/link?url=<?php echo urlencode(get_permalink()); ?>&amp;name=<?php echo urlencode($post->post_title); ?>&amp;description=<?php echo urlencode(get_the_excerpt()); ?>" target="_blank" title="<?php esc_html_e('Share on Tumblr', 'opalestate-pro'); ?>">
2019-09-28 09:21:28 +02:00
<i class="fab fa-tumblr"></i>
2019-09-10 06:27:33 +02:00
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('google_share_blog',true)): ?>
<a class="bo-social-google" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Google plus" href="https://plus.google.com/share?url=<?php the_permalink(); ?>" onclick="javascript:window.open(this.href,
'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank" title="<?php esc_html_e('Share on Google plus', 'opalestate-pro'); ?>">
2019-09-28 09:21:28 +02:00
<i class="fab fa-google-plus"></i>
2019-09-10 06:27:33 +02:00
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('pinterest_share_blog',true)): ?>
<?php $full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); ?>
<a class="bo-social-pinterest" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Pinterest" href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink()); ?>&amp;description=<?php echo urlencode($post->post_title); ?>&amp;media=<?php echo urlencode($full_image[0]); ?>" target="_blank" title="<?php esc_html_e('Share on Pinterest', 'opalestate-pro'); ?>">
2019-09-28 09:21:28 +02:00
<i class="fab fa-pinterest"></i>
2019-09-10 06:27:33 +02:00
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('mail_share_blog',true)): ?>
<a class="bo-social-envelope" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Email" href="mailto:?subject=<?php the_title(); ?>&amp;body=<?php the_permalink(); ?>" title="<?php esc_html_e('Email to a Friend', 'opalestate-pro'); ?>">
<i class="fa fa-envelope"></i>
</a>
<?php endif; ?>
</div>
</div>
</div>
</div>