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()
Gets the Uploads directory
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
Return Return
(bool|array) An associated array with baseurl and basedir or false on failure
Source Source
File: classes/Helpers.php
public static function get_upload_dir() { if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { $wp_upload_dir = wp_get_upload_dir(); } else { $wp_upload_dir = wp_upload_dir(); } if ( isset( $wp_upload_dir['error'] ) && false !== $wp_upload_dir['error'] ) { PUM_Utils_Logging::instance()->log( sprintf( 'Getting uploads directory failed. Error given: %s', esc_html( $wp_upload_dir['error'] ) ) ); return false; } else { return $wp_upload_dir; } }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.10 | Introduced. |