当用户激活插件时,我想用正确的翻译存储我的自定义帖子。
$a_custom_post = array(
\'post_type\' => "foo-page",
\'post_status\' => \'publish\',
\'post_title\' => __( \'Foo page name\', PLUGIN_DOMAIN ),
\'post_content\' => "",
\'comment_status\' => \'closed\',
\'ping_status\' => \'closed\',
\'post_author\' => 1,
\'guid\' => null
);
wp_insert_post( $a_custom_post, true);
我该怎么做?