/**
 * Can we put the discount block somewhere better than the top of the page.
 *
 * If we are in 4.6.3+ and we are working with a price set then the best place
 * to put it is in the new price-set-1 region - just before it.
 *
 * This is only tested / implemented on contribution forms at this stage.
 *
 * @param CRM_Core_Form $form
 *
 * @return bool
 *   Should we put the discount block somewhere better than just at the top.
 */
function _cividiscount_form_is_eligible_for_pretty_placement($form)
{
    if (get_class($form) != 'CRM_Contribute_Form_Contribution_Main' || !_cividiscount_version_at_least('4.6.4')) {
        return FALSE;
    }
    return TRUE;
}
/**
 * Can we put the discount block somewhere better than the top of the page.
 *
 * If we are in 4.6.3+ and we are working with a price set then the best place
 * to put it is in the new price-set-1 region - just before it.
 *
 * This is only tested / implemented on contribution forms at this stage.
 *
 * @param CRM_Core_Form $form
 *
 * @return bool
 *   Should we put the discount block somewhere better than just at the top.
 */
function _cividiscount_form_is_eligible_for_pretty_placement($form)
{
    $formClass = get_class($form);
    if ($formClass != 'CRM_Contribute_Form_Contribution_Main' && $formClass != 'CRM_Event_Form_Registration_Register' || !_cividiscount_version_at_least('4.6.4')) {
        return FALSE;
    }
    return TRUE;
}