function uc_product_feature_data in Ubercart 5
Same name and namespace in other branches
- 8.4 uc_product/uc_product.module \uc_product_feature_data()
- 6.2 uc_product/uc_product.module \uc_product_feature_data()
- 7.3 uc_product/uc_product.module \uc_product_feature_data()
Return a bit of data from a product feature array based on the feature ID and array key.
Parameters
$fid: The string ID of the product feature you want to get data from.
$key: The key in the product feature array you want: title, callback, delete, settings
Return value
The value of the key you specify.
1 call to uc_product_feature_data()
- uc_product_features in uc_product/
uc_product.module - Displays the project features tab on a product node edit form.
File
- uc_product/
uc_product.module, line 2761 - The product module for Ubercart.
Code
function uc_product_feature_data($fid, $key) {
static $features;
if (empty($features)) {
foreach (module_invoke_all('product_feature') as $feature) {
$features[$feature['id']] = $feature;
}
}
return $features[$fid][$key];
}