function uc_extra_fields_pane_access in Extra Fields Checkout Pane 6.2
Same name and namespace in other branches
- 7 uc_extra_fields_pane.module \uc_extra_fields_pane_access()
Check if user has access to this field.
Users that don't have the permission "use php fields" may not edit fields of this type.
Parameters
UCXF_Field $field: The field for which access is requested.
string $op: The operation that is performed on the field.
Return value
boolean
2 calls to uc_extra_fields_pane_access()
- uc_extra_fields_pane_customfields in ./
uc_extra_fields_pane.admin.inc - List of custom fields
- _uc_extra_fields_pane_address_fields_uc_store_address_fields_alter in includes/
addressfields.inc - _uc_extra_fields_pane_address_fields_uc_store_address_fields_alter() Adds extra address fields to form which can be defined at /admin/store/settings/addressfields/add
1 string reference to 'uc_extra_fields_pane_access'
- uc_extra_fields_pane_menu in ./
uc_extra_fields_pane.module - Implementation of hook_menu().
File
- ./
uc_extra_fields_pane.module, line 240 - Module: uc_extra_fields_pane.module
Code
function uc_extra_fields_pane_access(UCXF_Field $field, $op) {
switch ($op) {
case 'edit':
switch ($field->value_type) {
case UCXF_Field::UCXF_WIDGET_TYPE_PHP:
case UCXF_Field::UCXF_WIDGET_TYPE_PHP_SELECT:
return user_access('use php fields');
}
break;
}
return user_access('administer store');
}