Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_editor_set_quality

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
198       * Sets Image Compression quality on a 1-100% scale.
199       *
200       * @since 3.5.0
201       * @access public
202       *
203       * @param int $quality Compression Quality. Range: [1,100]
204       * @return boolean
205       */
206      public function set_quality( $quality ) {
207           $this->quality = apply_filters( 'wp_editor_set_quality', $quality );
208
209           return ( (bool) $this->quality );
210      }
211
212      /**
213       * Returns preferred mime-type and extension based on provided
214       * file's extension and mime, or current file's extension and mime.
215       *
216       * Will default to $this->default_mime_type if requested is not supported.