You are here

function acquia_lift_get_fallback_audience_name in Acquia Lift Connector 7.2

Identifies the fallback audience among the audiences provided.

The machine name of the "everyone-else" audience may have changed, if tests tests for the audience have changed, so it may have a suffix, like '-2'.

Parameters

$audiences: An array of audience names.

Return value

string|bool

3 calls to acquia_lift_get_fallback_audience_name()
AcquiaLiftWebTestReports::testReportPage in tests/acquia_lift.test
acquia_lift_personalize_campaign_wizard_targeting_alter in ./acquia_lift.admin.wizard.inc
Alter hook for the targeting portion of the campaign wizard.
acquia_lift_personalize_option_set_presave in ./acquia_lift.module
Implements hook_personalize_option_set_presave().

File

./acquia_lift.module, line 3377
acquia_lift.module Provides Acquia Lift-specific personalization functionality.

Code

function acquia_lift_get_fallback_audience_name($audiences) {
  foreach ($audiences as $audience) {
    if (strpos($audience, ACQUIA_LIFT_TARGETING_EVERYONE_ELSE) === 0) {
      return $audience;
    }
  }
  return FALSE;
}