Created
December 19, 2016 02:52
-
-
Save JMWebDevelopment/aa749ec7188b7f4d6b97ec4895d96ebd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.getCommentDepth = function ( theComment, comments_list ) { | |
var depthLevel = 0; | |
while ( theComment.comment_parent > 0 ) { | |
theComment = this.getCommentById( theComment.comment_parent, comments_list ); | |
depthLevel++; | |
} | |
return depthLevel; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment