Created
March 8, 2016 03:17
-
-
Save mrmt/cee4d1fb779d26c3c53a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/share/wordpress/wp-admin/import/mt.php.org 2010-09-11 13:28:52.000000000 +0900 | |
+++ /usr/share/wordpress/wp-admin/import/mt.php 2010-09-10 21:51:19.000000000 +0900 | |
@@ -220,6 +220,9 @@ | |
if ( is_wp_error( $post_id ) ) | |
return $post_id; | |
+ // mrmt | |
+ add_post_meta($post_id, 'nucleus_itemid', $post->nucleus_itemid, 0); | |
+ | |
// Add categories. | |
if ( 0 != count($post->categories) ) { | |
wp_create_categories($post->categories, $post_id); | |
@@ -324,6 +327,12 @@ | |
$context = 'ping'; | |
+ } else if ( 0 === strpos($line, 'ITEMID:') ) { | |
+ // mrmt | |
+ $m = array(); | |
+ preg_match('/^ITEMID: (\d+)/', $line, $m); | |
+ $post->nucleus_itemid = $m[1]; | |
} else if ( 0 === strpos($line, "AUTHOR:") ) { | |
$author = trim( substr($line, strlen("AUTHOR:")) ); | |
if ( '' == $context ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NucleusからWordPressへ移行 - なんか:かんがえて-6
http://blog.mrmt.net/entry/2010/09/11/050933