首页 WordPress函数大全 do_shortcode()

do_shortcode()

2020-05-01 / 5174阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

do_shortcode( string $content, bool $ignore_html = false )

Search content for shortcodes and filter shortcodes through their hooks.

描述

If there are no shortcode tags defined, then the content will be returned without any filtering. This might cause issues when plugins are disabled but the shortcode will still show up in the post or content.

参数

$content

(string)
(Required)
Content to search for shortcodes.

$ignore_html

(bool)
(Optional)
When true, shortcodes inside HTML elements will be skipped.

Default value: false

返回

(string) Content with shortcodes filtered out.

大家谈论
    我的见解