WPSEO_File_Size_Service::is_externally_hosted()
Checks if the file is hosted externally.
Метод класса: WPSEO_File_Size_Service{}
Хуков нет.
Возвращает
true|false
. True if it is hosted externally.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_externally_hosted( $file_url );
- $file_url(строка) (обязательный)
- The file url.
Код WPSEO_File_Size_Service::is_externally_hosted() WPSEO File Size Service::is externally hosted Yoast 22.4
protected function is_externally_hosted( $file_url ) { return wp_parse_url( home_url(), PHP_URL_HOST ) !== wp_parse_url( $file_url, PHP_URL_HOST ); }