Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
--- /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

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.