As far as I can tell, all the attributes are passed in as an array, so the most direct way to access them is through the $atts array. The extract and shortcode_atts functions just seem to prepare and create the variables.
The “title” attribute doesn’t appear in that array to begin with.
If I use the extract functions as indicated in the wordpress codex, the variable for the title always returns the default value, which says to me that it is never set.
Strange question, but have you tried adding the $content = null to your function as a second parameter so it matches the method definition that wordpress might expect?
All of the search results I have read never mention title as a reserved word, so I don’t think that is the issue… Have you tried changing it to header instead of title, to see if it comes across?
This is very peculiar. As I looked at the shortcodes.php file included in WordPress and there isn’t any logic that should stop title from working. Do you have any other plugins activated that may be interfering? Maybe there is a overflow in shortcodes that if title is used in another shortcode by another plugin it adversely affects other shortcodes (doesn’t seem to make sense to me though)?
I found another interesting thing on this unsolved issue. If I use [link show_title=“true”], the show_title attribute doesn’t appear. if I misspell “title” like this: [link show_ttitle=“true”], then the attribute show_ttitle appears. There is something strange happening whenever I use the word “title” in an attribute–it seems like it’s ignored every time for some reason. I don’t understand it.
I had a function in the functions.php file that strips attributes from html tags. One of those attributes that was set to be stripped was “title”. The regex code I was using couldn’t tell the difference between [shortcode title=“something”] and <a href=“link” title=“”>, so the title attribute was removed in both cases. I’ve since converted this code to use a DOM parser to replace the regex.