wp_editor_set_quality WordPress Filter Hook

The wp_editor_set_quality hook is used to set the quality of the editor for a specific post. The quality can be set to either 'high' or 'low'. This hook is useful for creating posts that are of a lower quality, such as drafts or posts that are not yet ready to be published.

apply_filters( 'wp_editor_set_quality', int $quality, string $mime_type ) #

Filters the default image compression quality setting.


Description

Applies only during initial editor instantiation, or when set_quality() is run manually without the $quality argument.

The WP_Image_Editor::set_quality() method has priority over the filter.


Top ↑

Parameters

$quality

(int)Quality level between 1 (low) and 100 (high).

$mime_type

(string)Image mime type.


Top ↑

Source

File: wp-includes/class-wp-image-editor.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.