Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author simon.ward

    (@simonward-1)

    It’s possible to do via the theme’s functions.php file. I can do it as a customisation, please get in touch here if you’re interested.

    Thread Starter laurosollero

    (@laurosollero)

    OK, thanks for your time Simon.. I am the dev trying to figure it out, more of a Drupal guy but this client’s website was already made in WordPress.

    I can always check for the cookie exists before calling the:
    add_filter('the_content', array(&$MP3JP, 'replace_links'), 1);

    As authenticated users won’t be listening to the music, only anonymous.
    I would rather not hack your code but… I’ve tried to call the add_filter later, from my theme, but I would still need to hack your code…

    Don’t get me wrong, you can make money anyway you want but I would not hire a dev to complete my job as I am not making that much money…

    For anyone having some problem like this, this snippet just check for the cookie saying that the user is logged in, it is not safe (cookies are easily spoofed) but I take care of access control with another module. As the module runs before WordPress is already fully loaded you can’t check if the user is really logged using it’s own functions, neither is possible to check for the page it is running:

    $logged_in = false;
    if (count($_COOKIE)) {
      foreach ($_COOKIE as $key => $val) {
        if (substr($key, 0, 19) === "wordpress_logged_in") {
          $logged_in = true;
        }
      }
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable filter for specific page’ is closed to new replies.