upload_dir

upload_dir

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.4.3

apply_filters('upload_dir') is found 1 times:

  • /wp-includes/functions.php line 2385
    	 *     @type string       $baseurl URL path without subdir.
    	 *     @type string|false $error   False or error message.
    	 * }
    	 */
    	$uploads = apply_filters( 'upload_dir', $cache[ $key ] );
    
    	if ( $create_dir ) {
    		$path = $uploads['path'];
    
    		if ( array_key_exists( $path, $tested_paths ) ) {
    			$uploads['error'] = $tested_paths[ $path ];
    

See this hook used in plugins: