Update Option success"; } $width_value=get_option( 'sgt_act_thumbnail_width' ); ?>

Amazon Custom Thumbnail Option :

Thumbnail Width : px

Did you like this plugin? if you can, donate to developers :)


'; if(!is_single() && !is_attachment() ) { $name = get_post_meta($post->ID, 'azon_image', true); $rating = get_post_meta($post->ID, 'azon_rating', true); $price = get_post_meta($post->ID, 'azon_price', true); $list_price = get_post_meta($post->ID, 'azon_listprice', true); $url = get_post_meta($post->ID, 'azon_url', true); $cart = get_post_meta($post->ID, 'azon_cart', true); $titles=get_the_title(); if( $name ) { $html .= ''.$titles.''; } $html .=''; if( $rating ) { $html .= ''.$titles.' product rating

'; } $html .='
'; if( !$list_price ) { $list_price_tmp = ' -'; }else { $list_price_tmp='$ '.$list_price; } $html .= '
'; if( $price ) { $price_tmp= '$ '.$price; }else { $price_tmp= ' -'; } $html .= '
'; if( $list_price && $price ) { if ($list_price >= $price) { $save_point= ($list_price - $price); $save_prcn= (($list_price - $price)*100)/$list_price; $html .= '
'; }else { $html .= '
'; } }else { $html .= '
'; } $html .='
'; if( $url ) { $html .= ''.$titles.' check price and available at amazon site'; } if( $cart ) { $html .= 'add to cart
'; } } $html .='
'; if(!empty($name)) { return $html; }else { $default = get_post_meta($post->ID, '_thumbnail_id', true); if ($default<>'-1') { //echo $default; $nm = get_post_meta($default, '_wp_attached_file', true); $img=home_url().'/wp-content/uploads/'.$nm; $html = ''; //$thumb=''; }else { $html =''; } return $html; } } add_action( 'publish_post', 'act_add_thumbnail_id' ); function act_add_thumbnail_id($postid) { if(!wp_is_post_revision($post_ID)) { $field_name = '_thumbnail_id'; add_post_meta($postid, $field_name, '-1', true); } } add_action( 'wp_enqueue_scripts', 'register_act_amazon_custom_css' ); function register_act_amazon_custom_css() { $width_value=get_option( 'sgt_act_thumbnail_width' ); wp_register_style( 'act_amazon_custom_css', plugins_url( 'act_amazon_custom_thumbnail/act_amazon_custom_css.php?warna=white&lebar='.$width_value ) ); wp_enqueue_style( 'act_amazon_custom_css' ); } ?>