Created
October 25, 2017 18:59
-
-
Save FernandoSalinas33/3ff39b5ba5e8814b14754a11d67cfd97 to your computer and use it in GitHub Desktop.
Display Share Options at the bottom of Listing Description Widget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function output() { | |
global $post; | |
if ( ! function_exists( 'sharing_display' ) ) { | |
return; | |
} | |
$buttons = sharing_display( '' ); | |
if ( '' == $buttons ) { | |
return; | |
} | |
$sharer = new Sharing_Service(); | |
$global = $sharer->get_global_options(); | |
$sharing = ''; | |
$sharing .= sprintf( | |
'<a href="#share-%d" class="popup-trigger"><i class="ion-share"></i> %s</a>', | |
$post->ID, | |
__( 'Share', 'listify' ) | |
); | |
$sharing .= sprintf( | |
'<div class="popup share-popup" id="share-%1$d"> | |
<h3 class="popup-title">%2$s</h3> | |
%3$s | |
</div>', | |
$post->ID, | |
$global['sharing_label'], | |
$buttons | |
); | |
echo $sharing; | |
} | |
add_action('listify_widget_job_listing_content_after', 'output' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment