aelia-currencyswitcher.cls.php
7 months ago
amp.cls.php
7 months ago
autoptimize.cls.php
7 months ago
avada.cls.php
7 months ago
bbpress.cls.php
7 months ago
beaver-builder.cls.php
7 months ago
caldera-forms.cls.php
7 months ago
divi-theme-builder.cls.php
7 months ago
elementor.cls.php
7 months ago
entry.inc.php
7 months ago
facetwp.cls.php
7 months ago
gravity-forms.cls.php
7 months ago
litespeed-check.cls.php
7 months ago
nextgengallery.cls.php
7 months ago
perfmatters.cls.php
7 months ago
theme-my-login.cls.php
7 months ago
user-switching.cls.php
7 months ago
wc-pdf-product-vouchers.cls.php
7 months ago
wcml.cls.php
7 months ago
woo-paypal.cls.php
7 months ago
woocommerce.cls.php
7 months ago
woocommerce.content.tpl.php
7 months ago
woocommerce.tab.tpl.php
7 months ago
wp-polls.cls.php
7 months ago
wp-postratings.cls.php
7 months ago
wpdiscuz.cls.php
7 months ago
wplister.cls.php
7 months ago
wpml.cls.php
7 months ago
wptouch.cls.php
7 months ago
yith-wishlist.cls.php
7 months ago
user-switching.cls.php
29 lines
| 1 | <?php |
| 2 | // phpcs:ignoreFile |
| 3 | /** |
| 4 | * The Third Party integration with User Switching. |
| 5 | * |
| 6 | * @since 3.0 |
| 7 | */ |
| 8 | namespace LiteSpeed\Thirdparty; |
| 9 | |
| 10 | defined('WPINC') || exit(); |
| 11 | |
| 12 | class User_Switching { |
| 13 | |
| 14 | public static function detect() { |
| 15 | if (!class_exists('user_switching')) { |
| 16 | return; |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * Register switch back URL nonce |
| 21 | * |
| 22 | * @since 3.0 @Robert Staddon |
| 23 | */ |
| 24 | if (function_exists('current_user_switched') && ($old_user = current_user_switched())) { |
| 25 | do_action('litespeed_nonce', 'switch_to_olduser_' . $old_user->ID); |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 |