20 lines
647 B
PHP
20 lines
647 B
PHP
<?php
|
|
function kompass_print_textbox($settingName, $settingValue, $style = '') {
|
|
echo '<input style="' . $style . '" type="text" name="' . $settingName . '" value="' . $settingValue. '" />';
|
|
if (defined('WP_DEBUG') && WP_DEBUG == true) {
|
|
echo '<br />' . $settingName;
|
|
}
|
|
}
|
|
|
|
function _kompass_limit_logins_settings_callback(array $args) {
|
|
$setting = get_option($args['setting'], null);
|
|
$style = isset($args['style']) ? $args['style'] : '';
|
|
|
|
$value = esc_attr($setting);
|
|
if (isset($args['unit_division'])) {
|
|
$value = (int)$value / (int)$args['unit_division'];
|
|
}
|
|
|
|
kompass_print_textbox($args['setting'], $value, $style);
|
|
}
|