Codeinwp / bookrev-lite

🚩 [RETIRED]
0 stars 9 forks source link

Fixed Slider Issue (retry) #25

Closed cookieshell closed 9 years ago

cookieshell commented 9 years ago

Initial description that I wrote while trying to submit the commit: Fixed issue #23 that @HardeepAsrani mentioned in #23 and tried to fix in #24 but there was a github commit error.

Additional remark:

Tried to fix the issue @HardeepAsrani mentioned but apparently I also get some kind of github glitch that mentions 1 addition and 389 deletions but in fact there are a few lines (2-3) of code modified.

if(!function_exists("book_rev_lite_wpr_get_product_image")) {
        function book_rev_lite_wpr_get_product_image() {
            if(get_post_meta(get_the_ID(), 'cwp_rev_product_image', 'true')) {
                return get_post_meta(get_the_ID(), 'cwp_rev_product_image', true);
            } else {
                return get_theme_mod('default-product-image-upload');
            }
        }       
    }
if(!function_exists("book_rev_lite_wpr_get_product_image")) {
        function book_rev_lite_wpr_get_product_image() {
            if(get_post_meta(get_the_ID(), 'cwp_rev_product_image', 'true')) {
                return get_post_meta(get_the_ID(), 'cwp_rev_product_image', true);
            } elseif( has_post_thumbnail() ) {
                return wp_get_attachment_url(get_post_thumbnail_id($post->ID));
            } else {
                return get_theme_mod('default-product-image-upload');
            }
        }       
    }