Advertisement
Mimergt

Tinypass WP plugin Custom AccessGaranted

Mar 26th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?php
  2.     $rid = "wp_post_" . strval($post->ID);// Same like the tinypass.php of the plugin source
  3.     $store->loadTokensFromCookie($_COOKIE); //not works or how can get the cookie of this post
  4.     $token = $store->getAccessToken($rid); // I'm not shure o.O'
  5.     if($token->isAccessGranted()) { // ok obvusly if the acces is Garanted load the code above
  6.         $show = '<p>Wuuuju!! this is The Private Content </p>'; //just an exaple
  7.         return $show;
  8.     }
  9.     else { //if the acces is NOT Garanted
  10.         echo('Dam!! Not Works'); //an exaple to...
  11.     }
  12.                
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement