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 / s2member-o.php

s2member-o.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 260917, at s2member-o.php

71 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // @codingStandardsIgnoreFile
3 /**
4 * WordPress with s2Member only.
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
16 * @since 110912
17 */
18 //260904.2255 A public health request proves that this exact PHP file is reachable, then exits before loading any s2Member or WordPress code.
19 if(isset($_GET['s2member_health_check']))
20 {
21 $ws_plugin__s2member_health_token = (isset($_GET['s2member_health_token'])) ? preg_replace('/[^a-zA-Z0-9_-]/', '', substr((string)$_GET['s2member_health_token'], 0, 80)) : '';
22 $ws_plugin__s2member_health_time = sprintf('%.6F', microtime(TRUE));
23 header('Content-Type: text/plain; charset=UTF-8');
24 header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
25 header('Pragma: no-cache');
26 header('X-s2Member-Loader: s2member-o'); //260910.0709 Keep the diagnostic identity aligned with the long-established s2member-o.php endpoint; the persisted loader option remains `s2o`.
27 header('X-s2Member-Health-Token: '.$ws_plugin__s2member_health_token);
28 header('X-s2Member-Health-Time: '.$ws_plugin__s2member_health_time);
29 echo 's2member-o-health:'.$ws_plugin__s2member_health_token.':'.$ws_plugin__s2member_health_time;
30 exit;
31 }
32
33 define ('_WS_PLUGIN__S2MEMBER_ONLY', TRUE);
34
35 include_once dirname(__FILE__).'/src/includes/classes/utils-s2o.inc.php';
36
37 if(($ws_plugin__s2member_o['wp_dir'] = c_ws_plugin__s2member_utils_s2o::wp_dir(dirname(__FILE__), dirname($_SERVER['SCRIPT_FILENAME']))))
38 {
39 if(($ws_plugin__s2member_o['wp_settings_as'] = c_ws_plugin__s2member_utils_s2o::wp_settings_as($ws_plugin__s2member_o['wp_dir'], __FILE__)))
40 {
41 /**
42 * Short initialization mode for WordPress.
43 *
44 * @package s2Member
45 * @since 110912
46 *
47 * @var bool
48 */
49 define ('SHORTINIT', TRUE);
50
51 /**
52 * Flag indicating only s2Member is being loaded.
53 *
54 * @package s2Member
55 * @since 110912
56 *
57 * @var bool
58 */
59 define ('WS_PLUGIN__S2MEMBER_ONLY', TRUE);
60
61 /*
62 Load WordPress.
63 */
64 require($ws_plugin__s2member_o['wp_dir'].'/wp-load.php');
65 eval ('?>'.$ws_plugin__s2member_o['wp_settings_as']);
66 }
67 else // Else fallback on full WordPress.
68 require($ws_plugin__s2member_o['wp_dir'].'/wp-load.php');
69 }
70 unset($ws_plugin__s2member_o);
71