-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
PluginPanel.php
41 lines (34 loc) · 980 Bytes
/
PluginPanel.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace YahnisElsts\PluginUpdateChecker\v5p3\DebugBar;
use YahnisElsts\PluginUpdateChecker\v5p3\Plugin\UpdateChecker;
if ( !class_exists(PluginPanel::class, false) ):
class PluginPanel extends Panel {
/**
* @var UpdateChecker
*/
protected $updateChecker;
protected function displayConfigHeader() {
$this->row('Plugin file', htmlentities($this->updateChecker->pluginFile));
parent::displayConfigHeader();
}
protected function getMetadataButton() {
$requestInfoButton = '';
if ( function_exists('get_submit_button') ) {
$requestInfoButton = get_submit_button(
'Request Info',
'secondary',
'puc-request-info-button',
false,
array('id' => $this->updateChecker->getUniqueName('request-info-button'))
);
}
return $requestInfoButton;
}
protected function getUpdateFields() {
return array_merge(
parent::getUpdateFields(),
array('homepage', 'upgrade_notice', 'tested',)
);
}
}
endif;