Skip to content

Instantly share code, notes, and snippets.

@FernandoSalinas33
Created October 25, 2017 18:59
Show Gist options
  • Save FernandoSalinas33/3ff39b5ba5e8814b14754a11d67cfd97 to your computer and use it in GitHub Desktop.
Save FernandoSalinas33/3ff39b5ba5e8814b14754a11d67cfd97 to your computer and use it in GitHub Desktop.
Display Share Options at the bottom of Listing Description Widget
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