WordPress.org

Ready to get started?Download WordPress

Forums

Function for User Level (4 posts)

  1. CanuckKev
    Member
    Posted 9 years ago #

    Since the codex Function reference is not quite up to date, I figured I'd ask here.

    I have setup a group blog and I am using IImage Browser for adding images to posts. It creates a link on the post page. I would like to only show it if the userlevel matches that of the level I have set to allow uploads.

    Which function does the user level check and which would return the upload level?

    And as a sidenote, is there a function to return the page or post owner?

  2. Kafkaesqui

    Posted 9 years ago #

    You'll want to run get_currentuserinfo() to pull up their user level, then match that against a hardcoded value (I don't know of a function in WP that will return the user level for uploads). See this thread for an example:

    http://wordpress.org/support/topic.php?id=28270

    get_the_author() will return the author of a Page/post, but it only provides the info that the_author() does, and needs to run in The Loop.

  3. CanuckKev
    Member
    Posted 9 years ago #

    Thanks for the information. It was exactly what I needed.

    As for the author info, I'll check the get_the_author function. What about the get_settings? I have seen that used in IIMage Browser plugin, but I can't find it documented. Any ideas?

  4. CanuckKev
    Member
    Posted 9 years ago #

    Found it....

    get_settings('fileupload_minlevel')

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.