$facility) { $str .= sprintf( '', $facility, selected($value, $facility, false), $name, ($facility == $default) ? __(' (default)') : '' ); } $str .= ''; return $str; } /** * Helper - drop-down list of facilities * * @since 4.4.0 Add type hints, return type * @since 4.3.0 Refactored. * @since 4.0.0 * * @param string $def Name of define for selected value * @param bool $_enabled Enabled? * * @return string * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function getLogFacilities(string $def, bool $_enabled = false): string { return $this->getLogFacilitiesOptions($def, ' , %s HTML; $html = sprintf( $fmt, checked($enabled, true, false), __('Enable logging', 'wp-fail2ban'), __('use facility', 'wp-fail2ban'), $this->getLogFacilities($define_log) ); $html .= sprintf('

%s

', Config::desc($define_name)); $rv = apply_filters("wp_fail2ban_log_{$define_name}", $html, $define_name, $define_log); if ($echo) { echo $rv; } return $rv; } }