Exemplo n.º 1
0
/**
 * Gets if premium is marked as spam
 *
 * @return boolean
 */
function osc_premium_is_spam()
{
    return osc_premium_field("b_spam") == 1;
}
Exemplo n.º 2
0
/**
PREMIUM CURRENCY by ERIC
*/
function osc_format_premium_price()
{
    $price = osc_premium_field("i_price");
    if ($price == null) {
        return osc_apply_filter('item_price_null', __('Check with seller'));
    }
    if ($price == 0) {
        return osc_apply_filter('item_price_zero', __('Free'));
    }
    $price = $price / 1000000;
    $currencyFormat = osc_locale_currency_format();
    $currencyFormat = str_replace('{NUMBER}', number_format($price, osc_locale_num_dec(), osc_locale_dec_point(), osc_locale_thousands_sep()), $currencyFormat);
    $currencyFormat = str_replace('{CURRENCY}', osc_premium_currency_symbol(), $currencyFormat);
    return osc_apply_filter('item_price', $currencyFormat);
}