WordPress.org

Ready to get started?Download WordPress

Forums

Collapse-O-Matic
Blank paragraphs (1 post)

  1. Lumpysimon
    Member
    Posted 2 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

About this Topic