You are here

function skinr_flatten_skins_array in Skinr 6.2

Same name and namespace in other branches
  1. 8.2 skinr.module \skinr_flatten_skins_array()
  2. 7.2 skinr.module \skinr_flatten_skins_array()

Helper function to flatten an array of classes settings.

3 calls to skinr_flatten_skins_array()
skinr_skin_extract in ./skinr.module
theme_panels_skinr_style_render_pane in modules/panels/skinr.inc
Render pane callback.
theme_panels_skinr_style_render_region in modules/panels/skinr.inc
Render panel callback.

File

./skinr.module, line 284

Code

function skinr_flatten_skins_array($skins) {
  $return = array();
  foreach ($skins as $entry) {
    if (is_array($entry)) {
      foreach ($entry as $subentry) {
        if (!empty($subentry)) {
          $return[] = check_plain($subentry);
        }
      }
    }
    elseif (!empty($entry)) {
      $return[] = check_plain($entry);
    }
  }
  return $return;
}