Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix depth parameter of comment in reply_link() #1648

Closed
wants to merge 1 commit into from
Closed

Fix depth parameter of comment in reply_link() #1648

wants to merge 1 commit into from

Conversation

wkocjan
Copy link
Contributor

@wkocjan wkocjan commented Jan 31, 2018

Issue

{{ comment.reply_link() }} function always returns link, even if max_depth of comments is reached. This is due to depth parameter always set to 1, which is wrong behavior. For child comments, this parameter should be set to its real depth level, not 1.

In result, current usage of {{ comment.reply_link() }} ignores max_depth level set in Wordpress settings, as this level is never reached.

Solution

Pass current depth value instead of always 1 to Wordpress built-in get_comment_reply_link() function.

Impact

No impact.

Usage Changes

No changes.

@wkocjan wkocjan closed this Jan 31, 2018
@coveralls
Copy link

coveralls commented Jan 31, 2018

Coverage Status

Coverage remained the same at 94.372% when pulling 15dc451 on wkocjan:master into 9b216fc on timber:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.372% when pulling 15dc451 on wkocjan:master into 9b216fc on timber:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants