Source Code Documentation


s2member\includes\classes\mo-page.inc.php


  1. <?php
  2. /**
  3. * Membership Options Page.
  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\Membership_Options_Page
  15. * @since 3.5
  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_mo_page"))
  21. {
  22. /**
  23. * Membership Options Page.
  24. *
  25. * @package s2Member\Membership_Options_Page
  26. * @since 3.5
  27. */
  28. class c_ws_plugin__s2member_mo_page
  29. {
  30. /**
  31. * Forces a redirection to the Membership Options Page for s2Member.
  32. *
  33. * This can be used by 3rd party apps that are not aware of which Page is currently set as the Membership Options Page.
  34. * Example usage: `http://example.com/?s2member_membership_options_page=1`
  35. *
  36. * @package s2Member\Membership_Options_Page
  37. * @since 3.5
  38. *
  39. * @attaches-to ``add_action("init");``
  40. *
  41. * @return null|inner Return-value of inner routine.
  42. */
  43. public static function membership_options_page ()
  44. {
  45. if (!empty ($_GET["s2member_membership_options_page"]))
  46. {
  47. return c_ws_plugin__s2member_mo_page_in::membership_options_page ();
  48. }
  49. }
  50. /**
  51. * Redirects to Membership Options Page w/ MOP Vars.
  52. *
  53. * @package s2Member\Membership_Options_Page
  54. * @since 111101
  55. *
  56. * @param str $seeking_type Seeking content type. One of: `post|page|catg|ptag|file|ruri`.
  57. * @param str|int $seeking_type_value Seeking content type data. String, or a Post/Page ID.
  58. * @param str $req_type Access requirement type. One of these values: `level|ccap|sp`.
  59. * @param str|int $req_type_value Access requirement. String, or a Post/Page ID.
  60. * @param str $seeking_uri The full URI that access was attempted on.
  61. * @param str $res_type Restriction type that's preventing access.
  62. * One of: `post|page|catg|ptag|file|ruri|ccap|sp|sys`.
  63. * Defaults to ``$seeking_type``.
  64. * @return inner Return-value of inner routine.
  65. */
  66. public static function wp_redirect_w_mop_vars ($seeking_type = FALSE, $seeking_type_value = FALSE, $req_type = FALSE, $req_type_value = FALSE, $seeking_uri = FALSE, $res_type = FALSE)
  67. {
  68. return c_ws_plugin__s2member_mo_page_in::wp_redirect_w_mop_vars ($seeking_type, $seeking_type_value, $req_type, $req_type_value, $seeking_uri, $res_type);
  69. }
  70. }
  71. }
  72. ?>

s2member\includes\classes\mo-page.inc.php

Source Code Documentation