| [ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Base WordPress Image Editor
| File Size: | 631 lines (17 kb) |
| Included or required: | 1 time |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| __construct( $file ) X-Ref |
| Each instance handles a single file. param: string $file Path to the file to load. |
| test( $args = array() X-Ref |
| Checks to see if current environment supports the editor chosen. Must be overridden in a subclass. return: bool since: 3.5.0 param: array $args |
| supports_mime_type( $mime_type ) X-Ref |
| Checks to see if editor supports the mime-type specified. Must be overridden in a subclass. return: bool since: 3.5.0 param: string $mime_type |
| get_size() X-Ref |
| Gets dimensions of image. return: int[] { since: 3.5.0 |
| update_size( $width = null, $height = null ) X-Ref |
| Sets current image size. return: true since: 3.5.0 param: int $width param: int $height |
| get_quality() X-Ref |
| Gets the Image Compression quality on a 1-100% scale. return: int Compression Quality. Range: [1,100] since: 4.0.0 |
| set_quality( $quality = null ) X-Ref |
| Sets Image Compression quality on a 1-100% scale. return: true|WP_Error True if set successfully; WP_Error on failure. since: 3.5.0 param: int $quality Compression Quality. Range: [1,100] |
| get_default_quality( $mime_type ) X-Ref |
| Returns the default compression quality setting for the mime type. return: int The default quality setting for the mime type. since: 5.8.1 param: string $mime_type |
| 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. return: array { filename|null, extension, mime-type } since: 3.5.0 param: string $filename param: string $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 return: string filename since: 3.5.0 param: string $suffix param: string $dest_path param: string $extension |
| get_suffix() X-Ref |
| Builds and returns proper suffix for file based on height and width. return: string|false suffix since: 3.5.0 |
| maybe_exif_rotate() X-Ref |
| Check if a JPEG image has EXIF Orientation tag and rotate it if needed. return: bool|WP_Error True if the image was rotated. False if not rotated (no EXIF data or the image doesn't need to be rotated). since: 5.3.0 |
| make_image( $filename, $callback, $arguments ) X-Ref |
| Either calls editor's save function or handles file as a stream. return: bool since: 3.5.0 param: string $filename param: callable $callback param: array $arguments |
| get_mime_type( $extension = null ) X-Ref |
| Returns first matched mime-type from extension, as mapped from wp_get_mime_types() return: string|false since: 3.5.0 param: string $extension |
| get_extension( $mime_type = null ) X-Ref |
| Returns first matched extension from Mime-type, as mapped from wp_get_mime_types() return: string|false since: 3.5.0 param: string $mime_type |
| Generated: Mon Oct 27 01:00:02 2025 | Cross-referenced by PHPXref 0.7.1 |