function acquia_lift_remove_option_for_audience in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 acquia_lift.admin.inc \acquia_lift_remove_option_for_audience()
Unsets the option_id property for a given target audience.
Parameters
$option_set: The option set whose targeting is being changed.
$audience: The audience name.
Throws
\PersonalizeException
1 call to acquia_lift_remove_option_for_audience()
- acquia_lift_implement_targeting in ./
acquia_lift.admin.inc - Takes whatever is in the 'lift_targeting' data property and converts it into the required campaign structure (including nested tests where needed).
File
- ./
acquia_lift.admin.inc, line 1788 - acquia_lift.admin.inc Provides functions needed for the admin UI.
Code
function acquia_lift_remove_option_for_audience(&$option_set, $audience) {
if (isset($option_set->targeting[$audience])) {
// If there was a test assigned to this audience, remove it.
if (isset($option_set->targeting[$audience]['option_id'])) {
unset($option_set->targeting[$audience]['option_id']);
}
}
}