【问题标题】:Add HTML markup to $wpdb results in Wordpress在 Wordpress 中将 HTML 标记添加到 $wpdb 结果
【发布时间】:2010-12-26 04:22:49
【问题描述】:

但是,我正在使用 Wordpress 中的 WPDB 类提取一些数据 - 数据被作为原始数据检索,没有任何标记。

如何自动添加此标记?

【问题讨论】:

    标签: php mysql html wordpress markup


    【解决方案1】:

    应该是$text = apply_filters( 'the_content', $text );——一个下划线。

    【讨论】:

      【解决方案2】:

      知道了:)

      $text = apply___filters('the_content', $text);

      参考wp-includes/formatting.php

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-08-03
        • 1970-01-01
        • 2012-02-11
        • 1970-01-01
        • 2021-08-15
        • 2021-09-05
        • 2011-05-12
        • 2016-09-03
        相关资源
        最近更新 更多