Adding before/after to Cdata results

Top WooCommerce & WordPress Plugins Forums Product XML Feeds for WooCommerce Adding before/after to Cdata results

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #105775
    Mateusz
    Guest

    in file includes/shortcodes/class-alg-shortcodes.php:145

    // CDATA
    if ( 'yes' === $atts['cdata'] ) {
    	$result = '';
    }
    // Before/After
    return $atts['before'] . $result . $atts['after'];
    

    It shold be posible to add before/after to cdata results, like below.

    if ( '' != $atts['cdata_before'] ) {
    	$result = $atts['before'] . $result;
    }
    
    if ( '' != $atts['cdata_after'] ) {
    	$result = $result . $atts['after'];
    }
    
    // CDATA
    if ( 'yes' === $atts['cdata'] ) {
    	$result = '';
    }
    
    // Before/After
    return $atts['before'] . $result . $atts['after'];
    
    • This topic was modified 11 months, 2 weeks ago by Omar Dabbas.
    #105776
    WPWhale
    Moderator

    Hi,

    Thanks for the suggestion, currently the cdata_before & cdata_after aren’t supported in shortcodes, thus we can’t change it (unless otherwise needed).

    Let me know if we can help in anything else.

    Omar

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.