Inline documentation for hooks in wp-includes/class-wp-image-editor.php.
Props tomauger. Fixes #25504 Built from https://develop.svn.wordpress.org/trunk@25705 git-svn-id: http://core.svn.wordpress.org/trunk@25619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a8bce2a54d
commit
e033cb93bc
|
@ -204,6 +204,13 @@ abstract class WP_Image_Editor {
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function set_quality( $quality ) {
|
public function set_quality( $quality ) {
|
||||||
|
/**
|
||||||
|
* Filter the default quality setting.
|
||||||
|
*
|
||||||
|
* @since 3.5.0
|
||||||
|
*
|
||||||
|
* @param int $quality Quality level between 0 (low) and 100 (high).
|
||||||
|
*/
|
||||||
$this->quality = apply_filters( 'wp_editor_set_quality', $quality );
|
$this->quality = apply_filters( 'wp_editor_set_quality', $quality );
|
||||||
|
|
||||||
return ( (bool) $this->quality );
|
return ( (bool) $this->quality );
|
||||||
|
@ -253,6 +260,15 @@ abstract class WP_Image_Editor {
|
||||||
// Double-check that the mime-type selected is supported by the editor.
|
// Double-check that the mime-type selected is supported by the editor.
|
||||||
// If not, choose a default instead.
|
// If not, choose a default instead.
|
||||||
if ( ! $this->supports_mime_type( $mime_type ) ) {
|
if ( ! $this->supports_mime_type( $mime_type ) ) {
|
||||||
|
/**
|
||||||
|
* Filter default mime type prior to getting the file extension.
|
||||||
|
*
|
||||||
|
* @see wp_get_mime_types()
|
||||||
|
*
|
||||||
|
* @since 3.5.0
|
||||||
|
*
|
||||||
|
* @param string $mime_type Mime type string.
|
||||||
|
*/
|
||||||
$mime_type = apply_filters( 'image_editor_default_mime_type', $this->default_mime_type );
|
$mime_type = apply_filters( 'image_editor_default_mime_type', $this->default_mime_type );
|
||||||
$new_ext = $this->get_extension( $mime_type );
|
$new_ext = $this->get_extension( $mime_type );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue