mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 10:15:28 +02:00
Minor AdminThemeUikit updates plus move access certain shared admin theme labels into AdminTheme::getLabels() method
This commit is contained in:
@@ -165,6 +165,25 @@ abstract class AdminTheme extends WireData implements Module {
|
||||
return parent::get($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get predefined translated label by key for labels shared among admin themes
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $val Value to return if label not available
|
||||
* @return string
|
||||
* @since 3.0.162
|
||||
*
|
||||
*/
|
||||
public function getLabel($key, $val = '') {
|
||||
switch($key) {
|
||||
case 'search-help': return $this->_('help'); // Localized term to type for search-engine help (3+ chars)
|
||||
case 'search-tip': return $this->_('Try “help”'); // // Search tip (indicating your translated “help” term)
|
||||
case 'advanced-mode': return $this->_('Advanced Mode');
|
||||
case 'debug': return $this->_('Debug');
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this admin theme is the one that will be used for this request
|
||||
*
|
||||
|
Reference in New Issue
Block a user