Last active
November 5, 2018 10:27
-
-
Save melvinstanly/fa81b92e6bbf04a5a935246ba17dfca2 to your computer and use it in GitHub Desktop.
Wordpress commonly used functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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