Skip to content

Commit

Permalink
Updated title and description fields
Browse files Browse the repository at this point in the history
  • Loading branch information
sinukaarel committed Feb 2, 2019
1 parent 84f153c commit 167d18c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions inc/Base/DataHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ public static function generate_rss_feed( $category, $limit = 50 ) {
<smly:old_price>' . esc_attr( $price ) . '</smly:old_price>
<smly:discount>-' . esc_attr( $discount ) . '%</smly: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[] = '<item>
<title>' . esc_attr( $prod->get_title() ) . '</title>
<title><![CDATA[' . $prod->get_title() . ']]></title>
<link>' . esc_url( $url ) . '</link>
<guid isPermaLink="True">' . esc_url( $url ) . '</guid>
<pubDate>' . date( 'D, d M Y H:i:s', $create_time ) . '</pubDate>
<description><![CDATA[' . esc_attr( $description ) . ']]></description>
<description><![CDATA[' . $description . ']]></description>
<enclosure url="' . esc_url( $image ) . '" />
<smly:price>' . esc_attr( $splc_price ) . '</smly:price>' . $price_fields . '
</item>
Expand Down

0 comments on commit 167d18c

Please sign in to comment.