Skip to content

Commit

Permalink
Fix comment redirect (#39027)
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyweight authored Aug 26, 2024
1 parent abb0eda commit e257a90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-comment-redirect
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Fix redirecting after comment when subscription modal is disabled
6 changes: 2 additions & 4 deletions projects/plugins/jetpack/modules/comments/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -1010,11 +1010,9 @@ public function capture_comment_post_redirect_to_reload_parent_frame( $url ) {
</h3>
<script type="text/javascript">
try {
window.parent.location = <?php echo wp_json_encode( $url ); ?>;
window.parent.location.reload(true);
window.parent.location.href = <?php echo wp_json_encode( $url ); ?>;
} catch (e) {
window.location = <?php echo wp_json_encode( $url ); ?>;
window.location.reload(true);
window.location.href = <?php echo wp_json_encode( $url ); ?>;
}
ellipsis = document.getElementById('ellipsis');

Expand Down

0 comments on commit e257a90

Please sign in to comment.