plugin updates
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
* WordPress Importer class for managing parsing of WXR files.
|
||||
*/
|
||||
class WXR_Parser {
|
||||
function parse( $file ) {
|
||||
public function parse( $file ) {
|
||||
// Attempt to use proper XML parsers first
|
||||
if ( extension_loaded( 'simplexml' ) ) {
|
||||
$parser = new WXR_Parser_SimpleXML;
|
||||
$parser = new WXR_Parser_SimpleXML();
|
||||
$result = $parser->parse( $file );
|
||||
|
||||
// If SimpleXML succeeds or this is an invalid WXR file then return the results
|
||||
@@ -21,7 +21,7 @@ class WXR_Parser {
|
||||
return $result;
|
||||
}
|
||||
} elseif ( extension_loaded( 'xml' ) ) {
|
||||
$parser = new WXR_Parser_XML;
|
||||
$parser = new WXR_Parser_XML();
|
||||
$result = $parser->parse( $file );
|
||||
|
||||
// If XMLParser succeeds or this is an invalid WXR file then return the results
|
||||
@@ -47,7 +47,7 @@ class WXR_Parser {
|
||||
}
|
||||
|
||||
// use regular expressions if nothing else available or this is bad XML
|
||||
$parser = new WXR_Parser_Regex;
|
||||
$parser = new WXR_Parser_Regex();
|
||||
return $parser->parse( $file );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user