Source Code Documentation


s2member\includes\classes\sc-files.inc.php


  1. <?php
  2. /**
  3. * Shortcode `[s2File /]`.
  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\s2File
  15. * @since 110926
  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_files"))
  21. {
  22. /**
  23. * Shortcode `[s2File /]`.
  24. *
  25. * @package s2Member\s2File
  26. * @since 110926
  27. */
  28. class c_ws_plugin__s2member_sc_files
  29. {
  30. /**
  31. * Handles the Shortcode for: `[s2File /]`.
  32. *
  33. * @package s2Member\s2File
  34. * @since 110926
  35. *
  36. * @attaches-to ``add_shortcode("s2File");``
  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 File Download URL, or null on failure.
  42. */
  43. public static function sc_get_file($attr = FALSE, $content = FALSE, $shortcode = FALSE)
  44. {
  45. return c_ws_plugin__s2member_sc_files_in::sc_get_file($attr, $content, $shortcode);
  46. }
  47. /**
  48. * Handles the Shortcode for: `[s2Stream /]`.
  49. *
  50. * @package s2Member\s2File
  51. * @since 130119
  52. *
  53. * @attaches-to ``add_shortcode("s2Stream");``
  54. *
  55. * @param array $attr An array of Attributes.
  56. * @param str $content Content inside the Shortcode.
  57. * @param str $shortcode The actual Shortcode name itself.
  58. * @return str HTML markup that produces an audio/video stream for a specific player.
  59. */
  60. public static function sc_get_stream($attr = FALSE, $content = FALSE, $shortcode = FALSE)
  61. {
  62. return c_ws_plugin__s2member_sc_files_in::sc_get_stream($attr, $content, $shortcode);
  63. }
  64. }
  65. }
  66. ?>

s2member\includes\classes\sc-files.inc.php

Source Code Documentation