files_age() files_age() : int Files Age in the temp folder. By default, it's 24 hours. Returns int — Temp file age in seconds.
image_mimes() image_mimes(string $context = 'list') : array Image MIME Types Retrieves a list of image MIME types based on the context. Parameters string $context The context in which the MIME types are needed ('list' or 'allowed'). Returns array — List of image MIME types based on the context.
clear_temp_dir() clear_temp_dir() : mixed Remove all files, which are older than 24 hours Can duplicate this function functionality remove_old_files Returns mixed
get_upload_dir() get_upload_dir(string $dir = '', int|null $blog_id = null) : string Get upload dir of plugin Parameters string $dir int|null $blog_id Returns string
get_upload_url() get_upload_url(string $url = '', int|null $blog_id = null) : string Get upload url of plugin Parameters string $url int|null $blog_id Returns string
format_bytes() format_bytes(int $size, int $precision = 1) : string Format Bytes Parameters int $size int $precision Returns string
remove_dir() remove_dir(string $dir) : bool Remove a directory using WP Filesystem. Parameters string $dir The directory path to be removed. Should end with DIRECTORY_SEPARATOR. Returns bool — True on success, false on failure or if directory doesn't exist.