Source Code Documentation


s2member\includes\classes\wp-footer.inc.php


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

s2member\includes\classes\wp-footer.inc.php

Source Code Documentation