WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 62 | if ( intval($content_width) > 0 ) |
| 63 | $max_width = min( intval($content_width), $max_width ); |
| 64 | } |
| 65 | // $size == 'full' has no constraint |
| 66 | else { |
| 67 | $max_width = $width; |
| 68 | $max_height = $height; |
| 69 | } |
| 70 | |
| 71 | list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size ); |
| 72 | |
| 73 | return wp_constrain_dimensions( $width, $height, $max_width, $max_height ); |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Retrieve width and height attributes using given width and height values. |
| 78 | * |
| 79 | * Both attributes are required in the sense that both parameters must have a |
| 80 | * value, but are optional in that if you set them to false or null, then they |