首页 WordPress函数大全 get_shortcode_regex()

get_shortcode_regex()

2020-05-01 / 3718阅 / 悠然

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

get_shortcode_regex( array $tagnames = null )

Retrieve the shortcode regular expression for searching.

描述

The regular expression combines the shortcode tags in the regular expression in a regex class.

The regular expression contains 6 different sub matches to help with parsing.

1 – An extra [ to allow for escaping shortcodes with double [[]] 2 – The shortcode name 3 – The shortcode argument list 4 – The self closing / 5 – The content of a shortcode when it wraps some content. 6 – An extra ] to allow for escaping shortcodes with double [[]]

参数

$tagnames

(array)
(Optional)
List of shortcodes to find. Defaults to all registered shortcodes.

Default value: null

返回

(string) The shortcode search regular expression

大家谈论
    我的见解