AI助手支持GPT4.0
When migrating from another system (i.e. Drupal), WordPress can require data that is currently serialized to be unserialized and stored in its own WordPress-specific tables/columns.
从另一个系统(即Drupal)迁移时,WordPress可能要求将当前序列化的数据进行非序列化并存储在其自己的WordPress特定表/列中。
This plugin can look for such data, and deserialize and store it, based on the plugin settings.
该插件可以根据插件设置查找此类数据,并反序列化并存储它。 p>
This plugin handles one (configurable) imported field at a time, so all imported, serialized data needs to be stored in that single field.
此插件一次处理一个(可配置)导入字段,因此所有导入的序列化数据都需要存储在该单个字段中。
Each key in that field can be mapped to any column, and stored in either wp_postmeta or wp_posts, as shown below:
wp_postmeta
wp_posts
该字段中的每个键都可以映射到任何列,并存储在 wp_postmeta code>或 wp_posts code>中,如下所示: p>` ` code> pre>if ( $maps[$key][‘wp_table’] === ‘wp_postmeta’ && $value != ” && $value != NULL ) { if($ maps [$ key] ['wp_table'] ===‘wp_postmeta'&& $ value!=” && $ value!= NULL){ add_post_meta( $post_id, $maps[$key][‘wp_column’], $value, $maps[$key][‘unique’] );add_post_meta($ post_id,$ maps [$ key] ['wp_column'],$ value,$ maps [$ key] ['unique']); } else if ( $maps[$key][‘wp_table’] === ‘wp_posts’ && $value != ” && $value != NULL ) { }否则if($ maps [$ key] ['wp_table'] ===‘wp_posts'&& $ value!=” && $ value!= NULL){ $post = array( $ post = array( ‘ID’ => $post_id, ‘ID’=> $ post_id, $maps[$key][‘wp_column’] => $value $ maps [$ key] [‘wp_column’] => $ value ); ); wp_update_post( $post );wp_update_post($ post); } } `` p>The wp_schedule_event method is used to deserialize the data and place it into its appropriate fields, and it can run at any configurable interval (you pick a number, and then a unit of time).< wp_schedule_event code>方法用于反序列化数据并将其放入其适当的字段中,并且它可以按任何可配置的时间间隔运行(您选择一个数字,然后选择一个时间单位)。 /p>/ p>
wp_postmeta code>或 wp_posts code>中,如下所示: p>` ` code> pre>if ( $maps[$key][‘wp_table’] === ‘wp_postmeta’ && $value != ” && $value != NULL ) { if($ maps [$ key] ['wp_table'] ===‘wp_postmeta'&& $ value!=” && $ value!= NULL){ add_post_meta( $post_id, $maps[$key][‘wp_column’], $value, $maps[$key][‘unique’] );add_post_meta($ post_id,$ maps [$ key] ['wp_column'],$ value,$ maps [$ key] ['unique']); } else if ( $maps[$key][‘wp_table’] === ‘wp_posts’ && $value != ” && $value != NULL ) { }否则if($ maps [$ key] ['wp_table'] ===‘wp_posts'&& $ value!=” && $ value!= NULL){ $post = array( $ post = array( ‘ID’ => $post_id, ‘ID’=> $ post_id, $maps[$key][‘wp_column’] => $value $ maps [$ key] [‘wp_column’] => $ value ); ); wp_update_post( $post );wp_update_post($ post); } } `` p>The wp_schedule_event method is used to deserialize the data and place it into its appropriate fields, and it can run at any configurable interval (you pick a number, and then a unit of time).< wp_schedule_event code>方法用于反序列化数据并将其放入其适当的字段中,并且它可以按任何可配置的时间间隔运行(您选择一个数字,然后选择一个时间单位)。 /p>/ p>
wp_posts code>中,如下所示: p>` ` code> pre>if ( $maps[$key][‘wp_table’] === ‘wp_postmeta’ && $value != ” && $value != NULL ) { if($ maps [$ key] ['wp_table'] ===‘wp_postmeta'&& $ value!=” && $ value!= NULL){ add_post_meta( $post_id, $maps[$key][‘wp_column’], $value, $maps[$key][‘unique’] );add_post_meta($ post_id,$ maps [$ key] ['wp_column'],$ value,$ maps [$ key] ['unique']); } else if ( $maps[$key][‘wp_table’] === ‘wp_posts’ && $value != ” && $value != NULL ) { }否则if($ maps [$ key] ['wp_table'] ===‘wp_posts'&& $ value!=” && $ value!= NULL){ $post = array( $ post = array( ‘ID’ => $post_id, ‘ID’=> $ post_id, $maps[$key][‘wp_column’] => $value $ maps [$ key] [‘wp_column’] => $ value ); ); wp_update_post( $post );wp_update_post($ post); } } `` p>The wp_schedule_event method is used to deserialize the data and place it into its appropriate fields, and it can run at any configurable interval (you pick a number, and then a unit of time).< wp_schedule_event code>方法用于反序列化数据并将其放入其适当的字段中,并且它可以按任何可配置的时间间隔运行(您选择一个数字,然后选择一个时间单位)。 /p>/ p>
` ` code> pre>if ( $maps[$key][‘wp_table’] === ‘wp_postmeta’ && $value != ” && $value != NULL ) { if($ maps [$ key] ['wp_table'] ===‘wp_postmeta'&& $ value!=” && $ value!= NULL){ add_post_meta( $post_id, $maps[$key][‘wp_column’], $value, $maps[$key][‘unique’] );add_post_meta($ post_id,$ maps [$ key] ['wp_column'],$ value,$ maps [$ key] ['unique']); } else if ( $maps[$key][‘wp_table’] === ‘wp_posts’ && $value != ” && $value != NULL ) { }否则if($ maps [$ key] ['wp_table'] ===‘wp_posts'&& $ value!=” && $ value!= NULL){ $post = array( $ post = array( ‘ID’ => $post_id, ‘ID’=> $ post_id, $maps[$key][‘wp_column’] => $value $ maps [$ key] [‘wp_column’] => $ value ); ); wp_update_post( $post );wp_update_post($ post); } } `` p>The wp_schedule_event method is used to deserialize the data and place it into its appropriate fields, and it can run at any configurable interval (you pick a number, and then a unit of time).< wp_schedule_event code>方法用于反序列化数据并将其放入其适当的字段中,并且它可以按任何可配置的时间间隔运行(您选择一个数字,然后选择一个时间单位)。 /p>/ p>
`
code> pre>
if ( $maps[$key][‘wp_table’] === ‘wp_postmeta’ && $value != ” && $value != NULL ) {
if($ maps [$ key] ['wp_table'] ===‘wp_postmeta'&& $ value!=” && $ value!= NULL){
add_post_meta( $post_id, $maps[$key][‘wp_column’], $value, $maps[$key][‘unique’] );
add_post_meta($ post_id,$ maps [$ key] ['wp_column'],$ value,$ maps [$ key] ['unique']);
} else if ( $maps[$key][‘wp_table’] === ‘wp_posts’ && $value != ” && $value != NULL ) {
}否则if($ maps [$ key] ['wp_table'] ===‘wp_posts'&& $ value!=” && $ value!= NULL){
$post = array(
$ post = array(
‘ID’ => $post_id,
‘ID’=> $ post_id,
$maps[$key][‘wp_column’] => $value
$ maps [$ key] [‘wp_column’] => $ value
);
);
wp_update_post( $post );
wp_update_post($ post);
}
` p>
The wp_schedule_event method is used to deserialize the data and place it into its appropriate fields, and it can run at any configurable interval (you pick a number, and then a unit of time).<
wp_schedule_event
wp_schedule_event code>方法用于反序列化数据并将其放入其适当的字段中,并且它可以按任何可配置的时间间隔运行(您选择一个数字,然后选择一个时间单位)。 /p>/ p>
/p>
/ p>
deserialize-metadata
/wp-content/plugins/
deserialize-metadata code>文件夹上载到 / wp-content / plugins / code>目录 li>Activate the plugin through the ‘Plugins’ menu in WordPress通过WordPress中的“插件”菜单激活插件 li>Fill out the settings on the Deserialize Metadata subpage of the Settings menu填写“设置”菜单中“反序列化元数据”子页面上的设置 li>
/ wp-content / plugins / code>目录 li>Activate the plugin through the ‘Plugins’ menu in WordPress通过WordPress中的“插件”菜单激活插件 li>Fill out the settings on the Deserialize Metadata subpage of the Settings menu填写“设置”菜单中“反序列化元数据”子页面上的设置 li>
ol>
原文出处:http://www.sanshu.cn/a/10646.html
群主管理都是支付大佬