| 1 |
<?php |
| 2 |
// @codingStandardsIgnoreFile |
| 3 |
/** |
| 4 |
* WordPress footer code. |
| 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\WP_Footer |
| 16 |
* @since 110524RC |
| 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_wp_footer')) |
| 22 |
{ |
| 23 |
/** |
| 24 |
* WordPress footer code. |
| 25 |
* |
| 26 |
* @package s2Member\WP_Footer |
| 27 |
* @since 110524RC |
| 28 |
*/ |
| 29 |
class c_ws_plugin__s2member_wp_footer |
| 30 |
{ |
| 31 |
/** |
| 32 |
* Generates footer code, when/if configured. |
| 33 |
* |
| 34 |
* @package s2Member\WP_Footer |
| 35 |
* @since 110524RC |
| 36 |
* |
| 37 |
* @return null |
| 38 |
*/ |
| 39 |
public static function wp_footer_code() |
| 40 |
{ |
| 41 |
do_action('ws_plugin__s2member_before_wp_footer_code', get_defined_vars()); |
| 42 |
|
| 43 |
if(($code = $GLOBALS['WS_PLUGIN__']['s2member']['o']['wp_footer_code'])) |
| 44 |
{ |
| 45 |
if(is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site()) |
| 46 |
{ |
| 47 |
echo do_shortcode($code)."\n"; |
| 48 |
} |
| 49 |
else // Otherwise, safe to allow PHP code. |
| 50 |
{ |
| 51 |
echo do_shortcode(c_ws_plugin__s2member_utilities::evl($code)); |
| 52 |
} |
| 53 |
} |
| 54 |
do_action('ws_plugin__s2member_after_wp_footer_code', get_defined_vars()); |
| 55 |
} |
| 56 |
} |
| 57 |
} |
| 58 |
|