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 |
---|---|
28 | // within the editor itself, and within the theme's content width if it's known. the user can resize it in the editor |
29 | // if they wish. |
30 | if ( !empty($GLOBALS['content_width']) ) { |
31 | $max_width = $GLOBALS['content_width']; |
32 | } |
33 | else |
34 | $max_width = 500; |
35 | } |
36 |
|
37 | list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size ); |
38 |
|
39 | return wp_constrain_dimensions( $width, $height, $max_width, $max_height ); |
40 | } |
41 |
|
42 | // return a width/height string for use in an <img /> tag. Empty values will be omitted. |
43 | function image_hwstring($width, $height) { |
44 | $out = ''; |
45 | if ($width) |
46 | $out .= 'width="'.intval($width).'" '; |