Skip to content

Commit

Permalink
Sharing: revert changes to echo inline sharing js
Browse files Browse the repository at this point in the history
Fixes #6640
Reverts changes introduced in #6339

`$service->display_footer()` includes calls to `js_dialog` when not using Jetpack's Official sharing buttons.
`js_dialog` often uses `wp_add_inline_script()`, thus recreating the issues described in #6640.
  • Loading branch information
jeherve committed Mar 13, 2017
1 parent 217e752 commit c3449bd
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions modules/sharedaddy/sharing-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,6 @@ function sharing_add_footer() {
);
wp_localize_script( 'sharing-js', 'sharing_js_options', $sharing_js_options);
}
}

function sharing_add_footer_scripts_inline() {
$sharer = new Sharing_Service();
$enabled = $sharer->get_blog_services();
foreach ( array_merge( $enabled['visible'], $enabled['hidden'] ) AS $service ) {
Expand Down Expand Up @@ -779,9 +776,6 @@ function sharing_display( $text = '', $echo = false ) {

// Enqueue scripts for the footer
add_action( 'wp_footer', 'sharing_add_footer' );

// Print inline scripts that depend on jQuery
add_action( 'wp_footer', 'sharing_add_footer_scripts_inline', 25 );
}
}

Expand Down

0 comments on commit c3449bd

Please sign in to comment.