[wp-trac] [WordPress Trac] #15155: Allow filtering of shortcode attributes
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 11 20:46:00 UTC 2011
#15155: Allow filtering of shortcode attributes
-------------------------+-----------------------------
Reporter: coffee2code | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Shortcodes | Version: 3.0.1
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-----------------------------
Comment (by coffee2code):
As per consultation with @nacin, original patch has been modified and
attached as [attachment:15155.2.diff]:
* Removed throwing warning (via either `_deprecated_argument()` or
`_doing_it_wrong()`) if the optional `$shortcode` argument is not
supplied
* Removed generic `shortcode_atts` filter
* Changed proposed filter name from `shortcode_atts-$shortcode` to
`shortcode_atts_$shortcode` (dash to underscore)
Without throwing warnings to developers, though, I wonder how well (widely
and quickly) the new argument will propagate... (though I acknowledge both
`_deprecated_argument()` or `_doing_it_wrong()` are not appropriate to
denote a newly added recommended argument). It would then become a matter
of shortcode developers actively allowing their shortcode to be modified
(by optionally specifying the argument) versus trying to make it so ANY
shortcode's attributes could be modified (if we progressed to requiring,
or strongly recommending, the argument).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15155#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list