wpcf7_upload_dir()
Retrieves uploads directory information.
Хуки из функции
Возвращает
Массив|Строку
. Information about the upload directory.
Использование
wpcf7_upload_dir( $type );
- $type(строка|true|false)
- Type of output.
По умолчанию: false
Код wpcf7_upload_dir() wpcf7 upload dir CF7 5.7.6
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; }