wpcf7_upload_dir()CF7 1.0

Retrieves uploads directory information.

Хуки из функции

Возвращает

Массив|Строку. Information about the upload directory.

Использование

wpcf7_upload_dir( $type );
$type(строка|true|false)
Type of output.
По умолчанию: false

Код wpcf7_upload_dir() CF7 5.9.3

function wpcf7_upload_dir( $type = false ) {
	$uploads = wp_get_upload_dir();

	$uploads = apply_filters( 'wpcf7_upload_dir', array(
		'dir' => $uploads['basedir'],
		'url' => $uploads['baseurl'],
	) );

	if ( 'dir' == $type ) {
		return $uploads['dir'];
	} if ( 'url' == $type ) {
		return $uploads['url'];
	}

	return $uploads;
}