Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Helpers::get_upload_dir_path( string $path = '' )

Gets the uploads directory path


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Parameters Parameters

$path

(Optional) A path to append to end of upload directory URL.

Default value: ''


Top ↑

Return Return

(bool|string) The uploads directory path or false on failure


Top ↑

Source Source

File: classes/Helpers.php

	public static function get_upload_dir_path( $path = '' ) {
		$upload_dir = self::get_upload_dir();
		if ( false !== $upload_dir && isset( $upload_dir['basedir'] ) ) {
			$dir = $upload_dir['basedir'];
			if ( ! empty( $path ) ) {
				$dir = trailingslashit( $dir ) . $path;
			}
			return $dir;
		} else {
			return false;
		}
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.10 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.