Changeset 1148743
- Timestamp:
- 04/29/2015 06:36:58 AM (11 years ago)
- Location:
- woocommerce-better-feeds/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
woocommerce-better-feeds.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-better-feeds/trunk/readme.txt
r1148716 r1148743 4 4 Requires at least: 4.0. 5 5 Tested up to: 4.2 6 Stable tag: 1. 0.06 Stable tag: 1.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 36 36 == Changelog == 37 37 38 = 1.0.0 = 38 = 1.1 = 39 * Some fixes 40 41 = 1.0 = 39 42 * First Release 43 -
woocommerce-better-feeds/trunk/woocommerce-better-feeds.php
r1148716 r1148743 4 4 Plugin URI: http://www.limeframe.gr/wpplugins/woocommerce-better-feeds 5 5 Description: Add Featured Image and Price to woocommerce rss feeds 6 Version: 1. 06 Version: 1.1 7 7 Author: Giannopoulos Konstantinos 8 8 Author URI: http://www.limeframe.gr … … 27 27 28 28 29 function getRssProductPrice() { 30 global $post; 31 $product = new WC_Product( $post->ID ); 32 $theproductprice = $product->price; 33 return $theproductprice; 34 } 29 35 30 36 function wcbfeedAddImageToContent($content) { 31 37 $wcbfeed_rss_image_size = get_option('wcbfeed_rss_image_size'); 32 38 global $post; 33 if ( has_post_thumbnail( $post->ID ) ){ 34 $content = '' . get_the_post_thumbnail( $post->ID, $wcbfeed_rss_image_size, array( 'style' => 'float:left; margin:0 15px 15px 0;' ) ) . '' . $content; 39 if(get_option('wcbfeed_rss_export_image')==1) { 40 if ( has_post_thumbnail( $post->ID ) ){ 41 $content = '' . get_the_post_thumbnail( $post->ID, $wcbfeed_rss_image_size, array( 'style' => 'float:left; margin:0 15px 15px 0;' ) ) . '' . $content; 42 } 43 } 44 if(get_option('wcbfeed_rss_export_price')==1) { 45 $content = '<br>Price:' . getRssProductPrice() . '<br>' . $content; 35 46 } 36 47 return $content; … … 42 53 43 54 44 function addImageUrlToCustom () {55 function addImageUrlToCustomTag() { 45 56 global $post; 46 57 $theproductimage = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID),'medium' ); … … 48 59 } 49 60 50 function getRssProductPrice() { 51 global $post; 52 $product = new WC_Product( $post->ID ); 53 $theproductprice = $product->price; 54 return $theproductprice; 55 } 61 56 62 57 63 add_action('rss_item','wcbfeedAddExtraItems'); … … 66 72 <?php } ?> 67 73 <?php if(get_option('wcbfeed_rss_export_image')==1) { ?> 68 <image><?php echo addImageUrlToCustom ();?></image>74 <image><?php echo addImageUrlToCustomTag();?></image> 69 75 <?php } ?> 70 76 </product>
Note: See TracChangeset
for help on using the changeset viewer.