From 167d18cfa79bef20af90b797b6130f262cc777c1 Mon Sep 17 00:00:00 2001 From: Kaarel Rooparg Date: Sat, 2 Feb 2019 15:44:41 +0200 Subject: [PATCH] Updated title and description fields --- inc/Base/DataHandler.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/inc/Base/DataHandler.php b/inc/Base/DataHandler.php index f95b686..9461d8b 100644 --- a/inc/Base/DataHandler.php +++ b/inc/Base/DataHandler.php @@ -97,14 +97,15 @@ public static function generate_rss_feed( $category, $limit = 50 ) { ' . esc_attr( $price ) . ' -' . esc_attr( $discount ) . '%'; } - // Remove image if inserted to description. - $description = preg_replace( '/\[.*caption\]/', '', ( $prod->get_description() ) ); + // Parse image to form element. + $description = do_shortcode( $prod->get_description()); + $items[] = ' - ' . esc_attr( $prod->get_title() ) . ' + <![CDATA[' . $prod->get_title() . ']]> ' . esc_url( $url ) . ' ' . esc_url( $url ) . ' ' . date( 'D, d M Y H:i:s', $create_time ) . ' - + ' . esc_attr( $splc_price ) . '' . $price_fields . '