Open rubengc opened 8 years ago
If we do this route I think there are a few concerns I'd have and it's related to continuity.
I think what I'd like to see is instead of adding items to it, plugin developers can provide a title
attribute and if they want to a link
attribute. We can set an empty array into the filter, and then any extensions can add their own link and title to the array and we'll just foreach through the array so we can use a standard separator
character like a |
or something.
The goal is someone could do something as simple as (psudo code here)
function my_function( $actions, $payment_id ) {
$actions['my-action'] = array( 'title' => 'My Title', 'link' => 'http://example.org/' );
return $actions;
}
add_filter( 'filter_name', 'my_function', 10, 2 );
Not sure why anyone would link back to the hompepage but I think that gives the idea of what I'm going for ;)
On purchase history page, some official plugins adds a column for their actions (Reviews 2.0, EDD Invoices, PDF Invoices)
This could be improved adding a single actions column where those plugins could add their custom actions
what do you think?