我想以一种可扩展的方式编写这段代码。
$my_item = array(
\'post_title\' => $item->get_title(),
\'post_content\' => \'\',
\'post_status\' => \'publish\',
\'post_excerpt\' => $item->get_description(),
\'post_type\' => \'post\'
);
如果我在插件中使用它,我希望能够创建另一个插件,可以更改该数组并提供不同的值或参数。我该怎么做?