• Resolved jacksoggetto

    (@jacksoggetto)


    Before i start digging into the code, do you have a function to check a page and user that will return true of false depending on the permissions to see it or not?

    I’m creating a few custom functions for my website and having something ready would be really useful.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Bel

    (@belimperial)

    Hi @jacksoggetto,

    Thank you for getting in touch, and we’re happy to assist you.

    We don’t have a code that can check a page and user that can return true or false depending on the protected content, but we’ll ask our development team and get back to you.

    Thank you for your kind understanding.

    Bel

    (@belimperial)

    Hi @jacksoggetto

    Thanks for patiently waiting.

    Currently, there is not a publicly exposed function/ API. You can try to use the static PHP class methods we have defined.

    Let us know if you have any questions.

    Thanks!

    Thread Starter jacksoggetto

    (@jacksoggetto)

    Thanks for your reply. In the meanwhile I already decided to use another plugin, so I won’t try.

    Thanks anyway for your reply

    Plugin Author Daniel Iser

    (@danieliser)

    @jacksoggetto – Totally understandable. That said if you find something the other can’t do well, maybe give this one a second look. Big update nearing beta which is basically a complete rewrite. I had made a note when the team asked earlier to make sure we offer an exposed programattic way to use things as well.

    Plugin Author Daniel Iser

    (@danieliser)

    @jacksoggetto – One quick follow up, could you elaborate with maybe some example code of how you hoped to be able to use the intended functionality?

    IE give me a sample of what your code might look like and add whatever_function( $args, $you, $like ); so i can try to assess how the new methods might need to look on our end for them to be versatile on your end (and others).

    Thread Starter jacksoggetto

    (@jacksoggetto)

    Hello Daniel, I was thinking about a simple function like

    can_view()

    if ( can_view() ) {
        // exe cute some code
    }

    than it could have some optional paramters like
    userid/username
    post_id/slug
    which default to the curretn user and current post, but can be personalized.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘function to check page and user’ is closed to new replies.