#1634 closed task (blessed) (fixed)
Shortcode attributes get transferred to lowercase
Reported by: | DekiGk | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Codex | Keywords: | needs-patch |
Cc: |
Description
Hello WP team,
In the WP codex it clearly states that we can use uppercase or lowercase letters for our shortcode attribute names:
"Attribute names are optional and should contain only the following characters for compatibility across all platforms:
Upper-case and lower-case letters: A-Z a-z
Digits: 0-9
Underscore: _
Hyphen: - (Not allowed before version 4.3.0)"
http://codex.wordpress.org/Shortcode_API#Attributes
However, when I was doing one shortcode today the WP seems to have transferred my "current_post_ID" to "current_post_id".
Through the help of my WordPress Serbia facebook network I have found out that this is because the function: "get_shortcode_atts_regex" has strtolower while parsing.
Can we change the codex to reflect that?
Best Regards,
Dejan Kostevski
Hi, and welcome!
The codex is just a wiki, and by logging in with your WordPress.org username and password you can freely edit any page that needs some attention there, without the need for a ticket on here.
I've made the modification to the article for now, but I do believe they should always be lowercase in the backend and are permitted to use mixed case in the actual editor to simplify the input for the end user.