Source Code Documentation


s2member\includes\classes\sc-s-badge-in.inc.php


  1. <?php
  2. /**
  3. * Shortcode for `[s2Member-Security-Badge /]` (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\Security_Badges
  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_sc_s_badge_in"))
  21. {
  22. /**
  23. * Shortcode for `[s2Member-Security-Badge /]` (inner processing routines).
  24. *
  25. * @package s2Member\Security_Badges
  26. * @since 110524RC
  27. */
  28. class c_ws_plugin__s2member_sc_s_badge_in
  29. {
  30. /**
  31. * Handles the Shortcode for: `[s2Member-Security-Badge /]`.
  32. *
  33. * @package s2Member\Security_Badges
  34. * @since 110524RC
  35. *
  36. * @attaches-to ``add_shortcode("s2Member-Security-Badge");``
  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 Resulting Security Badge code; HTML markup.
  42. */
  43. public static function sc_s_badge ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
  44. {
  45. foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
  46. do_action ("ws_plugin__s2member_before_sc_s_badge", get_defined_vars ());
  47. unset /* Unset defined __refs, __v. */ ($__refs, $__v);
  48.  
  49. $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr);
  50.  
  51. $attr = shortcode_atts (array ("v" => "1"), $attr); // One attribute.
  52.  
  53. $code = c_ws_plugin__s2member_utilities::s_badge_gen ($attr["v"], false, false);
  54.  
  55. return apply_filters ("ws_plugin__s2member_sc_s_badge", $code, get_defined_vars ());
  56. }
  57. }
  58. }
  59. ?>

s2member\includes\classes\sc-s-badge-in.inc.php

Source Code Documentation