Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

startElement( mixed $parser, string $tagName, array $attrs )

XML callback function for the start of a new XML tag.


Description Description


Parameters Parameters

$parser

(mixed) (Required) XML Parser resource.

$tagName

(string) (Required) XML element name.

$attrs

(array) (Required) XML element attributes.


Top ↑

Source Source

File: wp-admin/link-parse-opml.php

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
function startElement( $parser, $tagName, $attrs ) {
    global $names, $urls, $targets, $descriptions, $feeds;
 
    if ( 'OUTLINE' === $tagName ) {
        $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.
}

Top ↑

Changelog Changelog

Changelog
Version Description
0.71 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.