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:

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.

Related Functions

shortcode_parse_atts, shortcode_exists, shortcode_unautop, get_shortcode_atts_regex, do_shortcode_tag

Top Google Results

User discussions

wpseek mobile