unematiii / wp-shortcode-tree

Parses (nested) shortcodes into tree hierarcy.
MIT License
3 stars 1 forks source link

fix: constructor argument $shortcodes was never used #6

Closed Connum closed 4 years ago

Connum commented 4 years ago

The constructor argument of the Shortcode class was never used and instead overridden with an empty array:

public function __construct($name = '', $atts = array(), $content = '', $shortcodes = array(), $parent = null) {
    $this->name = $name;
    $this->atts = $atts;
    $this->content = $content;
    $this->shortcodes = array (); // <===
...

I encountered this while writing a test case for when #3 is merged.

unematiii commented 4 years ago

Thanks! Will merge.