BBCode::Internal_FinishTag( $tag_name )
Contents
Description Description
Source Source
File: includes/admin/parser.php
function Internal_FinishTag($tag_name) { if (strlen($tag_name) <= 0) return false; if (isset($this->start_tags[$tag_name]) && count($this->start_tags[$tag_name])) $pos = array_pop($this->start_tags[$tag_name]); else $pos = -1; if ($pos < 0) return false; $newpos = $this->Internal_CleanupWSByIteratingPointer(@$this->tag_rules[$tag_name]['after_tag'], $pos+1, $this->stack); $delta = $newpos - ($pos+1); $output = $this->Internal_GenerateOutput($newpos); $newend = $this->Internal_CleanupWSByIteratingPointer(@$this->tag_rules[$tag_name]['before_endtag'], 0, $output); $output = $this->Internal_CollectTextReverse($output, count($output) - 1, $newend); while ($delta-- > 0) array_pop($this->stack); $this->Internal_ComputeCurrentClass(); return $output; }