$value) { $sanitized_key = esc_html($key); $sanitized_value = esc_html($value); $sanitized_section_content[$sanitized_key] = $sanitized_value; } if ('text' === $output_format) { $data .= "\n --- $section_title --- \n\n"; $data .= self::output_section_data($sanitized_section_content); $data .= "\n===================================\n"; } elseif ('table' === $output_format) { $data .= '
'; $data .= '

'; $data .= '
'; $data .= apply_filters('aiowp_security_report_section_content', AIOWPSecurity_Utility_UI::format_data_as_table($sanitized_section_content)); $data .= '
'; $data .= '
'; } $data = apply_filters('aiowp_security_generate_report_section_below', $data); return $data; } /** * Output the section data * * @param array $section_data Section data to output * * @return string Section data */ private static function output_section_data($section_data = array()) { $output = ''; foreach ($section_data as $key => $value) { $output .= "$key - $value\n"; } return $output; } }