maero
Forum Replies Created
-
Hi,
Thanks for the advice, I was using OOP until I had the issue with the WP List Table, then it started to turn ugly with lots of code being copied, etc.
Your idea was the same as I had, but it is feasibly with only this filter? In that function, I can check which is the user (and check if it is admin or not), but how to check what level/role is on the shortcode tag that is issuing the function call?
Thanks,
One more question. Is it possible to make this but instead of giving global access (like admins), giving the same privileges as an access level? Let’s say that in a post I have:
[restrict level="some-group"]Lorem ipsum dolor[/restrict] [restrict role="administrator"]text only for admins[/restrict]With the current solution, someone using the token will have access to both, correct? I would like them only to have access to what “some-group” has.
Thanks,
Hi,
Currently I’m not working on the plugin, as I’m now finishing the website. WP_List_Table inside a metabox have been giving me problems (I’ve already overridden the display_tablenav() but there are more issues), so right now I’m using a ugly fix. I’ll look into your code, as you also use this class.
After finishing the website, I’ll make this code better, with comments, remove deprecated stuff, prettier as this is the first time I’m coding in PHP.
https://github.com/miguel-r/wp-temporary-link
I’ll give you updates later.
Thanks a lot!
I’ve been busy taking care of all the rest so I didn’t get to try this earlier.
The aim is to only use this for posts, so not a problem of not working with archive pages.
I was getting “Missing argument 2 for RUA_Level_Manager::{closure}()” so I removed $user of the header. This is ok, right?
It seems to be working, but I’ll test it more.
Thanks a lot!
My idea would be for these links to somehow overrule the access levels. In other words, each level has access to some post category, requiring the users to be registered.
Sometimes it would be useful for me to share a single post with someone, without the need to register. Additionally, these links should expire after X days (just like Dropbox does).
Did I explained myself clearly?
Thank you very much