PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 111105
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v111105
260917 260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 120213 All 189 releases
s2member / includes / menu-pages / code-samples / api-mop-vars-e.x-php

api-mop-vars-e.x-php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 111105, at includes/menu-pages/code-samples/api-mop-vars-e.x-php

60 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /* --------------------------------------------------------------- */
3
4 $_g = stripslashes_deep ($_GET);
5
6 /* ------------------------------------------------------------------------------------ */
7
8 if (isset ($_g["_s2member_seeking"]["type"]) /* One of: page|post|catg|ptag|file|ruri */ )
9 echo 'You were trying to access a protected: ' . esc_html ($_g["_s2member_seeking"]["type"]) . '.';
10
11 /* --------------------------------------------------------------- */
12
13 if (isset ($_g["_s2member_seeking"]["page"]))
14 echo 'You were trying to access Page ID #' . esc_html ($_g["_s2member_seeking"]["page"]) . '.';
15
16 else if (isset ($_g["_s2member_seeking"]["post"]))
17 echo 'You were trying to access Post ID #' . esc_html ($_g["_s2member_seeking"]["post"]) . '.';
18
19 else if (isset ($_g["_s2member_seeking"]["catg"]))
20 echo 'You were trying to access Category ID #' . esc_html ($_g["_s2member_seeking"]["catg"]) . '.';
21
22 else if (isset ($_g["_s2member_seeking"]["ptag"]))
23 echo 'You were trying to access the Tag ID #' . esc_html ($_g["_s2member_seeking"]["ptag"]) . '.';
24
25 else if (isset ($_g["_s2member_seeking"]["file"]))
26 echo 'You were trying to access the File: ' . esc_html ($_g["_s2member_seeking"]["file"]) . '.';
27
28 else if (isset ($_g["_s2member_seeking"]["ruri"]) /* Full URI they were trying to access. */)
29 echo 'You were trying to access URI: ' . esc_html (base64_decode ($_g["_s2member_seeking"]["ruri"])) . '.';
30 /* See also: <http://codex.wordpress.org/Function_Reference/site_url>. */
31 /* See also: <http://php.net/manual/en/function.base64-decode.php>. */
32
33 /* --------------------------------------------------------------- */
34
35 if (isset ($_g["_s2member_seeking"]["_uri"]) /* Full URI they were trying to access. */ )
36 echo 'You were trying to access URL: ' . esc_html (site_url(base64_decode($_g["_s2member_seeking"]["_uri"]))) . '.';
37 /* See also: <http://codex.wordpress.org/Function_Reference/site_url>. */
38 /* See also: <http://php.net/manual/en/function.base64-decode.php>. */
39
40 /* ------------------------------------------------------------------------------------ */
41
42 if (isset ($_g["_s2member_req"]["type"]) /* One of: level|ccap|sp */)
43 echo 'You were trying to access content that requires: ' . esc_html ($_g["_s2member_req"]["type"]) . '.';
44
45 /* --------------------------------------------------------------- */
46
47 if (isset ($_g["_s2member_req"]["level"]))
48 echo 'You must be a Member at Level #' . esc_html ($_g["_s2member_req"]["level"]) . ' or higher.';
49
50 else if (isset ($_g["_s2member_req"]["ccap"]))
51 echo 'You must be a Member with Custom Capability: ' . esc_html ($_g["_s2member_req"]["ccap"]) . '.';
52
53 else if (isset ($_g["_s2member_req"]["sp"]))
54 echo 'You must purchase Specific Post/Page ID #' . esc_html ($_g["_s2member_req"]["sp"]) . '.';
55
56 /* ------------------------------------------------------------------------------------ */
57
58 if (isset ($_g["_s2member_res"]["type"]) /* One of: post|page|catg|ptag|file|ruri|ccap|sp|sys */)
59 echo 'You were trying to access content protected via s2Member: ' . esc_html ($_g["_s2member_res"]["type"]) . ' restrictions.';
60 ?>