Kirki_Output::parse_output PHP Method

parse_output() protected method

Calls the process_output method for each of them.
protected parse_output ( )
        protected function parse_output()
        {
            foreach ($this->output as $output) {
                $skip = false;
                // Apply any sanitization callbacks defined.
                $value = $this->apply_sanitize_callback($output, $this->value);
                // Skip if value is empty.
                if ('' === $this->value) {
                    $skip = true;
                }
                // No need to proceed this if the current value is the same as in the "exclude" value.
                if (isset($output['exclude']) && false !== $output['exclude'] && is_array($output['exclude'])) {
                    foreach ($output['exclude'] as $exclude) {
                        if ($skip) {
                            continue;
                        }
                        // Skip if value is defined as excluded.
                        if ($exclude === $value) {
                            $skip = true;
                        }
                    }
                }
                if ($skip) {
                    continue;
                }
                // Apply any value patterns defined.
                $value = $this->apply_value_pattern($output, $value);
                if (isset($output['element']) && is_array($output['element'])) {
                    $output['element'] = array_unique($output['element']);
                    sort($output['element']);
                    $output['element'] = implode(',', $output['element']);
                }
                $value = $this->process_value($value, $output);
                $this->process_output($output, $value);
            }
        }