You are here

function advagg_form_print_r in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 7 includes/admin.inc \advagg_form_print_r()
2 calls to advagg_form_print_r()
advagg_admin_info_form in ./advagg.admin.inc
Form builder; Configure advagg settings.
advagg_bundler_admin_settings_form in advagg_bundler/advagg_bundler.admin.inc
Form builder; Configure advagg settings.

File

./advagg.admin.inc, line 712
Admin page callbacks for the advanced CSS/JS aggregation module.

Code

function advagg_form_print_r($data) {
  $data = print_r($data, TRUE);
  $data = explode("\n", $data);
  $new_data = '';
  foreach ($data as $text) {
    $new_text = str_replace('    ', '', $text);
    if ($new_text == "(") {
      $new_data .= ' ' . $new_text;
    }
    else {
      $new_data .= "\n" . $text;
    }
  }
  $new_data = explode("\n", $new_data);
  $new_data = array_filter($new_data);
  $rows = count($new_data);
  $new_data = implode("\n", $new_data);
  return array(
    $new_data,
    $rows,
  );
}