class WPV_Editor_Parser
__construct(string $content, array $shortcodes)
string
string to parse
array
list of supported shortcodes and their options
parse() : \[type]
Two special node types: 1. ROOT - a single root element 2. text - unrecognized shortcodes and text blocks. Adjascent text nodes are collapsed together
\[type]
[description]get_attributes(int $pos)
int
parser position
get_type(int $pos) : array
int
parser position
array
array of two elements - shortcode type and parser positionignore_whitespace(int $pos) : int
int
parser position
int
parser positionis_accepting(string $type) : boolean
string
shortcode type
boolean
true if nested shortcodes are enabled for $typeis_supported(string $type) : boolean
string
shortcode type
boolean
true if a shortcode of type $type is supported by the Vamtam editorknown_shortcodes()
splits the original list in two)
new_block(string $type, \object $parent) : object
string
node type
\object
reference to the new node's parent node
object
newly constructed nodeprepare() : string
string
cleaned up contenttrim_text_nodes(int $pos) : int
int
parser position
int
parser position after trimming the text