You are here

function skinr_context_skinr_skin_presave in Skinr 8.2

Same name and namespace in other branches
  1. 7.2 skinr_context/skinr_context.module \skinr_context_skinr_skin_presave()

Implements hook_skinr_skin_presave().

File

skinr_context/skinr_context.module, line 600
Provides Skinr integration with Context.

Code

function skinr_context_skinr_skin_presave($skin) {
  if (!empty($skin->gid)) {

    // Load group object.
    if ($group = skinr_context_group_load($skin->gid)) {
      if (!$group->status) {

        // Disable skin status if group is disabled.
        $skin->status = 0;
      }
    }
  }
}