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 |
---|---|
1412 | global $type, $tab, $pagenow; |
1413 |
|
1414 | $flash_action_url = admin_url('async-upload.php'); |
1415 |
|
1416 | // If Mac and mod_security, no Flash. :( |
1417 | $flash = true; |
1418 | if ( false !== stripos($_SERVER['HTTP_USER_AGENT'], 'mac') && apache_mod_loaded('mod_security') ) |
1419 | $flash = false; |
1420 |
|
1421 | $flash = apply_filters('flash_uploader', $flash); |
1422 | $post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0; |
1423 |
|
1424 | $upload_size_unit = $max_upload_size = wp_max_upload_size(); |
1425 | $sizes = array( 'KB', 'MB', 'GB' ); |
1426 | for ( $u = -1; $upload_size_unit > 1024 && $u < count( $sizes ) - 1; $u++ ) |
1427 | $upload_size_unit /= 1024; |
1428 | if ( $u < 0 ) { |
1429 | $upload_size_unit = 0; |
1430 | $u = 0; |