Prevent some html errors for duplicate ids

This commit is contained in:
jrfnl 2015-01-14 12:51:12 +01:00
parent 3f75005b3b
commit 07366fff49
1 changed files with 8 additions and 2 deletions

View File

@ -34,7 +34,10 @@ class PluginUpdateCheckerPanel extends Debug_Bar_Panel {
$this->row('Slug', htmlentities($this->updateChecker->slug));
$this->row('DB option', htmlentities($this->updateChecker->optionName));
$requestInfoButton = function_exists('get_submit_button') ? get_submit_button('Request Info', 'secondary', 'puc-request-info-button', false) : '';
$requestInfoButton = '';
if ( function_exists('get_submit_button') ) {
$requestInfoButton = get_submit_button('Request Info', 'secondary', 'puc-request-info-button', false, array('id' => 'puc-request-info-button-'.$this->updateChecker->slug));
}
$this->row('Metadata URL', htmlentities($this->updateChecker->metadataUrl) . ' ' . $requestInfoButton . $responseBox);
if ( $this->updateChecker->checkPeriod > 0 ) {
@ -62,7 +65,10 @@ class PluginUpdateCheckerPanel extends Debug_Bar_Panel {
echo '<h3>Status</h3>';
echo '<table class="puc-debug-data">';
$state = $this->updateChecker->getUpdateState();
$checkNowButton = function_exists('get_submit_button') ? get_submit_button('Check Now', 'secondary', 'puc-check-now-button', false) : '';
$checkNowButton = '';
if ( function_exists('get_submit_button') ) {
$checkNowButton = get_submit_button('Check Now', 'secondary', 'puc-check-now-button', false, array('id' => 'puc-check-now-button'.$this->updateChecker->slug));
}
if ( isset($state, $state->lastCheck) ) {
$this->row('Last check', $this->formatTimeWithDelta($state->lastCheck) . ' ' . $checkNowButton . $responseBox);