You are here

function _skinr_array_strip_empty in Skinr 6

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

Helper function to remove unchecked entries from checkbox form element.

3 calls to _skinr_array_strip_empty()
panels_skinr_submit_handler_settings in modules/panels.skinr.inc
Skinr submit handler.
skinr_submit_handler in includes/handlers.inc
Skinr submit handler.
views_skinr_submit_handler_display in modules/views.skinr.inc
Skinr submit handler.

File

includes/handlers.inc, line 131
Defines the various handler objects to support Skinr.

Code

function _skinr_array_strip_empty($array) {
  $new_array = array();
  foreach ($array as $key => $value) {
    if (!empty($value)) {
      $new_array[$key] = $value;
    }
  }
  return $new_array;
}