October 22, 2015 at 5:42 pm #4706
For some reason, fields I’m retrieving via Piklist are now being backslashed. I’m pretty sure this started with 0.9.9.
newsletter_highlightsis part of an add-more group:
array( 'type' => 'editor', 'field' => 'newsletter_highlights', 'label' => __( 'Highlights of this issue' ), 'columns' => 12, 'options' => array ( 'media_buttons' => false, 'teeny' => true, ), ),
I’m using the Piklist loop to display each group:
$newsletters = get_post_meta( $post->ID, 'newsletter_archive', true ); ?> <div class="newsletter-list"> <?php piklist( 'templates/newsletter-template', array( 'data' => $newsletters, 'loop' => 'data' ) ); ?>
And the template code uses wptexturize and wpautop:
$highlights = wptexturize( wpautop( $data['newsletter_highlights'] ) );
When I view the content in the editor, it looks fine:
Highlights include the life of underwater filmmaker and MRWC Board member Jeremy Monroe, MRWC's financial picture, and an interview with Michael Pope.
but on the page it displays as:
Highlights include the life of underwater filmmaker and MRWC Board member Jeremy Monroe, MRWC\'s financial picture, and an interview with Michael Pope.
October 22, 2015 at 5:45 pm #4707
stripslashesto my processing is a workaround:
$highlights = wptexturize( wpautop( stripslashes( $data['newsletter_highlights'] ) ) );
October 22, 2015 at 6:46 pm #4708
October 23, 2015 at 1:02 am #4712
This is fixed in the next beta release.
You must be logged in to reply to this topic.