我在single.php
现在需要使用the_content()
而不仅仅是$post->post_content
; 对于youtube嵌入等-
在其他项目中the_content()
和apply_filters("the_content", ...)
做它应该做的,但不是在这个single.php
... 具有相同插件的2017主题在the_content()
; 所以这一定是我的主题。
经过数小时的研究和摆弄,我发现我在代码的早期就做到了这一点:
$GLOBALS = array(
"active_menu" => "...",
"something_else" => true
);
// don\'t ask me why I did this, I was a even more a noob back then;
// it\'s been working fine so far; no time to refactor.. u know the excuses–
// of course I just do it like this now:
$GLOBALS["active_menu"] = "...";
$GLOBALS["something_else"] = true;
当我想看看“原作”中有什么可能如此重要的时候$GLOBALS
, 浏览器加载时就像它被遗忘了一样,然后又重新加载。这个变量里面有很多东西。所以问题是
为什么要覆盖$GLOBALS
哪个太大了,关掉过滤器