wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
startelement is private and should not be used in themes or plugins directly.
startelement › WordPress Function
Seit0.71
Veraltetn/v
› startelement ( $parser, $tag_name, $attrs )
Zugriff: |
|
Parameter: (3) |
|
Definiert in: |
|
Codex: |
Starts a new XML tag.
Callback function for xml_set_element_handler().Quellcode
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. }