Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: image_resize_dimensions

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
527       *
528       * @param null|mixed $null   Whether to preempt output of the resize dimensions.
529       * @param int        $orig_w Original width in pixels.
530       * @param int        $orig_h Original height in pixels.
531       * @param int        $dest_w New width in pixels.
532       * @param int        $dest_h New height in pixels.
533       * @param bool|array $crop   Whether to crop image to specified width and height or resize.
534       *                           An array can specify positioning of the crop area. Default false.
535       */
536      $output = apply_filters( 'image_resize_dimensions', null, $orig_w, $orig_h, $dest_w, $dest_h, $crop );
537
538      if ( null !== $output ) {
539           return $output;
540      }
541
542      // Stop if the destination size is larger than the original image dimensions.
543      if ( empty( $dest_h ) ) {
544           if ( $orig_w < $dest_w ) {
545                return false;