I would like to write this piece of code in an extendible way.
$my_item = array(
'post_title' => $item->get_title(),
'post_content' => '',
'post_status' => 'publish',
'post_excerpt' => $item->get_description(),
'post_type' => 'post'
);
If I use this in a plugin I would like to be able to create another plugin that can change that array and give different values or parameters. How can I do that?
Provide a filter:
A plugin can change these values now with: