WPSEO_File_Size_Service::calculate_file_size
Calculates the file size using the Utils class.
Метод класса: WPSEO_File_Size_Service{}
Хуков нет.
Возвращает
int|true|false. The file size or False if it could not be retrieved.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->calculate_file_size( $file_url );
- $file_url(строка) (обязательный)
- The file to retrieve the size for.
Код WPSEO_File_Size_Service::calculate_file_size() WPSEO File Size Service::calculate file size Yoast 26.9
protected function calculate_file_size( $file_url ) {
return WPSEO_Image_Utils::get_file_size(
[
'path' => $file_url,
]
);
}