On this page
get_shortcode_atts_regex(): string
Retrieves the shortcode attributes regex.
Return
string The shortcode attribute regular expression.
Source
File: wp-includes/shortcodes.php. View all references
function get_shortcode_atts_regex() {
return '/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*\'([^\']*)\'(?:\s|$)|([\w-]+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|\'([^\']*)\'(?:\s|$)|(\S+)(?:\s|$)/';
}
Related
Used By
| Used By | Description |
|---|---|
| shortcode_parse_atts() wp-includes/shortcodes.php | Retrieves all attributes from the shortcodes tag. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_shortcode_atts_regex