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
585
586           if ( ! current_user_can( 'edit_theme_options' ) || ! isset( $_POST['attachment_id'] ) ) {
587                exit;
588           }
589
590           $attachment_id = absint( $_POST['attachment_id'] );
591
592           $sizes = array_keys(
593                /** This filter is documented in wp-admin/includes/media.php */
594                apply_filters(
595                     'image_size_names_choose',
596                     array(
597                          'thumbnail' => __( 'Thumbnail' ),
598                          'medium'    => __( 'Medium' ),
599                          'large'     => __( 'Large' ),
600                          'full'      => __( 'Full Size' ),
601                     )
602                )
603           );