Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_filesize

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
3507
3508      /**
3509       * Filters the size of the file.
3510       *
3511       * @since 6.0.0
3512       *
3513       * @param int    $size The result of PHP filesize on the file.
3514       * @param string $path Path to the file.
3515       */
3516      return (int) apply_filters( 'wp_filesize', $size, $path );
3517 }
3518
3519 /**
3520  * Retrieve list of allowed mime types and file extensions.
3521  *
3522  * @since 2.8.6
3523  *
3524  * @param int|WP_User $user Optional. User to check. Defaults to current user.
3525  * @return string[] Array of mime types keyed by the file extension regex corresponding