wp_parse_args


wp_parse_args ( $args, $defaults = '' )

Parameters:
  • (string|array|object) $args Value to merge with $defaults.
  • (array) $defaults Optional. Array that serves as the defaults. Default empty.
Returns:
  • (array) Merged user defined values with defaults.
Defined at:
Change Log:
  • 2: .

Description

Merge user defined arguments into defaults array.

This function is used throughout WordPress to allow for both string or array to be merged into another array.

Related Functions

wp_parse_url, wp_parse_str, wp_parse_id_list, wp_parse_slug_list, wp_kses_attr

Top Google Results

User discussions

wpseek mobile