updated plugin Jetpack Protect version 2.1.0

This commit is contained in:
2024-04-19 10:49:36 +00:00
committed by Gitium
parent 620280b550
commit 7841fd5dc6
179 changed files with 6360 additions and 1476 deletions

View File

@ -139,12 +139,15 @@ class Host {
* Returns an array of nameservers for the current site.
*
* @param string $domain The domain of the site to check.
* @return string
* @return array
*/
public function get_nameserver_dns_records( $domain ) {
if ( ! function_exists( 'dns_get_record' ) ) {
return array();
}
$dns_records = dns_get_record( $domain, DNS_NS ); // Fetches the DNS records of type NS (Name Server)
$nameservers = array();
foreach ( $dns_records as $record ) {
if ( isset( $record['target'] ) ) {
$nameservers[] = $record['target']; // Adds the nameserver to the array