This commit is contained in:
xing 2023-03-03 13:50:11 +08:00
parent a3b1e054d0
commit 5665e0021b
4 changed files with 6 additions and 11 deletions

View File

@ -129,7 +129,4 @@
{{else}}
{{template "layout/empty"}}
{{end }}
{{end}}
{{ define "footer"}}
<script src='/wp-includes/js/comment-reply.min.js?ver=6.0.2' id='comment-reply-js'></script>
{{end}}

View File

@ -161,7 +161,4 @@
</symbol>
</defs>
</svg>
{{block "footerx" .}}
{{end}}
{{end}}

View File

@ -129,8 +129,3 @@
{{end }}
{{end}}
{{ define "footerx"}}
<script src='/wp-includes/js/comment-reply.min.js?ver=6.0.2' id='comment-reply-js'></script>
{{end}}

View File

@ -101,6 +101,12 @@ func (d *DetailHandle) ContextPost() {
}
func (d *DetailHandle) Render() {
if d.Post.CommentStatus == "open" && wpconfig.GetOption("thread_comments") == "1" {
d.PushGroupFooterScript(30, func(h *Handle) string {
return `<script src='/wp-includes/js/comment-reply.min.js' id='comment-reply-js'></script>`
})
}
d.PushHandleFn(constraints.Ok, NewHandleFn(func(h *Handle) {
d.PasswordProject()
d.RenderComment()