PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 111017
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v111017
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 / classes / sc-keys-in.inc.php

sc-keys-in.inc.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 111017, at includes/classes/sc-keys-in.inc.php

64 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Shortcode `[s2Key /]` ( inner processing routines ).
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\s2Key
15 * @since 110912
16 */
17 if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18 exit ("Do not access this file directly.");
19 /**/
20 if (!class_exists ("c_ws_plugin__s2member_sc_keys_in"))
21 {
22 /**
23 * Shortcode `[s2Key /]` ( inner processing routines ).
24 *
25 * @package s2Member\s2Key
26 * @since 110912
27 */
28 class c_ws_plugin__s2member_sc_keys_in
29 {
30 /**
31 * Handles the Shortcode for: `[s2Key /]`.
32 *
33 * @package s2Member\s2Key
34 * @since 110912
35 *
36 * @attaches-to: ``add_shortcode("s2Key");``
37 *
38 * @param array $attr An array of Attributes.
39 * @param str $content Content inside the Shortcode.
40 * @param str $shortcode The actual Shortcode name itself.
41 * @return str Value of the requested key, or null on failure.
42 */
43 public static function sc_get_key ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
44 {
45 eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
46 do_action ("ws_plugin__s2member_before_sc_get_key", get_defined_vars ());
47 unset ($__refs, $__v); /* Unset defined __refs, __v. */
48 /**/
49 $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr);
50 /**/
51 $attr = shortcode_atts (array ("file_download" => "", "directive" => ""), $attr);
52 /**/
53 eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
54 do_action ("ws_plugin__s2member_before_sc_get_key_after_shortcode_atts", get_defined_vars ());
55 unset ($__refs, $__v); /* Unset defined __refs, __v. */
56 /**/
57 if ($attr["file_download"]) /* Requesting a File Download Key? */
58 $get = c_ws_plugin__s2member_files::file_download_key ($attr["file_download"], $attr["directive"]);
59 /**/
60 return apply_filters ("ws_plugin__s2member_sc_get_key", ((isset ($get)) ? $get : null), get_defined_vars ());
61 }
62 }
63 }
64 ?>