- foreach ($openTags as $openTag) {
- if ($closing && $openTag == $tag) {
- continue;
- }
- if ($this->bbcodes[$openTag]->allowedChildren == 'all') {
- continue;
- }
- if ($this->bbcodes[$openTag]->allowedChildren == 'none') {
- return false;
- }
-
- $arguments = \explode('^', $this->bbcodes[$openTag]->allowedChildren);
- if (!empty($arguments[1])) {
- $tags = \explode(',', $arguments[1]);
- } else {
- $tags = [];
- }
-
- if ($arguments[0] == 'none' && !\in_array($tag, $tags)) {
- return false;
- }
- if ($arguments[0] == 'all' && \in_array($tag, $tags)) {
- return false;
- }
- }
-