Astra_Addon_Filesystem::get_uploads_dir( String $assets_dir )

Returns an array of paths for the upload directory of the current site.


Description


Parameters

$assets_dir

(String) (Required) directory name to be created in the WordPress uploads directory.


Return

(array)


Source

File: classes/class-astra-addon-filesystem.php

	public function get_uploads_dir( $assets_dir ) {
		$wp_info = wp_upload_dir( null, false );

		// SSL workaround.
		if ( $this->is_ssl() ) {
			$wp_info['baseurl'] = str_ireplace( 'http://', 'https://', $wp_info['baseurl'] );
		}

		// Build the paths.
		$dir_info = array(
			'path' => $wp_info['basedir'] . '/' . $assets_dir . '/',
			'url'  => $wp_info['baseurl'] . '/' . $assets_dir . '/',
		);

		return apply_filters( 'astra_get_assets_uploads_dir', $dir_info );
	}

Changelog

Changelog
Version Description
2.6.4 Introduced.


User Contributed Notes

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