Skip to content

Instantly share code, notes, and snippets.

@mrmt
Created March 8, 2016 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrmt/cee4d1fb779d26c3c53a to your computer and use it in GitHub Desktop.
Save mrmt/cee4d1fb779d26c3c53a to your computer and use it in GitHub Desktop.
--- /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 )
@mrmt
Copy link
Author

mrmt commented Mar 8, 2016

NucleusからWordPressへ移行 - なんか:かんがえて-6
http://blog.mrmt.net/entry/2010/09/11/050933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment