WordPress.org

Ready to get started?Download WordPress

Forums

Collapse-O-Matic
[resolved] Nested expand shortcodes (4 posts)

  1. AaronAsh
    Member
    Posted 1 year ago #

    Hi all,

    I wanted to use nested expand shortcodes and found that wordpress doesn't support that out of the box.

    I have modified collapse-o-matic.php so that it supports nested expand blocks. The code comes originally from the way the j-shortcodes plugin handles it (you can see this here: http://plugins.trac.wordpress.org/browser/j-shortcodes/trunk/j-utils.php).

    Here is my modified collapse-o-matic.php: http://pastebin.com/kNRiRG2P

    I thought I'd post this here in case the developer wants to include that in the plugin or anyone else wants to use it.

    Example:

    [expand title='Root Expand block']
      This is the root expand block.
      [=expand title='Nest level 1']
        Nested block level 1
        [==expand title='Nest level 2']
          Nested block level 2.
        [==/expand]
      [=/expand]
    [/expand]

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

  2. AaronAsh
    Member
    Posted 1 year ago #

    Here's a screenshot: http://i.imgur.com/Eogzj.png

  3. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Aaron,
    Thank you for your code contribution. We certainly want the plugin to work out of the box, however what exactly is not working for you? Did you structure your nested expands as described and demonstrated in the documentation on Nested Expand Elements?

    Regardless, we are always thankful for feedback from our users... twice as thankful when the feedback includes patches.
    http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#nested

  4. AaronAsh
    Member
    Posted 1 year ago #

    Haha crap.

    Turns out I just hadn't read the docs properly.

    Oh well, cheers for an excellent plugin anyway! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic