Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1634 closed task (blessed) (fixed)

Shortcode attributes get transferred to lowercase

Reported by: dekigk's profile DekiGk Owned by:
Milestone: Priority: normal
Component: Codex Keywords: needs-patch


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)"

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

Change History (2)

#1 @Clorith
8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Hi, and welcome!

The codex is just a wiki, and by logging in with your 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.

#2 @DekiGk
8 years ago


Thanks. Oh, I didn`t know I can do that myself.

I disagree with the above because:


are 3 different names.

Anyhow, thanks for your help. Case closed. :D

Note: See TracTickets for help on using tickets.