Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: image_edit_before_change

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
360                }
361                if ( !$combined )
362                     $filtered[++$i] = $changes[$j];
363           }
364           $changes = $filtered;
365           unset($filtered);
366      }
367
368      // image resource before applying the changes
369      $img = apply_filters('image_edit_before_change', $img, $changes);
370
371      foreach ( $changes as $operation ) {
372           switch ( $operation->type ) {
373                case 'rotate':
374                     if ( $operation->angle != 0 )
375                          $img = _rotate_image_resource($img, $operation->angle);
376                     break;
377                case 'flip':
378                     if ( $operation->axis != 0 )