Kirki_Explode_Background_Field::process_fields PHP Method

process_fields() public static method

Parse all fields and add the new background fields
public static process_fields ( array $fields ) : array
$fields array An array of all the generated fields.
return array
        public static function process_fields($fields)
        {
            foreach ($fields as $field) {
                /**
                 * Make sure background fields are exploded
                 */
                if (isset($field['type']) && 'background' === $field['type']) {
                    $explode = self::explode($field);
                    $fields = array_merge($fields, $explode);
                }
            }
            return $fields;
        }

Usage Example

 public function test_build_background_fields()
 {
     $this->assertEquals($this->final_fields(), Kirki_Explode_Background_Field::process_fields($this->initial_fields()));
 }
All Usage Examples Of Kirki_Explode_Background_Field::process_fields