Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22568

    Beee
    Participant

    I would like to disallow the right click for logged in users, but not for admins.

    Or is there a filter to override it with ?

    #22599

    Bartosz
    Keymaster

    There’s no built in filter but you can use wp_enqueue_script action hook and dequeue (https://codex.wordpress.org/Function_Reference/wp_dequeue_script) “iw-no-right-click” javascript based on your custom conditions (like user role).

    #27876

    Beee
    Participant

    Sorry it took a long while to reply…

    Let me see if I get this right…

    I would dequeue the script with handle “iw-no-right-click” for admins it would be disabled ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.