PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 110912
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v110912
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 / dropins / mu-plugins / s2member-o.php

s2member-o.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 110912, at includes/dropins/mu-plugins/s2member-o.php

73 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WordPress® with s2Member only.
4 *
5 * Copyright: © 2009-2011
6 * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7 * ( coded in the USA )
8 *
9 * Released under the terms of the GNU General Public License.
10 * You should have received a copy of the GNU General Public License,
11 * along with this software. In the main directory, see: /licensing/
12 * If not, see: {@link http://www.gnu.org/licenses/}.
13 *
14 * @package s2Member\Only
15 * @since 110912
16 */
17 if (!empty ($_GET["s2member_only"]) && /* Not in admin panels. */ !is_admin ())
18 {
19 if (!class_exists ("c_ws_plugin__s2member_only"))
20 {
21 /**
22 * WordPress® with s2Member only.
23 *
24 * @package s2Member\Only
25 * @since 110912
26 */
27 class c_ws_plugin__s2member_only
28 {
29 /*
30 * s2Member plugin only, filter.
31 *
32 * The `%s2member%` Replacement Code is filled before
33 * this file is copied into the `/mu-plugins/` directory for WordPress®.
34 *
35 * @package s2Member\Only
36 * @since 110912
37 *
38 * @return array Array with s2Member plugin only.
39 */
40 function filter () /* s2Member plugin only. */
41 {
42 return array ("%%s2member%%");
43 }
44 /*
45 * s2Member only, if active.
46 *
47 * The `%s2member%` Replacement Code is filled before
48 * this file is copied into the `/mu-plugins/` directory for WordPress®.
49 *
50 * @package s2Member\Only
51 * @since 110912
52 *
53 * @return null
54 */
55 function if_active () /* s2Member only, if active. */
56 {
57 $active_plugins = is_multisite () ? wp_get_active_network_plugins () : array ();
58 $active_plugins = array_merge ($active_plugins, wp_get_active_and_valid_plugins ());
59 /**/
60 if (in_array (WP_PLUGIN_DIR . "/%%s2member%%", $active_plugins) && !is_admin ())
61 {
62 add_filter ("pre_site_option_active_sitewide_plugins", "c_ws_plugin__s2member_only::filter", 100);
63 add_filter ("pre_option_active_plugins", "c_ws_plugin__s2member_only::filter", 100);
64 }
65 /**/
66 return; /* Return for uniformity. */
67 }
68 }
69 }
70 /**/
71 c_ws_plugin__s2member_only::if_active (); /* s2Member only, if active. */
72 }
73 ?>