backend_milestone_edit
Allows adding custom content to the milestone settings form.
Teamwork
Input (passed by reference)
$params['milestone'] array Milestone properties as an array with the following keys (the array contains empty strings if a new milestone is being added):
$params['list']['id'] int Milestone ID.
$params['list']['name'] string Milestone name.
$params['list']['description'] string Milestone description.
$params['list']['project_id'] int Project ID.
$params['list']['due_date'] date Deadline date.
$params['list']['closed'] bool Flag denoting that the milestone is completed.
$params['list']['id'] int Milestone ID.
$params['list']['name'] string Milestone name.
$params['list']['description'] string Milestone description.
$params['list']['project_id'] int Project ID.
$params['list']['due_date'] date Deadline date.
$params['list']['closed'] bool Flag denoting that the milestone is completed.
… your plugin code …
Output
{$backend_milestone_edit.more}
Custom HTML code to be added at the end of the milestone settings form.
Teamwork
Plugin code example
PHP
public function backendMilestoneEdit($params)
{
if ($params['milestone']['closed']) {
return [
'more' => sprintf_wp(
'<div class="field"><div class="name">%s</div><div class="value"><em class="state-caution">%s</em></div></div>',
_wp('Note'),
_wp('This milestone is closed!')
)
];
}
}









