Welcome, visitor! Log in
 

Source View: media_upload_default_type

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.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: 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.

Source View

Line Code
86 <?php
87      include('admin-footer.php');
88
89 } else {
90
91      // upload type: image, video, file, ..?
92      if ( isset($_GET['type']) )
93           $type = strval($_GET['type']);
94      else
95           $type = apply_filters('media_upload_default_type', 'file');
96
97      // tab: gallery, library, or type-specific
98      if ( isset($_GET['tab']) )
99           $tab = strval($_GET['tab']);
100      else
101           $tab = apply_filters('media_upload_default_tab', 'type');
102
103      $body_id = 'media-upload';
104