You are here

function fusion_apply_skin_validate in Fusion Accelerator 7.2

Same name and namespace in other branches
  1. 7 fusion_apply/fusion_apply.module \fusion_apply_skin_validate()

Validate a skin object.

Parameters

$skin: A skin object.

Return value

TRUE on success, FALSE on failure.

2 calls to fusion_apply_skin_validate()
fusion_apply_skin_save in fusion_apply/fusion_apply.module
Save a skin object.
fusion_apply_ui_import_form_validate in fusion_apply/fusion_apply_ui.admin.inc
Form validation handler for fusion_apply_ui_import_form().

File

fusion_apply/fusion_apply.module, line 382
Handles core Fusion Apply functionality.

Code

function fusion_apply_skin_validate(&$skin) {
  if (empty($skin->theme) || empty($skin->module) || empty($skin->element) || empty($skin->skin) || empty($skin->options)) {
    return FALSE;
  }
  if (!is_array($skin->options)) {
    return FALSE;
  }

  // Strip empty skins.
  $skin->options = _fusion_apply_array_strip_empty($skin->options);
  if (empty($skin->options)) {
    return FALSE;
  }
  return TRUE;
}