【问题标题】:Carousel wordpress plugin warning轮播 wordpress 插件警告
【发布时间】:2018-05-15 06:57:49
【问题描述】:

从小部件使用时轮播 wordpress 插件警告。

【问题讨论】:

    标签: wordpress owl-carousel


    【解决方案1】:

    插件代码存在错误。我怀疑您使用的是旧版本的插件,因为从in the source code 这一行来看,它似乎很好并且没有问题。

    可能是插件作者忘记use quotes on array keys了。

    如果可以,请更新插件,并希望他们应该修复它(查看目录中的似乎没问题)。如果还是不行,需要在plugin support forum提issue给作者看看。

    这是错误所在的行(看起来):

    echo owl_function(array(category => $instance['category'], singleItem => "true", autoPlay => "true", pagination => "false"));
    

    【讨论】:

      【解决方案2】:

      需要用 '' 包裹密钥。

      echo owl_function(
        array("category" => "events",
              "items" => "3",
              "autoPlay" => "true",
              "pagination" => "true"
        ));
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-12-07
        • 1970-01-01
        • 2016-08-27
        • 2012-07-14
        • 2013-10-21
        • 2018-02-11
        • 2011-11-11
        相关资源
        最近更新 更多