wp/wp-admin/link-parse-opml.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
     7  */
     7  */
     8 
     8 
     9 if ( ! defined('ABSPATH') )
     9 if ( ! defined('ABSPATH') )
    10 	die();
    10 	die();
    11 
    11 
       
    12 /**
       
    13  * @global string $opml
       
    14  */
    12 global $opml;
    15 global $opml;
    13 
    16 
    14 /**
    17 /**
    15  * XML callback function for the start of a new XML tag.
    18  * XML callback function for the start of a new XML tag.
    16  *
    19  *
    67 function endElement($parser, $tagName) {
    70 function endElement($parser, $tagName) {
    68 	// Nothing to do.
    71 	// Nothing to do.
    69 }
    72 }
    70 
    73 
    71 // Create an XML parser
    74 // Create an XML parser
       
    75 if ( ! function_exists( 'xml_parser_create' ) ) {
       
    76 	trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
       
    77 	wp_die( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
       
    78 }
       
    79 
    72 $xml_parser = xml_parser_create();
    80 $xml_parser = xml_parser_create();
    73 
    81 
    74 // Set the functions to handle opening and closing tags
    82 // Set the functions to handle opening and closing tags
    75 xml_set_element_handler($xml_parser, "startElement", "endElement");
    83 xml_set_element_handler($xml_parser, "startElement", "endElement");
    76 
    84