wpseek.com
A WordPress-centric search engine for devs and theme authors
startelement is private and should not be used in themes or plugins directly.
startelement › WordPress Function
Since0.71
Deprecatedn/a
› startelement ( $parser, $tag_name, $attrs )
Access: |
|
Parameters: (3) |
|
Defined at: |
|
Codex: |
Starts a new XML tag.
Callback function for xml_set_element_handler().Source
function startElement( $parser, $tag_name, $attrs ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid global $names, $urls, $targets, $descriptions, $feeds; if ( 'OUTLINE' === $tag_name ) { $name = ''; if ( isset( $attrs['TEXT'] ) ) { $name = $attrs['TEXT']; } if ( isset( $attrs['TITLE'] ) ) { $name = $attrs['TITLE']; } $url = ''; if ( isset( $attrs['URL'] ) ) { $url = $attrs['URL']; } if ( isset( $attrs['HTMLURL'] ) ) { $url = $attrs['HTMLURL']; } // Save the data away. $names[] = $name; $urls[] = $url; $targets[] = isset( $attrs['TARGET'] ) ? $attrs['TARGET'] : ''; $feeds[] = isset( $attrs['XMLURL'] ) ? $attrs['XMLURL'] : ''; $descriptions[] = isset( $attrs['DESCRIPTION'] ) ? $attrs['DESCRIPTION'] : ''; } // End if outline. }