Skip to content

Commit

Permalink
Minor Jetpack sharing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
siteorigin-support committed Jul 30, 2018
1 parent e8c1a9c commit be85bc8
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 37 deletions.
4 changes: 2 additions & 2 deletions inc/jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function siteorigin_unwind_infinite_scroll_render() {
}

/**
* Remove sharing buttons from their default locations
* Remove sharing buttons from their default locations.
*/
function siteorigin_unwind_remove_share() {
remove_filter( 'the_content', 'sharing_display', 19 );
Expand All @@ -137,7 +137,7 @@ function siteorigin_unwind_remove_share() {

if ( ! function_exists( 'siteorigin_unwind_jetpack_related_projects' ) ) :
/**
* Displays jetpack related posts for projects
* Displays jetpack related posts for projects.
*/
function siteorigin_unwind_jetpack_related_projects( $allowed_post_types ) {
$allowed_post_type[] = 'jetpack-portfolio';
Expand Down
17 changes: 17 additions & 0 deletions sass/modules/_jetpack.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,20 @@
}
}
}

/*--------------------------------------------------------------
## Sharing
--------------------------------------------------------------*/
.share-this {
font-size: 13px;
}

.single .sharedaddy .sd-content {
padding: 1em 0 1.5em;
text-align: center;
width: 100%;

ul {
display: inline-block;
}
}
2 changes: 1 addition & 1 deletion sass/site/header/_masthead.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
float: left;

&:last-of-type {
margin-right: 0 !important;
margin-right: 0;
}

@media (max-width: 768px) {
Expand Down
17 changes: 0 additions & 17 deletions sass/site/primary/_posts-and-pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -810,23 +810,6 @@
}
}

/*--------------------------------------------------------------
## Jetpack Sharing
--------------------------------------------------------------*/
.share-this {
font-size: 13px;
}

.single .sharedaddy .sd-content {
padding: 1em 0 1.5em;
text-align: center;
width: 100%;

ul {
display: inline-block;
}
}

/*--------------------------------------------------------------
## Related Posts
--------------------------------------------------------------*/
Expand Down
12 changes: 8 additions & 4 deletions single.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@
get_template_part( 'template-parts/content', 'single' );
}

if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'sharedaddy' ) && function_exists( 'sharing_display' ) ) : ?>
<h2 class="share-this heading-strike"><?php esc_html_e( 'Share This', 'siteorigin-unwind' ); ?></h2>
<?php echo sharing_display();
endif;
if ( class_exists( 'Jetpack_Likes' ) ) {
$custom_likes = new Jetpack_Likes;
echo $custom_likes->post_likes();
}

if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'sharedaddy' ) ) {
echo sharing_display();
}

if ( siteorigin_setting( 'navigation_post' ) ) :
siteorigin_unwind_the_post_navigation();
Expand Down
26 changes: 13 additions & 13 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit be85bc8

Please sign in to comment.