';
$nofollow = ' ';
if ( $porto_settings['share-nofollow'] ) {
$nofollow = ' rel="noopener noreferrer nofollow"';
} else {
$nofollow = ' rel="noopener noreferrer"';
}
$image = wp_get_attachment_url( get_post_thumbnail_id() );
$permalink = esc_url( apply_filters( 'the_permalink', get_permalink() ) );
$wishlist_page = function_exists( 'yith_wcwl_is_wishlist_page' ) && yith_wcwl_is_wishlist_page() ? true : false;
if ( class_exists( 'YITH_WCWL' ) && is_user_logged_in() ) {
global $post;
if ( get_option( 'yith_wcwl_wishlist_page_id' ) == $post->ID ) {
if ( empty( $share_link_url ) ) {
$wishlist_id = ( YITH_WCWL()->last_operation_token ) ? YITH_WCWL()->last_operation_token : ( isset( YITH_WCWL()->details['wishlist_id'] ) ? YITH_WCWL()->details['wishlist_id'] : '' );
if ( $wishlist_id ) {
$permalink .= ( '/' == substr( $permalink, -1 ) ? '' : '/' ) . 'view/' . $wishlist_id;
}
$permalink = esc_url( urlencode( $permalink ) );
} else {
$permalink = urlencode( $share_link_url );
}
}
}
if ( $wishlist_page && ! is_user_logged_in() ) {
$permalink = urlencode( $share_link_url );
}
$title = esc_attr( get_the_title() );
if ( porto_is_ajax() && isset( $_GET['action'] ) ) {
$tooltip = ' data-bs-tooltip';
} else {
$page_share_pos = ( isset( $porto_settings['page-share-pos'] ) && $porto_settings['page-share-pos'] ) ? $porto_settings['page-share-pos'] : '';
$position = '';
if ( $page_share_pos ) {
if ( 'left' == $page_share_pos ) {
$position = 'right';
if ( is_rtl() ) {
$position = 'left';
}
} else {
$position = 'left';
if ( is_rtl() ) {
$position = 'right';
}
}
} else {
$position = 'bottom';
}
$tooltip = " data-bs-tooltip data-bs-placement='" . esc_attr( $position ) . "'";
}
$extra_attr = 'target="_blank" ' . $nofollow . $tooltip;
if ( $porto_settings['share-facebook'] ) :
?> title="" class="share-facebook">
title="" class="share-twitter">
title="" class="share-linkedin">
title="" class="share-googleplus">
title="" class="share-pinterest">
title="" class="share-email">
title="" class="share-vk">
title="" class="share-xing">
title="" class="share-tumblr">
title="" class="share-reddit">
title="" class="share-whatsapp" style="display:none">
title="" class="share-viber" aria-label="">
';