Moron-proof Price mod for 3.05.2
Hi guys,
Under my previous version Classipress 3.04 I've installed this mod that worked pretty fine.
Reference >
http://appthemes.com/blog/classipres...torial-part-2/
<?php
/**
* Write your own functions or modify functions, actions, and filters using this file.
* LIST YOUR FUNCTIONS (optional):
* cp_import_wp_childstyle() [CUSTOM]
* cp_get_price() [OVERWRITE]
*/
//Place All Your Custom Function Below This Line
//change price to spit out correct looking currency and ignore anything that's not a price.
function cp_get_price($postid) {
if(get_post_meta($postid, 'cp_price', true)) {
$price_out = get_post_meta($postid, 'cp_price', true);
// uncomment the line below to change price format
$price_out = ereg_replace("[^0-9.]", "", $price_out);
$price_out = number_format($price_out, 2, '.', ',');
$price_out = cp_pos_currency($price_out);
} else {
if( get_option('cp_force_zeroprice') == 'yes' )
$price_out = cp_pos_currency(0);
else
$price_out = ' ';
}
echo $price_out;
}
How do I get this price mod working under 3.05.2.