PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 260917
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v260917
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 / src / includes / menu-pages / code-samples / api-mop-vars.x-php

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

56 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 -----------------------------------------------------------------------------------------------------------
2 Example redirection link with MOP Vars, in pseudo code:
3 -----------------------------------------------------------------------------------------------------------
4
5 s2Member's MOP Vars are now a double-dot (`..`) delimited list of six values.
6
7 .../membership-options-page/
8 ?_s2member_vars=[restriction type]..[requirement type]..[requirement type value]..
9 [seeking type]..[seeking type value]..[seeking URI base 64 encoded]
10
11 -----------------------------------------------------------------------------------------------------------
12
13 Here is a breakdown that explains each of the values:
14
15 * `[restriction type]` = A string. One of: `post|page|catg|ptag|file|ruri|ccap|sp|sys`
16 - The s2Member Restriction Type you've configured which is preventing access.
17 - Restriction Type `post` indicates that Post Access Restrictions triggered the redirection.
18 - Restriction Type `page` indicates that Page Access Restrictions triggered the redirection.
19 - Restriction Type `catg` indicates that Category Access Restrictions triggered the redirection.
20 - Restriction Type `ptag` indicates that Post Tag Access Restrictions triggered the redirection.
21 - Restriction Type `file` indicates that File Access Restrictions triggered the redirection.
22 - Restriction Type `ruri` indicates that Request URI Access Restrictions triggered the redirection.
23 - Restriction Type `ccap` indicates Custom Capability Restrictions triggered the redirection.
24 - Restriction Type `sp` indicates Specific Post/Page Access Restrictions triggered the redirection.
25 - Restriction Type `sys` indicates Systematic (i.e., something s2Member protects automatically).
26
27 * `[requirement type]` = A string. One of: `level|ccap|sp`
28 - Requirement Type `level` indicates that a Membership Level is required for access.
29 - Requirement Type `ccap` indicates that a Custom Capability is required for access.
30 - Requirement Type `sp` indicates that a Specific Post/Page purchase is required for access.
31
32 * `[requirement type value]` = A string. The Level, CCAP or Specific Post/Page ID required for access.
33 - This value correlates with `[requirement type]` to supply more specific information.
34 For instance, if `[requirement type]` is `level`, `[requirement type value]`
35 might be `1` to indicate that Level `1` is required for access.
36 - In the case of a CCAP, this will be set to the CCAP required for access.
37 - In the case of a Specific Post/Page, this is set to the Post/Page ID in WordPress.
38
39 * `[seeking type]` = A string. One of: `post|page|catg|ptag|file|ruri`
40 - This identifies the type of content a visitor was attempting to access.
41 A Post (`post`), Page (`page`), Category (`catg`), Post Tag (`ptag`), File (`file`),
42 or a Request URI (`ruri`) to indicate something that doesn't fall into any other classification.
43
44 * `[seeking type value]` = A string. A Post ID, Page ID, Category ID, Post Tag ID, File, or Request URI.
45 - This correlates with `[seeking type]` to supply more specific information.
46 For instance, if `[seeking type]` is `post`, this might be `123` to indicate the
47 visitor was attempting to access Post ID `123` in WordPress.
48 - File paths are relative to `/s2member-files/`, or your Amazon® S3 Bucket.
49 - Request URIs are base 64 encoded. Use PHP's `base64_decode()` to decode the value.
50
51 * `[seeking URI; base 64 encoded]` = A string. Base 64 encoded URI that a visitor was attempting to access.
52 - Request URIs are base 64 encoded. Use PHP's `base64_decode()` to decode the value.
53
54 -----------------------------------------------------------------------------------------------------------
55
56 * The use of MOP Vars is 100% completely optional (for advanced site owners).