PHP Класс A8C_Files, vip-mu-plugins-public

Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( )
attachment_file_exists ( $file_url )
check_to_download_file ( ) Ensures a local copy of the imported xml file is available for local reading at the final import step
check_to_upload_file ( $data, $postarr )
delete_file ( $file_name )
filter_filetype_check ( $filetype_data, $file, $filename, $mimes ) Check filetype support against Mogile
filter_unique_filename ( $filename, $ext, $dir, $unique_filename_callback ) Filter's the return value of wp_unique_filename()
get_files_service_hostname ( )
get_unique_filename ( $file ) Ensure filename uniqueness prior to WP 4.5's wp_unique_filename filter
get_upload_dir ( $upload )
image_resize ( boolean $ignore, integer $id, array | string $size ) : boolean | array Image resizing service. Takes place of image_downsize().
save_image_file ( $override, $filename, $image, $mime_type, $post_id )
upload_file ( $details, $upload_type )
upload_url_path ( $upload_url_path, $option )

Приватные методы

Метод Описание
_check_uniqueness_with_backend ( $filename ) Common method to check Mogile backend for filename uniqueness
_sanitize_filename ( $filename, $ext ) Ensure consistent filename sanitization
get_upload_path ( )
purge_cache_servers ( $requests )
purge_file_cache ( $url, $method )

Описание методов

__construct() публичный Метод

public __construct ( )

attachment_file_exists() публичный Метод

public attachment_file_exists ( $file_url )

check_to_download_file() публичный Метод

Ensures a local copy of the imported xml file is available for local reading at the final import step

check_to_upload_file() публичный Метод

public check_to_upload_file ( $data, $postarr )

delete_file() публичный Метод

public delete_file ( $file_name )

filter_filetype_check() публичный Метод

Leverages Mogile backend, which will return a 406 or other non-200 code if the filetype is unsupported
public filter_filetype_check ( $filetype_data, $file, $filename, $mimes )

filter_unique_filename() публичный Метод

Filter's the return value of wp_unique_filename()
public filter_unique_filename ( $filename, $ext, $dir, $unique_filename_callback )

get_files_service_hostname() публичный Метод

get_unique_filename() публичный Метод

Ensure filename uniqueness prior to WP 4.5's wp_unique_filename filter
public get_unique_filename ( $file )

get_upload_dir() публичный Метод

public get_upload_dir ( $upload )

image_resize() публичный Метод

Image resizing service. Takes place of image_downsize().
См. также: image_downsize()
public image_resize ( boolean $ignore, integer $id, array | string $size ) : boolean | array
$ignore boolean Unused.
$id integer Attachment ID for image.
$size array | string Optional, default is 'medium'. Size of image, either array or string.
Результат boolean | array False on failure, array on success.

save_image_file() публичный Метод

public save_image_file ( $override, $filename, $image, $mime_type, $post_id )

upload_file() публичный Метод

public upload_file ( $details, $upload_type )

upload_url_path() публичный Метод

public upload_url_path ( $upload_url_path, $option )