| Server IP : 195.130.67.5 / Your IP : 216.73.217.127 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/mscinformatics2022/wp-content/plugins/polylang/src/Model/ |
Upload File : |
<?php
/**
* @package Polylang
*/
namespace WP_Syntex\Polylang\Model;
/**
* Class to filter the list of languages to only include non-default languages.
*/
class Hide_Default implements Languages_Proxy_Interface {
/**
* Returns the proxy's key.
*
* @since 3.8
*
* @return string
*/
public function key(): string {
return 'hide_default';
}
/**
* Returns the list of non-default languages after passing it through this proxy.
*
* @since 3.8
*
* @param \PLL_Language[] $languages List of languages to filter.
* @return \PLL_Language[]
*/
public function filter( array $languages ): array {
return array_filter(
$languages,
static function ( $lang ) {
return ! $lang->is_default;
}
);
}
}