function getEstimatedReach($target_field, $plg_targetfiels) { require JPATH_SITE . DS . "administrator" . DS . "components" . DS . "com_socialads" . DS . "config" . DS . "config.php"; $adRetriever = new adRetriever(); if ($socialads_config['integration'] == 1) { $reach = $adRetriever->getEstimatedReach_JS($target_field, $plg_targetfiels); } if ($socialads_config['integration'] == 0) { $reach = $adRetriever->getEstimatedReach_CB($target_field, $plg_targetfiels); } return $reach; }