• 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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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:

    https://www.ads-software.com/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.

    Thread Starter canuckkev

    (@canuckkev)

    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?

    Thread Starter canuckkev

    (@canuckkev)

    Found it….

    get_settings('fileupload_minlevel')

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Function for User Level’ is closed to new replies.