Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: media_upload_tabs

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
4082      $tabs = array(
4083           // handler action suffix => tab label
4084           'type'     => '',
4085           'type_url' => '',
4086           'gallery'  => '',
4087           'library'  => '',
4088      );
4089
4090      /** This filter is documented in wp-admin/includes/media.php */
4091      $tabs = apply_filters( 'media_upload_tabs', $tabs );
4092      unset( $tabs['type'], $tabs['type_url'], $tabs['gallery'], $tabs['library'] );
4093
4094      $props = array(
4095           'link'  => get_option( 'image_default_link_type' ), // DB default is 'file'.
4096           'align' => get_option( 'image_default_align' ),     // Empty default.
4097           'size'  => get_option( 'image_default_size' ),      // Empty default.
4098      );
4099
4100      $exts      = array_merge( wp_get_audio_extensions(), wp_get_video_extensions() );