Te la Riporto tutta
Codice PHP:function theme_currency() { if ( function_exists( 'ot_get_option' ) ) { $currency = ot_get_option( 'currency_sign' ); if(!empty($currency)) { echo $currency; } else { _e('$','locality'); } } else { _e('$','locality'); } }
function get_theme_currency() { if ( function_exists( 'ot_get_option' ) ) { $currency = ot_get_option( 'currency_sign' ); if(!empty($currency)) { return $currency; } }
return __('$','locality'); }
Codice PHP:function property_price(){ global $post; $price = get_theme_currency(); $int_price = intval(get_post_meta($post->ID, 'locality_property_price', true)); if ( function_exists( 'ot_get_option' ) ) { $decimals = intval(ot_get_option( 'decimals')); $dec_point = ot_get_option( 'dec_point' ); $thousands_sep = ot_get_option( 'thousands_sep' ); $price .= number_format($int_price,$decimals, $dec_point, $thousands_sep); } else { $price = number_format($int_price); }
echo $price; }

Rispondi quotando
