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 |
---|---|
526 | * @return mixed WP_Error on failure, True on success |
527 | */ |
528 | function unzip_file($file, $to) { |
529 | global $wp_filesystem; |
530 |
|
531 | if ( ! $wp_filesystem || !is_object($wp_filesystem) ) |
532 | return new WP_Error('fs_unavailable', __('Could not access filesystem.')); |
533 |
|
534 | // Unzip can use a lot of memory, but not this much hopefully |
535 | @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) ); |
536 |
|
537 | $needed_dirs = array(); |
538 | $to = trailingslashit($to); |
539 |
|
540 | // Determine any parent dir's needed (of the upgrade directory) |
541 | if ( ! $wp_filesystem->is_dir($to) ) { //Only do parents if no children exist |
542 | $path = preg_split('![/\\\]!', untrailingslashit($to)); |
543 | for ( $i = count($path); $i >= 0; $i-- ) { |
544 | if ( empty($path[$i]) ) |