Skip to content

Commit

Permalink
Merge pull request #1227 from aheckler/issue-772
Browse files Browse the repository at this point in the history
Hide sharing buttons for private posts
  • Loading branch information
samhotchkiss committed Jan 28, 2015
2 parents df4d33a + e964cb4 commit a228a5c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/sharedaddy/sharing-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,13 @@ function sharing_display( $text = '', $echo = false ) {

if ( !empty( $switched_status ) )
$show = false;

// Private post?
$post_status = get_post_status( $post->ID );

if ( $post_status == 'private' ) {
$show = false;
}

// Allow to be used on P2 ajax requests for latest posts.
if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && 'get_latest_posts' == $_REQUEST['action'] )
Expand Down

0 comments on commit a228a5c

Please sign in to comment.