WordPress.org

Forums

Collapse-O-Matic
Blank paragraphs (1 post)

  1. Simon Blackbourn
    Member
    Posted 3 years ago #

    Hi

    Really great plugin thanks!

    I have one request: if the [expand] shortcode is wrapped around a multi-paragraph block like this...

    [expand title="hello"]
    
    Some stuff.
    
    More stuff
    
    [/expand]

    ... then you get a blank paragraph inserted at the beginning and end of the content.

    I have solved it by adding this code at line 77:

    if ( '</p>' == substr( $content, 0, 4 ) and '<p>' == substr( $content, strlen( $content ) - 3 ) ) {
        $content = substr( $content, 4, strlen( $content ) - 7 );
    }

    If there's any chance of incorporating this (or a better solution of course!) into future releases I'd be very happy.

    Thanks
    Simon

    http://wordpress.org/extend/plugins/jquery-collapse-o-matic/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Collapse-O-Matic
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by Simon Blackbourn
  • This topic is not resolved
  • WordPress version: 3.2.1