| 1 |
<?php |
| 2 |
/** |
| 3 |
* Login redirect removals. |
| 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\Login_Redirects |
| 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_login_redirects_r")) |
| 21 |
{ |
| 22 |
/** |
| 23 |
* Login redirect removals. |
| 24 |
* |
| 25 |
* @package s2Member\Login_Redirects |
| 26 |
* @since 3.5 |
| 27 |
*/ |
| 28 |
class c_ws_plugin__s2member_login_redirects_r |
| 29 |
{ |
| 30 |
/** |
| 31 |
* Removes ``login_redirect`` Filters to prevent conflicts with s2Member. |
| 32 |
* |
| 33 |
* @attaches-to: ``add_action("init");`` |
| 34 |
* |
| 35 |
* @package s2Member\Login_Redirects |
| 36 |
* @since 3.5 |
| 37 |
* |
| 38 |
* @return null |
| 39 |
*/ |
| 40 |
public static function remove_login_redirect_filters () /* For compatibility. */ |
| 41 |
{ |
| 42 |
do_action ("ws_plugin__s2member_before_remove_login_redirect_filters", get_defined_vars ()); |
| 43 |
/**/ |
| 44 |
if (!apply_filters ("ws_plugin__s2member_allow_other_login_redirect_filters", false, get_defined_vars ())) |
| 45 |
remove_all_filters("login_redirect"); /* Removes all `login_redirect` Filters. */ |
| 46 |
/**/ |
| 47 |
do_action ("ws_plugin__s2member_after_remove_login_redirect_filters", get_defined_vars ()); |
| 48 |
/**/ |
| 49 |
return; /* Return for uniformity. */ |
| 50 |
} |
| 51 |
} |
| 52 |
} |
| 53 |
?> |