]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/link-parse-opml.php
WordPress 4.4.1
[autoinstalls/wordpress.git] / wp-admin / link-parse-opml.php
index 6197281d8667bc891e9150dddac608c47994902f..1d051b523729e73a42c3d2825fc3038a2317f533 100644 (file)
@@ -9,6 +9,9 @@
 if ( ! defined('ABSPATH') )
        die();
 
+/**
+ * @global string $opml
+ */
 global $opml;
 
 /**
@@ -74,10 +77,13 @@ $xml_parser = xml_parser_create();
 // Set the functions to handle opening and closing tags
 xml_set_element_handler($xml_parser, "startElement", "endElement");
 
-if (!xml_parse($xml_parser, $opml, true)) {
-       echo(sprintf(__('XML error: %1$s at line %2$s'),
-       xml_error_string(xml_get_error_code($xml_parser)),
-       xml_get_current_line_number($xml_parser)));
+if ( ! xml_parse( $xml_parser, $opml, true ) ) {
+       printf(
+               /* translators: 1: error message, 2: line number */
+               __( 'XML Error: %1$s at line %2$s' ),
+               xml_error_string( xml_get_error_code( $xml_parser ) ),
+               xml_get_current_line_number( $xml_parser )
+       );
 }
 
 // Free up memory used by the XML parser