WordPress.org

Ready to get started?Download WordPress

Forums

Standout Color Boxes and Buttons
[resolved] Feature-Request: nested color-boxes (6 posts)

  1. HealingChimeAudio
    Member
    Posted 1 year ago #

    I love the simplicity of this plugin. It works really great and has a light structure I admire in a plugin. This is more of a feature request:

    I would love to be able to nest color boxes and my attempts thus far have failed. For example I could create a large box container and have a smaller box inside to feature some content. Let me know if this idea fits with the vision and usability of the plugin.

    peace!

    http://wordpress.org/extend/plugins/standout-color-boxes-and-buttons/

  2. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    I'm afraid not, see http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes

    This is a limitation of the context-free regexp parser used by do_shortcode() - it is very fast but does not count levels of nesting, so it can't match each opening tag with its correct closing tag in these cases

  3. HealingChimeAudio
    Member
    Posted 1 year ago #

    Ok thanks for the response. I see its more of an issue of how shortcodes are translated than anything else. Probably supplying a parameter like an ID value would not help sort out where one shortcode ends inside anther callout.
    Thanks!

    Noah

  4. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    That article is pretty unequivocal. I'm sure if there was a way to do it, it would have said so.

  5. HealingChimeAudio
    Member
    Posted 1 year ago #

    well I suppose I could create a second version of the plugin with a different name :)

  6. HealingChimeAudio
    Member
    Posted 1 year ago #

    or we could just create a specification for the inner and outer with two separate shortcode calls:

    [color-box]
    [color-box-inner]
    [/color-box-inner]
    [/color-box]

    So yes, it does seem impossible given the limitation of one shortcode to do it all, but it is not impossible to create multiple shortcodes within one plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.