protected function importPbPostMeta($pid, $post_type, $p)
{
if ('metadata' == $post_type) {
$this->importMetaBoxes($pid, $p);
} elseif ('part' == $post_type) {
$part_content = $this->searchForMetaValue('pb_part_content', $p['postmeta']);
if ($part_content) {
update_post_meta($pid, 'pb_part_content', $part_content);
}
} else {
$meta_to_update = apply_filters('pb_import_metakeys', array('pb_section_author', 'pb_section_license', 'pb_short_title', 'pb_subtitle'));
foreach ($meta_to_update as $meta_key) {
$meta_val = $this->searchForMetaValue($meta_key, $p['postmeta']);
if (is_serialized($meta_val)) {
$meta_val = unserialize($meta_val);
}
if ($meta_val) {
update_post_meta($pid, $meta_key, $meta_val);
}
}
}
}