[ Index ] |
WordPress Cross Reference |
[Source view] [Print] [Project Stats]
Base WordPress Image Editor
File Size: | 453 lines (11 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
__construct( $file ) X-Ref |
Each instance handles a single file. |
test( $args = array() X-Ref |
Checks to see if current environment supports the editor chosen. Must be overridden in a sub-class. param: array $args return: boolean |
supports_mime_type( $mime_type ) X-Ref |
Checks to see if editor supports the mime-type specified. Must be overridden in a sub-class. param: string $mime_type return: boolean |
get_size() X-Ref |
Gets dimensions of image. return: array {'width'=>int, 'height'=>int} |
update_size( $width = null, $height = null ) X-Ref |
Sets current image size. param: int $width param: int $height |
set_quality( $quality = null ) X-Ref |
Sets Image Compression quality on a 1-100% scale. param: int $quality Compression Quality. Range: [1,100] return: boolean|WP_Error True if set successfully; WP_Error on failure. |
get_output_format( $filename = null, $mime_type = null ) X-Ref |
Returns preferred mime-type and extension based on provided file's extension and mime, or current file's extension and mime. Will default to $this->default_mime_type if requested is not supported. Provides corrected filename only if filename is provided. param: string $filename param: string $mime_type return: array { filename|null, extension, mime-type } |
generate_filename( $suffix = null, $dest_path = null, $extension = null ) X-Ref |
Builds an output filename based on current file, and adding proper suffix param: string $suffix param: string $dest_path param: string $extension return: string filename |
get_suffix() X-Ref |
Builds and returns proper suffix for file based on height and width. return: string suffix |
make_image( $filename, $function, $arguments ) X-Ref |
Either calls editor's save function or handles file as a stream. param: string|stream $filename param: callable $function param: array $arguments return: boolean |
get_mime_type( $extension = null ) X-Ref |
Returns first matched mime-type from extension, as mapped from wp_get_mime_types() param: string $extension return: string|boolean |
get_extension( $mime_type = null ) X-Ref |
Returns first matched extension from Mime-type, as mapped from wp_get_mime_types() param: string $mime_type return: string|boolean |
Generated: Tue Mar 25 01:41:18 2014 | WordPress honlapkészítés: online1.hu |