1. 首页
  2. WordPress钩子手册
  3. 主题相关

WordPress在某些情况下,自定义预览可以无限刷新

您好,

一位朋友指出,在WP 4.7-beta4中,当自定义程序预览框保持无限刷新时,可能会出现一个错误,如果您这样做:

  1. 创建一个新页面
  2. 将其添加到与主题位置相关联的菜单
  3. 删除您在步骤1中创建的页面。
  4. 转到自定义屏幕,我开始调试我们的主题,发现只有菜单使用自定义walker时才会出现这种情况,例如这样(添加到函数.php在2016年和2017年的主题):

    class Johnnie_Walker extends Walker_Nav_Menu {}function custom_menu_walker( $args ) {return array_merge( $args,>

    As shown in the demonstration above, it is irrelevant what the custom walker implementation does, the example above just extends the original WP walker (no custom method overrides) and the problem still exists.

    Unfortunately I don\"t have time at the moment to debug this further and submit a patch, but I still wanted to point it out here on the forum, so others are aware of this.

    Found this related (and fixed) bug report: https://core.trac.wordpress.org/ticket/32894

    • This topic was modified 4 years, 7 months ago by Primoz Cigler.
    • This topic was modified 4 years, 7 months ago by Ipstenu (Mika Epstein).

    Thanks very much. I\"ve been able to reproduce the bug and I\"m now in the process of fixing. Please follow https://core.trac.wordpress.org/ticket/38890

    @cyman Would you be able to test this patch? https://core.trac.wordpress.org/attachment/ticket/38890/38890.0.diff

    @cyman I\"ve committed the fix to trunk因为我得到确认,它修复了一个非常相似(或相同)的问题,在同一时间报告。请确认。如果没有,请重新打开Trac记录单。

    由于此问题有一个Trac记录单,因此我们鼓励将有关此问题的任何新发现发布到它以进行跟踪。

    因此,我会将此线程标记为已解决,以便我们知道哪些线程仍需要关注以进行故障排除和确认

    WordPress在某些情况下,自定义预览可以无限刷新 为WP2原创文章,链接:https://www.wp2.cn/hook/theme_hook/wordpress%e5%9c%a8%e6%9f%90%e4%ba%9b%e6%83%85%e5%86%b5%e4%b8%8b%ef%bc%8c%e8%87%aa%e5%ae%9a%e4%b9%89%e9%a2%84%e8%a7%88%e5%8f%af%e4%bb%a5%e6%97%a0%e9%99%90%e5%88%b7%e6%96%b0/

发表评论

您的电子邮箱地址不会被公开。