mirror of
https://github.com/discourse/wp-discourse.git
synced 2025-10-03 08:59:21 +08:00
Only load comments if we have a post id (#553)
Some checks failed
WP-Discourse Formatting / Formatting on PHP 5.6 (push) Has been cancelled
WP-Discourse Formatting / Formatting on PHP 7.0 (push) Has been cancelled
WP-Discourse Formatting / Formatting on PHP 7.4 (push) Has been cancelled
WP-Discourse Formatting / Formatting on PHP 8.0 (push) Has been cancelled
WP-Discourse Tests / Tests on PHP 8.2 (push) Has been cancelled
Some checks failed
WP-Discourse Formatting / Formatting on PHP 5.6 (push) Has been cancelled
WP-Discourse Formatting / Formatting on PHP 7.0 (push) Has been cancelled
WP-Discourse Formatting / Formatting on PHP 7.4 (push) Has been cancelled
WP-Discourse Formatting / Formatting on PHP 8.0 (push) Has been cancelled
WP-Discourse Tests / Tests on PHP 8.2 (push) Has been cancelled
This commit is contained in:
parent
4181491e51
commit
4b95944d27
1 changed files with 5 additions and 1 deletions
|
@ -9,9 +9,13 @@
|
|||
$( document ).ready(
|
||||
function() {
|
||||
var commentsURL = wpdc.commentsURL,
|
||||
$commentArea = $( '#wpdc-comments' ),
|
||||
$commentArea = $( '#wpdc-comments' ),
|
||||
postId = $commentArea.data( 'post-id' );
|
||||
|
||||
if (!postId) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url: commentsURL + '?post_id=' + postId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue