( trim( $font_size ) == us_get_option( 'body_fontsize' ) ) ? '' : $font_size, ) ); // The list of available sharing providers and additional in-shortcode data $providers_list = array( 'email' => array( 'title' => __( 'Email this', 'us' ), ), 'facebook' => array( 'title' => __( 'Share this', 'us' ), ), 'twitter' => array( 'title' => __( 'Tweet this', 'us' ), ), 'linkedin' => array( 'title' => __( 'Share this', 'us' ), ), 'pinterest' => array( 'title' => __( 'Pin this', 'us' ), ), 'vk' => array( 'title' => __( 'Share this', 'us' ), ), 'whatsapp' => array( 'title' => __( 'Share this', 'us' ), ), 'xing' => array( 'title' => __( 'Share this', 'us' ), ), 'reddit' => array( 'title' => __( 'Share this', 'us' ), ), ); $set_providers = explode( ',', $providers ); // Keeping only the actually used providers foreach ( $providers_list as $provider => $provider_data ) { if ( ! in_array( $provider, $set_providers ) ) { unset( $providers_list[ $provider ] ); } } if ( empty( $providers_list ) ) { return; } if ( empty( $url ) ) { // Using the current page URL $url = home_url( $_SERVER['REQUEST_URI'] ); $url = str_replace( '?us_iframe=1', '', $url ); } if ( $counters == 'show' ) { $counts = us_get_sharing_counts( $url, array_keys( $providers_list ) ); } $post_thumbnail = get_the_post_thumbnail_url( NULL, 'large' ); $post_thumbnail = ( $post_thumbnail ) ? $post_thumbnail : ''; // Output the element $output = '
'; $output .= '
'; $sharing_list = ''; foreach ( $providers_list as $provider => $provider_data ) { $sharing_list .= ''; } $sharing_list .= ''; } $output .= $sharing_list; $output .= '
'; if ( $text_selection ) { $sharing_area = ( $text_selection_post ) ? 'post_content' : 'l-main'; $output .= '