Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: image_size_names_choose

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
773  * @since 2.7.0
774  *
775  * @param object $post
776  * @param bool|string $check
777  * @return array
778  */
779 function image_size_input_fields( $post, $check = '' ) {
780
781           // get a list of the actual pixel dimensions of each possible intermediate version of this image
782           $size_names = apply_filters( 'image_size_names_choose', array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full Size')) );
783
784           if ( empty($check) )
785                $check = get_user_setting('imgsize', 'medium');
786
787           foreach ( $size_names as $size => $label ) {
788                $downsize = image_downsize($post->ID, $size);
789                $checked = '';
790
791                // is this size selectable?