WordPress.org

Ready to get started?Download WordPress

Forums

how to get remaining free space for upload folder (3 posts)

  1. k0rp0rate
    Member
    Posted 7 years ago #

    Hi all! ;)

    I'm trying to port a WordPress MU plugin to WordPress (single user).

    That plugin is used to see in the dashboard the remaining space in the upload folder, so you can know all the time if you have enough free space for more files.

    If I try to use this plugin in WP I get this error:

    Fatal error: Call to undefined function get_site_option() in...

    Because the plugin uses get_site_option to get the space remaining throught a funtion argument that exist in WPMU.

    So my question is...

    Is there any function in WP to get the free space remaining in the blog/hosting??? (I have searched in the develop docs but cant find anything).

    Thanks in advance!

  2. drmike
    Member
    Posted 7 years ago #

    Boy I hope you give proper credit to teh author of that plugin. :)

    The issue I see with doing it for a normal install is that the space remaining quanity isn't known to wordpress. It's an issue with the hosting software and, considing there are so many different OSes out there, I don't see a single method of pulling the data out.

  3. k0rp0rate
    Member
    Posted 7 years ago #

    Hehehe... sure! in fact if there's not any function to obtain that in WP, the credit will remain intact because in that case I cant do anything :(

    Thanks for your reply Dr. ;)

Topic Closed

This topic has been closed to new replies.

About this Topic