shortcode_atts
shortcode_atts ( $pairs, $atts, $shortcode = '' )
Parameters:- (array) pairs Entire list of supported attributes and their defaults.
- (array) atts User defined attributes in shortcode tag.
- (string) shortcode Optional. The name of the shortcode, provided for context to enable filtering
Returns:- (array) Combined and filtered attribute list.
Defined at: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Combines user attributes with known attributes and fill in defaults when needed.The pairs should be considered to be all of the attributes which are
supported by the caller and given as a list. The returned attributes will
only contain the attributes in the $pairs list.
If the $atts list has unsupported attributes, then they will be ignored and
removed from the final returned list.