wp_parse_args


wp_parse_args ( $args, $defaults = array() )

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

Description

Merges 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_list, wp_parse_id_list, wp_paused_plugins

Top Google Results

User discussions

wpseek mobile