PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / trunk
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions vtrunk
260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 120213 120219 120301 All 187 releases
s2member / src / includes / classes / mo-page.inc.php

mo-page.inc.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions trunk, at src/includes/classes/mo-page.inc.php

87 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // @codingStandardsIgnoreFile
3 /**
4 * Membership Options Page.
5 *
6 * Copyright: © 2009-2011
7 * {@link http://websharks-inc.com/ WebSharks, Inc.}
8 * (coded in the USA)
9 *
10 * Released under the terms of the GNU General Public License.
11 * You should have received a copy of the GNU General Public License,
12 * along with this software. In the main directory, see: /licensing/
13 * If not, see: {@link http://www.gnu.org/licenses/}.
14 *
15 * @package s2Member\Membership_Options_Page
16 * @since 3.5
17 */
18 if(!defined('WPINC')) // MUST have WordPress.
19 exit ("Do not access this file directly.");
20
21 if(!class_exists("c_ws_plugin__s2member_mo_page"))
22 {
23 /**
24 * Membership Options Page.
25 *
26 * @package s2Member\Membership_Options_Page
27 * @since 3.5
28 */
29 class c_ws_plugin__s2member_mo_page
30 {
31 /**
32 * Forces a redirection to the Membership Options Page for s2Member.
33 *
34 * This can be used by 3rd party apps that are not aware of which Page is currently set as the Membership Options Page.
35 * Example usage: `http://example.com/?s2member_membership_options_page=1`
36 *
37 * @package s2Member\Membership_Options_Page
38 * @since 3.5
39 *
40 * @attaches-to ``add_action("init");``
41 *
42 * @return null|inner Return-value of inner routine.
43 */
44 public static function membership_options_page()
45 {
46 if(!empty($_GET["s2member_membership_options_page"]))
47 {
48 return c_ws_plugin__s2member_mo_page_in::membership_options_page();
49 }
50 }
51
52 /**
53 * Redirects to Membership Options Page w/ MOP Vars.
54 *
55 * @package s2Member\Membership_Options_Page
56 * @since 111101
57 *
58 * @param string $seeking_type Seeking content type. One of: `post|page|catg|ptag|file|ruri`.
59 * @param string|int $seeking_type_value Seeking content type data. String, or a Post/Page ID.
60 * @param string $req_type Access requirement type. One of these values: `level|ccap|sp`.
61 * @param string|int $req_type_value Access requirement. String, or a Post/Page ID.
62 * @param string $seeking_uri The full URI that access was attempted on.
63 * @param string $res_type Restriction type that's preventing access.
64 * One of: `post|page|catg|ptag|file|ruri|ccap|sp|sys`.
65 * Defaults to ``$seeking_type``.
66 *
67 * @return bool Return-value of inner routine.
68 */
69 public static function wp_redirect_w_mop_vars($seeking_type = FALSE, $seeking_type_value = FALSE, $req_type = FALSE, $req_type_value = FALSE, $seeking_uri = FALSE, $res_type = FALSE)
70 {
71 return c_ws_plugin__s2member_mo_page_in::wp_redirect_w_mop_vars($seeking_type, $seeking_type_value, $req_type, $req_type_value, $seeking_uri, $res_type);
72 }
73
74 /*
75 * s2Member's MOP Vars are now a double-dot (`..`) delimited list of six values.
76 *
77 * e.g., .../membership-options-page/
78 * ?_s2member_vars=[restriction type]..[requirement type]..[requirement type value]..
79 * [seeking type]..[seeking type value]..[seeking URI base 64 encoded]
80 */
81 public static function back_compat_mop_vars()
82 {
83 return c_ws_plugin__s2member_mo_page_in::back_compat_mop_vars();
84 }
85 }
86 }
87