wpcf7_upload_tmp_dir()CF7 1.0

Returns the directory path for uploaded files.

Хуков нет.

Возвращает

Строку. Directory path.

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

wpcf7_upload_tmp_dir();

Код wpcf7_upload_tmp_dir() CF7 6.0.1

function wpcf7_upload_tmp_dir() {
	if ( defined( 'WPCF7_UPLOADS_TMP_DIR' ) ) {
		$dir = path_join( WP_CONTENT_DIR, WPCF7_UPLOADS_TMP_DIR );
		wp_mkdir_p( $dir );

		if ( wpcf7_is_file_path_in_content_dir( $dir ) ) {
			return $dir;
		}
	}

	$dir = path_join( wpcf7_upload_dir( 'dir' ), 'wpcf7_uploads' );
	wp_mkdir_p( $dir );
	return $dir;
}