Version Description
- Add support for WordPress 6.1.
Download this release
Release Info
Developer | githubsync |
Plugin | Tumblr Importer |
Version | 1.0 |
Comparing to | |
See all releases |
Code changes from version 0.9 to 1.0
- readme.txt +9 -6
- tumblr-importer.php +25 -9
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: wordpressdotorg, Otto42, dd32, westi, dllh
|
3 |
Tags: tumblr, import
|
4 |
Requires at least: 3.2
|
5 |
-
Tested up to: 6.
|
6 |
-
Stable tag: 0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -25,11 +25,14 @@ Imports a Tumblr blog into a WordPress blog.
|
|
25 |
|
26 |
== Upgrade Notice ==
|
27 |
|
28 |
-
Version 0.9 Removes untested warning for the plugin.
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
-
= 0
|
|
|
|
|
|
|
33 |
* Force WP_IMPORTING to true during the do_blog_import process.
|
34 |
|
35 |
= 0.8 =
|
@@ -55,13 +58,13 @@ Version 0.9 Removes untested warning for the plugin.
|
|
55 |
* Import Media to server (Images, Audio, Custom uploaded Video's)
|
56 |
* Set the date on Media imports for easier management
|
57 |
|
58 |
-
= 0.3 =
|
59 |
* Handle multi-image posts
|
60 |
* Handle question/answer posts
|
61 |
* Handle video posts somewhat better
|
62 |
* Speedup (reduce importer delay from 3 minutes to 1 minute)
|
63 |
|
64 |
-
= 0.2 =
|
65 |
* The audio, video, and image formats no longer use the caption for the titles. Tumblr seems to facilitate putting all sorts of crazy stuff into the caption fields as part of their reblogging system. So instead, these types of posts will have no titles at all. Sorry, but Tumblr simply doesn't have any sort of title fields here to work with, and no data that can be used to "create" a title for them.
|
66 |
* Minor debug error cleanup.
|
67 |
* Sideloading now done on drafts and pages as well.
|
2 |
Contributors: wordpressdotorg, Otto42, dd32, westi, dllh
|
3 |
Tags: tumblr, import
|
4 |
Requires at least: 3.2
|
5 |
+
Tested up to: 6.1
|
6 |
+
Stable tag: 1.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
25 |
|
26 |
== Upgrade Notice ==
|
27 |
|
28 |
+
Version 0.9 Removes untested warning for the plugin.
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
+
= 1.0 =
|
33 |
+
* Add support for WordPress 6.1.
|
34 |
+
|
35 |
+
= 0.9 =
|
36 |
* Force WP_IMPORTING to true during the do_blog_import process.
|
37 |
|
38 |
= 0.8 =
|
58 |
* Import Media to server (Images, Audio, Custom uploaded Video's)
|
59 |
* Set the date on Media imports for easier management
|
60 |
|
61 |
+
= 0.3 =
|
62 |
* Handle multi-image posts
|
63 |
* Handle question/answer posts
|
64 |
* Handle video posts somewhat better
|
65 |
* Speedup (reduce importer delay from 3 minutes to 1 minute)
|
66 |
|
67 |
+
= 0.2 =
|
68 |
* The audio, video, and image formats no longer use the caption for the titles. Tumblr seems to facilitate putting all sorts of crazy stuff into the caption fields as part of their reblogging system. So instead, these types of posts will have no titles at all. Sorry, but Tumblr simply doesn't have any sort of title fields here to work with, and no data that can be used to "create" a title for them.
|
69 |
* Minor debug error cleanup.
|
70 |
* Sideloading now done on drafts and pages as well.
|
tumblr-importer.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpress.org/extend/plugins/tumblr-importer/
|
|
5 |
Description: Import posts from a Tumblr blog.
|
6 |
Author: wordpressdotorg
|
7 |
Author URI: http://wordpress.org/
|
8 |
-
Version: 0
|
9 |
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
10 |
Text Domain: tumblr-importer
|
11 |
Domain Path: /languages
|
@@ -58,10 +58,13 @@ class Tumblr_Import extends WP_Importer_Cron {
|
|
58 |
|
59 |
// Figures out what to do, then does it.
|
60 |
function start() {
|
61 |
-
if ( isset($_POST['restart']) )
|
62 |
$this->restart();
|
|
|
63 |
|
64 |
-
if ( !isset($this->error) )
|
|
|
|
|
65 |
|
66 |
@ $this->consumerkey = defined ('TUMBLR_CONSUMER_KEY') ? TUMBLR_CONSUMER_KEY : ( !empty($_POST['consumerkey']) ? $_POST['consumerkey'] : $this->consumerkey );
|
67 |
@ $this->secretkey = defined ('TUMBLR_SECRET_KEY') ? TUMBLR_SECRET_KEY : ( !empty($_POST['secretkey']) ? $_POST['secretkey'] : $this->secretkey );
|
@@ -85,7 +88,11 @@ class Tumblr_Import extends WP_Importer_Cron {
|
|
85 |
|
86 |
unset ($this->error);
|
87 |
|
88 |
-
|
|
|
|
|
|
|
|
|
89 |
|
90 |
if ( $saved && !isset($_GET['noheader']) ) {
|
91 |
?>
|
@@ -102,12 +109,16 @@ class Tumblr_Import extends WP_Importer_Cron {
|
|
102 |
}
|
103 |
|
104 |
function greet($error=null) {
|
105 |
-
|
106 |
if ( !empty( $error ) )
|
107 |
echo "<div class='error'><p>{$error}</p></div>";
|
108 |
?>
|
109 |
|
110 |
-
<div class='wrap'
|
|
|
|
|
|
|
|
|
|
|
111 |
<h2><?php _e('Import Tumblr', 'tumblr-importer'); ?></h2>
|
112 |
<?php if ( empty($this->request_tokens) ) { ?>
|
113 |
<p><?php _e('Howdy! This importer allows you to import posts from your Tumblr account into your WordPress site.', 'tumblr-importer'); ?></p>
|
@@ -214,9 +225,14 @@ class Tumblr_Import extends WP_Importer_Cron {
|
|
214 |
if ( !empty( $error ) )
|
215 |
echo "<div class='error'><p>{$error}</p></div>";
|
216 |
|
217 |
-
$authors = get_users( array('who' => 'authors') );
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
?>
|
219 |
-
<div class='wrap'><?php echo screen_icon(); ?>
|
220 |
<h2><?php _e('Import Tumblr', 'tumblr-importer'); ?></h2>
|
221 |
<p><?php _e('Please select the Tumblr blog you would like to import into your WordPress site and then click on the "Import this Blog" button to continue.'); ?></p>
|
222 |
<p><?php _e('If your import gets stuck for a long time or you would like to import from a different Tumblr account instead then click on the "Clear account information" button below to reset the importer.','tumblr-importer'); ?></p>
|
@@ -966,7 +982,7 @@ class Tumblr_Import extends WP_Importer_Cron {
|
|
966 |
* Here we override the default behavior.
|
967 |
*/
|
968 |
function filter_allow_empty_content( $maybe_empty, $_post ) {
|
969 |
-
if ( 'gallery' == $_post['format'] )
|
970 |
return false;
|
971 |
|
972 |
return $maybe_empty;
|
5 |
Description: Import posts from a Tumblr blog.
|
6 |
Author: wordpressdotorg
|
7 |
Author URI: http://wordpress.org/
|
8 |
+
Version: 1.0
|
9 |
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
10 |
Text Domain: tumblr-importer
|
11 |
Domain Path: /languages
|
58 |
|
59 |
// Figures out what to do, then does it.
|
60 |
function start() {
|
61 |
+
if ( isset($_POST['restart']) ) {
|
62 |
$this->restart();
|
63 |
+
}
|
64 |
|
65 |
+
if ( !isset($this->error) ) {
|
66 |
+
$this->error = null;
|
67 |
+
}
|
68 |
|
69 |
@ $this->consumerkey = defined ('TUMBLR_CONSUMER_KEY') ? TUMBLR_CONSUMER_KEY : ( !empty($_POST['consumerkey']) ? $_POST['consumerkey'] : $this->consumerkey );
|
70 |
@ $this->secretkey = defined ('TUMBLR_SECRET_KEY') ? TUMBLR_SECRET_KEY : ( !empty($_POST['secretkey']) ? $_POST['secretkey'] : $this->secretkey );
|
88 |
|
89 |
unset ($this->error);
|
90 |
|
91 |
+
$saved = false;
|
92 |
+
|
93 |
+
if ( !isset($_POST['restart']) ) {
|
94 |
+
$saved = $this->save_vars();
|
95 |
+
}
|
96 |
|
97 |
if ( $saved && !isset($_GET['noheader']) ) {
|
98 |
?>
|
109 |
}
|
110 |
|
111 |
function greet($error=null) {
|
|
|
112 |
if ( !empty( $error ) )
|
113 |
echo "<div class='error'><p>{$error}</p></div>";
|
114 |
?>
|
115 |
|
116 |
+
<div class='wrap'>
|
117 |
+
<?php
|
118 |
+
if ( version_compare( get_bloginfo( 'version' ), '3.8.0', '<' ) ) {
|
119 |
+
screen_icon();
|
120 |
+
}
|
121 |
+
?>
|
122 |
<h2><?php _e('Import Tumblr', 'tumblr-importer'); ?></h2>
|
123 |
<?php if ( empty($this->request_tokens) ) { ?>
|
124 |
<p><?php _e('Howdy! This importer allows you to import posts from your Tumblr account into your WordPress site.', 'tumblr-importer'); ?></p>
|
225 |
if ( !empty( $error ) )
|
226 |
echo "<div class='error'><p>{$error}</p></div>";
|
227 |
|
228 |
+
$authors = get_users( version_compare( get_bloginfo( 'version' ), '5.9.0', '<' ) ? array( 'who' => 'authors' ) : array( 'capability' => 'edit_posts' ) );
|
229 |
+
?>
|
230 |
+
<div class='wrap'>
|
231 |
+
<?php
|
232 |
+
if ( version_compare( get_bloginfo( 'version' ), '3.8.0', '<' ) ) {
|
233 |
+
screen_icon();
|
234 |
+
}
|
235 |
?>
|
|
|
236 |
<h2><?php _e('Import Tumblr', 'tumblr-importer'); ?></h2>
|
237 |
<p><?php _e('Please select the Tumblr blog you would like to import into your WordPress site and then click on the "Import this Blog" button to continue.'); ?></p>
|
238 |
<p><?php _e('If your import gets stuck for a long time or you would like to import from a different Tumblr account instead then click on the "Clear account information" button below to reset the importer.','tumblr-importer'); ?></p>
|
982 |
* Here we override the default behavior.
|
983 |
*/
|
984 |
function filter_allow_empty_content( $maybe_empty, $_post ) {
|
985 |
+
if ( ! empty( $_post['format'] ) && 'gallery' == $_post['format'] )
|
986 |
return false;
|
987 |
|
988 |
return $maybe_empty;
|