From 65ffc785483bfb5bf982214fdbcbafc2e7cff86f Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 10 May 2007 21:21:37 +0000 Subject: [PATCH] Handle local and remote blogroll imports. Props apokalyptik. fixes #4243 for 2.2 git-svn-id: http://svn.automattic.com/wordpress/branches/2.2@5438 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/link-import.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-admin/link-import.php b/wp-admin/link-import.php index bda2c2d3ce..abbbdc238b 100644 --- a/wp-admin/link-import.php +++ b/wp-admin/link-import.php @@ -93,7 +93,12 @@ foreach ($categories as $category) { } if ( isset($opml_url) && $opml_url != '' ) { - $opml = wp_remote_fopen($opml_url); + if ( $blogrolling === true ) { + $opml = wp_remote_fopen($opml_url); + } else { + $opml = file_get_contents($opml_url); + } + include_once('link-parse-opml.php'); $link_count = count($names); @@ -118,6 +123,7 @@ else } // end else if ( ! $blogrolling ) + apply_filters( 'wp_delete_file', $opml_url); @unlink($opml_url); ?>