Handle local and remote blogroll imports. Props apokalyptik. fixes #4243 for 2.3
git-svn-id: https://develop.svn.wordpress.org/trunk@5439 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
37f7c36ac0
commit
36f1863f59
@ -93,7 +93,12 @@ foreach ($categories as $category) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( isset($opml_url) && $opml_url != '' ) {
|
if ( isset($opml_url) && $opml_url != '' ) {
|
||||||
|
if ( $blogrolling === true ) {
|
||||||
$opml = wp_remote_fopen($opml_url);
|
$opml = wp_remote_fopen($opml_url);
|
||||||
|
} else {
|
||||||
|
$opml = file_get_contents($opml_url);
|
||||||
|
}
|
||||||
|
|
||||||
include_once('link-parse-opml.php');
|
include_once('link-parse-opml.php');
|
||||||
|
|
||||||
$link_count = count($names);
|
$link_count = count($names);
|
||||||
@ -118,6 +123,7 @@ else
|
|||||||
} // end else
|
} // end else
|
||||||
|
|
||||||
if ( ! $blogrolling )
|
if ( ! $blogrolling )
|
||||||
|
apply_filters( 'wp_delete_file', $opml_url);
|
||||||
@unlink($opml_url);
|
@unlink($opml_url);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user