Skip to content

Instantly share code, notes, and snippets.

@melvinstanly
Last active November 5, 2018 10:27
Show Gist options
  • Save melvinstanly/fa81b92e6bbf04a5a935246ba17dfca2 to your computer and use it in GitHub Desktop.
Save melvinstanly/fa81b92e6bbf04a5a935246ba17dfca2 to your computer and use it in GitHub Desktop.
Wordpress commonly used functions
<?php
// Get wordpress upload folder directory
function get_upload_folder_path(){
$current_user = wp_get_current_user();
$upload_dir = wp_upload_dir();
$uploads_folder = $upload_dir['basedir']; // Path to wordpress uploads folder
return $uploads_folder;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment